Nx plugin to deploy your secrets to Secret Manager.
- Encrypt and decrypt secrets locally
- Deploy secrets to Google Cloud Secret Manager
- Label management for secrets
- Configurable update behavior (destroy, delete, or disable)
- Integration with Nx workspace
GCP_SECRETS_ENCRYPTION_KEYenvironment variable set with your encryption key
npm install -D @nx-extend/gcp-secrets
nx g @nx-extend/gcp-secrets:initAdd an environment variable named GCP_SECRETS_ENCRYPTION_KEY that holds your key to encrypt and decrypt your secrets:
export GCP_SECRETS_ENCRYPTION_KEY="your-encryption-key"Decrypt secrets locally:
nx decrypt <project-name>| Name | Type | Default | Description |
|---|---|---|---|
secret |
string |
- | Only decrypt the secret with this name |
Deploy secrets to Google Cloud Secret Manager:
nx deploy <project-name>| Name | Type | Default | Description |
|---|---|---|---|
project |
string |
- | GCP project to deploy to |
secret |
string |
- | Only deploy the secret with this name |
Encrypt secrets locally:
nx encrypt <project-name>| Name | Type | Default | Description |
|---|---|---|---|
secret |
string |
- | Only encrypt the secret with this name |
When configuring secrets, you can use the following metadata attributes:
| Attribute | Default | Description |
|---|---|---|
status |
- | Status of the file: encrypted or decrypted |
labels |
[] |
Array of labels to add to the secrets |
onUpdateBehavior |
destroy |
What to do when updating: destroy, delete, or disable |