From 91202ff3d87e4c5c24c02f70b248c56a51458eba Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 6 Apr 2026 13:39:50 -0400 Subject: [PATCH] fix: dynamic paths in rendered_files + HTTPS module source for CodeBuild - Replace placeholder paths (environment/region/vpc/cluster/) with var.environment / var.region / var.cluster_config.vpc_name / var.name so managed_extra_files land in the correct Terragrunt hierarchy - Change CSVD/terraform-github-repo source from SSH (git@) to HTTPS (git::https://) to work inside CodeBuild without SSH agent --- main.tf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.tf b/main.tf index 2400cf3..1670613 100644 --- a/main.tf +++ b/main.tf @@ -33,23 +33,23 @@ locals { "root.hcl" : templatefile("${path.module}/templates/root.hcl.tf.tpl", { environment = var.environment }), - "environment/account.hcl" : templatefile("${path.module}/templates/account.hcl.tf.tpl", { + "${var.environment}/account.hcl" : templatefile("${path.module}/templates/account.hcl.tf.tpl", { account_name = var.cluster_config.account_name, aws_account_id = var.cluster_config.aws_account_id, environment = var.environment, environment_abbr = var.cluster_config.environment_abbr }), - "environment/region/region.hcl" : templatefile("${path.module}/templates/region.hcl.tf.tpl", { + "${var.environment}/${var.region}/region.hcl" : templatefile("${path.module}/templates/region.hcl.tf.tpl", { aws_region = var.region, environment = var.environment }), - "environment/region/vpc/vpc.hcl" : templatefile("${path.module}/templates/vpc.hcl.tf.tpl", { + "${var.environment}/${var.region}/${var.cluster_config.vpc_name}/vpc.hcl" : templatefile("${path.module}/templates/vpc.hcl.tf.tpl", { vpc_name = var.cluster_config.vpc_name, vpc_domain_name = var.cluster_config.vpc_domain_name, environment = var.environment, aws_region = var.region }), - "environment/region/vpc/cluster/cluster.hcl" : templatefile("${path.module}/templates/cluster.hcl.tf.tpl", { + "${var.environment}/${var.region}/${var.cluster_config.vpc_name}/${var.name}/cluster.hcl" : templatefile("${path.module}/templates/cluster.hcl.tf.tpl", { cluster_name = var.name, cluster_mailing_list = var.cluster_config.cluster_mailing_list, aws_profile = local.aws_profile, @@ -74,7 +74,7 @@ locals { } module "github_repo" { - source = "git::git@github.e.it.census.gov:CSVD/terraform-github-repo.git" + source = "git::https://github.e.it.census.gov/CSVD/terraform-github-repo.git" name = var.name repo_org = var.organization