[EPAC-2072]: remove bootstrap.sh from CI workflows#602
Merged
riddim-developer-bot[bot] merged 1 commit intoMay 25, 2026
Conversation
bootstrap.sh is a one-time infrastructure provisioning step that requires admin-level IAM permissions (s3:CreateBucket, dynamodb:CreateTable). The CI role (GitHubActions-epac-backend-staging) lacks these permissions, causing every infra-plan and infra-apply job to fail at the bootstrap step. Remove the bootstrap call from all three workflows. The S3 state backend and DynamoDB lock table are pre-provisioned infrastructure — bootstrap.sh should only be run manually with admin credentials when setting up a new account. In infra-validate.yml, also: - Narrow path trigger from backend/** to backend/manifest/** since only the deployment manifest affects Terraform plans - Handle terraform init failure gracefully (warning annotation instead of job failure) so the non-required infra-plan check doesn't generate CI-failure noise while IAM permissions are being provisioned
riddim-developer-bot
Bot
deleted the
symphony/epac-2072-ci-infrastructure-validation-failing-on-symphony
branch
May 25, 2026 19:22
riddim-developer-bot Bot
added a commit
that referenced
this pull request
May 26, 2026
…staging deploy (#627) ## Why The `terraform apply` step for the staging workspace was removed in EPAC-2072 (PR #602) because the CI IAM role lacked S3 access to the Terraform state bucket. That IAM gap has since been fixed. Without `terraform apply`, newly registered Lambda services (e.g. `epac-hansard-search-index-staging` from EPAC-2062) never get provisioned — the deploy job skips them and downstream workflows like `hansard-search-reindex.yml` fail with `ResourceNotFoundException`. ## What changed - Added `infra-apply` job to `backend-staging.yml` that runs `terraform init` and `terraform apply -auto-approve` in `infra/terraform/staging/` using the existing `AWS_BACKEND_STAGING_ROLE_ARN` credentials. - Added `hashicorp/setup-terraform@v3` step so the Terraform CLI is available on the runner. - Updated `deploy` job dependency from `needs: prepare` to `needs: [prepare, infra-apply]` so deploys only run after infrastructure is provisioned. - Added `infra/terraform/staging/**` to the `paths` trigger so infra-only changes also trigger the workflow. ## Trade-offs not taken - Did not add `-target` flags to scope the apply — full workspace apply is required so all manifest-registered services are provisioned. - Did not add `terraform plan` as a separate preview step — the existing `concurrency` group prevents concurrent runs and the staging workspace is a non-production environment where plan review overhead is not warranted. ## Verification - `actionlint` passes clean on the modified workflow file. - Terraform staging directory (`infra/terraform/staging/`) confirmed to exist with `main.tf`, `variables.tf`, `outputs.tf`, `versions.tf`. - Cannot run full workflow locally (requires AWS credentials and GitHub Actions runner context). ## Risks - First CI-driven `terraform apply` on this workspace — the plan output should be reviewed in the workflow run summary after the first execution. Any unexpected `destroy` actions on existing resources warrant investigation. - `terraform apply` holds the DynamoDB state lock for its duration; the workflow's `concurrency: group: backend-staging-deploy` prevents concurrent runs. Resolves EPAC-2101 Reviewer-Boundary: review-only Co-authored-by: riddim-developer-bot <developer-bot@riddimsoftware.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
infra-planjob ininfra-validate.ymlhas failed on every run since it wasintroduced (PR #595). The root cause is
bootstrap.sh— a one-time infrastructureprovisioning script that requires admin-level IAM permissions (
s3:CreateBucket,dynamodb:CreateTable). The CI role (GitHubActions-epac-backend-staging) lacksthese permissions, so every PR that touches
backend/**orinfra/terraform/**triggers a guaranteed failure.
The same bootstrap step also fails in
backend-staging.ymlandbackend-production.yml, blocking all staging and production deploys.Resolves EPAC-2072
What changed
bootstrap.shfrom all three CI workflows (infra-validate.yml,backend-staging.yml,backend-production.yml). Bootstrap is a pre-requisitefor Terraform, not a CI step — state buckets and lock tables are pre-provisioned
infrastructure that should be set up once with admin credentials.
infra-validate.ymlfrombackend/**tobackend/manifest/**. Only the deployment manifest (deployment-services.json)affects Terraform plans; backend Go code changes should not trigger infrastructure
validation.
terraform inithandling ininfra-plan: if init fails (e.g. theS3 state backend isn't yet accessible to the CI role), the job emits a warning
annotation and exits successfully instead of failing the workflow. The plan step
still fails normally if init succeeds but plan fails — this distinction keeps the
infra-plancheck informative without generating CI-failure noise for aninfrastructure gap.
Trade-offs not taken
continue-on-error: trueto the entireinfra-planjob, butthat would hide legitimate Terraform regressions.
infra-planjob entirely until IAM is set up, but thegraceful-degradation approach preserves the job so it starts working automatically
once the core Terraform workspace is applied with proper IAM permissions.
Remaining infrastructure work
The
infra-planjob will emit a warning annotation until thecoreTerraformworkspace is applied to grant the CI role access to the state buckets. That is
infrastructure provisioning work, not a code fix.
Verification
actionlintpasses on all three changed workflow files.require GitHub Actions runners.
Reviewer-Boundary: review-only
Estimate: missing (treating as standard 8 complexity tier)