-
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
Terraform doesn't understand pre-release required_version constraint #28148
Comments
Hi @marshall7m, thanks for reporting this. I can see this behaviour too. This is caused by the version package initializing the |
An update after a failed attempt to fix this: while the issue is at root caused by this mismatched |
thanks @alisdair for taking a look at this. I'm not too familiar with the internal aspects of Terraform (and Go in general) but it seems like your PR will fix it. Thanks! |
I don't know if this helps or brings up another issue but when I use |
FYI, this also happens when locally installing Terraform CLI. For example, |
I just reinvestigated implementing the second idea I had posted above, and it's also a non-starter. If we consider the full version (including prerelease) when calculating This is because go-version rejects prerelease versions for constraints which use inequality checks. Making the change I suggested would break the use of modules with any prerelease build. At the risk of being wrong for the third time in a row, I think the only useful thing we can do here is warn or error if the |
That sounds reasonable to me 👍 |
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. |
Terraform Version
Terraform Configuration Files
Debug Output
Crash Output
Expected Behavior
Actual Behavior
Steps to Reproduce
Additional Context
Using tfenv for Terraform version management. Specifically using
tfenv use 0.15.0-beta2
before runningterraform apply
References
The text was updated successfully, but these errors were encountered: