aboutsummaryrefslogtreecommitdiffstats
path: root/terraform-ci-infra/1n_nmd/alertmanager
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2021-01-29 10:03:46 +0000
committerpmikus <pmikus@cisco.com>2021-01-29 10:03:46 +0000
commit993696b15c5f5b63c5d206fd9cc9b32c4af4e2dd (patch)
tree003ad067f319e14ef5dca6e8af591fa22f35c5d4 /terraform-ci-infra/1n_nmd/alertmanager
parenta44eef233de959c5679602dc6cd1ed866d6abc14 (diff)
Fix: Slack key workaround
- Todo: Deploy hashi vault. Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: Ib02f00039bd4cbb4725ea3fec56184b7928208ad
Diffstat (limited to 'terraform-ci-infra/1n_nmd/alertmanager')
-rw-r--r--terraform-ci-infra/1n_nmd/alertmanager/conf/nomad/alertmanager.hcl2
-rw-r--r--terraform-ci-infra/1n_nmd/alertmanager/main.tf2
-rw-r--r--terraform-ci-infra/1n_nmd/alertmanager/variables.tf6
3 files changed, 5 insertions, 5 deletions
diff --git a/terraform-ci-infra/1n_nmd/alertmanager/conf/nomad/alertmanager.hcl b/terraform-ci-infra/1n_nmd/alertmanager/conf/nomad/alertmanager.hcl
index 4560cf07ab..b8a9df4985 100644
--- a/terraform-ci-infra/1n_nmd/alertmanager/conf/nomad/alertmanager.hcl
+++ b/terraform-ci-infra/1n_nmd/alertmanager/conf/nomad/alertmanager.hcl
@@ -162,7 +162,7 @@ job "${job_name}" {
data = <<EOH
global:
# The API URL to use for Slack notifications.
- slack_api_url: '${slack_api_url}'
+ slack_api_url: 'https://hooks.slack.com/services/${slack_api_key}'
# The directory from which notification templates are read.
templates:
diff --git a/terraform-ci-infra/1n_nmd/alertmanager/main.tf b/terraform-ci-infra/1n_nmd/alertmanager/main.tf
index 411c78a558..8307601669 100644
--- a/terraform-ci-infra/1n_nmd/alertmanager/main.tf
+++ b/terraform-ci-infra/1n_nmd/alertmanager/main.tf
@@ -25,7 +25,7 @@ data "template_file" "nomad_job_alertmanager" {
cpu = var.alertmanager_cpu
mem = var.alertmanager_mem
port = var.alertmanager_port
- slack_api_url = var.alertmanager_slack_api_url
+ slack_api_key = var.alertmanager_slack_api_key
slack_channel = var.alertmanager_slack_channel
default_receiver = var.alertmanager_default_receiver
}
diff --git a/terraform-ci-infra/1n_nmd/alertmanager/variables.tf b/terraform-ci-infra/1n_nmd/alertmanager/variables.tf
index ebd862123d..152530b96d 100644
--- a/terraform-ci-infra/1n_nmd/alertmanager/variables.tf
+++ b/terraform-ci-infra/1n_nmd/alertmanager/variables.tf
@@ -71,10 +71,10 @@ variable "alertmanager_default_receiver" {
default = "default-receiver"
}
-variable "alertmanager_slack_api_url" {
- description = "Alertmanager slack API URL"
+variable "alertmanager_slack_api_key" {
+ description = "Alertmanager slack API key"
type = string
- default = "https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX"
+ default = "XXXXXXXXX/XXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX"
}
variable "alertmanager_slack_channel" {