gcloud secrets create accepts --secret-type
Introduced 2026-07-28 · score 0.92
HOW TO USE IT
When creating a Secret Manager secret with a specific type, pass `--secret-type=<type>` to `gcloud secrets create`. Choose one of the documented types, such as `cloud-sql-db-credentials`.
gcloud secrets create <SECRET_ID> --secret-type=cloud-sql-db-credentialsWHY THIS HELPS
When creating a secret with a type such as Cloud SQL credentials, set its secret type.
REQUIREMENTS AND LIMITATIONS
- SECRET (required): Secret ID or fully qualified identifier.
- --secret-type: Secret type; allowed values: `access-key`, `certificate`, `cloud-sql-db-credentials`, `other`, `other-db-credentials`, `secret-type-unspecified`.
- The source gives Cloud SQL credentials as an example of a secret type.
FIRST-PARTY EVIDENCE
- https://docs.cloud.google.com/sdk/docs/release-notes#57800_2026-07-28
- https://docs.cloud.google.com/sdk/gcloud/reference/secrets/create
Check the installed version and the source before using it. Entry JSON