OpenTofu configurations for the ambient-code-platform GCP project.
- Workload Identity Federation - GitHub Actions in
ambient-code/platformauthenticate to GCP without service account keys - GCP API enablement - Vertex AI and supporting APIs
- IAM bindings -
roles/aiplatform.userfor CI workloads - CI/CD - GitHub Actions workflow to validate, plan, and apply changes
State is stored in a GCS bucket (ambient-code-platform-tfstate). You must
have access to this bucket to run tofu init.
The bucket should have:
- Uniform bucket-level access enabled (no per-object ACLs)
- Object versioning enabled (allows state recovery)
- Restricted IAM — only project administrators and the CI identity
A GitHub Actions workflow runs on every push:
- validate — runs
tofu validateon all branches - plan — runs
tofu planon non-main branches - apply — runs
tofu apply -auto-approveon main
The workflow authenticates to GCP via Direct Workload Identity Federation.
cd gcp
tofu init
tofu plan
tofu apply