Skip to content
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

-Var-File Support #192

Closed
tcmoody opened this issue Nov 5, 2018 · 5 comments
Closed

-Var-File Support #192

tcmoody opened this issue Nov 5, 2018 · 5 comments
Labels
enhancement New feature or request

Comments

@tcmoody
Copy link

tcmoody commented Nov 5, 2018

Hello all, I use the tfvars file just about everywhere for my terraform (try to avoid using the -var arg), is there any chance that -var-file arg support will be coming soon?

@mcalhoun mcalhoun added the enhancement New feature or request label Nov 5, 2018
@brikis98
Copy link
Member

brikis98 commented Nov 5, 2018

We had no plans to add it, but a PR would be welcome! You'd add it to terraform.Options and add the appropriate CLI args here.

@berney
Copy link

berney commented Jan 17, 2019

You may be able to use this technique:

Use the TerraformDir in terraform.Options you can put your *.auto.tfvars and terraform.tfvars files there and they'll be auto-loaded.

This works well in a lot of scenarios. It won't work well if you want to have many tests where the terraform code (under test) TerraformDir is the same and you want to use different .tfvars files to change some complex variables (that can't be passed in Vars (-var)).

I too welcome a PR adding -var-file support.

@brikis98
Copy link
Member

This is being worked on in #201

@kurtmaile
Copy link

+1

@pysysops
Copy link
Contributor

@tcmoody - Now that #201 is merged I think that this can be closed 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants