Interview Prep/Terraform/IaC and Terraform Fundamentals

How do version constraints like `~>`, `>=` and `!=` work?

IntermediateConceptIaC and Terraform Fundamentals
Answer

= 1.2.3 pins exactly; >= 1.2 sets a floor; ~> 5.1 allows 5.x where x is 1 or higher (the rightmost digit may increase); ~> 5.1.0 allows only 5.1.x; != 5.3.0 excludes a bad release. Constraints can be combined with commas. For modules and providers we use ~> to take patches and minors but not majors.

All Terraform questions Roadmap: Terraform

More on IaC and Terraform Fundamentals