Skip to content
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

latest resolve to 3.7.0-alpha1 version and it break with 0.12 terraform version #663

Closed
1 task done
junejasandeep opened this issue Feb 25, 2025 · 6 comments
Closed
1 task done
Labels

Comments

@junejasandeep
Copy link

Terraform CLI and Provider Versions

Terraform v0.12.31
Provider Version: 3.7.0-alpha1 (latest)

Terraform Configuration

resource "random_password" "password" {
  length           = 20
  min_lower        = 1
  min_numeric      = 1
  min_special      = 1
  min_upper        = 1
  special          = true
  override_special = "-_+[]{}?"
}

Expected Behavior

Latest should not be released to pre-release version
Or should work with terraform 0.12 version

Actual Behavior

Image

Steps to Reproduce

  1. terraform init

How much impact is this issue causing?

High

Logs

No response

Additional Information

As we do not have a required_version section, it is resolving to latest and braking the existing service. We have a terraform upgrade with future release but this is breaking the current env.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jamesw4
Copy link

jamesw4 commented Feb 25, 2025

Ran into same issue myself today. While I agree its unusual to see an alpha released be tagged as latest, and maybe that's a mistake. That said - if you are not pinning all providers to a particular major version then breaking changes like this are to be expected.

Have pinned the random provider like my other providers and all good. Try pinning to ~3.6.

@austinvalle
Copy link
Member

Hey everyone 👋🏻 , we're aware of the issue and are currently looking into it.

As @jamesw4 mentioned, the workaround for the moment is to pin to 3.6.3 (the error message coming from TF v0.12.31 mentioning v2.2.1 is a red-herring, v3.6.3 should be good). The upcoming v3.7.0 release will be compatible with TF v0.12.31, it's just not currently reporting the supported protocol versions from the registry properly.

@junejasandeep
Copy link
Author

junejasandeep commented Feb 25, 2025

@austinvalle When 3.7.0 will be released? I just wanted to understand better, as we have a few environments those are impacted and providing a workaround will also take some time.

@bbasata
Copy link

bbasata commented Feb 25, 2025

The upcoming v3.7.0 release will be compatible with TF v0.12.31, it's just not currently reporting the supported protocol versions from the registry properly.

An update on behalf of @austinvalle: v3.7.1 is now released. It will be available once it completes publishing to Terraform Registry. We will keep this issue open while we verify success.

@bbasata
Copy link

bbasata commented Feb 25, 2025

Success with v0.12.31:

$ ./terraform init

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "random" (hashicorp/random) 3.7.1...

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, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.random: version = "~> 3.7"

$ ./terraform version
Terraform v0.12.31
+ provider.random v3.7.1

Your version of Terraform is out of date! The latest version
is 1.10.5. You can update by downloading from https://www.terraform.io/downloads.html

$ cat main.tf
provider "random" {}

@austinvalle
Copy link
Member

austinvalle commented Feb 25, 2025

Thanks @bbasata! I see everything being reported successfully in the registry, so I'm going to close this issue. Please create a new issue if you run into problems with v3.7.1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants