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

Consolidate "variable not declared" errors from -var-file #20538

Closed
apparentlymart opened this issue Mar 1, 2019 · 1 comment · Fixed by #20581
Closed

Consolidate "variable not declared" errors from -var-file #20538

apparentlymart opened this issue Mar 1, 2019 · 1 comment · Fixed by #20581
Assignees
Milestone

Comments

@apparentlymart
Copy link
Contributor

In order to give better feedback to users who have made typos in their variable declarations or definitions, we introduced an error, later demoted to a warning after discussion in #19424, if a .tfvars file includes a definition for a variable that hasn't been declared. We're now recommending the use of environment variables to set "ambient" variable values that made available to all Terraform configurations in a session, since that warning does not apply to those.

However, existing uses with large .tfvars files currently lead to a lot of warnings, because we generate one warning per undeclared variable, and the result is therefore quite overwhelming and redundant. Instead, we should gather all of the undeclared variables into a single list and report a single warning that explains that these should be migrated to use environment variables, using similar text to what we currently have in each individual message.

@ghost
Copy link

ghost commented Mar 29, 2020

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.

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant