Skip to content

Commit

Permalink
Merge pull request #18 from NHSDigital/CCM-5680_SupportDedicatedDevEn…
Browse files Browse the repository at this point in the history
…vBranchFix

CCM-5680 Support dedicated dev env branches
  • Loading branch information
aidenvaines-bjss authored Aug 5, 2024
2 parents 7740757 + 3a11419 commit 4f627ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
3 changes: 3 additions & 0 deletions infrastructure/terraform/components/branch/locals.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
locals {
dns_prefix = "${var.environment}.${local.iam.amplify["domain_name"]}"
}
19 changes: 0 additions & 19 deletions infrastructure/terraform/components/branch/locals_remote_state.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
locals {
bootstrap = data.terraform_remote_state.bootstrap.outputs
acct = data.terraform_remote_state.acct.outputs
iam = data.terraform_remote_state.iam.outputs
}

Expand All @@ -22,24 +21,6 @@ data "terraform_remote_state" "bootstrap" {
}
}

data "terraform_remote_state" "acct" {
backend = "s3"

config = {
bucket = local.terraform_state_bucket

key = format(
"%s/%s/%s/%s/acct.tfstate",
var.project,
var.aws_account_id,
"eu-west-2",
"main"
)

region = "eu-west-2"
}
}

data "terraform_remote_state" "iam" {
backend = "s3"

Expand Down
3 changes: 2 additions & 1 deletion infrastructure/terraform/components/iam/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ output "cognito_user_pool_client" {

output "amplify" {
value = {
id = aws_amplify_app.main.id
id = aws_amplify_app.main.id
domain_name = local.dns_prefix
}
}

0 comments on commit 4f627ff

Please sign in to comment.