-
Notifications
You must be signed in to change notification settings - Fork 1
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
Improve the way to manage environment variables and secrets #104
Comments
As I understand correctly, we will store the |
@andyduong1920 In the Varun project, we store the whole secret object in 1Password, and whenever we added a new key, we updated 1Password as well. It seems that is not a good way. In the Ewa project, when we add a new secret, we create the corresponding secret in AWS. But this will create many secrets if we have many. I found a way we can improve this:
But I still feel it's not the best practice. Do you have any better options? |
@hoangmirs can we try the 1Passworld Terraform provider to get the value from 1Password and pass it into Terraform? https://registry.terraform.io/providers/1Password/onepassword/latest/docs/data-sources/item So we just need to update the ENV only on the 1Password side and let Terraform script pull and handle that. The downside is: when we transfer the project to client, not sure we can transfer the 1Password ownership 🤔 |
[#104] Improve the way to manage environment variables and secrets
Why
With the current structure, every time we need to add a new environment variable, we need to open a PR to define a new variable and add it into the container definition(example). That is tedious.
Inspired by the Varun project, we set a new way to do so in EWA Payroll project: maintain a new variable
environment_variables
on Terraform cloud as a JSON object; a new variable just needs to add to it.A similar approach (but less flexible) for secrets. These PRs can be used as references.
https://github.com/onward-venture/ewa-payroll-infra/pull/2
https://github.com/onward-venture/ewa-payroll-infra/pull/6
Wiki: https://github.com/worpt-wallet/wallet-api/wiki/Environment-Variables
Who benefits
All developers who need to occasionally define new environment variables and secrets when working on the tasks.
The text was updated successfully, but these errors were encountered: