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

Backport of Check required_version as early as possible into v1.0 #29670

Merged
merged 5 commits into from
Sep 29, 2021

Conversation

teamterraform
Copy link
Contributor

Backport

This PR is auto-generated from #29665 to be assessed for backporting due to the inclusion of the label 1.0-backport.

The below text is copied from the body of the original PR.


Our current check of required_version happens after parsing the configuration, which may not be possible if new configuration constructs have been added to the language since the declared required_version. This can cause terraform to print rather unhelpful error messages about unknown identifiers in various modules, when the only pertinent information is that the CLI version is not compatible.

Restructure the init command to ensure that we check the core version constraints before handling any parsing diagnostics. We can remove the extra loading of the configuration, which is redundant when the config loader can return the same value along with its diagnostics.

Closes #29109

@teamterraform teamterraform force-pushed the backport/jbardin/required_version/wildly-striking-mink branch from 1044ea3 to bb74d73 Compare September 29, 2021 12:18
@jbardin jbardin merged commit fee01cc into v1.0 Sep 29, 2021
@jbardin jbardin deleted the backport/jbardin/required_version/wildly-striking-mink branch September 29, 2021 12:49
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants