-
Notifications
You must be signed in to change notification settings - Fork 363
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 Settings Configuration through CLI and environment Variables #988
Comments
I'm interested in this getting in as a feature. I've created a cli tool that will generate the zappa_settings.json file dynamically for ci integration. It's been working for me for a long time, but I would like similar functionality integrated into zappa itself. |
Any updates on this? Super interested in having a feature like this :) |
Hi @michaelhudelson @monkut I saw your repo. And yes your configuration can help in CI/CD deployment. |
Thanks for getting back to me :) I think I misunderstood this ticket - I'm actually looking for something that is to Zappa what Terragrunt is to Terraform. I want to be able to have a base settings file and then right a layer of customization over it. If you are interested, I recently made something in a personal project that does this as a POC in about 80 lines of python. |
Another use case for this is not committing secrets to git. For example, when setting a certificate ARN in the settings file, it contains the account number for the AWS account. I’d rather reference an environment variable for that ARN then commit the hardcoded ARN with account number and UUID to git. |
I have the beginning of an implementation that would read settings from environment variables. I'm having difficulty imagining how passing settings as command line options would work. @mcrowson do you have ideas about what the CLI experience would be? Like if you wanted to pass the value for
Or perhaps something like:
I'm not sure if/how Any suggestions? |
I am admittedly far from Zappa development these days and have handed the reigns off to others. However you all want to roll with this is up to you. |
@dougharris, perhaps I'm not quite understanding the issue you're describing, but I'm unsure if I see an actual problem that is not already solvable using Zappa as-is. Following best practices, the use of Zappa should never require any secrets to be committed to a repo. Major collaborative version control platforms (e.g., GitHub) have long supported securely storing secrets that can be securely loaded into the ephemeral environments that get created on CI/CD runners during job execution. And then Zappa currently offers a variety of ways to securely set those environment variables in AWS from your CI/CD workflow. And, as some have mentioned above, it's relatively common for users to write a short Python script that can assist in dynamically inserting/generating values into a |
@javulticat In my particular use case, my zappa_settings.json has
I'd like to make my repo public as an example of a few things in my project, but I'd prefer that this ARN not be visible (in particular, I'd like my account number not to be so easily visible). Is there a way for the certificate ARN to be pulled from AWS environment variables? My WIP on this would see |
My commit there shows the idea. I'd like to add tests before submitting a pull request. |
Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed. |
yes, still relevant |
Right now settings are just passed in through the settings file. This is somewhat limiting if there is a value that will be dynamic with deployments (such as a docker image file, etc.) We should support accepting settings through environment variables, the CLI, the current settings file, and any mix of those.
The order of precedence with mixed should be CLI -> environment -> config file.
If possible, the implementation of this ticket would not be to enumerate each settings value for each of these sources, but to have some way of dynamically finding zappa settings and configuring it.
The text was updated successfully, but these errors were encountered: