Skip to content

Run terraform plan locally with a read-only database login - #304

Merged
ale210 merged 3 commits into
mainfrom
209-read-only-postgres-tfvars
Nov 25, 2026
Merged

ale210 merged 3 commits into
mainfrom
209-read-only-postgres-tfvars

Conversation

@ale210

@ale210 ale210 commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Part of #209.

Lets a contributor run terraform plan locally with a read-only database login instead of the master password.

  • pguser variable, default postgres, so CI is unchanged. The postgresql provider now uses it.
  • terraform/terraform.tfvars.example and a README section on running plan locally from the terraform.tfvars file in the DevOps CoP vault in 1Password.

The terraform_plan login was created by hand on incubator-prod-database, not in Terraform. It has no grants: everything the provider reads during a refresh is a catalog any login can read. A local plan authenticated as it, with only terraform.tfvars supplying credentials, reported no changes and refreshed all 34 postgresql_* resources.

Expected CI plan: no changes.

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Terraform plan in terraform
With backend config files: terraform/prod.backend.tfvars

No changes. Your infrastructure matches the configuration.
No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

✅ Plan applied in Terraform apply (OIDC) #129

@ale210
ale210 merged commit 6a37041 into main Nov 25, 2026
2 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.

1 participant