/tsh-stack-gcp:implementing-gcp-terraformfrom TSH Stack: GCP
Provides GCP-specific Terraform patterns and Architecture Framework defaults for VPC, GKE, Cloud SQL, Cloud Storage, Cloud Run, Pub/Sub, Secret Manager, and Cloud Armor. Use when provisioning or reviewing GCP infrastructure with Terraform.
Ships in TSH Stack: GCP. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
GCP resource patterns and the defaults TSH provisions them with. Module structure — file layout, variable validation, state, testing, Terragrunt — is generic and is not repeated here; this skill is what goes inside GCP modules.
The project's existing modules outrank these patterns. Read versions.tf and
.terraform.lock.hcl for the pinned provider version first, and search with that
version — the Google provider changes resource arguments between majors, and the
google-beta provider is a separate pin.
Verify current machine types, GKE versions and regional availability with context7
before naming a specific size. Availability differs by region and is a common
late-stage surprise.
| Severity | Rule |
|---|---|
| MUST | Run terraform plan and read the output before proposing any change. |
| MUST | Enable the APIs a module needs with google_project_service. A module that assumes an enabled API fails on a fresh project with an error that does not name the cause. |
| MUST | Use Workload Identity for workload authentication. Service-account keys are long-lived credentials in a file and need an explicit recorded reason. |
| MUST | Use private IP for every data service. A Cloud SQL instance on a public IP is a finding regardless of its authorized networks. |
| MUST | Apply the project's mandatory labels to every labelable resource. GCP labels are lowercase with underscores. |
| MUST | Include a cost estimate. Cloud NAT data processing, always-on Cloud Run CPU and pd-ssd are the usual surprises. |
| NEVER | Run apply, destroy or -auto-approve without explicit authorization for that specific action. Deliver apply instructions instead. |
| NEVER | Open a firewall rule to 0.0.0.0/0 on an administrative port — 22, 3389, or a database port. |
| NEVER | Use auto-mode VPC. It creates a subnet in every region with overlapping ranges you cannot change. |
| Reference | Load when | Covers |
|---|---|---|
| Module patterns | Provisioning any of these resource families | VPC, GKE, Cloud SQL, Cloud Storage, Cloud Run, Pub/Sub, Secret Manager, Cloud Armor |
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 5.0"
}
}
}
Confirm the current major with context7 for a greenfield project; match the project's
existing pin otherwise. Where a resource is beta-only, pin google-beta separately
rather than moving the whole project onto it.
Apply these unless the project documents a reason not to:
servicenetworking.googleapis.com.google_org_policy_policy.cost_center,
environment, service, owner, data_class.google_project_service in the module.context7 for the pinned provider version.terraform fmt -check, terraform validate,
terraform plan -out=tfplan, then tflint and tfsec or checkov where present.pd-ssd versus pd-balanced, and inter-zone transfer.| Don't | Do |
|---|---|
| Auto-mode VPC | Custom-mode, with planned ranges |
| Service-account keys | Workload Identity |
| Public IP on Cloud SQL | Private IP via VPC peering |
| ACLs on buckets | Uniform bucket-level access |
pd-ssd for general workloads | pd-balanced |
n1 machine types | e2 or n2 |
| Cloud Run with always-on CPU on low traffic | Request-based CPU allocation |
| VPC Connector for Cloud Run egress | Direct VPC egress — the connector is legacy |
| On-demand GKE nodes for batch | Spot VM node pool |
| Cloud NAT carrying Google-API traffic | Private Google Access |
| GKE Standard with hand-managed pools for a simple workload | Autopilot |
| Logging with no exclusions | Exclude high-volume low-value lines at ingestion |
Generic Terraform mechanics — module file layout, variable validation, state backends,
Terragrunt, Terratest — live in implementing-terraform-modules in the
tsh-platform-engineering plugin. Auditing an existing project for cost and label
compliance is auditing GCP cost in this plugin.
What SKILL.md sets; muted values are Claude Code's defaults
Trigger on: writing or reviewing Terraform for GCP resources, `provider "google"` in a project, designing a VPC with secondary IP ranges, standing up GKE Standard or Autopilot with Workload Identity, Cloud SQL with private IP and HA, Cloud Storage buckets with lifecycle rules and CMEK, Cloud Run services with traffic splitting, Pub/Sub topics and dead-letter subscriptions, Cloud Armor WAF policies, enabling project services, or choosing the Google provider version constraint.
Three short reads, in order
2 skills in this plugin
npx claudepluginhub thesoftwarehouse/agentic-collections --plugin tsh-stack-gcpOther plugins' skills for the same job