Hi, I’m following the Target Resources tutorial and I get the following failure when I run the
terraform init setup step:
│ Error: Failed to query available provider packages │ │ Could not retrieve the list of available versions for provider hashicorp/aws: locked provider registry.terraform.io/hashicorp/aws 3.39.0 does not match configured version │ constraint ~> 3.39.0, >= 3.50.0; must use terraform init -upgrade to allow selection of new versions
terraform init -upgrade results in this similar error message:
│ 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.39.0, >= 3.50.0
It looks like the ~>3.39.0 version specified in ./main.tf conflicts with the >=3.5.0 contraint from the s3_bucket module (.terraform/modules/s3_bucket/versions.tf).
I’ve tried cloning a clean version of the tutorial repository and keep running into this error. Is this a problem with my local configuration or with the tutorial code? If the latter, what’s the best way to move past this? Should I adjust one of the constraints manually to resolve the conflict?