website: link to dependency lock file tutorial

This commit is contained in:
Nick Fagerlund 2020-12-01 15:20:14 -08:00
parent 652b48bb49
commit d5950b7fd2
3 changed files with 13 additions and 0 deletions

View File

@ -69,6 +69,8 @@ and commit it to version control along with your configuration. If a lock file
is present, Terraform Cloud, CLI, and Enterprise will all obey it when is present, Terraform Cloud, CLI, and Enterprise will all obey it when
installing providers. installing providers.
> **Hands-on:** Try the [Lock and Upgrade Provider Versions](https://learn.hashicorp.com/tutorials/terraform/provider-versioning?in=terraform/configuration-language&utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial on HashiCorp Learn.
## How to Find Providers ## How to Find Providers
To find providers for the infrastructure platforms you use, browse To find providers for the infrastructure platforms you use, browse

View File

@ -9,6 +9,8 @@ page_title: "Dependency Lock File (.terraform.lock.hcl) - Configuration Language
versions of Terraform did not track dependency selections at all, so the versions of Terraform did not track dependency selections at all, so the
information here is not relevant to those versions. information here is not relevant to those versions.
> **Hands-on:** Try the [Lock and Upgrade Provider Versions](https://learn.hashicorp.com/tutorials/terraform/provider-versioning?in=terraform/configuration-language&utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial on HashiCorp Learn.
A Terraform configuration may refer to two different kinds of external A Terraform configuration may refer to two different kinds of external
dependency that come from outside of its own codebase: dependency that come from outside of its own codebase:

View File

@ -217,6 +217,15 @@ The `version` argument is optional; if omitted, Terraform will accept any
version of the provider as compatible. However, we strongly recommend specifying version of the provider as compatible. However, we strongly recommend specifying
a version constraint for every provider your module depends on. a version constraint for every provider your module depends on.
To ensure Terraform always installs the same provider versions for a given
configuration, you can use Terraform CLI to create a
[dependency lock file](/docs/configuration/dependency-lock.html)
and commit it to version control along with your configuration. If a lock file
is present, Terraform Cloud, CLI, and Enterprise will all obey it when
installing providers.
> **Hands-on:** Try the [Lock and Upgrade Provider Versions](https://learn.hashicorp.com/tutorials/terraform/provider-versioning?in=terraform/configuration-language&utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial on HashiCorp Learn.
### Best Practices for Provider Versions ### Best Practices for Provider Versions
Each module should at least declare the minimum provider version it is known Each module should at least declare the minimum provider version it is known