You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Do not merge until Nov 19.**
This PR removes beta language and text in Terraform language and HCP
Terraform docs for the GA of search and import functionality per
https://hashicorp.atlassian.net/browse/IPE-1288.
Copy file name to clipboardExpand all lines: content/terraform-docs-agents/v1.25.x/docs/cloud-docs/agents/agents.mdx
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,8 +85,6 @@ The optional configurations for customizing the agent include building a custom
85
85
86
86
### Enable search queries
87
87
88
-
@include 'beta.mdx'
89
-
90
88
You can query your existing infrastructure to find resources that are not yet managed by Terraform. This makes it easier to identify and import unmanaged resources into your Terraform workspace. Refer to [Import existing resources to state](terraform/cloud-docs/workspaces/import) for more information.
91
89
92
90
To use the search functionality, you must include the `query` operation in the [`TFE_AGENT_ACCEPT` variable](#accept) when starting your agent.
Copy file name to clipboardExpand all lines: content/terraform-docs-common/docs/cloud-docs/workspaces/import.mdx
+8-10Lines changed: 8 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,13 @@ tfc_only: true
6
6
7
7
# Import existing resources to state
8
8
9
-
Terraform can search your existing infrastructure for resources to let you import any unmanaged resources to an HCP Terraform workspace in bulk. For instructions on importing single resources or small batches of resources in your configuration, refer to [Import a single resource](/terraform/language/v1.14.x/import/single-resource).
10
-
11
-
@include 'beta.mdx'
9
+
Terraform can search your existing infrastructure for resources to let you import any unmanaged resources to an HCP Terraform workspace in bulk. For instructions on importing single resources or small batches of resources in your configuration, refer to [Import a single resource](/terraform/language/import/single-resource).
12
10
13
11
## Overview
14
12
15
13
You can search for unmanaged resources in [UI and VCS-driven](/terraform/cloud-docs/run/ui) and [CLI-driven](/terraform/cloud-docs/run/cli) workspaces. HCP Terraform presents results so that you can use the UI to import the resources and begin managing them as code. Complete the following steps to search for resources and import them into your Terraform state:
16
14
17
-
1.**Define queries**: Add `list` blocks to your Terraform configuration. If you are using the VCS-driven workflow, commit this change and push it to the repository associated with your workspace in HCP Terraform. Refer to [Import resources in bulk](/terraform/language/v1.14.x/import/bulk) for more information.
15
+
1.**Define queries**: Add `list` blocks to your Terraform configuration. If you are using the VCS-driven workflow, commit this change and push it to the repository associated with your workspace in HCP Terraform. Refer to [Import resources in bulk](/terraform/language/import/bulk) for more information.
18
16
1.**Run the queries**: You can run queries in the HCP Terraform UI or run the Terraform CLI on your local workstation.
19
17
1.**Review search results**: HCP Terraform shows the management status for resources it finds.
20
18
1.**Generate code**: HCP Terraform generates `import` and `resource` blocks for the resources it discovers.
@@ -26,13 +24,13 @@ If you use HCP Terraform agents for your runs, you must enable the `query` opera
26
24
27
25
## Requirements
28
26
29
-
You must enable Terraform 1.14.0-beta or newer for your workspace to access the **Search & Import** page. Refer to the [general workspace settings documentation](/terraform/cloud-docs/workspaces/settings#general) for more information about changing workspace settings.
27
+
You must enable Terraform 1.14.0 or newer for your workspace to access the **Search & Import** page. Refer to the [general workspace settings documentation](/terraform/cloud-docs/workspaces/settings#general) for more information about changing workspace settings.
30
28
31
29
HCP Terraform identifies resources managed by other workspaces when the workspace uses Terraform v1.12 and newer.
32
30
33
31
## Define queries
34
32
35
-
Add `list` blocks to your workspace's Terraform configuration to create search queries you want to run against your existing infrastructure. Refer to [Import resources in bulk](/terraform/language/v1.14.x/import/bulk) for instructions on how to define queries.
33
+
Add `list` blocks to your workspace's Terraform configuration to create search queries you want to run against your existing infrastructure. Refer to [Import resources in bulk](/terraform/language/import/bulk) for instructions on how to define queries.
36
34
37
35
If HCP Terraform is connected to your VCS, commit the configuration to version control.
38
36
@@ -52,11 +50,11 @@ As the query progresses, HCP Terraform loads the results to the page.
52
50
53
51
In the **IaC** column, HCP Terraform indicates one of the following statuses for resources returned by the query:
54
52
55
-
-**Managed** indicates that the resource has the same [identity](/terraform/language/v1.14.x/import#resource-identity) as a resource applied by a similar provider version.
56
-
-**Unknown** indicates that the resource has the same [identity](/terraform/language/v1.14.x/import#resource-identity) as a resource applied by an older version of Terraform or older provider version.
53
+
-**Managed** indicates that the resource has the same [identity](/terraform/language/import#resource-identity) as a resource applied by a similar provider version.
54
+
-**Unknown** indicates that the resource has the same [identity](/terraform/language/import#resource-identity) as a resource applied by an older version of Terraform or older provider version.
57
55
-**Unmanaged** indicates that there are no managed resources of this type or that Terraform can't attribute this resource to a similar provider and Terraform version.
58
56
59
-
Over time, providers may change their [resource identity](/terraform/language/v1.14.x/import#resource-identity) definitions, but HCP Terraform attempts to capture all resource identities as providers evolve. When a schema for a resource type changes between versions, HCP Terraform may list a resource as **Unknown** instead of **Unmanaged** when a resource was applied by one version of a provider but queried by a different version.
57
+
Over time, providers may change their [resource identity](/terraform/language/import#resource-identity) definitions, but HCP Terraform attempts to capture all resource identities as providers evolve. When a schema for a resource type changes between versions, HCP Terraform may list a resource as **Unknown** instead of **Unmanaged** when a resource was applied by one version of a provider but queried by a different version.
60
58
61
59
You can perform the following actions in the results area:
62
60
@@ -75,7 +73,7 @@ Copy the code to your Terraform configuration and apply the configuration. Befor
75
73
Use one of the following methods to apply the configuration:
76
74
77
75
- Navigate to your workspace in HCP Terraform and click **New run**.
78
-
- Run the `terraform apply` command on the remote workstation.
76
+
- Run the `terraform apply` command on your workstation.
79
77
- If your workspace is configured to run on VCS changes, check the updated configuration into your VCS to trigger a new run.
Copy file name to clipboardExpand all lines: content/terraform/v1.13.x/docs/cli/commands/import.mdx
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,12 +9,6 @@ The `terraform import` command imports existing resources into Terraform. Refer
9
9
10
10
> **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.
11
11
12
-
<Note>
13
-
14
-
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.
Copy file name to clipboardExpand all lines: content/terraform/v1.13.x/docs/cli/import/index.mdx
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,12 +10,6 @@ This topic provides an overview of the Terraform commands that let you import ex
10
10
11
11
> **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.
12
12
13
-
<Note>
14
-
15
-
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.
16
-
17
-
</Note>
18
-
19
13
## Workflows
20
14
21
15
You can import an existing resource to state from the Terraform CLI. You can also perform import operations using HCP Terraform. To import multiple resources, use the `import` block.
Copy file name to clipboardExpand all lines: content/terraform/v1.13.x/docs/cli/import/usage.mdx
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,12 +9,6 @@ This topic describes how to use the `terraform import` command to import existin
9
9
10
10
> **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.
11
11
12
-
<Note>
13
-
14
-
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.
15
-
16
-
</Note>
17
-
18
12
## Overview
19
13
20
14
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.
Copy file name to clipboardExpand all lines: content/terraform/v1.13.x/docs/language/block/import.mdx
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,6 @@ description: >-
8
8
9
9
The `import` block instructs Terraform to import existing infrastructure resources into Terraform. Refer to [Import existing resources](/terraform/language/import) for more information.
10
10
11
-
<Note>
12
-
13
-
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.
14
-
15
-
</Note>
16
-
17
11
## Configuration model
18
12
19
13
An `import` block supports the following configuration:
Copy file name to clipboardExpand all lines: content/terraform/v1.13.x/docs/language/import/generating-configuration.mdx
+2-8Lines changed: 2 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,19 +6,13 @@ description: >-
6
6
7
7
# Generating configuration
8
8
9
-
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.
9
+
This topic describes how to generate code for single resources or small batches of resources defined in [`import` blocks](/terraform/language/import). For instructions querying your existing infrastructure for resources and generating `import` configuration based on search results, refer to the [Import existing resources in bulk](/terraform/language/import/bulk).
10
10
11
11
~> **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.
12
12
13
-
<Note>
14
-
15
-
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.
16
-
17
-
</Note>
18
-
19
13
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.
20
14
21
-
To generate configuration, run `terraform plan` with the `-generate-config-out` flag and supply a new file path. Do not supply a path to an existing file, or Terraform throws an error.
15
+
To generate configuration, run `terraform plan` with the `-generate-config-out` flag and supply a new file path. Do not supply a path to an existing file, or Terraform throws an error. Terraform produces HCL to act as a template that contains Terraform's best guess at the appropriate value for each resource argument.
22
16
23
17
```shell
24
18
$ terraform plan -generate-config-out="generated_resources.tf"
Copy file name to clipboardExpand all lines: content/terraform/v1.13.x/docs/language/import/index.mdx
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,12 +9,6 @@ You can import existing infrastructure resources into your Terraform state so th
9
9
10
10
> **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.
11
11
12
-
<Note>
13
-
14
-
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.
15
-
16
-
</Note>
17
-
18
12
## Overview
19
13
20
14
When you import existing infrastructure into state, you must also define the Terraform configuration corresponding to that resource to manage the rest of its lifecycle. You can manually write all of the configuration or use the Terraform CLI to generate configuration for resources your are importing. When you import resources, Terraform pulls all of the resource's attributes into the state file, but you do not need to define all of them in the `resource` block.
0 commit comments