Description
terraform-linters/tflint#1225 fixed the case where a provider was explicitly passed to a module, but stated:
It remains a lint error to declare a required provider when it is implicitly inherited by the child module, as that declaration is the child's responsibility.
But this in conflict with the Terraform best practices:
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.
I.e. the root modules should specify a (stricter) version requirement. But tflint
complains about it.