Managing secrets and versions
Now let us look at some basic operations you can perform in Secret Manager. These operations can either be performed using gcloud
, the Cloud console, or APIs. We have used the console to keep it simple.
Creating a secret
Follow these steps to create a secret using the Google Cloud console:
- Go to Console | Security | Secret Manager.
- Click on Create secret.
Figure 11.1 – Creating a new secret
As shown in Figure 11.1, a secret value can be copied directly into the console or provided via a file. Typically, binary secrets are provided via a file.
- Choose the desired rotation period (Set rotation period). Note that this will only set a notification but not rotate the secret automatically.
Figure 11.2 – Creating a new secret—rotation period
As shown in Figure 11.2, there are additional properties you can set on a secret. We recommend that you do...