Comments (2)
The use case for extra_env_vars
is for merging extra environment variables on top of the default ones if you need to do so. You would add these in your {env}.tfvars
file like so:
extra_env_vars = [
{
name = "MY_ENV_VAR"
value = "my-value"
}
]
If you want to add sensitive data that should not be committed to code, there are a few options:
- ideally you can use the boto3 library or some other wrapper to call secrets rather than passing them to your task definition (link). In my example project in this repo I use
aws-secretsmanager-caching
which is maintained by AWS - Add a secrets manager secret to your container as an environment variable (link)
- use the
extra_env_vars
to add a value that you can safely commit to the.tfvars
file like I have shown above - if you want to put the value in GitHub secrets then you will need to pass it down through the application from the top level main.tf file down to the web module. So you need to add it to the
.vars
files. I assume you are not using my Terraform modules directly but instead are using your own modules. Then you can change them as you need to support adding extra environment variables through environment secrets. You would also need to update the GitHub Actions scripts to inject theTF_VARS_
env vars to the step that runsterraform plan/apply
Let me know if you have any other questions about these suggestions, hope that helps!
from django-step-by-step.
Thanks for the suggestions, I was able to get it to work using secret manager. Thanks again!
from django-step-by-step.
Related Issues (20)
- add terraform configuration
- Add a GitHub Action workflows for updating the container in frontend and backend task definitions HOT 1
- Create GitHub actions workflow for building, tagging and pushing frontend and backend images HOT 1
- delete terraform workspace when destroying an ad hoc environment
- add an option to destroy the database when destroying an ad hoc environment
- remove heroku support
- clean up makefile HOT 1
- Remove set-output commands from GitHub Actions workflows HOT 1
- Some potentially old references to remove HOT 3
- Sync live/prod/app/main.tf to latest in terraform-aws-django HOT 5
- Introduction Section Text Edits
- Refactor Terraform prod GitHub Actions workflows
- Refactor application upgrade scripts
- Poetry - Separate test dependencies from dev dependencies
- Django ALLOWED_HOSTS settings for production HOT 2
- Does Adhoc environment work? HOT 2
- Add Navigation Link from End Authentication Section to VuePress Section
- Use a single class with static methods to organize all API calls to backend
- Update to postgres 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-step-by-step.