-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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: Invalid provider version constraints #26631
Comments
Thanks for reporting this! I've confirmed the issue. The specific error output on second run of
|
There's a possible fix for this in #26637, although I'm not completely sure that's the right approach. One thing to note here is that I don't think Terraform intentionally supports the With that in mind, a different fix might be to make the version constraint in the original configuration invalid, with a useful diagnostic explaining what the alternatives are. |
As terraform is moving closer to 1.0, is now the time to tighten up on version specifiers since the behavior is not exactly explicit on just major.minor? |
Yeah, I think it would be helpful to have a deprecation for version constraints with no operator and fewer than three version segments. |
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. |
Terraform Version
Terraform Configuration Files
Debug Output
https://gist.github.com/danieladams456/2a62510f5646fb073647f9e367c68062
Expected Behavior
terraform init should be able to be run twice.
Actual Behavior
The second time terraform init runs, it errors. This seems to be due the required_providers using a single version string like "3.11" and it being saved in the lock file as "3.11.*".
Steps to Reproduce
terraform init
terraform init
Additional Context
.terraform.lock.hcl
contents:References
#26524
The text was updated successfully, but these errors were encountered: