[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M720W8J790RXNCHF712W1S5T":3,"skill-same:01M720W8J790RXNCHF712W1S5T":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M720W8J790RXNCHF712W1S5T","gcp-terraform",null,"Writes Terraform (HCL) for Google Cloud resource changes and hands them to submit-suggestion as one pull request, on an install whose GitOps repository keeps clusters\u002F\u003Ccluster>\u002Fprovisioning\u002F (or its Terraform root) as HCL. Use when a request creates or changes a GKE cluster or node pool (new cluster, grow, autoscale, adopt), a Cloud SQL instance (read replica, resize), or a VPC firewall rule, and the repository holds .tf files for it. Edits the existing resources and modules in the repository's own style, decides edit, import or create read-only, flags replacements and deletion-protection changes, checks syntax with tofu fmt, and never runs init, plan or apply. Don't use for Config Connector YAML (use gcp-config-connector), Kubernetes workload manifests (use gke-manifest-generation), or Helm charts (use gitops-helm-chart).","gke-labs\u002Fkube-agents","gke-labs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F197140281?v=4","01M720MEZR8K6WD2WTHNQE346Q","01M720MF0BRA9RGH1QVT4J0M0E",126,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fagents\u002Fplatform\u002Fskills\u002Fgcp-terraform\u002FSKILL.md",[],[],"2026-11-10 18:39:20",false,"---\nname: gcp-terraform\ndescription: >-\n  Writes Terraform (HCL) for Google Cloud resource changes and hands them to\n  submit-suggestion as one pull request, on an install whose GitOps\n  repository keeps clusters\u002F\u003Ccluster>\u002Fprovisioning\u002F (or its Terraform root) as\n  HCL. Use when a request creates or changes a GKE cluster or node pool (new\n  cluster, grow, autoscale, adopt), a Cloud SQL instance (read replica,\n  resize), or a VPC firewall rule, and the repository holds .tf files for it.\n  Edits the existing resources and modules in the repository's own style,\n  decides edit, import or create read-only, flags replacements and\n  deletion-protection changes, checks syntax with tofu fmt, and never runs\n  init, plan or apply. Don't use for Config Connector YAML (use\n  gcp-config-connector), Kubernetes workload manifests (use\n  gke-manifest-generation), or Helm charts (use gitops-helm-chart).\n---\n\n# Terraform Authoring\n\nOn a repository that keeps its Google Cloud resources as Terraform, a\nchange leaves this agent as an edit to that HCL, reviewed by a human and\napplied by the customer's CI, which holds the state and the credentials.\nThis skill writes the edit. It reads the repository and the cloud project\nto decide what to write, keeps to the repository's own style, checks the\nsyntax with `tofu fmt`, and opens the pull request through\n**submit-suggestion**. Nothing here plans or applies: `terraform plan` is\nthe reviewer's or CI's step, because only CI has the state to plan against.\n\n## When to Use\n\n- **A GKE node pool or cluster change** on a Terraform repository: grow or\n  shrink a pool, turn on autoscaling, change a release channel or\n  maintenance window, add a new cluster, adopt a cluster the repository\n  does not describe. A new cluster comes here when `SOUL.md` §3 item 7\n  routes it here, which it does for a Terraform repository.\n- **A Cloud SQL change**: a read replica, a tier, backups, high\n  availability.\n- **A VPC firewall rule**: open or close a port, narrow a source range,\n  disable a rule, turn on logging.\n- **Adopting a resource** that exists in Google Cloud but not in the\n  repository (an `import` block).\n\n## When NOT to Use\n\n- **A repository whose `provisioning\u002F` holds Config Connector YAML**:\n  `gcp-config-connector`. A repository can hold both in different cluster\n  directories; use the format the target's own directory uses.\n- **Kubernetes workloads**: `gke-manifest-generation`. **Helm charts**:\n  `gitops-helm-chart`.\n- **Resource types outside the families in `references\u002F`.** The workflow\n  holds for them, but their replace-forcing fields are not catalogued here:\n  read the provider's documentation page for the resource at the\n  repository's pinned provider version, and say in the PR body that the\n  type is outside the catalogued set.\n- **Fixing a fleet-audit finding**: the `fleet-audit` skill opens that PR.\n\n## Workflow\n\n### Step 0: A stop ends the request\n\nEvery \"stop\" in this skill is the answer, not a reason to look for another\nway in. When one applies, report it in the words given, change nothing, and\nend: on a kanban card with `kanban_block(kind=\"needs_input\")` and the stop as\nthe reason. Do not go on to check what you are allowed to change, try another\nidentity, or search for credentials or another repository.\n\nThe first stop comes before anything else: the install must have a GitOps\nrepository registered, and it must be reachable. One command answers both,\nand its one line is final:\n\n```bash\npython3 \"$HERMES_HOME\"\u002Fscripts\u002Fgitops_preflight.py\npython3 \"$HERMES_HOME\"\u002Fscripts\u002Fgitops_preflight.py --repo \"\u003Cowner>\u002F\u003Crepo>\"\n```\n\nRun the first form before anything else, and the second once you know which\nrepository the change goes to. `REGISTERED: ...` (exit 0) means go on. Any\nother line (`NO_REGISTERED_REPO`, `REPO_UNREACHABLE`, `STATE_UNREADABLE`,\n`BROKER_UNAVAILABLE`) is the stop: block with that line as the reason and\nchange nothing.\n\n### Step 1: Open the repository and learn its Terraform\n\nOpen it with **submit-suggestion** `prepare` (its Step 1) on branch\n`platform-agent\u002Ftf-\u003Ctype>-\u003Cname>`, then find the Terraform that owns the\ntarget:\n\n```bash\npython3 \"$HERMES_HOME\"\u002Fskills\u002Fsubmit-suggestion\u002Fscripts\u002Fsubmit_suggestion.py prepare \\\n  --repo \"\u003Cowner>\u002F\u003Crepo>\" --branch \"platform-agent\u002Ftf-\u003Ctype>-\u003Cname>\"\nls \u003Cworkspace>\u002Fclusters\u002F\u003Ccluster>\u002Fprovisioning\ngrep -rlE 'resource \"google_container_(cluster|node_pool)\"|resource \"google_sql_database_instance\"|resource \"google_compute_firewall\"' \u003Cworkspace> --include=*.tf\ngrep -rnE '^\\s*source\\s*=|required_version|required_providers' \u003Cworkspace> --include=*.tf\n```\n\nFrom the files that own the target, take:\n\n- **Resources or modules.** Whether the repository writes\n  `resource \"google_container_node_pool\"` blocks or calls a module (its own\n  under `modules\u002F`, the public `terraform-google-modules`, or\n  kube-agents' own `gke-cluster`). A change to something a module creates\n  is a change to that module call's inputs, never a new resource beside it.\n- **Versions.** The `required_providers` pin for `google` and the\n  `required_version`. Write only syntax that version accepts: `import`\n  blocks need Terraform 1.5 or OpenTofu 1.6 and later.\n- **Style.** How names, variables, `locals`, labels and `for_each` are\n  written, and whether values are literals or `var.`\u002F`local.` references.\n  Copy it; a reviewer should not be able to tell your block from theirs.\n- **The resource address** of the target (`google_container_node_pool.\u003Cname>`\n  or `module.\u003Cname>.google_container_node_pool.\u003Cname>`), for the PR body.\n\n**Stopping before Step 5 leaves nothing to clean up.** The copy is on this\nfilesystem. Stop where you need to (a question from Step 2's table, an\nunasked replacement in Step 3, a syntax error you cannot resolve) and run\n`prepare` again when the work resumes.\n\n### Step 2: Decide edit, import or create, read-only\n\nRead the live resource with the reads the command policy allows:\n\n```bash\ngcloud container clusters describe \u003Ccluster> --location \u003Clocation> --project \u003Cproject> --format=json\ngcloud container node-pools describe \u003Cpool> --cluster \u003Ccluster> --location \u003Clocation> --project \u003Cproject> --format=json\ngcloud compute firewall-rules describe \u003Crule> --project \u003Cproject> --format=json\n```\n\n| In the repository | In Google Cloud | Decision                                                                                                        |\n| ----------------- | --------------- | --------------------------------------------------------------------------------------------------------------- |\n| yes               | any             | **Edit** that block or module call. Touch only what the request needs.                                          |\n| no                | yes             | **Import.** An `import` block plus a resource whose arguments match the live resource (`references\u002Fimport.md`). |\n| no                | no              | **Create**, in the repository's style.                                                                          |\n| no                | unknown         | Report what you could not read. Ask the user whether it exists; do not assume.                                  |\n\n`gcloud sql` has no entry on the read allowlist. For a Cloud SQL instance\nthe repository is your only read; when the instance is not in it, ask the\nuser whether it exists rather than guessing (`references\u002Fsql.md`).\n\nA resource in the repository is not proof that the live one matches it:\nthe CI's state is the record, and you cannot read it. Say in the PR body\nwhich reads decided the edit.\n\n### Step 3: Write the change\n\n- **Edit in place.** Change the arguments the request needs, add the ones\n  it requires, and nothing else. An argument you copy from the live resource\n  becomes one someone has to own.\n- **A replacement is written only when the request names it.** An\n  argument that forces replacement (`references\u002F` lists them per family;\n  the provider's page for the pinned version decides) destroys and recreates\n  the resource when the pull request is applied. Write one only when the\n  request names that argument or its direct effect (\"switch the pool to\n  Spot VMs\" names `spot`), and lead with it: the PR body's **Replacement**\n  line names the argument and what is destroyed and recreated (the pool's\n  nodes and their workloads, or the whole cluster), and so does your reply.\n  Name a route that avoids the replacement if one exists (a new pool beside\n  the old one) as an alternative in the body, without writing it. When the\n  request states a goal and only a replace-forcing argument would meet it\n  (\"more pod IPs\" is `cluster_ipv4_cidr`), or only your way of writing it\n  would cause one, never write it: say so, name the argument, and stop for\n  the user's decision.\n- **Deletion protection.** Never set `deletion_protection = false`, remove\n  it, remove a `lifecycle { prevent_destroy = true }`, or change a\n  `deletion_policy` (`ABANDON` gets past `deletion_protection`). A\n  requested cluster replacement is still written, with the **Deletion\n  protection** line saying that applying it fails until a human sets\n  `deletion_protection = false` in a separate change. Anything else that\n  needs one of them is a human's pull request: stop and say so.\n- **A new cluster's deletion protection** is on, written the way the\n  repository's existing clusters write it (the resource argument or the\n  module input). With no cluster to copy, it is `deletion_protection = true`,\n  the provider's default since 5.0.0. A sibling that has it `false` is not\n  copied: write `true` and name that sibling in the **Deletion protection**\n  line. Never `false`, for a test, an evaluation or an easier teardown: a\n  cluster that needs it off is a human's pull request.\n- **New resources** go where the repository keeps their siblings, in a file\n  named the way the siblings are, using the same module or resource shape.\n  Shape, not contents: a new cluster gets only what exists once per cluster\n  (the cluster, its node pools, its fleet membership). A project- or\n  fleet-wide resource the repository already declares (a\n  `google_gke_hub_feature`, a `google_project_service`, a shared service\n  account) is used by name or left alone, never declared a second time:\n  copying a sibling's file copies those too, and a second declaration fails\n  or fights the first at apply. Name the shared ones the cluster relies on\n  in the PR body. `references\u002Fcontainer.md` lists the common ones. Where\n  each cluster is its own root module, its `backend` and provider blocks\n  are copied with this cluster's own state prefix: a copied prefix points\n  the new root at the sibling's state, and CI's plan would then propose\n  destroying the sibling.\n- **No secrets in HCL.** A password, key or token never goes into a `.tf`\n  or `.tfvars` file; use the repository's existing reference (a\n  `google_secret_manager_secret_version` data source, a variable CI fills)\n  or stop and ask.\n\n### Step 4: Check the syntax\n\n`tofu fmt` parses every file it formats, so it is the syntax check that\nneeds no providers, state or credentials. Run it on the files you changed\nor added, never the directory: a directory target rewrites every sibling\nthat is not already formatted, and `submit` commits every modified tracked\nfile, so the pull request would carry formatting the request never asked\nfor. Then apply the formatting to those files:\n\n```bash\ntofu fmt -check -diff \u003Cworkspace>\u002Fclusters\u002F\u003Ccluster>\u002Fprovisioning\u002F\u003Cfile>.tf\ntofu fmt \u003Cworkspace>\u002Fclusters\u002F\u003Ccluster>\u002Fprovisioning\u002F\u003Cfile>.tf\n```\n\n- Exit 2 is a syntax error, naming the file and line: fix it and run\n  again. It hides the formatting report until the file parses.\n- Exit 3 with a diff is formatting only: the second command writes it, so\n  the pull request matches `terraform fmt` and the reviewer's CI.\n- Exit 0 means the files parse. It does not mean the arguments exist: `fmt`\n  loads no provider schema, so a misspelled argument passes here and fails\n  CI's `plan`. Check every argument you wrote against the provider's page\n  for the pinned version.\n- Nothing else. `tofu init`, `validate`, `plan`, `apply` and `import`, and\n  any `terraform` command, need provider plugins from a registry and a cloud\n  this shell cannot reach, and they are CI's to run.\n\n### Step 5: Hand off as a pull request\n\nSubmit through **submit-suggestion** `submit` with the branch from Step 1.\nUse this shape for the `--body-file` document, after the skill's standard\nheader, and pass the `--evidence-file` its Step 3 requires:\n\n```\n### Terraform change\n- **Decision:** edit | import | create, and the reads that decided it.\n- **Resource:** `\u003Caddress>` (\u003Ctype> `\u003Cname>` in project `\u003Cproject>`, location `\u003Clocation>`).\n- **Replacement:** none | REPLACES \u003Caddress>: `\u003Cargument>` forces it; applying this PR destroys and recreates \u003Cwhat> (or deletes \u003Cwhat>).\n- **Deletion protection:** unchanged | unchanged; applying this PR fails until a human sets `deletion_protection = false` in a separate change. | new cluster: `true`, as `\u003Csibling address>` has | new cluster: `true`, the provider default (no existing cluster to copy) | new cluster: `true`; `\u003Csibling address>` has `false` and was not copied.\n- **Import:** none | `import { to = \u003Caddress>, id = \"\u003Cid>\" }`; plan must show an import, not a create.\n- **Checked:** `tofu fmt -check` on \u003Cpath>. Not run here: `terraform init`, `validate` and\n  `plan`. Run `plan` in CI before merging; it must show only the changes above.\n```\n\nRecord the PR URL for the user. Addressing review feedback follows\n**submit-suggestion** Step 5. On a kanban card, a stop from Steps 1 to 4\nends in `kanban_block(kind=\"needs_input\")` with the reason, never in\n`kanban_complete` with advice.\n\n## Red Lines\n\n- No `tofu` or `terraform` command other than `tofu fmt`. No mutating\n  `gcloud`; the command policy refuses it and a refusal is not a retry\n  prompt.\n- Never set `deletion_protection = false`, remove it, remove\n  `prevent_destroy`, or change a `deletion_policy`.\n- Never write a replacement the request did not name, a removed resource\n  or a `removed` block unasked.\n- Never fill in a project, region, network or name you did not read from\n  the repository, the cloud or the user.\n- Never write a secret into HCL or a `.tfvars` file.\n\n## References\n\n- **[Import blocks](references\u002Fimport.md)**: when to adopt instead of\n  create, the block, and the ID formats.\n- **[Clusters and node pools](references\u002Fcontainer.md)**: arguments,\n  replace-forcing fields, `describe`-to-argument mapping.\n- **[Cloud SQL](references\u002Fsql.md)**: instances, replicas, the missing\n  `gcloud sql` read.\n- **[Firewall rules](references\u002Fcompute-firewall.md)**: rule shape,\n  replace-forcing fields.\n","# Terraform Authoring\n\nOn a repository that keeps its Google Cloud resources as Terraform, a\nchange leaves this agent as an edit to that HCL, reviewed by a human and\napplied by the customer's CI, which holds the state and the credentials.\nThis skill writes the edit. It reads the repository and the cloud project\nto decide what to write, keeps to the repository's own style, checks the\nsyntax with `tofu fmt`, and opens the pull request through\n**submit-suggestion**. Nothing here plans or applies: `terraform plan` is\nthe reviewer's or CI's step, because only CI has the state to plan against.\n\n## When to Use\n\n- **A GKE node pool or cluster change** on a Terraform repository: grow or\n  shrink a pool, turn on autoscaling, change a release channel or\n  maintenance window, add a new cluster, adopt a cluster the repository\n  does not describe. A new cluster comes here when `SOUL.md` §3 item 7\n  routes it here, which it does for a Terraform repository.\n- **A Cloud SQL change**: a read replica, a tier, backups, high\n  availability.\n- **A VPC firewall rule**: open or close a port, narrow a source range,\n  disable a rule, turn on logging.\n- **Adopting a resource** that exists in Google Cloud but not in the\n  repository (an `import` block).\n\n## When NOT to Use\n\n- **A repository whose `provisioning\u002F` holds Config Connector YAML**:\n  `gcp-config-connector`. A repository can hold both in different cluster\n  directories; use the format the target's own directory uses.\n- **Kubernetes workloads**: `gke-manifest-generation`. **Helm charts**:\n  `gitops-helm-chart`.\n- **Resource types outside the families in `references\u002F`.** The workflow\n  holds for them, but their replace-forcing fields are not catalogued here:\n  read the provider's documentation page for the resource at the\n  repository's pinned provider version, and say in the PR body that the\n  type is outside the catalogued set.\n- **Fixing a fleet-audit finding**: the `fleet-audit` skill opens that PR.\n\n## Workflow\n\n### Step 0: A stop ends the request\n\nEvery \"stop\" in this skill is the answer, not a reason to look for another\nway in. When one applies, report it in the words given, change nothing, and\nend: on a kanban card with `kanban_block(kind=\"needs_input\")` and the stop as\nthe reason. Do not go on to check what you are allowed to change, try another\nidentity, or search for credentials or another repository.\n\nThe first stop comes before anything else: the install must have a GitOps\nrepository registered, and it must be reachable. One command answers both,\nand its one line is final:\n\n```bash\npython3 \"$HERMES_HOME\"\u002Fscripts\u002Fgitops_preflight.py\npython3 \"$HERMES_HOME\"\u002Fscripts\u002Fgitops_preflight.py --repo \"\u003Cowner>\u002F\u003Crepo>\"\n```\n\nRun the first form before anything else, and the second once you know which\nrepository the change goes to. `REGISTERED: ...` (exit 0) means go on. Any\nother line (`NO_REGISTERED_REPO`, `REPO_UNREACHABLE`, `STATE_UNREADABLE`,\n`BROKER_UNAVAILABLE`) is the stop: block with that line as the reason and\nchange nothing.\n\n### Step 1: Open the repository and learn its Terraform\n\nOpen it with **submit-suggestion** `prepare` (its Step 1) on branch\n`platform-agent\u002Ftf-\u003Ctype>-\u003Cname>`, then find the Terraform that owns the\ntarget:\n\n```bash\npython3 \"$HERMES_HOME\"\u002Fskills\u002Fsubmit-suggestion\u002Fscripts\u002Fsubmit_suggestion.py prepare \\\n  --repo \"\u003Cowner>\u002F\u003Crepo>\" --branch \"platform-agent\u002Ftf-\u003Ctype>-\u003Cname>\"\nls \u003Cworkspace>\u002Fclusters\u002F\u003Ccluster>\u002Fprovisioning\ngrep -rlE 'resource \"google_container_(cluster|node_pool)\"|resource \"google_sql_database_instance\"|resource \"google_compute_firewall\"' \u003Cworkspace> --include=*.tf\ngrep -rnE '^\\s*source\\s*=|required_version|required_providers' \u003Cworkspace> --include=*.tf\n```\n\nFrom the files that own the target, take:\n\n- **Resources or modules.** Whether the repository writes\n  `resource \"google_container_node_pool\"` blocks or calls a module (its own\n  under `modules\u002F`, the public `terraform-google-modules`, or\n  kube-agents' own `gke-cluster`). A change to something a module creates\n  is a change to that module call's inputs, never a new resource beside it.\n- **Versions.** The `required_providers` pin for `google` and the\n  `required_version`. Write only syntax that version accepts: `import`\n  blocks need Terraform 1.5 or OpenTofu 1.6 and later.\n- **Style.** How names, variables, `locals`, labels and `for_each` are\n  written, and whether values are literals or `var.`\u002F`local.` references.\n  Copy it; a reviewer should not be able to tell your block from theirs.\n- **The resource address** of the target (`google_container_node_pool.\u003Cname>`\n  or `module.\u003Cname>.google_container_node_pool.\u003Cname>`), for the PR body.\n\n**Stopping before Step 5 leaves nothing to clean up.** The copy is on this\nfilesystem. Stop where you need to (a question from Step 2's table, an\nunasked replacement in Step 3, a syntax error you cannot resolve) and run\n`prepare` again when the work resumes.\n\n### Step 2: Decide edit, import or create, read-only\n\nRead the live resource with the reads the command policy allows:\n\n```bash\ngcloud container clusters describe \u003Ccluster> --location \u003Clocation> --project \u003Cproject> --format=json\ngcloud container node-pools describe \u003Cpool> --cluster \u003Ccluster> --location \u003Clocation> --project \u003Cproject> --format=json\ngcloud compute firewall-rules describe \u003Crule> --project \u003Cproject> --format=json\n```\n\n| In the repository | In Google Cloud | Decision                                                                                                        |\n| ----------------- | --------------- | --------------------------------------------------------------------------------------------------------------- |\n| yes               | any             | **Edit** that block or module call. Touch only what the request needs.                                          |\n| no                | yes             | **Import.** An `import` block plus a resource whose arguments match the live resource (`references\u002Fimport.md`). |\n| no                | no              | **Create**, in the repository's style.                                                                          |\n| no                | unknown         | Report what you could not read. Ask the user whether it exists; do not assume.                                  |\n\n`gcloud sql` has no entry on the read allowlist. For a Cloud SQL instance\nthe repository is your only read; when the instance is not in it, ask the\nuser whether it exists rather than guessing (`references\u002Fsql.md`).\n\nA resource in the repository is not proof that the live one matches it:\nthe CI's state is the record, and you cannot read it. Say in the PR body\nwhich reads decided the edit.\n\n### Step 3: Write the change\n\n- **Edit in place.** Change the arguments the request needs, add the ones\n  it requires, and nothing else. An argument you copy from the live resource\n  becomes one someone has to own.\n- **A replacement is written only when the request names it.** An\n  argument that forces replacement (`references\u002F` lists them per family;\n  the provider's page for the pinned version decides) destroys and recreates\n  the resource when the pull request is applied. Write one only when the\n  request names that argument or its direct effect (\"switch the pool to\n  Spot VMs\" names `spot`), and lead with it: the PR body's **Replacement**\n  line names the argument and what is destroyed and recreated (the pool's\n  nodes and their workloads, or the whole cluster), and so does your reply.\n  Name a route that avoids the replacement if one exists (a new pool beside\n  the old one) as an alternative in the body, without writing it. When the\n  request states a goal and only a replace-forcing argument would meet it\n  (\"more pod IPs\" is `cluster_ipv4_cidr`), or only your way of writing it\n  would cause one, never write it: say so, name the argument, and stop for\n  the user's decision.\n- **Deletion protection.** Never set `deletion_protection = false`, remove\n  it, remove a `lifecycle { prevent_destroy = true }`, or change a\n  `deletion_policy` (`ABANDON` gets past `deletion_protection`). A\n  requested cluster replacement is still written, with the **Deletion\n  protection** line saying that applying it fails until a human sets\n  `deletion_protection = false` in a separate change. Anything else that\n  needs one of them is a human's pull request: stop and say so.\n- **A new cluster's deletion protection** is on, written the way the\n  repository's existing clusters write it (the resource argument or the\n  module input). With no cluster to copy, it is `deletion_protection = true`,\n  the provider's default since 5.0.0. A sibling that has it `false` is not\n  copied: write `true` and name that sibling in the **Deletion protection**\n  line. Never `false`, for a test, an evaluation or an easier teardown: a\n  cluster that needs it off is a human's pull request.\n- **New resources** go where the repository keeps their siblings, in a file\n  named the way the siblings are, using the same module or resource shape.\n  Shape, not contents: a new cluster gets only what exists once per cluster\n  (the cluster, its node pools, its fleet membership). A project- or\n  fleet-wide resource the repository already declares (a\n  `google_gke_hub_feature`, a `google_project_service`, a shared service\n  account) is used by name or left alone, never declared a second time:\n  copying a sibling's file copies those too, and a second declaration fails\n  or fights the first at apply. Name the shared ones the cluster relies on\n  in the PR body. `references\u002Fcontainer.md` lists the common ones. Where\n  each cluster is its own root module, its `backend` and provider blocks\n  are copied with this cluster's own state prefix: a copied prefix points\n  the new root at the sibling's state, and CI's plan would then propose\n  destroying the sibling.\n- **No secrets in HCL.** A password, key or token never goes into a `.tf`\n  or `.tfvars` file; use the repository's existing reference (a\n  `google_secret_manager_secret_version` data source, a variable CI fills)\n  or stop and ask.\n\n### Step 4: Check the syntax\n\n`tofu fmt` parses every file it formats, so it is the syntax check that\nneeds no providers, state or credentials. Run it on the files you changed\nor added, never the directory: a directory target rewrites every sibling\nthat is not already formatted, and `submit` commits every modified tracked\nfile, so the pull request would carry formatting the request never asked\nfor. Then apply the formatting to those files:\n\n```bash\ntofu fmt -check -diff \u003Cworkspace>\u002Fclusters\u002F\u003Ccluster>\u002Fprovisioning\u002F\u003Cfile>.tf\ntofu fmt \u003Cworkspace>\u002Fclusters\u002F\u003Ccluster>\u002Fprovisioning\u002F\u003Cfile>.tf\n```\n\n- Exit 2 is a syntax error, naming the file and line: fix it and run\n  again. It hides the formatting report until the file parses.\n- Exit 3 with a diff is formatting only: the second command writes it, so\n  the pull request matches `terraform fmt` and the reviewer's CI.\n- Exit 0 means the files parse. It does not mean the arguments exist: `fmt`\n  loads no provider schema, so a misspelled argument passes here and fails\n  CI's `plan`. Check every argument you wrote against the provider's page\n  for the pinned version.\n- Nothing else. `tofu init`, `validate`, `plan`, `apply` and `import`, and\n  any `terraform` command, need provider plugins from a registry and a cloud\n  this shell cannot reach, and they are CI's to run.\n\n### Step 5: Hand off as a pull request\n\nSubmit through **submit-suggestion** `submit` with the branch from Step 1.\nUse this shape for the `--body-file` document, after the skill's standard\nheader, and pass the `--evidence-file` its Step 3 requires:\n\n```\n### Terraform change\n- **Decision:** edit | import | create, and the reads that decided it.\n- **Resource:** `\u003Caddress>` (\u003Ctype> `\u003Cname>` in project `\u003Cproject>`, location `\u003Clocation>`).\n- **Replacement:** none | REPLACES \u003Caddress>: `\u003Cargument>` forces it; applying this PR destroys and recreates \u003Cwhat> (or deletes \u003Cwhat>).\n- **Deletion protection:** unchanged | unchanged; applying this PR fails until a human sets `deletion_protection = false` in a separate change. | new cluster: `true`, as `\u003Csibling address>` has | new cluster: `true`, the provider default (no existing cluster to copy) | new cluster: `true`; `\u003Csibling address>` has `false` and was not copied.\n- **Import:** none | `import { to = \u003Caddress>, id = \"\u003Cid>\" }`; plan must show an import, not a create.\n- **Checked:** `tofu fmt -check` on \u003Cpath>. Not run here: `terraform init`, `validate` and\n  `plan`. Run `plan` in CI before merging; it must show only the changes above.\n```\n\nRecord the PR URL for the user. Addressing review feedback follows\n**submit-suggestion** Step 5. On a kanban card, a stop from Steps 1 to 4\nends in `kanban_block(kind=\"needs_input\")` with the reason, never in\n`kanban_complete` with advice.\n\n## Red Lines\n\n- No `tofu` or `terraform` command other than `tofu fmt`. No mutating\n  `gcloud`; the command policy refuses it and a refusal is not a retry\n  prompt.\n- Never set `deletion_protection = false`, remove it, remove\n  `prevent_destroy`, or change a `deletion_policy`.\n- Never write a replacement the request did not name, a removed resource\n  or a `removed` block unasked.\n- Never fill in a project, region, network or name you did not read from\n  the repository, the cloud or the user.\n- Never write a secret into HCL or a `.tfvars` file.\n\n## References\n\n- **[Import blocks](references\u002Fimport.md)**: when to adopt instead of\n  create, the block, and the ID formats.\n- **[Clusters and node pools](references\u002Fcontainer.md)**: arguments,\n  replace-forcing fields, `describe`-to-argument mapping.\n- **[Cloud SQL](references\u002Fsql.md)**: instances, replicas, the missing\n  `gcloud sql` read.\n- **[Firewall rules](references\u002Fcompute-firewall.md)**: rule shape,\n  replace-forcing fields.\n",{"name":5,"description":7},"main","4544e0540d35535c4b9deb47d6f77abda58fee1b","agents\u002Fplatform\u002Fskills\u002Fgcp-terraform",44,"https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents","https:\u002F\u002Fgke-labs.github.io\u002Fkube-agents\u002F","https:\u002F\u002Fgithub.com\u002Fgke-labs","2026-11-14 20:53:19",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add gke-labs\u002Fkube-agents --skill gcp-terraform",{"tool":37,"command":38},"bunx","bunx skills add gke-labs\u002Fkube-agents --skill gcp-terraform",{"tool":40,"command":41},"pnpm","pnpm dlx skills add gke-labs\u002Fkube-agents --skill gcp-terraform","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fagents\u002Fplatform\u002Fskills\u002Fgcp-terraform\u002FSKILL.md",true,[45,51,55,59],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Fcompute-firewall.md","REFERENCE","参考文档",1899,"https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fagents\u002Fplatform\u002Fskills\u002Fgcp-terraform\u002Freferences\u002Fcompute-firewall.md",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fcontainer.md",7108,"https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fagents\u002Fplatform\u002Fskills\u002Fgcp-terraform\u002Freferences\u002Fcontainer.md",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fimport.md",2823,"https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fagents\u002Fplatform\u002Fskills\u002Fgcp-terraform\u002Freferences\u002Fimport.md",{"path":60,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fsql.md",1530,"https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fagents\u002Fplatform\u002Fskills\u002Fgcp-terraform\u002Freferences\u002Fsql.md",[64,71,78,85,92,99],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M72168JZM6CYRZFWW204PA2V","gke-workload-troubleshooting","Diagnoses GKE workload failures (CrashLoopBackOff, OOMKilled, ImagePullBackOff, Pending, etc.) via logs and events. Use when pods fail to start or crash repeatedly. Don't use for GKE cluster infrastructure provisioning, node pool creation, or non-Kubernetes Google Cloud services.","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-workload-troubleshooting\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M721643JPG43MFDHGN067D7T","gke-workload-security","Audits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running security audits (`audit_cluster.sh`), enforcing Network Policies (default-deny and Dataplane V2 logging), isolating high-risk pods inside GKE Sandbox (`gVisor`), enforcing Pod Security Standards (`restricted` labeling) and pod securityContext, and mounting Secret Manager secrets via CSI (`SecretProviderClass`). Use when auditing workload security posture, isolating namespaces, applying pod security standards, or configuring network policies and secret volume mounts. Don't use for Workload Identity (use gke-workload-identity), cluster-wide control plane security, RBAC hardening, Binary Authorization, Shielded Nodes, or enabling platform-level GKE add-ons (use gke-platform-security instead).","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-workload-security\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M721618QGFKZRWHS0RFVG7WT","gke-workload-scaling","Manages scaling for GKE workloads using HPA and VPA. Use when configuring Horizontal Pod Autoscaler (HPA), configuring Vertical Pod Autoscaler (VPA), or applying best practices for GKE workload autoscaling. Do not use for cluster-level autoscaling (Cluster Autoscaler), static cluster sizing, or configuring node-level machine styles directly.","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-workload-scaling\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M7215WA1TNFDZE22VJEN3XXW","gke-workload-identity","Configures and diagnoses Workload Identity Federation for GKE authentication failures for Pods (403 \"iam.serviceAccounts.getAccessToken\" \u002F permission denied, \"could not find default credentials\", or GKE metadata server unreachable) by verifying cluster and node-pool Workload Identity configuration, the Kubernetes ServiceAccount (KSA) to IAM binding (direct principal binding and legacy Google ServiceAccount impersonation), target-resource IAM roles, and gke-metadata-server health. Use when setting up KSA\u002FGSA bindings (`roles\u002Fiam.workloadIdentityUser`, `iam.gke.io\u002Fgcp-service-account`) or when a Pod cannot authenticate to Google Cloud APIs. Don't use for in-cluster Kubernetes RBAC errors (API-server authorization), general workload crashes (use gke-workload-troubleshooting), or Pod Security Standards and NetworkPolicies (use gke-workload-security).","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-workload-identity\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":18},"01M7215PJTBTZ0W15ZZ2W32FF9","gke-upgrades","Plans, executes, and validates Google Kubernetes Engine (GKE) cluster upgrades and maintenance operations for both Standard and Autopilot clusters. Produces upgrade plans, pre\u002Fpost-upgrade checklists, maintenance runbooks with gcloud commands, release channel strategy, and troubleshooting guides. Handles node pool upgrade strategies (surge, blue-green), version compatibility, PDB management, and workload-specific concerns (stateful, GPU, operators). Use this skill whenever the user mentions GKE upgrades, Kubernetes version bumps, node pool maintenance, GKE patching, cluster version management, release channel selection, maintenance windows, surge upgrades, stuck upgrades, or any GKE lifecycle management task — even casual mentions like \"we need to upgrade our clusters\" or \"plan our next GKE maintenance\" or \"our upgrade is stuck.\" Don't use for GKE cluster creation, application onboarding, general networking\u002Frouting setup, or security policy configurations (use gke-basics or relevant GKE skills instead).","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-upgrades\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":18},"01M7215JX0FBZBTG4570CJ20HS","gke-tpu-metrics-monitoring","Monitors and troubleshoots GKE TPU workloads, nodes, and node pools using GKE system metrics and PromQL. Use when monitoring TensorCore duty cycle, TPU memory, node readiness, multi-host TPU node pool availability, host maintenance or preemption interruptions, and calculating MTTR or MTBI metrics for GKE TPUs. Don't use for general non-TPU GKE workload monitoring or non-metric TPU debugging.","https:\u002F\u002Fgithub.com\u002Fgke-labs\u002Fkube-agents\u002Fblob\u002Fmain\u002Fthird_party\u002Fgoogle-skills\u002Fgke-tpu-metrics-monitoring\u002FSKILL.md",[],[]]