Skip to content

fix(gcp): drop 5 invalid IAM permissions from cloud-connector custom role#55

Merged
vik-nullify merged 1 commit into
mainfrom
fix/gcp-connector-invalid-iam-perms
Jun 29, 2026
Merged

fix(gcp): drop 5 invalid IAM permissions from cloud-connector custom role#55
vik-nullify merged 1 commit into
mainfrom
fix/gcp-connector-invalid-iam-perms

Conversation

@vik-nullify

@vik-nullify vik-nullify commented Jun 29, 2026

Copy link
Copy Markdown
Member

Claude

What

Removes 5 IAM permissions from the cloud-connector custom role that either don't exist or aren't grantable in a custom role, which makes the role fail to create for every customer at organization, folder, and project scope.

Permission Problem
bigquery.datasets.list no such permission (only .get exists)
cloudbuild.buildTriggers.get / .list the buildTriggers.* IAM family does not exist
accesscontextmanager.accessPolicies.get / .list not grantable in a custom role

Fixed in both install paths — the Terraform module (modules/nullify-gcp-integration/main.tf) and the gcloud installer (scripts/install.sh) — and the docs (docs/permissions.md, terraform/README.md) updated to match.

Why CI didn't catch it

terraform validate and the terraform-validate job only check HCL — the permission strings are syntactically valid. The failure only surfaces at terraform apply / gcloud iam roles create (customer install time), or via the IAM API.

Verification

  • Diffed the full custom-role permission list against queryTestablePermissions for the resource (49 valid, 5 invalid).
  • Applied and verified all three scopes (organization, folder, projects) cleanly in a test GCP organization, then destroyed.

Suggested follow-up (separate PR)

Add a CI step that diffs the custom-role permission list against queryTestablePermissions so this class of bug fails in CI instead of at customer install time.

🤖 Generated with Claude Code


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

…role

Five permissions in the custom role either do not exist or are not grantable
in a custom role, so creating the role fails for every customer — both
`terraform apply` (org/folder/project scope) and the gcloud installer's
`gcloud iam roles create`. `terraform validate` and the terraform-validate
CI job cannot catch this: the strings are syntactically valid; only the IAM
API rejects them.

  - bigquery.datasets.list           (no such permission; only .get exists)
  - cloudbuild.buildTriggers.get     (no buildTriggers.* IAM family exists)
  - cloudbuild.buildTriggers.list
  - accesscontextmanager.accessPolicies.get   (not grantable in a custom role)
  - accesscontextmanager.accessPolicies.list

Removed from the Terraform module and the gcloud installer, and updated the
docs (permissions.md, README) to match. Verified against
queryTestablePermissions and by clean organization, folder, and project
applies in a test GCP organization.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vik-nullify vik-nullify marked this pull request as ready for review June 29, 2026 06:04
@vik-nullify vik-nullify merged commit 89e3cd9 into main Jun 29, 2026
8 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.

2 participants