https://github.com/valentinfunk/secrets-api
https://github.com/valentinfunk/secrets-api
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/valentinfunk/secrets-api
- Owner: ValentinFunk
- Created: 2018-11-15T16:16:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-15T16:16:31.000Z (over 6 years ago)
- Last Synced: 2025-02-02T23:02:02.264Z (4 months ago)
- Language: TypeScript
- Size: 139 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Easy HTTP Interface to get Runtime Configuration for CI.
To create a new config (needs access to the secrets project in gcloud):
```
gcloud beta runtime-config configs create 'projectname-production'
gcloud beta runtime-config configs create 'projectname-staging'
```To set variables (Variable names will be transformed from lowercase to uppercase, separated by underscores):
```
gcloud beta runtime-config configs variables set \
my-variable-name my-value \
--is-text --config-name projectname-staging
```
Will make MY_VARIABLE_NAME=my-value available.Meant to be consumed like this:
```
export `curl -H "Accept: text/x-shell-export" https://secrets-service/${PROJECT}/staging -H "Authorization: ${GCP_SERVICE_ACC}"`
```### Endpoints
#### Reading Configuration in ENV compatible format
**/projects/\**
Authorization: \
**Returns:**
All stored variables. Pass Accept: text/x-shell-export header to get the variables as shell escaped, space separated variables