diff options
author | Peter Mikus <pmikus@cisco.com> | 2022-02-09 09:58:09 +0100 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2022-02-09 08:59:07 +0000 |
commit | 0bbb81c4fd1afdee6eb23ba4d49171d8dced6b19 (patch) | |
tree | cf806d4fdcad01bcf8115f6784847f0fdc765363 /fdio.infra.terraform/1n_nmd/alertmanager/variables.tf | |
parent | 0576c4293e05b1eded486b48a217495451a8b685 (diff) |
feat(terraform): Refactor Alertmanager
- prepare for ETL
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Change-Id: I8931f76f78b5acee39716398b92e4b107d399773
Diffstat (limited to 'fdio.infra.terraform/1n_nmd/alertmanager/variables.tf')
-rw-r--r-- | fdio.infra.terraform/1n_nmd/alertmanager/variables.tf | 131 |
1 files changed, 93 insertions, 38 deletions
diff --git a/fdio.infra.terraform/1n_nmd/alertmanager/variables.tf b/fdio.infra.terraform/1n_nmd/alertmanager/variables.tf index e24ceb64c6..e452598fa6 100644 --- a/fdio.infra.terraform/1n_nmd/alertmanager/variables.tf +++ b/fdio.infra.terraform/1n_nmd/alertmanager/variables.tf @@ -1,43 +1,102 @@ # Nomad -variable "nomad_datacenters" { - description = "Nomad data centers" +variable "datacenters" { + description = "Specifies the list of DCs to be considered placing this task" type = list(string) default = ["dc1"] } -# Alermanager -variable "alertmanager_job_name" { - description = "Job name" +variable "region" { + description = "Specifies the list of DCs to be considered placing this task" type = string - default = "alertmanager" + default = "global" +} + +variable "volume_source" { + description = "The name of the volume to request" + type = string + default = "persistence" +} + +# Alertmanager +variable "am_version" { + description = "Alertmanager version" + type = string + default = "0.21.0" +} + +variable "auto_promote" { + description = "Specifies if the job should auto-promote to the canary version" + type = bool + default = true +} + +variable "auto_revert" { + description = "Specifies if the job should auto-revert to the last stable job" + type = bool + default = true } -variable "alertmanager_group_count" { - description = "Number of group instances" +variable "canary" { + description = "Equal to the count of the task group allows blue/green depl." type = number default = 1 } -variable "alertmanager_service_name" { - description = "Service name" +variable "cpu" { + description = "CPU allocation" + type = number + default = 1000 +} + +variable "group_count" { + description = "Specifies the number of the task groups running under this one" + type = number + default = 1 +} + +variable "job_name" { + description = "Specifies a name for the job" type = string default = "alertmanager" } -variable "alertmanager_version" { - description = "Version" +variable "max_parallel" { + description = "Specifies the maximum number of updates to perform in parallel" + type = number + default = 1 +} + +variable "memory" { + description = "Specifies the memory required in MB" + type = number + default = 1024 +} + +variable "port" { + description = "Specifies the static TCP/UDP port to allocate" + type = number + default = 9093 +} + +variable "service_name" { + description = "Specifies the name this service will be advertised in Consul" type = string - default = "0.21.0" + default = "alertmanager" } -variable "alertmanager_use_canary" { +variable "use_canary" { description = "Uses canary deployment" type = bool + default = true +} + +variable "use_host_volume" { + description = "Use Nomad host volume feature" + type = bool default = false } -variable "alertmanager_vault_secret" { - description = "Set of properties to be able to fetch secret from vault" +variable "vault_secret" { type = object({ use_vault_provider = bool, vault_kv_policy_name = string, @@ -45,57 +104,53 @@ variable "alertmanager_vault_secret" { vault_kv_field_access_key = string, vault_kv_field_secret_key = string }) + description = "Set of properties to be able to fetch secret from vault." + default = { + use_vault_provider = false + vault_kv_policy_name = "kv" + vault_kv_path = "secret/data/alertmanager" + vault_kv_field_access_key = "access_key" + vault_kv_field_secret_key = "secret_key" + } } -variable "alertmanager_cpu" { - description = "CPU allocation" - type = number - default = 1000 -} - -variable "alertmanager_mem" { - description = "RAM allocation" - type = number - default = 1024 -} - -variable "alertmanager_port" { - description = "TCP allocation" - type = number - default = 9093 +variable "volume_destination" { + description = "Specifies where the volume should be mounted inside the task" + type = string + default = "/data/" } -variable "alertmanager_slack_jenkins_api_key" { +variable "slack_jenkins_api_key" { description = "Alertmanager jenkins slack API key" type = string default = "XXXXXXXXX/XXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX" } -variable "alertmanager_slack_jenkins_receiver" { +variable "slack_jenkins_receiver" { description = "Alertmanager jenkins slack receiver" type = string default = "jenkins-slack-receiver" } -variable "alertmanager_slack_jenkins_channel" { +variable "slack_jenkins_channel" { description = "Alertmanager jenkins slack channel" type = string default = "jenkins-channel" } -variable "alertmanager_slack_default_api_key" { +variable "slack_default_api_key" { description = "Alertmanager default slack API key" type = string default = "XXXXXXXXX/XXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX" } -variable "alertmanager_slack_default_receiver" { +variable "slack_default_receiver" { description = "Alertmanager default slack receiver" type = string default = "default-slack-receiver" } -variable "alertmanager_slack_default_channel" { +variable "slack_default_channel" { description = "Alertmanager default slack channel" type = string default = "default-channel" |