gcloud secrets create my-api-key --replication-policy automatic

Category: Google Cloud & Workspace

gcloud secrets create my-api-key --replication-policy automatic

Create a new Secret Manager secret

Creates a secret named my-api-key that will hold a value like an API key or password, replicated automatically across regions for availability. The secret starts with no versions, so add the first value with gcloud secrets versions add. Read the value later with gcloud secrets versions access.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.