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

Reusable module provider versions should be pinned using >= constraint instead of ~> #3511

Open
reweeden opened this issue Nov 10, 2023 · 1 comment

Comments

@reweeden
Copy link
Contributor

Currently cumulus reusable modules use the ~> version constraint for the aws provider version. This means that the code which uses that module must also be using the same major version (e.g. 3.x or 5.x) of the terraform provider in order to deploy.

This essentially locks the user of the modules into a range of provider versions. When those provider versions become outdated and stop functioning e.g. due to changes in AWS, the users cannot upgrade to newer versions until a new version of the cumulus modules is released that bump the version number, even if the terraform code is actually completely compatible with other provider versions.

It is recommended in the terraform documentation that reusable modules pin their dependent provider versions using a >= constraint to prevent these issues. See: https://developer.hashicorp.com/terraform/language/expressions/version-constraints#terraform-core-and-provider-versions

Reusable modules should constrain only their minimum allowed versions of Terraform and providers, such as >= 0.12.0. This helps avoid known incompatibilities, while allowing the user of the module flexibility to upgrade to newer versions of Terraform without altering the module.

Note that cumulus is doing this with the terraform version, but not with the provider versions.

@reweeden reweeden changed the title Reusable module provider versions should be pinned using >= 3.0 Reusable module provider versions should be pinned using >= constraint instead of ~> Nov 10, 2023
@codewithmurali
Copy link

codewithmurali commented May 11, 2024

I'm interested in contributing to it. Could you please let me know if the issue is still open and if contributions are welcome at this time? @Jkovarik @reweeden

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

No branches or pull requests

2 participants