declarative-deployment-boundary
recognized control-plane commands bypass Terraform resource ownership
Why
Imperative control-plane commands split deployment ownership between Terraform and repository-specific orchestration, so drift and safety depend on execution order. Publishing an application artifact is a release operation and remains outside this rule.
Fix
Model the resource, identity, and lifecycle in Terraform; let CI select inputs and apply the saved plan without maintaining a second mutation path.
Examples
jobs: deploy: steps: - run: gcloud run deploy api --image $IMAGE --memory 1Gijobs: deploy: steps: - run: gcloud run deploy api --image $IMAGE --region usjobs: deploy: steps: - run: gcloud run deploy api --image $IMAGE --memory 1Gijobs: deploy: steps: - run: terraform apply saved.tfplanresource "terraform_data" "enable_api" { provisioner "local-exec" { command = "gcloud services enable example.googleapis.com" }}resource "terraform_data" "inspect_api" { provisioner "local-exec" { command = "gcloud services list --enabled" }}jobs: deploy: steps: - run: pnpm exec wrangler d1 create appjobs: deploy: steps: - run: pnpm exec wrangler deploy --tag $GITHUB_SHAFiles
.github/workflows/*.{yaml,yml}{cloudbuild,deploy,deployments,iac,infra,k8s,scripts,terraform,tools}/****/*.tf