Search code examples
google-cloud-platformgoogle-secret-manager

How to create a Secret using Google Cloud Secret Manager with gcloud command line tool?


I have started a Google Cloud Account and I want to access and use Google Secret Manager. How can I create a Secret using Google Secret Manager API using gcloud command line interface ?


Solution

  • You can see it here https://cloud.google.com/secret-manager/docs/creating-and-accessing-secrets#secretmanager-create-secret-cli

    gcloud secrets create secret-id \
        --replication-policy="automatic"