tfvars Use Case

103 views
Skip to first unread message

RomeNYRR

unread,
Dec 8, 2015, 3:25:02 AM12/8/15
to Terraform
Greetings, 

So far I feel like I have a pretty good handle on Variables (Inputs & Outputs) and how to declare them and interpolate them etc. I typically layout my file structure as follows

main.tf (contains my build and where I define the variables)
outputs.tf (holds my outputs)
variables (declares my variables) 

But what's the best use case for tfvars? Is it simply to pass through sensitive data? Any other use cases? Thanks all

Matt Black

unread,
Dec 8, 2015, 3:54:40 AM12/8/15
to terrafo...@googlegroups.com

I only use terraform.tfvars for sensitive data - add it to .gitignore and then put AWS API keys in there. That ensures that they don’t end up in my zsh history. Interested to know if there’s any other reasoning for it.

https://terraform.io/intro/getting-started/variables.html


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/66101133-6af9-491d-8b40-b7862d9d5e16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

RomeNYRR

unread,
Dec 8, 2015, 1:29:41 PM12/8/15
to Terraform
Thanks Mafrosis - pretty much i've been thinking about using it just for that instead of loading keys in my shell env. Any other use cases out there? 
Reply all
Reply to author
Forward
0 new messages