-
Notifications
You must be signed in to change notification settings - Fork 358
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Error when var file includes undeclared variables #2072
Comments
Duplicate of #1877 tflint --var 'foo=bar'
|
@bendrucker I'm sorry, but I'm not sure I understand how this is a solution for me. As a user I want to use |
Reading the tickets you mentioned, they seem to describe a very different issue than the new feature I'm proposing. |
Hmm, I looked at echo 'foo = "bar"' > terraform.tfvars
tflint --var-file terraform.tfvars
# nothing... #1941 says:
Given that the goal is to error in the cases where Terraform prints a warning, this is looking more like a bug/inconsistency. |
Reading the above comment, it seems like Terraform intentionally makes this a warning rather than an error. There is room for discussion on whether TFLint should actively raise an error or conservatively keep the same behavior as Terraform. Personally, I think it might be better to provide it as a rule that can be enabled when needed. |
If |
It's consistent, but I'm not sure if it helps. Unlike Terraform warnings, TFLint logs are intended for debugging, so they may not be useful for finding typos or other problems. In your use case, does this help? |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Introduction
Terraform gives appropriate warnings for values found in tfvars without a corresponding variable in the configuration:
Proposal
tflint should also raise errors for the same problem.
References
N/A
The text was updated successfully, but these errors were encountered: