hashicorp / terraform

Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
https://www.terraform.io/
Other
42.3k stars 9.49k forks source link

Terraform init downloading wrong aws provider version #25987

Closed Naragorn closed 4 years ago

Naragorn commented 4 years ago

Terraform Version

0.13.0

Terraform Configuration Files

terraform { required_version = "0.13" required_providers { aws = "3.0" } }

Debug Output

Crash Output

Initializing modules...

Initializing the backend...

Successfully configured the backend "s3"! Terraform will automatically use this backend unless the backend configuration changes.

Initializing provider plugins...

The following providers do not have any version constraints in configuration, so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking changes, we recommend adding version constraints in a required_providers block in your configuration, with the constraint strings suggested below.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see any changes that are required for your infrastructure. All Terraform commands should now work.

If you ever set or change modules or backend configuration for Terraform, rerun this command to reinitialize your working directory. If you forget, other commands will detect it and remind you to do so if necessary.

Expected Behavior

Terraform would install and use provider -/aws 3.0

Actual Behavior

Terraform will install and use provider -/aws 3.3, which breaks my code

Steps to Reproduce

terraform { required_version = "0.13" required_providers { aws = "3.0" } }

then run:

terraform init

Additional Context

References

Naragorn commented 4 years ago

Sorry I just saw this is a duplicate of https://github.com/hashicorp/terraform/issues/25819

ghost commented 3 years ago

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.