pessimistic constraint operator
The ~> version operator, which allows only the rightmost number you wrote to increase.
In more detail
So "~> 3.6" accepts 3.6, 3.7 and later 3.x releases but never 4.0, and "~> 3.6.0" accepts only 3.6.x patch releases. It is the sensible default for providers because it lets in fixes and features without a breaking major release.
Example
version = "~> 3.6" # 3.6 up to, not including, 4.0Related terms
- version constraint — A string such as "~> 3.6" or ">= 1.6.0" that says which versions of Terraform, a provider or a module are acceptable.
- semantic versioning — A version numbering scheme of three numbers, major.minor.patch, raised for breaking changes, new features and fixes respectively.
Taught in
- Installing Terraform And Meeting The CLI — Infrastructure as Code with Terraform
- Providers And The required_providers Block — Infrastructure as Code with Terraform