From 960a8e3fb02b8e8080b7d48bd64c6fcfcff24fe7 Mon Sep 17 00:00:00 2001 From: Sam Ainsworth Date: Wed, 1 Nov 2023 16:02:54 +0000 Subject: [PATCH 1/2] Revert "UML-3155 Enable account resources in eu-west-2 (#2393)" This reverts commit 7360b015c89a3f3f3d7376ae7188b29582c69b08. --- terraform/account/region.tf | 19 ------------------- terraform/account/region/cloudwatch.tf | 2 +- terraform/environment/shared_data_sources.tf | 2 +- terraform/environment/terraform.tf | 13 ------------- 4 files changed, 2 insertions(+), 34 deletions(-) diff --git a/terraform/account/region.tf b/terraform/account/region.tf index cff755a8d4..6e56333c4f 100644 --- a/terraform/account/region.tf +++ b/terraform/account/region.tf @@ -16,22 +16,3 @@ module "eu_west_1" { aws.shared = aws.shared } } - -module "eu_west_2" { - source = "./region" - - account = local.account - account_name = local.account_name - environment_name = local.environment - lambda_container_version = var.lambda_container_version - - depends_on = [ - module.cloudwatch_mrk, - ] - - providers = { - aws.region = aws.eu_west_2 - aws.management = aws.management - aws.shared = aws.shared - } -} diff --git a/terraform/account/region/cloudwatch.tf b/terraform/account/region/cloudwatch.tf index 028b14aa83..625ace500a 100644 --- a/terraform/account/region/cloudwatch.tf +++ b/terraform/account/region/cloudwatch.tf @@ -10,7 +10,7 @@ resource "aws_cloudwatch_log_group" "use-an-lpa" { } data "aws_kms_alias" "cloudwatch_mrk" { - name = "alias/cloudwatch-encryption-mrk" + name = "alias/cloudwatch_encryption" provider = aws.region } diff --git a/terraform/environment/shared_data_sources.tf b/terraform/environment/shared_data_sources.tf index 7e4b04f517..628544755f 100644 --- a/terraform/environment/shared_data_sources.tf +++ b/terraform/environment/shared_data_sources.tf @@ -65,7 +65,7 @@ data "aws_kms_alias" "pagerduty_sns" { } data "aws_kms_alias" "cloudwatch_encryption" { - name = "alias/cloudwatch-encryption-mrk" + name = "alias/cloudwatch_encryption" } //-------------------- diff --git a/terraform/environment/terraform.tf b/terraform/environment/terraform.tf index 883e1b3c29..d7d989c3d9 100644 --- a/terraform/environment/terraform.tf +++ b/terraform/environment/terraform.tf @@ -59,19 +59,6 @@ provider "aws" { } } -provider "aws" { - region = "eu-west-2" - alias = "eu_west_2" - default_tags { - tags = local.default_tags - } - assume_role { - role_arn = "arn:aws:iam::${local.environment.account_id}:role/${var.default_role}" - session_name = "terraform-session" - } -} - - provider "aws" { region = "us-east-1" alias = "us-east-1" From cdf87861d7d9310b61d0a03c0f499a77e87a1c6f Mon Sep 17 00:00:00 2001 From: Sam Ainsworth Date: Wed, 1 Nov 2023 17:25:38 +0000 Subject: [PATCH 2/2] Don't revert secret --- terraform/account/region/cloudwatch.tf | 2 +- terraform/environment/region/data_sources.tf | 2 +- terraform/environment/shared_data_sources.tf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/terraform/account/region/cloudwatch.tf b/terraform/account/region/cloudwatch.tf index 625ace500a..028b14aa83 100644 --- a/terraform/account/region/cloudwatch.tf +++ b/terraform/account/region/cloudwatch.tf @@ -10,7 +10,7 @@ resource "aws_cloudwatch_log_group" "use-an-lpa" { } data "aws_kms_alias" "cloudwatch_mrk" { - name = "alias/cloudwatch_encryption" + name = "alias/cloudwatch-encryption-mrk" provider = aws.region } diff --git a/terraform/environment/region/data_sources.tf b/terraform/environment/region/data_sources.tf index c35b917b00..0c9d224d42 100644 --- a/terraform/environment/region/data_sources.tf +++ b/terraform/environment/region/data_sources.tf @@ -56,7 +56,7 @@ data "aws_kms_alias" "pagerduty_sns" { } data "aws_kms_alias" "cloudwatch_encryption" { - name = "alias/cloudwatch_encryption" + name = "alias/cloudwatch-encryption-mrk" provider = aws.region } diff --git a/terraform/environment/shared_data_sources.tf b/terraform/environment/shared_data_sources.tf index 628544755f..7e4b04f517 100644 --- a/terraform/environment/shared_data_sources.tf +++ b/terraform/environment/shared_data_sources.tf @@ -65,7 +65,7 @@ data "aws_kms_alias" "pagerduty_sns" { } data "aws_kms_alias" "cloudwatch_encryption" { - name = "alias/cloudwatch_encryption" + name = "alias/cloudwatch-encryption-mrk" } //--------------------