Skip to content

Commit 44a5631

Browse files
adityatapsclaude
andcommitted
feat(scripts): explicitly generate backend.hcl from STATE_BUCKET in both scaffold scripts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 49a4d87 commit 44a5631

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

scripts/create-aws-account.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,11 @@ cat > "$TARGET/README.md" <<EOF
179179
<!-- END_TF_DOCS -->
180180
EOF
181181

182+
# backend.hcl
183+
cat > "$TARGET/backend.hcl" <<EOF
184+
bucket = "$STATE_BUCKET"
185+
EOF
186+
182187
echo "✓ Account root files written to providers/aws/accounts/$OU/$ACCOUNT_NAME/"
183188

184189
# ── 2. Patch providers/github/main.tf ─────────────────────────────────────────

scripts/create-gcp-project.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ cp -r "$TEMPLATE" "$TARGET"
5757
# Remove files that should not be copied
5858
rm -rf "$TARGET/.terraform" "$TARGET/.terraform.lock.hcl" "$TARGET/terraform.tfvars" "$TARGET/README.md"
5959

60+
# ── Generate backend.hcl ──────────────────────────────────────────────────────
61+
cat > "$TARGET/backend.hcl" <<EOF
62+
bucket = "$STATE_BUCKET"
63+
EOF
64+
6065
# ── Patch backend.tf prefix ───────────────────────────────────────────────────
6166
sed -i '' \
6267
"s|prefix = \"gcp/projects/management/tapshalkar-com\"|prefix = \"gcp/projects/$FOLDER/$PROJECT_ID\"|" \

0 commit comments

Comments
 (0)