Skip to content

Commit

Permalink
UML-3155 Enable account resources in eu-west-2 (#2393)
Browse files Browse the repository at this point in the history
* UML-3155 Enable account resources in eu-west-2
  • Loading branch information
Sam Ainsworth authored Nov 1, 2023
1 parent 35cd031 commit 7360b01
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
19 changes: 19 additions & 0 deletions terraform/account/region.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,22 @@ 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
}
}
2 changes: 1 addition & 1 deletion terraform/account/region/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion terraform/environment/shared_data_sources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

//--------------------
Expand Down
13 changes: 13 additions & 0 deletions terraform/environment/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ 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"
Expand Down

0 comments on commit 7360b01

Please sign in to comment.