diff --git a/terraform/environments/apex/application_variables.json b/terraform/environments/apex/application_variables.json index ec2100f0197..e099f7fe5c2 100644 --- a/terraform/environments/apex/application_variables.json +++ b/terraform/environments/apex/application_variables.json @@ -49,7 +49,8 @@ "alb_elb_5xx_alarm_threshold": "10", "alb_target_4xx_alarm_threshold": "10", "alb_elb_4xx_alarm_threshold": "10", - "oas_lz_cidr": "10.202.4.85/32" + "oas_lz_cidr": "10.202.4.85/32", + "lz_account_id": "411213865113" }, "test": { "ec2amiid": "ami-00b96c3ab7b1106b4", @@ -98,7 +99,8 @@ "alb_elb_5xx_alarm_threshold": "10", "alb_target_4xx_alarm_threshold": "10", "alb_elb_4xx_alarm_threshold": "10", - "oas_lz_cidr": "10.206.4.156/32" + "oas_lz_cidr": "10.206.4.156/32", + "lz_account_id": "140455166311" }, "preproduction": { "ec2amiid": "ami-0cbc8c735c4f995b2", @@ -147,7 +149,8 @@ "alb_elb_5xx_alarm_threshold": "10", "alb_target_4xx_alarm_threshold": "10", "alb_elb_4xx_alarm_threshold": "10", - "oas_lz_cidr": "10.206.4.156/32" + "oas_lz_cidr": "10.206.4.156/32", + "lz_account_id": "484221692666" }, "production": { "example_var": "production-data", diff --git a/terraform/environments/apex/backups.tf b/terraform/environments/apex/backups.tf index a611e3196db..9fa237b1460 100644 --- a/terraform/environments/apex/backups.tf +++ b/terraform/environments/apex/backups.tf @@ -3,10 +3,6 @@ ## Resources here can be removed after data migration ############################################################################ -locals { - lz_account_id = "411213865113" -} - resource "aws_backup_vault" "apex" { name = "${local.application_name}-backup-vault" tags = merge( @@ -44,7 +40,7 @@ data "aws_iam_policy_document" "apex" { principals { type = "AWS" - identifiers = ["arn:aws:iam::${local.lz_account_id}:root"] + identifiers = ["arn:aws:iam::${local.application_data.accounts[local.environment].lz_account_id}:root"] } actions = [