Skip to content

Support newer versions of the AWS Provider #679

@jrstarke

Description

@jrstarke

Description

In April, HashiCorp replaced their GPG key due to an exposure (https://discuss.hashicorp.com/t/hcsec-2021-12-codecov-security-event-and-hashicorp-gpg-key-exposure/23512). Newer releases of the Terraform Providers are only signed with the new key.

When attempting to use a newer provider with a version of terraform before 0.12.31, you would get an error message like the following:

No provider "aws" plugins meet the constraint ">= 3.15,>= 3.38". The version constraint is derived from the "version" argument within the provider "aws" block in configuration. Child modules may also apply provider version constraints. To view the provider versions requested by each module in the current configuration, run "terraform providers". To proceed, the version constraints for this provider must be relaxed by either adjusting or removing the "version" argument in the provider blocks throughout the configuration. Warning: registry.terraform.io: This version of Terraform has an outdated GPG key and is unable to verify new provider releases. Please upgrade Terraform to at least 0.12.31 to receive new provider updates. For details see: https://discuss.hashicorp.com/t/hcsec-2021-12-codecov-security-event-and-hashicorp-gpg-key-exposure/23512 ... Error: no suitable version is available 

⚠️ Note

Before you submit an issue, please perform the following first:

  1. Remove the local .terraform directory (! ONLY if state is stored remotely, which hopefully you are following that best practice!): rm -rf .terraform/
  2. Re-initialize the project root to pull down modules: terraform init
  3. Re-attempt your terraform plan or apply and check if the issue still persists

Versions

  • Terraform: v0.12.26
  • Provider(s):
  • provider.aws v3.38.0
  • Module: master

Reproduction

  1. Set the aws version in versions.tf to >= 3.37
  2. cd examples/simple-vpc && terraform init
  3. Set the aws version in versions.tf to >= 3.38
  4. terraform init

Code Snippet to Reproduce

terraform { required_version = ">= 0.12.26" required_providers { aws = { source = "hashicorp/aws" version = ">= 3.38" } } } 

Expected behavior

The project initializes as expected

Actual behavior

Init is unable to find a suitable version, because it can't verify the signature with this version of terraform

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions