diff --git a/main.tf b/main.tf index 51b5bf9..268b800 100644 --- a/main.tf +++ b/main.tf @@ -1,9 +1,10 @@ module "datadog_integration" { source = "cloudposse/datadog-integration/aws" version = "0.11.0" - namespace = "plaap" - stage = "test" - name = "datadog-integration" + for_each = var.aws_accounts + namespace = "${each.value.namespace}" + stage = "${each.value.environment}" + name = "datadog-integration-${each.value.prefix_slug}-${each.value.team}-${each.value.environment}" integrations = [ "all" ] } diff --git a/variables.tf b/variables.tf index af04660..35ba323 100644 --- a/variables.tf +++ b/variables.tf @@ -24,10 +24,34 @@ variable "aws_profile" { description = "Which AWS account is this for" } -variable "prefix_slug" { - type = string +variable "aws_accounts" { + description = "Map of AWS accounts to configuration." + type = map + default = { + vnn-bingel-prd = { + aws_account_id = "", + namespace = "datadog", + environment = "prd", + prefix_slug = "vnn", + region = "eu-west-1", + team = "bingel" + }, + vnn-dbw-prd = { + aws_account_id = "", + namespace = "datadog", + environment = "prd", + prefix_slug = "vnn", + region = "eu-west-1", + team = "dbw" + } + mbg-sesame-prd = { + aws_account_id = "", + namespace = "datadog", + environment = "prd", + prefix_slug = "mbg", + region = "eu-west-1", + team = "sesame" + } + } } -variable "team" { - type = string -}