gcp-deployment-preflightlisted
Install: claude install-skill eric-sabe/engsys
# GCP Deployment Preflight
Validate GCP infrastructure changes locally and clear blocking state *before* you
deploy, so CI doesn't discover what you could have caught. Continue through all steps
even if one fails — capture every issue, then fix them in a batch.
> Discipline: **batch your fixes.** Each deploy/CI run costs real minutes. Read the
> whole failing config, reason about every issue, fix them all, push once. One run per
> problem cluster, not one per error message.
## When to use
- Before `terraform apply`, `gcloud run deploy`, `gcloud deployment-manager deployments
create/update`, or Config Connector / KCC applies.
- When preparing or reviewing GCP IaC (Terraform google provider, Deployment Manager,
Config Connector manifests).
- To preview what a deploy will change.
- After a failed deploy left a deployment or resource stuck.
## Step 1 — Detect project type & confirm context
- **Terraform (most common for GCP IaC):** `*.tf` with the `google`/`google-beta`
provider, backend in GCS. → use the Terraform flow (Step 2a).
- **gcloud / Deployment Manager:** `*.yaml`/`*.jinja` DM configs, or imperative
`gcloud` deploys. → Step 2b.
- **Config Connector / KCC:** Kubernetes-style GCP-resource manifests applied to a
cluster.
- Confirm context — wrong project is the expensive mistake:
```bash
gcloud config get-value project
gcloud auth list # active account
gcloud config get-value compute/region
```
## Step 2 — Validate & preview
### 2a