{
  "slug": "gcloud-beta-alloydb-connect-uses-alloydb-auth-proxy-and-psql-16d84507dcc0",
  "title": "gcloud beta alloydb connect uses AlloyDB Auth Proxy and psql",
  "tools": [
    "gcloud"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-03-31T00:00:00.000Z",
  "announced_at": "2026-03-31T00:00:00.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When you need an interactive connection to an AlloyDB instance, run `gcloud beta alloydb connect` with its instance, cluster, and region; it starts the AlloyDB Auth Proxy and `psql` session.",
    "examples": [
      "gcloud beta alloydb connect <INSTANCE_ID> --cluster=<CLUSTER_ID> --region=<REGION_ID>",
      "gcloud beta alloydb connect <INSTANCE_ID> --cluster=<CLUSTER_ID> --region=<REGION_ID> --public-ip",
      "gcloud beta alloydb connect <INSTANCE_ID> --cluster=<CLUSTER_ID> --region=<REGION_ID> --auto-iam-authn"
    ],
    "gotchas": [
      "Availability: beta",
      "INSTANCE_ID (required): AlloyDB instance ID.",
      "--cluster=<CLUSTER_ID> (required): AlloyDB cluster ID.",
      "--region=<REGION_ID> (required): Regional location of the cluster.",
      "--database=<DATABASE> (-d): Database to connect to.",
      "--port=<PORT>: Local listener port for the Auth Proxy; default is 9471.",
      "--user=<USER> (-u): Built-in database user. Mutually exclusive with `--auto-iam-authn`.",
      "--auto-iam-authn: Enables Auto IAM authentication. Mutually exclusive with `--user`.",
      "--psc: Connect using Private Service Connect. Mutually exclusive with `--public-ip`.",
      "--public-ip: Connect using the instance's public IP. Mutually exclusive with `--psc`.",
      "Prerequisite: Install the gcloud CLI and the `psql` client tool.",
      "Prerequisite: The IAM principal needs the `roles/alloydb.client` role.",
      "Prerequisite: Have a network path to the instance; for example, run the command from a VPC that can reach it."
    ]
  },
  "why_it_matters": "Connect to an AlloyDB instance from a coding workflow using the CLI.",
  "sources": [
    "https://docs.cloud.google.com/sdk/docs/release-notes#56300_2026-03-31",
    "https://docs.cloud.google.com/alloydb/docs/connect-gcloud",
    "https://docs.cloud.google.com/sdk/gcloud/reference/beta/alloydb/connect"
  ],
  "rank": 0.97027,
  "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-c6c2d45b22a9f19d-0:gate",
    "evidence_hash": "d535ddfe4d47dce9e9b58ffde43a8d3e206685ce13d97a09a495283e6a48ccc7"
  },
  "review": {
    "draft_hash": "ed95aa416c4f5b93d55c2271d67513e356f34ba3e219eb1274b5ab9720f0a874",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "cloud-20261008:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.97 >= 0.9; 2 needed) and Jev gave 0.68 (>= 0.6 needed)."
  }
}
