Skip to main content
Knowledge Base

Terraform modules: provider constraints and upper and lower bounds

Answer

A customer asked: > I notice that some Gruntwork modules have very specific constraints, where the provider version is required to be `>= 3.66.0`, whereas in other places, the provider constraint that is set only specifies the upper bound, e.g.; `< 4.0`. Why is this done?

There are some situations where a high lower bound, e.g.; `> 3.0, < 4.0`, could cause problems. For example, there might be a bug for a resource in the newer provider versions and you'd like to explicitly avoid the broken versions. In general, we find that setting a lower bound is not very flexible and has the potential to cause issues we're not aware of, so we try to avoid setting a high lower bound, or a lower bound at all, wherever possible.