terragrunt icon indicating copy to clipboard operation
terragrunt copied to clipboard

Define syntax of terraform_version_constraint and terragrunt_version_constraint

Open stevenpitts opened this issue 2 years ago • 1 comments

The docs for terraform_version_constraint and terragrunt_version_constraint do not specify syntax rules.

The examples show terraform_version_constraint = ">= 0.11" and terragrunt_version_constraint = ">= 0.23", which gives a partial answer.

My use case was wanting to pin a major and minor version, and it's unclear what syntax I would use to do that.

I've tried terraform_version_constraint = "latest:^0.11" and terraform_version_constraint = "~= 0.11", both of which give Malformed constraint errors.

stevenpitts avatar Sep 02 '22 13:09 stevenpitts

Update: Turns out the syntax I wanted was terraform_version_constraint = "~> 0.11.0". It's actually defined here: https://www.terraform.io/language/expressions/version-constraints#version-constraint-syntax

Could this be linked in the docs?

stevenpitts avatar Sep 02 '22 13:09 stevenpitts