A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.hashicorp.com/terraform/language/v1.9.x/expressions/version-constraints below:

Version Constraints - Configuration Language | Terraform

This topic provides reference information about the version constraints syntax in Terraform configuration language.

Terraform lets you specify a range of acceptable versions for components you define in the configuration. Terraform expects a specially-formatted string to constrain the versions of the component. You can specify version constraints when configuring the following components:

A version constraint is a string literal containing one or more conditions separated by commas.

Each condition consists of an operator and a version number.

Version numbers are a series of numbers separated by periods, for example 1.2.0. It is optional, but you can include a suffix to indicate a beta release. Refer to Specify a pre-release version for additional information.

Use the following syntax to specify version constraints:

version = "<operator> <version>"

In the following example, Terraform installs a versions 1.2.0 and newer, as well as version older than 2.0.0:

version = ">= 1.2.0, < 2.0.0"

The following table describes the operators you can use to configure version constraints:

Operator Description =,
no operator Allows only one exact version number. Cannot be combined with other conditions. != Excludes an exact version number. >,
>=,
<,
<= Compares to a specified version. Terraform allows versions that resolve to true. The > and >= operators request newer versions. The < and <= operators request older versions. ~> Allows only the right-most version component to increment. Examples:

Terraform uses versions that meet all applicable constraints.

Terraform consults version constraints to determine whether it has acceptable versions of itself, any required provider plugins, and any required modules. For plugins and modules, Terraform uses the newest installed version that meets the applicable constraints.

When Terraform does not have an acceptable version of a required plugin or module, it attempts to download the newest version that meets the applicable constraints.

When Terraform is unable to obtain acceptable versions of external dependencies or if it does not have an acceptable version of itself, then it does not proceed with any terraform plan, terraform apply, or terraform state operations.

The root module and any child modules can constrain the Terraform version and any provider versions the modules use. Terraform considers these constraints equal, and only proceeds if all are met.

Specify a pre-release version

A pre-release version is a version number that contains a suffix introduced by a dash, for example 1.2.0-beta. To configure Terraform to select a pre-release version, set the exact version number using the = operator. You can also omit the operator and specify the exact pre-release version. Terraform does not match pre-release versions on >, >=, <, <=, or ~> operators.

We recommend implementing the following best practices when configuration version constraints.

Module versions Terraform core and provider versions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4