File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -179,6 +179,11 @@ cat > "$TARGET/README.md" <<EOF
179179<!-- END_TF_DOCS -->
180180EOF
181181
182+ # backend.hcl
183+ cat > " $TARGET /backend.hcl" << EOF
184+ bucket = "$STATE_BUCKET "
185+ EOF
186+
182187echo " ✓ Account root files written to providers/aws/accounts/$OU /$ACCOUNT_NAME /"
183188
184189# ── 2. Patch providers/github/main.tf ─────────────────────────────────────────
Original file line number Diff line number Diff line change @@ -57,6 +57,11 @@ cp -r "$TEMPLATE" "$TARGET"
5757# Remove files that should not be copied
5858rm -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 ───────────────────────────────────────────────────
6166sed -i ' ' \
6267 " s|prefix = \" gcp/projects/management/tapshalkar-com\" |prefix = \" gcp/projects/$FOLDER /$PROJECT_ID \" |" \
You can’t perform that action at this time.
0 commit comments