slayyyyer · three-repo reference system

gcp-reference-platform

Terraform modules for hosting the orders service on Google Cloud: private networking, private-IP Cloud SQL, Cloud Run service and migration job, Pub/Sub, and keyless GitHub Actions federation.

What this proves — and what it does not

Proves

  • The configuration is valid for hashicorp/google and passes terraform test assertions that encode security posture.
  • Resource wiring composes: modules accept typed, validated inputs and the dev/prod roots plan without unknown-value errors.
  • IAM, network and recovery choices are reviewable as code and are pinned by version.

Does not prove

  • That any resource exists, or that an apply would succeed. Quotas, org policy, API enablement and IAM propagation are never exercised.
  • That the numbers sized here are right for a real workload.
  • That the application connects to Cloud SQL — that needs a deployed VPC and instance.

Verification

Each unit below was initialised with -backend=false, validated, and tested with command = plan against a mocked provider.

Loading recorded verification output…

Raw verification logs

Modules

Inputs and outputs are generated by terraform-docs during CI, not written by hand.

Module documentation not present in this build.

Dependency graph

Produced by terraform graph on the production composition.

Graph not present in this build.

Security posture

ControlWhere it is enforcedAsserted by a test
No public database addresscloud-sql-postgres: ipv4_enabled = false, private services accessyes
Point-in-time recovery and backupscloud-sql-postgres: backup_configurationyes
Deletion protection in prodenvs/prod → module inputyes
No database passwordsCloud SQL IAM auth; secrets by reference onlypartial — see ADR 0003
One identity per workloadcloud-run-service, cloud-run-jobyes
No anonymous invocationcloud-run-service: allow_unauthenticated = falseyes
Secrets never in tfvarsSecret Manager references in secret_envyes
Keyless CI federation, pinned to repo and refgithub-wif: attribute_conditionyes
No primitive rolesExplicit predefined roles onlyyes
Bounded redeliverypubsub: dead-letter policy and retry backoffyes

Decision records

Reproduce

git clone https://github.com/slayyyyer/gcp-reference-platform
cd gcp-reference-platform
# Terraform 1.17.x, no credentials needed
./scripts/verify.sh        # fmt, init -backend=false, validate, terraform test, tflint
./scripts/build-docs.sh    # assembles dist/ (needs terraform-docs + graphviz for full output)

There is no apply step, no backend and no state. That is the point: the repository is an auditable artefact, not a deployed platform.