website: Add links to relevant Learn guides in several docs pages (#25718)
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
This commit is contained in:
parent
0e5651560b
commit
0ab7c1b90e
|
@ -8,6 +8,8 @@ description: |-
|
||||||
|
|
||||||
# Command: apply
|
# 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
|
The `terraform apply` command is used to apply the changes required
|
||||||
to reach the desired state of the configuration, or the pre-determined
|
to reach the desired state of the configuration, or the pre-determined
|
||||||
set of actions generated by a `terraform plan` execution plan.
|
set of actions generated by a `terraform plan` execution plan.
|
||||||
|
|
|
@ -8,6 +8,8 @@ description: |-
|
||||||
|
|
||||||
# Command: import
|
# 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
|
The `terraform import` command is used to
|
||||||
[import existing resources](/docs/import/index.html)
|
[import existing resources](/docs/import/index.html)
|
||||||
into Terraform.
|
into Terraform.
|
||||||
|
|
|
@ -8,6 +8,8 @@ description: |-
|
||||||
|
|
||||||
# Terraform Commands (CLI)
|
# 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 controlled via a very easy to use command-line interface (CLI).
|
||||||
Terraform is only a single command-line application: terraform. This application
|
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
|
then takes a subcommand such as "apply" or "plan". The complete list of subcommands
|
||||||
|
|
|
@ -8,6 +8,8 @@ description: |-
|
||||||
|
|
||||||
# Command: init
|
# 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
|
The `terraform init` command is used to initialize a working directory
|
||||||
containing Terraform configuration files. This is the first command that should
|
containing Terraform configuration files. This is the first command that should
|
||||||
be run after writing a new Terraform configuration or cloning an existing one
|
be run after writing a new Terraform configuration or cloning an existing one
|
||||||
|
|
|
@ -8,6 +8,8 @@ description: |-
|
||||||
|
|
||||||
# Command: plan
|
# 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
|
The `terraform plan` command is used to create an execution plan. Terraform
|
||||||
performs a refresh, unless explicitly disabled, and then determines what
|
performs a refresh, unless explicitly disabled, and then determines what
|
||||||
actions are necessary to achieve the desired state specified in the
|
actions are necessary to achieve the desired state specified in the
|
||||||
|
|
|
@ -14,6 +14,8 @@ description: |-
|
||||||
earlier, see
|
earlier, see
|
||||||
[0.11 Configuration Language](../configuration-0-11/index.html).
|
[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
|
Terraform uses its own configuration language, designed to allow concise
|
||||||
descriptions of infrastructure. The Terraform language is declarative,
|
descriptions of infrastructure. The Terraform language is declarative,
|
||||||
describing an intended goal rather than the steps to reach that goal.
|
describing an intended goal rather than the steps to reach that goal.
|
||||||
|
|
|
@ -12,6 +12,8 @@ description: |-
|
||||||
earlier, see
|
earlier, see
|
||||||
[0.11 Configuration Language: Modules](../configuration-0-11/modules.html).
|
[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.
|
A _module_ is a container for multiple resources that are used together.
|
||||||
|
|
||||||
Every Terraform configuration has at least one module, known as its
|
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
|
section of the documentation describe the different elements that make up
|
||||||
modules, and there is further information about how modules can be used,
|
modules, and there is further information about how modules can be used,
|
||||||
created, and published in [the dedicated _Modules_
|
created, and published in [the dedicated _Modules_
|
||||||
section](/docs/modules/index.html). You can also learn more about how to use and
|
section](/docs/modules/index.html).
|
||||||
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).
|
|
||||||
|
|
||||||
## Calling a Child Module
|
## Calling a Child Module
|
||||||
|
|
||||||
|
|
|
@ -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
|
providers for most major infrastructure platforms. You can also write and
|
||||||
distribute your own Terraform providers, for public or private use.
|
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
|
### Provider Installation
|
||||||
|
|
||||||
Terraform finds and installs providers when
|
Terraform finds and installs providers when
|
||||||
|
|
|
@ -14,6 +14,8 @@ description: |-
|
||||||
earlier, see
|
earlier, see
|
||||||
[0.11 Configuration Language: Resources](../configuration-0-11/resources.html).
|
[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.
|
_Resources_ are the most important element in the Terraform language.
|
||||||
Each resource block describes one or more infrastructure objects, such
|
Each resource block describes one or more infrastructure objects, such
|
||||||
as virtual networks, compute instances, or higher-level components 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:
|
pool of compute instances. Terraform has two ways to do this:
|
||||||
`count` and [`for_each`][inpage-for_each].
|
`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
|
The `count` meta-argument accepts a whole number, and creates that many
|
||||||
instances of the resource. Each instance has a distinct infrastructure object
|
instances of the resource. Each instance has a distinct infrastructure object
|
||||||
associated with it (as described above in
|
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:
|
pool of compute instances. Terraform has two ways to do this:
|
||||||
[`count`][inpage-count] and `for_each`.
|
[`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
|
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
|
instance for each item in that map or set. Each instance has a distinct
|
||||||
infrastructure object associated with it (as described above in
|
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
|
[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
|
Some infrastructure objects require some special actions to be taken after they
|
||||||
are created before they can become fully functional. For example, compute
|
are created before they can become fully functional. For example, compute
|
||||||
instances may require configuration to be uploaded or a configuration management
|
instances may require configuration to be uploaded or a configuration management
|
||||||
|
|
|
@ -10,6 +10,8 @@ description: |-
|
||||||
|
|
||||||
# Import
|
# 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
|
Terraform is able to import existing infrastructure. This allows you take
|
||||||
resources you've created by some other means and bring it under Terraform
|
resources you've created by some other means and bring it under Terraform
|
||||||
management.
|
management.
|
||||||
|
|
|
@ -8,6 +8,8 @@ description: |-
|
||||||
|
|
||||||
# Import Usage
|
# 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 `terraform import` command is used to import existing infrastructure.
|
||||||
|
|
||||||
The command currently can only import one resource at a time. This means
|
The command currently can only import one resource at a time. This means
|
||||||
|
|
|
@ -10,11 +10,13 @@ description: |-
|
||||||
|
|
||||||
~> **Advanced topic!** Plugin development is a highly advanced
|
~> **Advanced topic!** Plugin development is a highly advanced
|
||||||
topic in Terraform, and is not required knowledge for day-to-day usage.
|
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
|
not necessary to read. For general use of Terraform, please see our
|
||||||
[Intro to Terraform](/intro/index.html) and [Getting
|
[Intro to Terraform](/intro/index.html) and [Getting
|
||||||
Started](https://learn.hashicorp.com/terraform/getting-started/install) guides.
|
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:
|
A provider in Terraform is responsible for the lifecycle of a resource:
|
||||||
create, read, update, delete. An example of a provider is AWS, which
|
create, read, update, delete. An example of a provider is AWS, which
|
||||||
can manage resources of type `aws_instance`, `aws_eip`, `aws_elb`, etc.
|
can manage resources of type `aws_instance`, `aws_eip`, `aws_elb`, etc.
|
||||||
|
|
|
@ -14,6 +14,8 @@ for service.
|
||||||
|
|
||||||
## Provisioners are a Last Resort
|
## 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,
|
Terraform includes the concept of provisioners as a measure of pragmatism,
|
||||||
knowing that there will always be certain behaviors that can't be directly
|
knowing that there will always be certain behaviors that can't be directly
|
||||||
represented in Terraform's declarative model.
|
represented in Terraform's declarative model.
|
||||||
|
|
Loading…
Reference in New Issue