{
  "slug": "gcloud-sql-users-create-accepts-database-roles-bc8ca857e1b1",
  "title": "gcloud sql users create accepts --database-roles",
  "tools": [
    "gcloud"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-02-03T00:00:00.000Z",
  "announced_at": "2026-02-03T00:00:00.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "For a Cloud SQL MySQL or PostgreSQL instance, create a user with `gcloud sql users create` and pass `--database-roles` to assign roles during creation.",
    "examples": [
      "gcloud sql users create <USERNAME> --instance=<INSTANCE> --database-roles=<ROLE_1>,<ROLE_2>"
    ],
    "gotchas": [
      "USERNAME (required): Cloud SQL username.",
      "--instance=INSTANCE (required): Cloud SQL instance ID.",
      "--database-roles=ROLE,…: Comma-separated roles to assign; available only for MySQL and PostgreSQL instances. Roles can be predefined or custom.",
      "Prerequisite: Any custom roles must already exist in the database; create them with `CREATE ROLE`.",
      "Applies to Postgres and MySQL."
    ]
  },
  "why_it_matters": "Create a Postgres or MySQL user with additional database roles.",
  "sources": [
    "https://docs.cloud.google.com/sdk/docs/release-notes#55500_2026-02-03",
    "https://docs.cloud.google.com/sdk/gcloud/reference/sql/users/create"
  ],
  "rank": 0.95031,
  "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-76320a1a7b811af2-2:gate",
    "evidence_hash": "4a858bb3b2e9d74dc25935422744209290d5f9e53a12140ad3bfbc9bc677924f"
  },
  "review": {
    "draft_hash": "8744dc527738d240aac75b70f8effb8bc2d0783250b3e34532102bdf3c280ab4",
    "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.95 >= 0.9; 2 needed) and Jev gave 0.66 (>= 0.6 needed)."
  }
}
