Stores a key-value map of secrets
Based on the following Terraform examples:
Assumes:
- A Google Cloud service account with appropriate role and permissions
- gcloud CLI installed
cp terraform.tfvars.sample terraform.tfvars
Amend the values for
project
secrets_manager_instance_name
secrets_key_value_map
See Getting Started with the Google Provider > Adding credentials
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/credentials.json
Update the value above to be the current path to your service account credentials
./create-secrets-manager-secrets.sh
At a terminal prompt (with environment variable set above), type:
gcloud secrets versions access {version_id} --secret="{secret-manager-instance-name}"
Replace
{version-id}
andsecret-manager-instance-name
above with appropriate values
For example
❯ gcloud secrets versions access latest --secret="tap-secret-store"
{"foo": "bar"}
./destroy-secrets-manager-secrets.sh
This action is workflow dispatched with inputs.