Skip to content

Commit

Permalink
MLPAB-2189 - Create a replicated secret in management account (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpearce-digital authored Jun 26, 2024
1 parent f7a4abe commit 0b9615d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions terraform/account/data_sources.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
data "aws_default_tags" "default" {
provider = aws.eu_west_1
}

data "aws_region" "eu_west_1" {
provider = aws.eu_west_1
}

data "aws_region" "eu_west_2" {
provider = aws.eu_west_2
}
8 changes: 8 additions & 0 deletions terraform/account/secrets.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
resource "aws_secretsmanager_secret" "jwt_key" {
name = "${data.aws_default_tags.default.tags.application}/${data.aws_default_tags.default.tags.account}/jwt-key"
description = "JWT key for ${data.aws_default_tags.default.tags.application} in ${data.aws_default_tags.default.tags.account}, for use with Make and Register, and Use a LPA"
replica {
region = data.aws_region.eu_west_2.name
}
provider = aws.management_eu_west_1
}

0 comments on commit 0b9615d

Please sign in to comment.