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

update aws version constraints to 5.0 #1

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

anasgrt
Copy link
Contributor

@anasgrt anasgrt commented Jul 25, 2023

What

Update the AWS Provider version constraints to be 5.0

Why

This module is used in Viaviela production environment and we are doing the update for the providers in terraform code for them and it shows some contradictions in terms of versions constraints ... so this update of this version constraints is required to avoid these contradiction.

Code Review

Please consider the following checklist when reviewing this Pull Request.
More background and details here.

  • Does the code actually solve the problem it was meant to solve?
  • Is the code covered by unit tests? Integration tests?
  • Does anything here need documentation? (Focus on why, not what.)
  • Does any of this code deal with privacy sensitive information or affects security? Ask an additional reviewer.
  • Is the code easy to understand and change in the future?
  • Is the same code or concept duplicated? Find a balance between DRYness and readability.
  • Does the code reasonably adhere to the Kabisa coding standards?
  • Be kind.

@MeesvanStraten MeesvanStraten self-requested a review July 25, 2023 12:04
@anasgrt anasgrt merged commit 443cccb into main Jul 25, 2023
1 of 2 checks passed
@anasgrt anasgrt deleted the chore/upgrade_aws_required_providers_constraints branch July 25, 2023 12:41
@tmeijn
Copy link

tmeijn commented Jul 25, 2023

@anasnedtech @MeesvanStraten I don't understand why this module is locked into version 5? Seems no changes were needed, so it would be better to change the constraint to >= 4, meaning "Version 4 and up". See example here: https://github.com/cloudposse/terraform-aws-rds/blob/main/versions.tf This change is also breaking so based on SemVer the version should actually be 2.0.0.

@anasgrt
Copy link
Contributor Author

anasgrt commented Jul 25, 2023

@tmeijn we are updating the terraform code for Viaviela and they are using AWS provider v4.0; we are updating that to be v5.0 ... the latest version of the AWS provider.. and when I tried to do that terraform just through the following error:
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 >= 2.70.0, ~> │ 4.0, ~> 5.1.0 ... after troubleshooting the terraform code it turned out that this module is used and it has a provider constraints v4.0 which erroring the updating of the Viaviela terraform code..that's why I made a new release of this module with AWS Provider v5.0 constraints.
Regarding the semantic versioning of the release ... I think we are just updating the provider version of this module so it is a minor change not a major change regarding the module itself .. but when I review the Semantic version Docs.. I think it would be saver if I release it with 2.0.0 version!

@tmeijn
Copy link

tmeijn commented Jul 25, 2023

@anasnedtech yes, I understand why you need to change the constraint, but like the example I gave: if you change the constraint to >= 4 I think you will be fine while not introducing the unnecessary requirement to have v5 provider and introducing a breaking change.
In general it's considered best practice to only lower constrain a provider version in a module and not have an upper constrain.

I think we are just updating the provider version of this module so it is a minor change not a major change regarding the module itself .. but when I review the Semantic version Docs.. I think it would be saver if I release it with 2.0.0 version!

Indeed, if I used this module I could not consume your change without having to change my provider === breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants