From 0ab7c1b90e2e232ecf9519f891d849c7944abf3a Mon Sep 17 00:00:00 2001 From: Nick Fagerlund Date: Fri, 31 Jul 2020 13:16:35 -0700 Subject: [PATCH] website: Add links to relevant Learn guides in several docs pages (#25718) Co-authored-by: Tu Nguyen --- website/docs/commands/apply.html.markdown | 2 ++ website/docs/commands/import.html.md | 2 ++ website/docs/commands/index.html.markdown | 2 ++ website/docs/commands/init.html.markdown | 2 ++ website/docs/commands/plan.html.markdown | 2 ++ website/docs/configuration/index.html.md | 2 ++ website/docs/configuration/modules.html.md | 6 +++--- website/docs/configuration/provider-requirements.html.md | 2 ++ website/docs/configuration/resources.html.md | 8 ++++++++ website/docs/import/index.html.md | 2 ++ website/docs/import/usage.html.md | 2 ++ website/docs/plugins/provider.html.md | 4 +++- website/docs/provisioners/index.html.markdown | 2 ++ 13 files changed, 34 insertions(+), 4 deletions(-) diff --git a/website/docs/commands/apply.html.markdown b/website/docs/commands/apply.html.markdown index c0e26398b..9631dc1bc 100644 --- a/website/docs/commands/apply.html.markdown +++ b/website/docs/commands/apply.html.markdown @@ -8,6 +8,8 @@ description: |- # Command: apply +> For a hands-on tutorial, try the [Get Started](https://learn.hashicorp.com/terraform/getting-started/intro?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) track on HashiCorp Learn. + The `terraform apply` command is used to apply the changes required to reach the desired state of the configuration, or the pre-determined set of actions generated by a `terraform plan` execution plan. diff --git a/website/docs/commands/import.html.md b/website/docs/commands/import.html.md index f10bbdddc..77b405494 100644 --- a/website/docs/commands/import.html.md +++ b/website/docs/commands/import.html.md @@ -8,6 +8,8 @@ description: |- # Command: import +> For a hands-on tutorial, try the [Import Terraform Configuration](https://learn.hashicorp.com/terraform/state/import?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial on HashiCorp Learn. + The `terraform import` command is used to [import existing resources](/docs/import/index.html) into Terraform. diff --git a/website/docs/commands/index.html.markdown b/website/docs/commands/index.html.markdown index 2ef8cc110..8a1d10d95 100644 --- a/website/docs/commands/index.html.markdown +++ b/website/docs/commands/index.html.markdown @@ -8,6 +8,8 @@ description: |- # Terraform Commands (CLI) +> For a hands-on tutorial, try the [Get Started](https://learn.hashicorp.com/terraform/getting-started/intro?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) track on HashiCorp Learn. + Terraform is controlled via a very easy to use command-line interface (CLI). Terraform is only a single command-line application: terraform. This application then takes a subcommand such as "apply" or "plan". The complete list of subcommands diff --git a/website/docs/commands/init.html.markdown b/website/docs/commands/init.html.markdown index 81067b3aa..3d2e5485f 100644 --- a/website/docs/commands/init.html.markdown +++ b/website/docs/commands/init.html.markdown @@ -8,6 +8,8 @@ description: |- # Command: init +> For a hands-on tutorial, try the [Get Started](https://learn.hashicorp.com/terraform/getting-started/intro?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) track on HashiCorp Learn. + The `terraform init` command is used to initialize a working directory containing Terraform configuration files. This is the first command that should be run after writing a new Terraform configuration or cloning an existing one diff --git a/website/docs/commands/plan.html.markdown b/website/docs/commands/plan.html.markdown index 0cb2731a3..add83ddb6 100644 --- a/website/docs/commands/plan.html.markdown +++ b/website/docs/commands/plan.html.markdown @@ -8,6 +8,8 @@ description: |- # Command: plan +> For a hands-on tutorial, try the [Get Started](https://learn.hashicorp.com/terraform/getting-started/intro?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) track on HashiCorp Learn. + The `terraform plan` command is used to create an execution plan. Terraform performs a refresh, unless explicitly disabled, and then determines what actions are necessary to achieve the desired state specified in the diff --git a/website/docs/configuration/index.html.md b/website/docs/configuration/index.html.md index 0287b1105..74aad4399 100644 --- a/website/docs/configuration/index.html.md +++ b/website/docs/configuration/index.html.md @@ -14,6 +14,8 @@ description: |- earlier, see [0.11 Configuration Language](../configuration-0-11/index.html). +> For a hands-on tutorial, try the [Get Started](https://learn.hashicorp.com/terraform/getting-started/intro?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) track on HashiCorp Learn. + Terraform uses its own configuration language, designed to allow concise descriptions of infrastructure. The Terraform language is declarative, describing an intended goal rather than the steps to reach that goal. diff --git a/website/docs/configuration/modules.html.md b/website/docs/configuration/modules.html.md index 64cd3cf45..02cebace4 100644 --- a/website/docs/configuration/modules.html.md +++ b/website/docs/configuration/modules.html.md @@ -12,6 +12,8 @@ description: |- earlier, see [0.11 Configuration Language: Modules](../configuration-0-11/modules.html). +> For a hands-on tutorial, try the [Organize Configuration with Modules](https://learn.hashicorp.com/terraform/modules/modules-overview?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) track on HashiCorp Learn. + A _module_ is a container for multiple resources that are used together. Every Terraform configuration has at least one module, known as its @@ -28,9 +30,7 @@ This page describes how to call one module from another. Other pages in this section of the documentation describe the different elements that make up modules, and there is further information about how modules can be used, created, and published in [the dedicated _Modules_ -section](/docs/modules/index.html). You can also learn more about how to use and -create modules with our hands-on [modules track on -learn.hashicorp.com](https://learn.hashicorp.com/terraform/modules/modules-overview?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS). +section](/docs/modules/index.html). ## Calling a Child Module diff --git a/website/docs/configuration/provider-requirements.html.md b/website/docs/configuration/provider-requirements.html.md index c906d3d4a..e5dd74497 100644 --- a/website/docs/configuration/provider-requirements.html.md +++ b/website/docs/configuration/provider-requirements.html.md @@ -40,6 +40,8 @@ is the main directory of publicly available Terraform providers, and hosts providers for most major infrastructure platforms. You can also write and distribute your own Terraform providers, for public or private use. +> For a hands-on tutorial about creating a custom Terraform provider, try the [Call APIs with Terraform Providers](https://learn.hashicorp.com/terraform/providers/setup-implement-read?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) track on HashiCorp Learn. + ### Provider Installation Terraform finds and installs providers when diff --git a/website/docs/configuration/resources.html.md b/website/docs/configuration/resources.html.md index 080e0ec01..d5bc07618 100644 --- a/website/docs/configuration/resources.html.md +++ b/website/docs/configuration/resources.html.md @@ -14,6 +14,8 @@ description: |- earlier, see [0.11 Configuration Language: Resources](../configuration-0-11/resources.html). +> For a hands-on tutorial, try the [Get Started](https://learn.hashicorp.com/terraform/getting-started/intro?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) track on HashiCorp Learn. + _Resources_ are the most important element in the Terraform language. Each resource block describes one or more infrastructure objects, such as virtual networks, compute instances, or higher-level components such @@ -287,6 +289,8 @@ However, sometimes you want to manage several similar objects, such as a fixed pool of compute instances. Terraform has two ways to do this: `count` and [`for_each`][inpage-for_each]. +> For a hands-on tutorial, try the [Manage Similar Resources With Count](https://learn.hashicorp.com/terraform/configuration/count?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) guide on HashiCorp Learn. + The `count` meta-argument accepts a whole number, and creates that many instances of the resource. Each instance has a distinct infrastructure object associated with it (as described above in @@ -388,6 +392,8 @@ However, sometimes you want to manage several similar objects, such as a fixed pool of compute instances. Terraform has two ways to do this: [`count`][inpage-count] and `for_each`. +> For a hands-on tutorial, try the [Manage Similar Resources With For Each](https://learn.hashicorp.com/terraform/configuration/for-each?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) guide on HashiCorp Learn. + The `for_each` meta-argument accepts a map or a set of strings, and creates an instance for each item in that map or set. Each instance has a distinct infrastructure object associated with it (as described above in @@ -701,6 +707,8 @@ the processing happens too early for arbitrary expression evaluation. [inpage-provisioner]: #provisioner-and-connection-resource-provisioners +> For hands-on tutorials about handling provisioning actions declaratively, try the [Provision Infrastructure Deployed with Terraform](https://learn.hashicorp.com/terraform/provision/packer?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) track on HashiCorp Learn. + Some infrastructure objects require some special actions to be taken after they are created before they can become fully functional. For example, compute instances may require configuration to be uploaded or a configuration management diff --git a/website/docs/import/index.html.md b/website/docs/import/index.html.md index 4ca58fd61..97fb598c5 100644 --- a/website/docs/import/index.html.md +++ b/website/docs/import/index.html.md @@ -10,6 +10,8 @@ description: |- # Import +> For a hands-on tutorial, try the [Import Terraform Configuration](https://learn.hashicorp.com/terraform/state/import?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) guide on HashiCorp Learn. + Terraform is able to import existing infrastructure. This allows you take resources you've created by some other means and bring it under Terraform management. diff --git a/website/docs/import/usage.html.md b/website/docs/import/usage.html.md index f7b3b6f11..16009f1c1 100644 --- a/website/docs/import/usage.html.md +++ b/website/docs/import/usage.html.md @@ -8,6 +8,8 @@ description: |- # Import Usage +> For a hands-on tutorial, try the [Import Terraform Configuration](https://learn.hashicorp.com/terraform/state/import?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) guide on HashiCorp Learn. + The `terraform import` command is used to import existing infrastructure. The command currently can only import one resource at a time. This means diff --git a/website/docs/plugins/provider.html.md b/website/docs/plugins/provider.html.md index 5bcf819bc..330902dbb 100644 --- a/website/docs/plugins/provider.html.md +++ b/website/docs/plugins/provider.html.md @@ -10,11 +10,13 @@ description: |- ~> **Advanced topic!** Plugin development is a highly advanced topic in Terraform, and is not required knowledge for day-to-day usage. -If you don't plan on writing any plugins, this section of the documentation is +If you don't plan on writing any plugins, this section of the documentation is not necessary to read. For general use of Terraform, please see our [Intro to Terraform](/intro/index.html) and [Getting Started](https://learn.hashicorp.com/terraform/getting-started/install) guides. +> For a hands-on tutorial, try the [Call APIs with Terraform Providers](https://learn.hashicorp.com/terraform/providers/provider-use?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) track on HashiCorp Learn. + A provider in Terraform is responsible for the lifecycle of a resource: create, read, update, delete. An example of a provider is AWS, which can manage resources of type `aws_instance`, `aws_eip`, `aws_elb`, etc. diff --git a/website/docs/provisioners/index.html.markdown b/website/docs/provisioners/index.html.markdown index 374ed5f39..6fa5d0968 100644 --- a/website/docs/provisioners/index.html.markdown +++ b/website/docs/provisioners/index.html.markdown @@ -14,6 +14,8 @@ for service. ## Provisioners are a Last Resort +> For hands-on tutorials about handling provisioning actions declaratively, try the [Provision Infrastructure Deployed with Terraform](https://learn.hashicorp.com/terraform/provision/packer?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) track on HashiCorp Learn. + Terraform includes the concept of provisioners as a measure of pragmatism, knowing that there will always be certain behaviors that can't be directly represented in Terraform's declarative model.