-
Notifications
You must be signed in to change notification settings - Fork 481
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
Unused bucket and region variables in account.tfvars #6
Comments
The file is pulled in by every module: https://github.com/gruntwork-io/terragrunt-infrastructure-live-example/blob/master/non-prod/terraform.tfvars#L20. It's an example of how to set common variables that are used by all modules. That said, I'm not sure any of the example code in the infra-modules example repo is using those particular variables, so we should probably update the examples accordingly :) |
Thanks. I was just confused by why it was there. It didn't make sense that these two variables would even be globally needed. |
This example should include environment level variables. For example if you want to tag everything in QA with the environment name and everything in STAGE with the environment name. I was thinking of making an envname.tfvar in each environment folder and figuring out the imports such that it imports all the account.tfvars like in this examples and lets you override/add to them. Then this envname.tfvar is imported in each resource file. |
Here is how I have done it, as include on a file with an include doesn't work.
config in non-prod/us-east-1/stage/postgresql/terraform.tfvars
non-prod/us-east-1/stage/env.tfvars
|
A correction, the above doesn't work. This is quite miserable to learn and get right. I wish it was more like ansible. How do I debug required_var_files or path? |
I agree. I would really like to see an example where I use something defined in account.tfvars in some of the child terraform.tfvars. I can't find an example anywhere.... |
@hammadzz @kelsmj there is no support for it, but there is a workaround I use:
|
account.tfvars
Were
tfstate_global_bucket
andtfstate_global_bucket_region
to be used in terraform.tfvarsThe text was updated successfully, but these errors were encountered: