From b12ab8c367dc92e28dc93c15569c1cfb5dc9f362 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Tue, 30 Aug 2022 11:47:19 +0200 Subject: [PATCH] Added terraform's versioning TL;DR --- knowledge base/terraform.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/knowledge base/terraform.md b/knowledge base/terraform.md index 04c5cf9..6e4c488 100644 --- a/knowledge base/terraform.md +++ b/knowledge base/terraform.md @@ -87,7 +87,21 @@ Name | Description ## Versioning +Use a _string_ literal containing one or more conditions separated by commas: +```ini +version = ">= 1.2.0, < 2.0.0" +version = "~> 1.3, < 1.9.5" +``` + +Each condition must consist of an operator and a version number. The available operators are as follow: + +Operator | Description +-------------------- | ----------- +`=` or not present | Specify the **exact** version number. It cannot be combined with other conditions. +`!=` | Exclude the **exact** version number. +`>`, `>=`, `<`, `<=` | Compare the available versions against the one specified and allow those for which the comparison is true. +`~>` | Allow only the **rightmost** version component to be incremented. ## Troubleshooting