Skip to content

Commit 8c795ea

Browse files
committed
Update README with environment based configuration
1 parent e2f84df commit 8c795ea

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,37 @@ AWS_SECRETS_TAG_VALUE=production
3232

3333
`AWS_SECRETS_TAG_NAME` and `AWS_SECRETS_TAG_VALUE` are used to pull down all the secrets that match the tag key/value.
3434

35+
### Other Environment-based Configuration
36+
37+
#### Enabled environments
38+
39+
Specify which environments should have AWS Secrets enabled:
40+
41+
`AWS_SECRETS_ENABLED_ENV=production,staging`
42+
43+
Default: `production`
44+
45+
#### Overwritable Variables Config
46+
47+
Specify which variables should be able to overwrite the config using the `AWS_SECRETS_VARIABLES_CONFIGS` key in the `.env` file. The format is a comma-separated list of `ENV_VARIABLE_NAME:CONFIG_KEY` pairs.
48+
49+
For example:
50+
51+
`VARIABLES_CONFIG_KEYS=APP_KEY:app.key,OTHER_KEY:app.other_key`
52+
53+
This setup allows `APP_KEY` to overwrite `app.key` in the config, and `OTHER_KEY` to overwrite `app.other_key`.
54+
55+
Default Behavior: If `AWS_SECRETS_VARIABLES_CONFIGS` is not set or is empty, no variables will be set for config overwriting.
56+
57+
#### Cache Settings
58+
59+
For example:
60+
```
61+
AWS_SECRETS_CACHE_ENABLED=true
62+
AWS_SECRETS_CACHE_EXPIRY=60
63+
AWS_SECRETS_CACHE_STORE=file
64+
```
65+
3566
### Setting up AWS Secrets
3667

3768
1. Store New Secret.

0 commit comments

Comments
 (0)