Skip to content

fix(datastore/postgres/gcp-cloudsql): read project_id, not project - #366

Merged
unni-facets merged 1 commit into
mainfrom
fix/gcp-postgres-project-id-drift
Jul 6, 2026
Merged

fix(datastore/postgres/gcp-cloudsql): read project_id, not project#366
unni-facets merged 1 commit into
mainfrom
fix/gcp-postgres-project-id-drift

Conversation

@srikxcipher

Copy link
Copy Markdown
Contributor

What

Renames the gcp_provider.attributes field read by postgres/gcp-cloudsql from project to project_id.

Why

All three GCP datastore modules consume the same @facets/gcp_cloud_account provider input, but read different attribute names:

Module Attribute (before)
mysql/gcp-cloudsql project_id
redis/gcp-memorystore project_id
postgres/gcp-cloudsql project ← drifted

Both names resolve today only because the resource-type system passes the whole @facets/gcp_cloud_account interface object through. The inconsistency breaks the moment the output schema is tightened to require one canonical name. project_id matches the two siblings and standard GCP API parameter naming.

Changes

  • variables.tf: projectproject_id in the gcp_provider input type. Non-behavioral — the attribute isn't read in .tf code; this just makes the declared input shape consistent across siblings.

Verified: no GCP datastore module reads attributes.project (non-_id) anywhere.

Follow-up (out of scope)

If @facets/gcp_cloud_account exposes both project and project_id as a back-compat artifact, drop project from the output type once no module reads it.

🤖 Generated with Claude Code

The three GCP datastore modules consume the same @facets/gcp_cloud_account
provider input, but postgres/gcp-cloudsql declared the attribute as `project`
while mysql/gcp-cloudsql and redis/gcp-memorystore use `project_id`. Both work
today only because the resource-type system passes the whole interface object;
the drift breaks the moment the output schema is tightened to one canonical
name. Align on project_id (matches the two siblings and GCP API naming).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@unni-facets
unni-facets merged commit 40fdc00 into main Jul 6, 2026
1 check passed
@unni-facets
unni-facets deleted the fix/gcp-postgres-project-id-drift branch July 6, 2026 10:14
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