Skip to content

fix(gcp): enable the APIs that read through the host project's quota - #119

Draft
tim-thacker-nullify wants to merge 2 commits into
mainfrom
fix/gcp-cloudbuild-roles-connector-apis
Draft

tim-thacker-nullify wants to merge 2 commits into
mainfrom
fix/gcp-cloudbuild-roles-connector-apis

Conversation

@tim-thacker-nullify

@tim-thacker-nullify tim-thacker-nullify commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Claude

Nullify cannot read KMS, Cloud SQL, Spanner, Dataflow, BigQuery, Org Policy or Access Context Manager config for connectors whose host project does not enable those APIs (Aura, Wesfarmers): these APIs count each read against the service account's own project, so every call fails with "API has not been used in project ".

  • apis.tf: new scan_quota resource enables cloudkms, sqladmin, spanner, dataflow, bigquery, orgpolicy and accesscontextmanager in the host project, behind enable_scan_quota_apis (default true).
  • Nothing depends on scan_quota, so an org policy that blocks one of them does not fail the install; only that service goes unread.
  • install.sh: enables the seven in a separate call that warns instead of exiting.
  • terraform/README.md: lists them, says why they belong in the host project, and tells existing installs to re-apply.
  • main.tf: the Cloud Build comment now says trigger and worker pool config is read through Cloud Asset Inventory.
  • No role changes.

Evidence: Loki, 3 days: every host-project failure is one of these seven (plus Cloud Build, which moves to Asset Inventory); the error's consumer is the host project number.

Not verified before un-draft:

  • Whether enabling Dataflow also enables Compute Engine in the host project (which creates the default service account).
  • Whether the service account needs serviceusage.services.use on its own project. A live scan against a test host project answers both.

Merge after Nullify-Platform/nullify#18346, which moves Cloud Build reads to Cloud Asset Inventory.

Refs FDE-3031, FDE-3030.

🤖 Generated with Claude Code

tim-thacker-nullify and others added 2 commits November 11, 2026 20:41
KMS, Cloud SQL, Spanner, Dataflow, BigQuery, Org Policy and Access Context
Manager count each read against the quota of the service account's own
project. The Nullify service account lives in the host project, so every
read of these APIs failed with "API has not been used in project <host>".
Enable them in apis.tf and install.sh, and list them in the README.

Correct docs/permissions.md: Cloud Build trigger and worker pool
configuration is read through Cloud Asset Inventory; no Cloud Build
permission is granted.

Refs FDE-3031, FDE-3030.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the seven scan APIs into their own `scan_quota` resource that no
other resource depends on, behind `enable_scan_quota_apis` (default
true). install.sh enables them in a separate call that warns and goes on
when it fails. Correct the stale Cloud Build comment in main.tf and leave
docs/permissions.md as it was.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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