-
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 0.13 downloading wrong version of provider #25819
Comments
Without the required_providers version set call it does only download the 3.1.0 version, but this would defiantly break if you plan to use an older provider with 0.13.0. It is possible that the 2.62 provider is not compatible with 0.13.0 and its not marked as an incompatibility in the provider dependency tree. Is it possible to confirm that the 3.1 provider is actually being used with terraform calls even when your version constraint should prevent that? |
Removing my comments, the proper fix is listed below by alisdair and kstromeiraos |
This command fixed it for me:
|
Explanation & WorkaroundThe source of the Running If for some reason you cannot run All that said, this is not ideal behaviour, and if we could fix it by somehow merging the provider requirements for legacy providers before attempting installation, I think that would be a better user experience. Reproduction
|
Yes, I believe some of us can't run
One doesn't expect that the code must be compatible with AWS provider v. 3.2.0 when the code is still specifying v. 2.x. Perhaps make |
I don't think this is possible because the |
This is another of the issue that is happening and for me, this worked:
Again, this should be handled with |
Can this be added to the 0.13 upgrade docs please? We've been trying to figure this out for hours. |
@alisdair I've tried your suggestion from #25957:
This did not work for me, the latest version is still being downloaded:
Any suggestions? |
@alisdair can you please advise regarding my comment above? |
The suggestion from the other issue was specific to that reporter's situation, which doesn't seem to match yours. The best way forward here is to use the |
Hi! I've already run provider "aws" {
region = var.aws_region
}
terraform {
required_version = "0.13.6"
required_providers {
aws = {
source = "hashicorp/aws"
version = "2.49.0"
}
}
backend "s3" {}
}
A |
For anyone still encountering this problem after running |
Unfortunately, I had tried this as well 😞 not sure if there's something I'm missing re: my output.
|
@virtualdom Huh! I can't imagine what could have caused this combination of errors—where could the requirement for So far, it doesn't seem like it's the same problem as this issue, so if you can reliably reproduce it with a small configuration, we'd like to hear more in a new issue. If not, you may find some help on the community forum. |
random question on this topic.. is it possible that the S3 backend configuration for example uses an internal provider setting somewhere? I've tried to run terraform provider shows:
I've manually checked the state file - there is no reference to If I remember this module correctly, we started out on terraform 0.12.30 - and then upgraded at some point to 0.13.6 - I'm wondering if the S3 backend config uses the -/aws provider still from when we first initialised the backend under 0.12.30? Anybody got any experience with that or any idea where this setting might be? Our CI spins up a fresh terraform 0.13.6 container, does a fresh repo checkout, tf init, tf plan, tf apply every time it runs, so it's something that I would have thought comes out of the state somewhere, but can't find it. It's not a major issues as I now know that our modules use the correct pinned hashicorp/aws provider version, but it's confusing and annoying to anybody who hasn't gone down this rabbit hole.. |
Hi all! Terraform v0.13 is pretty old by now so I don't expect we'll be making any further changes to that line of releases. Some folks above suggested documenting Because the v0.13 series is closed to new development, and because |
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
0.13.0
Terraform Configuration Files
Expected Behavior
Terraform will only download version 2.62.0 of aws provider.
Actual Behavior
Terraform downloaded version 2.62.0 and 3.1.0 of aws provider.
This then causes an issue when I run
terraform apply
where it shows it can't decode a field (issue described here: #25752).Steps to Reproduce
terraform 0.13upgrade
terraform init
The text was updated successfully, but these errors were encountered: