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

hashicorp/aws: Could not resolve provider hashicorp/aws: the previously-selected version, 5.48.0 is no longer available #455

Open
Breee opened this issue May 7, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Breee
Copy link

Breee commented May 7, 2024

Thank you for reporting an issue.

At May 3, 2024 at 3:00:22 AM GMT+2 we tried to update the AWS provider to 5.48.0

$ gitlab-tofu init
Initializing the backend...
Successfully configured the backend "http"! OpenTofu will automatically
use this backend unless the backend configuration changes.
Initializing provider plugins...
- Finding latest version of hashicorp/time...
- Finding hashicorp/azuread versions matching "~> 2.48.0"...
- Finding hashicorp/random versions matching "3.6.1"...
- Finding hashicorp/aws versions matching "5.48.0"...
- Installing hashicorp/time v0.11.1...
- Installed hashicorp/time v0.11.1 (signed, key ID 0C0AF313E5FD9F80)
- Installing hashicorp/azuread v2.48.0...
- Installed hashicorp/azuread v2.48.0 (signed, key ID 0C0AF313E5FD9F80)
- Installing hashicorp/random v3.6.1...
- Installed hashicorp/random v3.6.1 (signed, key ID 0C0AF313E5FD9F80)
- Installing hashicorp/aws v5.48.0...
- Installed hashicorp/aws v5.48.0 (signed, key ID 0C0AF313E5FD9F80)
Providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://opentofu.org/docs/cli/plugins/signing/
OpenTofu has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that OpenTofu can guarantee to make the same selections by default when
you run "tofu init" in the future.
OpenTofu has been successfully initialized!
$ gitlab-tofu validate
Initializing provider plugins...
- Reusing previous version of hashicorp/aws from the dependency lock file
- Reusing previous version of hashicorp/time from the dependency lock file
- Reusing previous version of hashicorp/azuread from the dependency lock file
- Reusing previous version of hashicorp/random from the dependency lock file
- Using previously-installed hashicorp/time v0.11.1
- Using previously-installed hashicorp/azuread v2.48.0
- Using previously-installed hashicorp/random v3.6.1
╷
│ Error: Failed to resolve provider packages
│ 
│ Could not resolve provider hashicorp/aws: the previously-selected version
│ 5.48.0 is no longer available

Now it works again, however, It is a problem if our CI/CD pipelines break when automatically updating the providers using renovate-bot:

  "terraform": {
    "commitMessageTopic": "Terraform {{depName}}",
    "fileMatch": [
      "\\.tf$"
    ],
    "pinDigests": false,
    "registryUrls": ["https://registry.opentofu.org"]
  },

OpenTofu Version

image: 

registry.gitlab.com/components/opentofu/gitlab-opentofu:0.17.0@sha256:0187f906304ba978527336ea04b2ffa92750d07c7ff7f77d6a24538aea80e4be

OpenTofu Configuration Files

terraform {
  backend "http" {
  }

  required_providers {
    azuread = {
      source  = "hashicorp/azuread"
      version = "~> 2.48.0"
    }

    random = {
      source  = "hashicorp/random"
      version = "3.6.1"
    }

    aws = {
      source  = "hashicorp/aws"
      version = "5.48.0"
    }
  }

  required_version = ">= 1.2.0"
}

provider "random" {}

# Configure the Azure Active Directory Provider
provider "azuread" {}

provider "aws" {
  region = "eu-central-1"
}
@Breee Breee added the bug Something isn't working label May 7, 2024
@janosdebugs
Copy link
Contributor

Hey @Breee thank you very much for reporting this issue. It will always take some time for us to update these providers because we are downstream from the HashiCorp variant. @Yantrio was working on getting dependabot support for OpenTofu going, I wonder if we could do something similar for Renovate.

@Breee
Copy link
Author

Breee commented May 7, 2024

Renovate in theory supports other terraform registries, like in my example.
But the version in registry.opentofu.org might have been bumped to early.
i have to test that the next time it happens and look at the logs of renovate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants