-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Environments Updates & Bulk Fetches #7
Comments
To support data sharing for #4, the structure should be as simple and portable as possible. As of now here is the final return JSON for the [
{
"args": "ssm_parameter:/my/application/SOME_SECRET",
"items": [
{
"name": "/my/application/SOME_SECRET",
"value": "1A2B3C4D5E6F"
}
],
"name": "SOME_SECRET"
},
{
"args": "ssm_parameters:/my/application/env",
"items": [
{
"name": "/my/application/env/DATABASE_URL",
"value": "mysql2://user:[email protected]:3306/app"
},
{
"name": "/my/application/env/NEWRELIC_KEY",
"value": "z6y5x4w3v2u1"
}
],
"name": "X_CRYPTEIA_ENVIRONMENTS"
}
] Here is a proposed data structure that is more succinct and serializable with {
"SOME_SECRET": {
"type": "ssm_parameter",
"value": "1A2B3C4D5E6F"
},
"DATABASE_URL": {
"type": "ssm_parameters",
"value": "mysql2://user:[email protected]:3306/app"
},
"NEWRELIC_KEY": {
"type": "ssm_parameters",
"value": "z6y5x4w3v2u1"
}
} The idea of including the {
"SOME_SECRET": "1A2B3C4D5E6F",
"DATABASE_URL": "mysql2://user:[email protected]:3306/app",
"NEWRELIC_KEY": "z6y5x4w3v2u1"
}
|
Fixed by #11 |
Right now the proof of concept will work as long as an existing ENV is set. For example, if
HELLO=yall
is set then the shared object hook into getenv can override that withWORLD
as a value. But ifHELLO
were not set at all, then the current code will not return the override. Why is this important?Let's say you want to batch fetch many parameters using
ssm_parameters:/my/application/env
as a path. You could have something like this in your template.yml file:So this could pull in
DATABASE_URL
,SECRET_KEY_BASE
, and many more. But would fail because there was no previousDATABASE_URL
set. We could treat this as a feature and encourage placeholders like so, but that feels a bit superfluous?The text was updated successfully, but these errors were encountered: