From 4d4fe85227228755a8f5611f50bc777a22014430 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 11 Jan 2018 12:38:43 -0500 Subject: [PATCH 1/2] Documentation: Add version specifier information to provider version docs and clarify pessimistic specifier --- website/docs/configuration/providers.html.md | 10 ++++++++++ website/docs/modules/usage.html.markdown | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/website/docs/configuration/providers.html.md b/website/docs/configuration/providers.html.md index 074569b03..cf855b9c0 100644 --- a/website/docs/configuration/providers.html.md +++ b/website/docs/configuration/providers.html.md @@ -110,6 +110,16 @@ This special argument applies to _all_ providers. view the specified version constraints for all providers used in the current configuration. +The `version` attribute value may either be a single explicit version or +a version constraint expression. Constraint expressions use the following +syntax to specify a _range_ of versions that are acceptable: + +* `>= 1.2.0`: version 1.2.0 or newer +* `<= 1.2.0`: version 1.2.0 or older +* `~> 1.2.0`: any non-beta version between 1.2.0 (inclusive) and 1.3.0 (exclusive), e.g. `1.2.X` +* `~> 1.2`: any non-beta version between 1.2.0 (inclusive) and 2.0.0 (exclusive), e.g. `1.X.Y` +* `>= 1.0.0, <= 2.0.0`: any version between 1.0.0 and 2.0.0 inclusive + When `terraform init` is re-run with providers already installed, it will use an already-installed provider that meets the constraints in preference to downloading a new version. To upgrade to the latest acceptable version diff --git a/website/docs/modules/usage.html.markdown b/website/docs/modules/usage.html.markdown index 83ed03c6d..8797f6afb 100644 --- a/website/docs/modules/usage.html.markdown +++ b/website/docs/modules/usage.html.markdown @@ -93,7 +93,8 @@ syntax to specify a _range_ of versions that are acceptable: * `>= 1.2.0`: version 1.2.0 or newer * `<= 1.2.0`: version 1.2.0 or older -* `~> 1.2`: any non-beta patch release within the `1.2` range +* `~> 1.2.0`: any non-beta version between 1.2.0 (inclusive) and 1.3.0 (exclusive), e.g. `1.2.X` +* `~> 1.2`: any non-beta version between 1.2.0 (inclusive) and 2.0.0 (exclusive), e.g. `1.X.Y` * `>= 1.0.0, <= 2.0.0`: any version between 1.0.0 and 2.0.0 inclusive When depending on third-party modules, references to specific versions are From 939f20011eee755e6c427a414c9166fd21fce1b4 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 11 Jan 2018 12:46:00 -0500 Subject: [PATCH 2/2] Documentation: Cleaner copy around pessimistic version specifiers for modules and providers --- website/docs/configuration/providers.html.md | 4 ++-- website/docs/modules/usage.html.markdown | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/website/docs/configuration/providers.html.md b/website/docs/configuration/providers.html.md index cf855b9c0..8fd95db83 100644 --- a/website/docs/configuration/providers.html.md +++ b/website/docs/configuration/providers.html.md @@ -116,8 +116,8 @@ syntax to specify a _range_ of versions that are acceptable: * `>= 1.2.0`: version 1.2.0 or newer * `<= 1.2.0`: version 1.2.0 or older -* `~> 1.2.0`: any non-beta version between 1.2.0 (inclusive) and 1.3.0 (exclusive), e.g. `1.2.X` -* `~> 1.2`: any non-beta version between 1.2.0 (inclusive) and 2.0.0 (exclusive), e.g. `1.X.Y` +* `~> 1.2.0`: any non-beta version `>= 1.2.0` and `< 1.3.0`, e.g. `1.2.X` +* `~> 1.2`: any non-beta version `>= 1.2.0` and `< 2.0.0`, e.g. `1.X.Y` * `>= 1.0.0, <= 2.0.0`: any version between 1.0.0 and 2.0.0 inclusive When `terraform init` is re-run with providers already installed, it will diff --git a/website/docs/modules/usage.html.markdown b/website/docs/modules/usage.html.markdown index 8797f6afb..d49cd776f 100644 --- a/website/docs/modules/usage.html.markdown +++ b/website/docs/modules/usage.html.markdown @@ -93,8 +93,8 @@ syntax to specify a _range_ of versions that are acceptable: * `>= 1.2.0`: version 1.2.0 or newer * `<= 1.2.0`: version 1.2.0 or older -* `~> 1.2.0`: any non-beta version between 1.2.0 (inclusive) and 1.3.0 (exclusive), e.g. `1.2.X` -* `~> 1.2`: any non-beta version between 1.2.0 (inclusive) and 2.0.0 (exclusive), e.g. `1.X.Y` +* `~> 1.2.0`: any non-beta version `>= 1.2.0` and `< 1.3.0`, e.g. `1.2.X` +* `~> 1.2`: any non-beta version `>= 1.2.0` and `< 2.0.0`, e.g. `1.X.Y` * `>= 1.0.0, <= 2.0.0`: any version between 1.0.0 and 2.0.0 inclusive When depending on third-party modules, references to specific versions are