hashicorp / learn-terraform-provider-versioning

https://learn.hashicorp.com/tutorials/terraform/provider-versioning
Mozilla Public License 2.0
16 stars 54 forks source link

'~>' required_version is not supported anymore #1

Closed Hellboy94520 closed 3 years ago

Hellboy94520 commented 3 years ago

On 'terraform init' command, following error message appear: """ │ Error: Unsupported Terraform Core version │ │ on versions.tf line 14, in terraform: │ 14: required_version = "~> 0.14" │ │ This configuration does not support Terraform version 1.0.4. To proceed, either choose another supported Terraform version or update this version constraint. Version constraints are normally set for good │ reason, so updating the constraint may lead to other errors or unexpected behavior. """

im2nguyen commented 3 years ago

Thanks for reporting! Updated the configuration so it should work 😄

Hellboy94520 commented 3 years ago

Thank you ! 👍

DC4JG commented 2 years ago

It looks like you missed to adapt the website accordingly. It states:

In addition, the Terraform block specifies only Terraform binaries that are v0.14.x can run this configuration. The ~> operator is a convenient shorthand for allowing only patch releases within a specific minor release.

this is inconsistent with required_version = ">= 0.14" as shown in the code block above.