Attempting to create a new AWS environment using the suggested provider stanza from https://registry.terraform.io/providers/hashicorp/aws/latest/docs fails with
Initializing provider plugins...
- Finding hashicorp/aws versions matching ">= 3.70.0"...
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/aws: no available releases match the given
│ constraints >= 3.70.0
the actual provider stanza being used is
terraform {
required_version = "1.1.2"
required_providers {
aws = {
source = "hashicorp/aws"
version = "3.70.0"
}
}
}
provider "aws" {
# Configuration options
}
However, if I set the version to version = ">= 3.0.0"
it does pull release 3.22.0.
Hm, it works for me
Which platform are you running on? Does the error message change if you use terraform init -upgrade
?
Running Fedora 35. And get the same message regardless and tops out at AWS provider 3.22.0. --upgrade
gives the same message. Also, if it matters, AWS CLI 2.4.6 is installed.
Same issue with fedora 34.
Was hoping for a Christmas miracle but no such luck. I cannot get any AWS provider >3.22.0. What I also see is that is interesting is that it’s “unauthenticated”.
Initializing provider plugins...
- Finding hashicorp/aws versions matching ">= 3.22.0"...
- Finding latest version of hashicorp/random...
- Installing hashicorp/aws v3.22.0...
- Installed hashicorp/aws v3.22.0 (unauthenticated)
- Installing hashicorp/random v3.1.0...
- Installed hashicorp/random v3.1.0 (signed by HashiCorp
Which terraform version are you using?
Well, the version lock points to 1.1.2.
Running with 1.1.2 but also tried with a few earlier versions.
Could you check or (re)move ~/.terraform.d/plugins/
and try again?
Do you have a ~/.terraformrc
?
No…but I did have a ~/.terraform.d. Once I moved that aside, it worked as expected. Thanks for the nudge in the right direction.