{
  "slug": "gcloud-spanner-instances-create-and-update-labels-7634c3d4b3be",
  "title": "gcloud spanner instances create and update labels",
  "tools": [
    "gcloud"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-05-27T00:00:00.000Z",
  "announced_at": "2026-05-27T00:00:00.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When creating a Cloud Spanner instance, pass labels with `--labels`; when maintaining one, use `--update-labels` to add or change labels, `--remove-labels` to remove selected keys, or `--clear-labels` to remove all labels.",
    "examples": [
      "gcloud spanner instances create <INSTANCE_ID> --config=<INSTANCE_CONFIG> --description=<INSTANCE_NAME> --nodes=<NODE_COUNT> --labels=<KEY>=<VALUE>,<KEY>=<VALUE>",
      "gcloud spanner instances update <INSTANCE_ID> --update-labels=<KEY>=<VALUE>,<KEY>=<VALUE>",
      "gcloud spanner instances update <INSTANCE_ID> --remove-labels=<KEY1>,<KEY2>\ngcloud spanner instances update <INSTANCE_ID> --clear-labels"
    ],
    "gotchas": [
      "--labels=<KEY>=<VALUE>,…: List of label key-value pairs to add during creation. Keys and values allow lowercase letters, numbers, hyphens, and underscores.",
      "--update-labels=<KEY>=<VALUE>,…: Update existing label values or create new labels. Keys and values allow lowercase letters, numbers, hyphens, and underscores.",
      "--clear-labels: Remove all labels. Mutually exclusive with `--remove-labels`; if used with `--update-labels`, clearing is applied first.",
      "--remove-labels=<KEY>,…: Remove listed label keys; missing keys are ignored. Mutually exclusive with `--clear-labels`; if used with `--update-labels`, updates are applied first.",
      "INSTANCE_ID (required): Cloud Spanner instance ID.",
      "--config=<INSTANCE_CONFIG> (required): Instance configuration defining geographic placement and database replication.",
      "--description=<INSTANCE_NAME> (required): Instance description.",
      "Prerequisite: To view and manage instance labels, the docs require IAM permissions `spanner.instances.get` and `spanner.instances.update`; these are included in `roles/spanner.admin`."
    ]
  },
  "why_it_matters": "Set labels when creating or maintaining a Cloud Spanner instance.",
  "sources": [
    "https://docs.cloud.google.com/sdk/docs/release-notes#57000_2026-05-27",
    "https://docs.cloud.google.com/spanner/docs/labels",
    "https://docs.cloud.google.com/sdk/gcloud/reference/spanner/instances/create",
    "https://docs.cloud.google.com/sdk/gcloud/reference/spanner/instances/update"
  ],
  "rank": 0.92028,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "cloud-20261008",
    "verdict_id": "cloud-20261008:cloud-20261008-f07172907d5b3013-13:gate",
    "evidence_hash": "e5c3dfaf79508625221a7df7b889bce27b19e1ff9e1fc9003eb2261303cf0f2a"
  },
  "review": {
    "draft_hash": "4e0eb6d34040a2bfffb8ac192461925038c9a0c96b868b39327e5c1b1e3d609f",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "cloud-20261008:gate",
    "reason": "2 of 3 judge runs approved with p_yes >= 0.9 (mean 0.92 >= 0.9; 2 needed) and Jev gave 0.69 (>= 0.6 needed)."
  }
}
