-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Autoload *.tfvars in the same way as *.tf (allow inheritance) #1084
Comments
This is actually a pretty decent idea. Not sure why we made it |
+1 |
Yeah I'm +1 for this as well. We'll need to spec and document the behavior on collisions, and we may also want to provide some UX to inspect variables. We'll need to think about if we're ever going to support complex types (lists, mappings) as input variables. If so, we'll have to consider the inheritance behavior for those types. |
@phinze I think as an early implementation, any later file just overrides the earlier. We can define more complex types in the future. But I think the easiest will just be that top-level keys just override earlier top-level keys. |
@phinze More reasons why this makes sense initially: we support multiple |
Oh yeah - initial impl should be easy then. 👍 |
👍 |
I plan to look at the implementation, just wanted to ask for feedback regarding this: Shall we ignore any I currently do have a very simple script that takes a "tfvars template" and fills in some known variables, typically external IP address taken via I don't mind sticking to any different convention, but I was thinking that |
@radeksimko I think we should ignore any files in the same way we ignore |
Is this still on the roadmap? |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
There's currently just one static file -
terraform.tfvars
where user can place custom settings, but I was thinking that there might be need for more versions of this file, e.g. per environment or per user who's executing it.The idea is to load all
*.tfvars
alphabetically, so that user can have e.g.01-user.tfvars
in.gitignore
and keep00-default.tfvars
in the repository.This would generally allow inheritance between these files.
The text was updated successfully, but these errors were encountered: