Skip to content

feat(api): gate bgg-warehouse-api via authoritative Terraform invoker binding#87

Open
phenrickson wants to merge 2 commits into
mainfrom
feature/warehouse-api-gating
Open

feat(api): gate bgg-warehouse-api via authoritative Terraform invoker binding#87
phenrickson wants to merge 2 commits into
mainfrom
feature/warehouse-api-gating

Conversation

@phenrickson

Copy link
Copy Markdown
Owner

What this is

Gating for bgg-warehouse-api: an authoritative google_cloud_run_v2_service_iam_binding
on roles/run.invoker. Authoritative ⇒ the members list is the complete allow-list,
so allUsers can never be (re)added out of band, and drift is corrected on every apply.

Grant surface = the Terraform members list (day-one member: the owner). Adding a
consumer later = add its serviceAccount: here, PR, merge — grants stay in code and
git-audited.

⚠️ Merge order

Merge the service PR first, confirm bgg-warehouse-api deployed, then merge this.
An IAM binding against a not-yet-created service plans fine but fails at apply.

Review gate

On merge, terraform.yml runs plan then apply -auto-approve. Read the terraform plan in this PR's checks before merging — it should show only the one
run.invoker binding being added. If it shows other changes (state drift), do not merge
until reconciled.

See docs/superpowers/specs/2026-07-16-service-auth-pattern-design.md.

🤖 Generated with Claude Code

phenrickson and others added 2 commits July 16, 2026 13:49
… binding (7b)

Authoritative google_cloud_run_v2_service_iam_binding on run.invoker guarantees no
allUsers. Day-one member is the owner; consumers join the invoker group. Applied by
terraform.yml. MUST merge AFTER the service exists (deploy PR first).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… (not a group)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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