terraform-aws-modules / terraform-aws-apigateway-v2

Terraform module to create AWS API Gateway v2 (HTTP/WebSocket) 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/apigateway-v2/aws
Apache License 2.0
144 stars 187 forks source link

Mark v1.9.0 as Breaking due to AWS Provider #73

Closed Hugo-Dahl-Tyler closed 2 years ago

Hugo-Dahl-Tyler commented 2 years ago

Description

Running terraform install or terraform install -upgrade is failing due to conflicting AWS providers between modules.

Most of the modules I currently use in my project support AWS provider < 4.0.0, and I've set all my modules to be restrictive based on the current major version based on Semver, including "terraform-aws-apigateway-v2".

However, between 1.8.0 and 1.9.0, the AWS provider was changed from >= 3.24.0 to >= 4.0. With such a change in a provider, and potentially module, I would expect the module to also be updated by a major version to follow Semver convention.

If your request is for a new feature, please use the Feature request template.

⚠️ 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

Reproduction Code [Required]

Steps to reproduce the behaviour:

  1. Create a new project with a module using the following source information
    source  = "terraform-aws-modules/s3-bucket/aws"
    version = ">= 2.9.0, < 3.0.0"
  2. Add another module to the same project with the following module source information
    source  = "terraform-aws-modules/apigateway-v2/aws"
    version = ">=1.5.0, <2.0.0"
  3. Run terraform init
  4. Execution fails due to incompatible AWS providers
Hugo-Dahl-Tyler commented 2 years ago

A temporary workaround would be to set the version range for the terraform-aws-apigateway-v2 to < 1.9.0, however, if there are others who are setting version ranges in a similar semver-compatible manner, this would also impact them.

antonbabenko commented 2 years ago

This issue has been resolved in version 2.0.0 :tada:

antonbabenko commented 2 years ago

Thanks @Hugo-Dahl-Tyler for reporting this issue! It is still rather hard to remember all these versioning strategies and procedures.

Hugo-Dahl-Tyler commented 2 years ago

Agreed @antonbabenko - especially when you start working with more and more modules, which each have their own versioning to manage, as well as maintaining compatibility with the provider. Thanks for looking at it so quickly!

github-actions[bot] commented 1 year 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.