Repository navigation
fix(gcp/ci-cd): allow main in WIF attribute condition (deploy auth failure) - #1379
Conversation
…ef flip warning README incorrectly described the attribute_condition as repo-only; it also gates on assertion.ref (deploy_ref). Add explicit warning that flipping the base branch requires re-applying this module with the new ref, or main-branch deploys fail with "unauthorized_client". Closes the documentation gap that led to GCP deploy auth failures after feat/multicloud-web-frontend merged to main (issue #1372). - Fix README attribute_condition description (was missing deploy_ref clause) - Add operator gcloud command to inspect the live condition without applying - Add IMPORTANT flip-back warning to terraform.tfvars.example - Add inline comment to github_oidc.tf explaining the lockout risk terraform fmt -check: exit 0 terraform init -backend=false: exit 0 terraform validate: exit 0
|
@coderabbitai review |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 58 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
✅ Action performedReview finished.
|
|
Merged to main: documents the WIF deploy_ref pinning trap that caused the GCP deploy outage (stale local tfvars pinned the retired feature branch; fix applied and confirmed end-to-end on run 29514101154). README now documents the actual attribute condition (repository AND ref), the gcloud inspect command, and the flip-back requirement. |
Problem
GCP deploys have been failing since the base branch changed from
feat/multicloud-web-frontendtomain(around 2026-06-09) with:The WIF provider's
attribute_conditiongates on both repository and ref:The live condition (verified read-only via
gcloud) still says:This rejects every push to
main. The localterraform.tfvars(gitignored)was last applied with
deploy_ref = "refs/heads/feat/multicloud-web-frontend".Root cause
The
terraform.tfvarsoverride was not updated after the branch merge.variables.tfalready defaultsdeploy_reftorefs/heads/main, so a freshapply with no override (or with
deploy_ref = "refs/heads/main") fixes it.What this PR changes
documented as repo-only) with the accurate two-clause form, adds the
operator
gcloudcommand to inspect the live condition, and explains theflip-back requirement.
deploy_refwhen the base branch changes, with the exact lockout error towatch for.
flip-back rule.
No Terraform logic changed;
terraform fmt -check,terraform init -backend=false,and
terraform validateall exit 0.Operator apply step
See the runbook comment on #1372 for exact commands. Short version:
Then re-run "Deploy to GCP Cloud Run" from the Actions tab to verify.
Drift note
Live GCP condition exactly matches what Terraform would produce from the
stale
terraform.tfvars(no unexpected drift). After applying withdeploy_ref = "refs/heads/main", the condition becomes:Ref: #1372 (GCP half; AWS half tracked in #1375 - do not close #1372 via this PR)