{
  "id": "policy/gcp-service-account-key-limit-exceeded",
  "signature": "Error: Service account key limit exceeded. Maximum number of keys for service account: 10.",
  "signature_zh": "错误：服务账号密钥超出限制。每个服务账号最多允许10个密钥。",
  "regex": "Error: Service account key limit exceeded\\. Maximum number of keys for service account: 10\\.",
  "domain": "policy",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "GCP enforces a hard limit of 10 user-managed keys per service account; attempting to create an 11th key fails.",
  "root_cause_type": "generic",
  "root_cause_zh": "GCP 对每个服务账号强制执行10个用户管理密钥的硬性限制；尝试创建第11个密钥会失败。",
  "versions": [
    {
      "version": "GCP IAM API v1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "gcloud CLI 400.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Google Cloud SDK 4.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The limit is per service account, not a global quota; deleting keys frees slots but recreating without cleanup still hits the limit if you exceed 10.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Reusing keys increases security risk and doesn't solve the underlying quota issue; you still need separate keys for different workloads.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This limit is not adjustable via quota increase requests; it's a hard platform limit that cannot be changed.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Delete unused keys using gcloud: `gcloud iam service-accounts keys list --iam-account=SA@PROJECT.iam.gserviceaccount.com` then `gcloud iam service-accounts keys delete KEY_ID --iam-account=SA@PROJECT.iam.gserviceaccount.com` to free up slots.",
      "success_rate": 0.95,
      "how": "Delete unused keys using gcloud: `gcloud iam service-accounts keys list --iam-account=SA@PROJECT.iam.gserviceaccount.com` then `gcloud iam service-accounts keys delete KEY_ID --iam-account=SA@PROJECT.iam.gserviceaccount.com` to free up slots.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use workload identity federation instead of service account keys for external workloads: configure a workload identity pool and provider.",
      "success_rate": 0.9,
      "how": "Use workload identity federation instead of service account keys for external workloads: configure a workload identity pool and provider.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Create a new service account for additional workloads and assign the same roles.",
      "success_rate": 0.85,
      "how": "Create a new service account for additional workloads and assign the same roles.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "使用 gcloud 删除未使用的密钥：`gcloud iam service-accounts keys list --iam-account=SA@PROJECT.iam.gserviceaccount.com` 然后 `gcloud iam service-accounts keys delete KEY_ID --iam-account=SA@PROJECT.iam.gserviceaccount.com` 以释放槽位。",
    "对于外部工作负载，使用工作负载身份联合而不是服务账号密钥：配置工作负载身份池和提供程序。",
    "为额外的工作负载创建一个新的服务账号并分配相同的角色。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://cloud.google.com/iam/docs/creating-managing-service-account-keys",
  "official_doc_section": null,
  "error_code": "QUOTA_EXCEEDED",
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-06-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}