terraform-aws-modules / terraform-aws-s3-bucket

Terraform module to create AWS S3 resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/s3-bucket/aws
Apache License 2.0
526 stars 3.62k forks source link

Breaking change introduced in 4.2.0 #291

Closed BeyondEvil closed 1 month ago

BeyondEvil commented 1 month ago

This change causes Error: Failed to query available provider packages given this version pin:

module "private_s3" {
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 4.0"
  ...

given the following AWS provider config:

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "5.65.0"
    }
    ...

No action here I guess, but wanted to share if someone else gets this as the output from terraform isn't very helpful.

antonbabenko commented 1 month ago

Module version 4.2.0 requires at least version 5.70.0 of AWS provider. Please make sure that you run terraform init -upgrade to fetch newer version of the providers.

BeyondEvil commented 1 month ago

Module version 4.2.0 requires at least version 5.70.0 of AWS provider. Please make sure that you run terraform init -upgrade to fetch newer version of the providers.

For some reason that failed with the same error.

Regardless, this isn't necessarily a terraform-aws-modules fault.

When using 3rd-party modules, one should pin the exact version as per best practices: https://developer.hashicorp.com/terraform/language/expressions/version-constraints#best-practices

github-actions[bot] commented 1 week ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.