Skip to content

Remove maximum version constraint for providers #497

Open
@ryan-jan

Description

@ryan-jan

TL;DR

Terraform's best practices specifically state to not constrain the maximum version of providers in shared/reusable modules. It causes such an unnecessary headache - please stop doing this!

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.

  • Root modules should use a ~> constraint to set both a lower and upper bound on versions for each provider they depend on.

Expected behavior

Only constrain the minimum version for any required providers. For example:

    google = {
      source  = "hashicorp/google"
      version = ">= 6.0"
    }
    google-beta = {
      source  = "hashicorp/google-beta"
      version = ">= 6.0"
    }

Observed behavior

Unnecessary dependency hell!

Terraform Configuration

N/A

Terraform Version

N/A

Terraform Provider Versions

N/A

Additional information

I do note that this was raised before, but I think it needs to be revisited as I cannot see any benefit in constraining the maximum versions in these modules - only unnecessary headaches to unpick.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions