Skip to content

Fix Terraform state bootstrap sequence - #50

Merged
jaydreyer merged 1 commit into
mainfrom
codex/fix-bootstrap-backend
Aug 7, 2026
Merged

jaydreyer merged 1 commit into
mainfrom
codex/fix-bootstrap-backend

Conversation

@jaydreyer

Copy link
Copy Markdown
Owner

Summary

  • keep the bootstrap root on Terraform’s implicit local backend until the state bucket exists
  • provide an inactive S3 backend template and document the reviewed local-to-S3 state migration
  • add mocked bootstrap security assertions and run them in CI

Root cause

The bootstrap root declared its S3 backend before the state bucket existed. terraform init -backend=false installed providers, but it did not activate an implicit local backend, so the following saved-plan command correctly refused to run.

Verification

  • terraform fmt -check -recursive infra/terraform
  • bootstrap terraform init, terraform validate, and terraform test
  • recovery from the previously interrupted init -backend=false sequence
  • demo terraform init -backend=false, terraform validate, and terraform test (5 passed)
  • actionlint
  • independent review: approved with no findings

No AWS apply, state migration, or resource mutation was performed.

Refs #45 and #49.

@jaydreyer
jaydreyer marked this pull request as ready for review August 7, 2026 18:34
@jaydreyer
jaydreyer merged commit b1a5c43 into main Aug 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant