Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions content/terraform/v1.13.x/data/cli-nav-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"title": "Provisioning Infrastructure",
"routes": [
{ "title": "Overview", "path": "run" },
{ "title": "<code>plan</code>", "href": "/cli/commands/plan" },
{ "title": "<code>apply</code>", "href": "/cli/commands/apply" },
{ "title": "<code>plan</code>", "href": "/cli/commands/plan", "alias": "actions" },
{ "title": "<code>apply</code>", "href": "/cli/commands/apply", "alias": "actions" },
{ "title": "<code>destroy</code>", "href": "/cli/commands/destroy" }
]
},
Expand Down Expand Up @@ -56,11 +56,20 @@
{
"title": "Import Infrastructure",
"routes": [
{ "title": "Overview", "path": "import" },
{ "title": "Import existing resources", "path": "import/usage" },
{
"title": "Overview",
"path": "import",
"alias": "search, query"
},
{
"title": "Import existing resources",
"path": "import/usage",
"alias": "search, query"
},
{
"title": "Reference",
"href": "/cli/commands/import"
"href": "/cli/commands/import",
"alias": "search, query"
}
]
},
Expand Down Expand Up @@ -296,7 +305,7 @@
"title": "Alphabetical List of Commands",
"routes": [
{ "title": "Overview", "href": "/cli/commands" },
{ "title": "<code>apply</code>", "href": "/cli/commands/apply" },
{ "title": "<code>apply</code>", "href": "/cli/commands/apply", "alias": "actions" },
{ "title": "<code>console</code>", "href": "/cli/commands/console" },
{ "title": "<code>destroy</code>", "href": "/cli/commands/destroy" },
{ "title": "<code>fmt</code>", "href": "/cli/commands/fmt" },
Expand All @@ -312,7 +321,7 @@
{ "title": "<code>logout</code>", "href": "/cli/commands/logout" },
{ "title": "<code>modules</code>", "href": "/cli/commands/modules" },
{ "title": "<code>output</code>", "href": "/cli/commands/output" },
{ "title": "<code>plan</code>", "href": "/cli/commands/plan" },
{ "title": "<code>plan</code>", "href": "/cli/commands/plan", "alias": "actions" },
{ "title": "<code>providers</code>", "href": "/cli/commands/providers" },
{
"title": "<code>providers lock</code>",
Expand Down Expand Up @@ -392,7 +401,7 @@
"hidden": true,
"routes": [
{ "title": "Overview", "path": "commands" },
{ "title": "apply", "path": "commands/apply" },
{ "title": "apply", "path": "commands/apply", "alias": "actions" },
{ "title": "console", "path": "commands/console" },
{ "title": "destroy", "path": "commands/destroy" },
{ "title": "fmt", "path": "commands/fmt" },
Expand All @@ -405,7 +414,7 @@
{ "title": "logout", "path": "commands/logout" },
{ "title": "modules", "path": "commands/modules" },
{ "title": "output", "path": "commands/output" },
{ "title": "plan", "path": "commands/plan" },
{ "title": "plan", "path": "commands/plan", "alias": "actions" },
{
"title": "providers",
"routes": [
Expand Down
17 changes: 12 additions & 5 deletions content/terraform/v1.13.x/data/language-nav-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,14 @@
{
"title": "Import existing resources",
"routes": [
{ "title": "Import a resource", "path": "import" },
{ "title": "Import a resource",
"path": "import",
"alias": "search, query"
},
{
"title": "Generate resource configuration",
"path": "import/generating-configuration"
"path": "import/generating-configuration",
"alias": "search, query"
}
]
},
Expand Down Expand Up @@ -276,7 +280,8 @@
},
{
"title": "import",
"path": "block/import"
"path": "block/import",
"alias": "search, query"
},
{
"title": "locals",
Expand Down Expand Up @@ -304,7 +309,8 @@
},
{
"title": "resource",
"path": "block/resource"
"path": "block/resource",
"alias": "actions"
},
{
"title": "terraform",
Expand Down Expand Up @@ -349,7 +355,8 @@
},
{
"title": "Meta-arguments",
"path": "meta-arguments"
"path": "meta-arguments",
"alias": "actions"
},
{
"title": "Built-in resources",
Expand Down
6 changes: 6 additions & 0 deletions content/terraform/v1.13.x/docs/cli/commands/apply.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ plan.

> **Hands On:** Try the [Apply Terraform Configuration](/terraform/tutorials/cli/apply?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial to learn how Terraform applies a configuration, how Terraform recovers from errors during apply, and common ways to use this command.

<Note>

Terraform `v1.14.x (beta)` adds the `-invoke` flag, which lets you trigger actions outside of Terraform CRUD operations. Refer to the [Invoke an action](/terraform/language/v1.14.x/invoke-actions) beta documentation for more information.

</Note>

## Usage

Usage: `terraform apply [options] [plan file]`
Expand Down
6 changes: 5 additions & 1 deletion content/terraform/v1.13.x/docs/cli/commands/import.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ description: The `terraform import` command imports existing resources into Terr

The `terraform import` command imports existing resources into Terraform. Refer to [Import](/terraform/cli/import) for additional information.


> **Hands-on:** Try the [Import Terraform Configuration](/terraform/tutorials/state/state-import?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial.

<Note>

Terraform `v1.14.x (beta)` lets you search existing infrastructure for resources, generate configuration, and import them in bulk. Refer to the [Import existing resources in bulk](/terraform/language/v1.14.x/import/bulk) beta documentation for more information.

</Note>

## Usage

Expand Down
7 changes: 7 additions & 0 deletions content/terraform/v1.13.x/docs/cli/commands/plan.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ description: >-
The `terraform plan` command creates an execution plan, which lets you preview
the changes that Terraform plans to make to your infrastructure.

<Note>

Terraform `v1.14.x (beta)` adds the `-invoke` flag, which lets you trigger actions outside of Terraform CRUD operations. Refer to the [Invoke an action](/terraform/language/v1.14.x/invoke-actions) beta documentation for more information.

</Note>

## Introduction

By default, Terraform performs the following operations when it creates a plan:

* Reads the current state of any already-existing remote objects to make sure
Expand Down
5 changes: 5 additions & 0 deletions content/terraform/v1.13.x/docs/cli/import/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ This topic provides an overview of the Terraform commands that let you import ex

> **Hands-on:** Try the [Import Terraform Configuration](/terraform/tutorials/state/state-import?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial.

<Note>

Terraform `v1.14.x (beta)` lets you search existing infrastructure for resources, generate configuration, and import them in bulk. Refer to the [Import existing resources in bulk](/terraform/language/v1.14.x/import/bulk) beta documentation for more information.

</Note>

## Workflows

Expand Down
6 changes: 6 additions & 0 deletions content/terraform/v1.13.x/docs/cli/import/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ This topic describes how to use the `terraform import` command to import existin

> **Hands-on:** Try the [Import Terraform Configuration](/terraform/tutorials/state/state-import?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial.

<Note>

Terraform `v1.14.x (beta)` implements a new workflow for searching existing infrastructure for resources, generating configuration, and importing them in bulk. Refer to the [Import existing resources in bulk](/terraform/language/v1.14.x/import/bulk) beta documentation for more information.

</Note>

## Overview

Use the `terraform import` command to import existing infrastructure to Terraform state. The `terraform import` command can only import one resource at a time. It cannot simultaneously import an entire collection of resources, such as an AWS VPC.
Expand Down
6 changes: 6 additions & 0 deletions content/terraform/v1.13.x/docs/language/block/import.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ description: >-

The `import` block instructs Terraform to import existing infrastructure resources into Terraform. Refer to [Import existing resources](/terraform/language/import) for more information.

<Note>

Terraform `v1.14.x (beta)` lets you configure queries to search your existing infrastructure for resources and generate configuration to import them. Refer to the [list block reference](/terraform/language/v1.14.x/block/tfquery/list) beta documentation for more information.

</Note>

## Configuration model

An `import` block supports the following configuration:
Expand Down
6 changes: 6 additions & 0 deletions content/terraform/v1.13.x/docs/language/block/resource.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ description: >-

The `resource` block defines a piece of infrastructure and specifies the settings for Terraform to create it with. The arguments that an individual resource supports are determined by the provider. Refer to the provider documentation for more information about specific resource configuration.

<Note>

Terraform `v1.14.x (beta)` adds the `action_trigger` block to the `resource` block so that you can trigger actions outside of Terraform CRUD operations. Refer to the [Invoke an action](/terraform/language/v1.14.x/invoke-actions) beta documentation for more information.

</Note>

## Configuration model

The `resource` block supports the following arguments:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ description: >-

# Generating configuration

Terraform can generate code for the resources you define in [`import` blocks](/terraform/language/import) that do not already exist in your configuration. Terraform produces HCL to act as a template that contains Terraform's best guess at the appropriate value for each resource argument.

~> **Experimental:** Configuration generation is available in Terraform v1.5 as an experimental feature. Later minor versions may contain changes to the formatting of generated configuration and behavior of the `terraform plan` command using the `-generate-config-out` flag.

Terraform can generate code for the resources you define in [`import` blocks](/terraform/language/import) that do not already exist in your configuration. Terraform produces HCL to act as a template that contains Terraform's best guess at the appropriate value for each resource argument.
<Note>

Terraform `v1.14.x (beta)` lets you configure queries to search your existing infrastructure for resources and generate configuration to import them. Refer to the [Import existing resources in bulk](/terraform/language/v1.14.x/import/bulk) beta documentation for more information.

</Note>

Starting with Terraform's generated HCL, we recommend iterating to find your ideal configuration by removing some attributes, adjusting the value of others, and rearranging `resource` blocks into files and modules as appropriate.

Expand Down
5 changes: 5 additions & 0 deletions content/terraform/v1.13.x/docs/language/import/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ You can import existing infrastructure resources into your Terraform state so th

> **Hands-on:** Try the [State Import](/terraform/tutorials/state/state-import?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial.

<Note>

Terraform `v1.14.x (beta)` implements a new workflow for searching existing infrastructure for resources, generating configuration, and importing them in bulk. Refer to the [Import existing resources in bulk](/terraform/language/v1.14.x/import/bulk) beta documentation for more information.

</Note>

## Overview

Expand Down
6 changes: 6 additions & 0 deletions content/terraform/v1.13.x/docs/language/meta-arguments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ description: Meta-arguments are built-in Terraform arguments that determine how

Meta-arguments are a class of arguments built into the Terraform configuration language that control how Terraform creates your infrastructure. This page provides an overview of the meta-arguments included with Terraform.

<Note>

Terraform `v1.14.x (beta)` adds the `action_trigger` meta-argument, which lets you trigger actions that extend Terraform CRUD operations. Refer to the [Invoke an action](/terraform/language/v1.14.x/invoke-actions) beta documentation for more information.

</Note>

## Introduction

You can use meta-arguments in any type of resource, including resources created with `data` blocks. You can also use most meta-arguments in `module` blocks.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: Learn how to query existing infrastructure for unmanaged resources

You can configure queries that instruct Terraform to search your existing infrastructure for unmanaged resources. Terraform can also generate configuration for importing the resources it finds so that you can import them to your Terraform workspace in bulk. For information about importing single resources or small batches of resources, refer to [Import single resources](/terraform/language/import/single-resource) for instructions.

@include 'beta.mdx'

## Introduction

For organizations with large sets of infrastructure resources, manually identifying and importing them is tedious and labor intensive, even when using third-party tools or custom scripts. To alleviate this burden, you can write HCL-based queries and run them with the Terraform CLI to retrieve unmanaged resources so that you can import them in bulk.
Expand Down
Loading