Skip to content

Commit

Permalink
fix: dynamic paths in rendered_files + HTTPS module source for CodeBuild
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Your Name committed Apr 6, 2026
1 parent b4f330a commit 91202ff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 91202ff

Please sign in to comment.