cloudposse / terraform-aws-waf

https://cloudposse.com/accelerate
Apache License 2.0
40 stars 57 forks source link

AWS provider version constraint only allows 4.28.x as of module v0.4.0 #46

Open TylerHendrickson opened 1 year ago

TylerHendrickson commented 1 year ago

Describe the Bug

A commit part of the v0.4.0 release of the cloudposse/waf/aws module changed the version constraint for the AWS provider from >= 4.28.0 to ~> 4.28.0, which means that although AWS provider 4.28.0 is still the minimum for this module, it prevents anyone using an AWS provider version >= 4.29.0.

I'm curious if this is/was intentional, and if so, what would need to be done in order to once again support more recent versions of the AWS provider.

Expected Behavior

This module is usable in projects using versions of the AWS provider that are later than 4.28.x.

Steps to Reproduce

A project containing the following will break when the project also depends on 0.4.0 of this module:

terraform {
  required_version = ">= 1.2.4"

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 4.29.0"
    }
  }
}

To verify:

  1. Checkout the 0.4.0 tag of this repository and navigate to the directory containing the complete example.
  2. Modify the complete example's versions.tf file to match the code snipped above.
  3. Run terraform init.

Screenshots

Following Steps to reproduce produces the following error from terraform init:

╷
│ Error: Failed to query available provider packages
│ 
│ Could not retrieve the list of available versions for provider
│ hashicorp/aws: no available releases match the given constraints
│ ~> 4.28.0, ~> 4.29.0
╵

Environment

Additional Context

No response