Skip to content

Commit a5d7f95

Browse files
terraform 1.14 search ga (#1275)
**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.
2 parents 4920753 + ca188ff commit a5d7f95

File tree

14 files changed

+19
-83
lines changed

14 files changed

+19
-83
lines changed

content/terraform-docs-agents/v1.25.x/docs/cloud-docs/agents/agents.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ The optional configurations for customizing the agent include building a custom
8585

8686
### Enable search queries
8787

88-
@include 'beta.mdx'
89-
9088
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.
9189

9290
To use the search functionality, you must include the `query` operation in the [`TFE_AGENT_ACCEPT` variable](#accept) when starting your agent.

content/terraform-docs-common/data/cloud-docs-nav-data.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,7 @@
298298
{
299299
"title": "Import existing resources",
300300
"path": "workspaces/import",
301-
"alias": "search, terraform search, resource discoverability",
302-
"badge": {
303-
"text": "BETA",
304-
"type": "outlined",
305-
"color": "neutral"
306-
}
301+
"alias": "search, terraform search, resource discoverability"
307302
},
308303
{
309304
"title": "Policy enforcement",

content/terraform-docs-common/docs/cloud-docs/workspaces/import.mdx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ tfc_only: true
66

77
# Import existing resources to state
88

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).
1210

1311
## Overview
1412

1513
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:
1614

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.
1816
1. **Run the queries**: You can run queries in the HCP Terraform UI or run the Terraform CLI on your local workstation.
1917
1. **Review search results**: HCP Terraform shows the management status for resources it finds.
2018
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
2624

2725
## Requirements
2826

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.
3028

3129
HCP Terraform identifies resources managed by other workspaces when the workspace uses Terraform v1.12 and newer.
3230

3331
## Define queries
3432

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.
3634

3735
If HCP Terraform is connected to your VCS, commit the configuration to version control.
3836

@@ -52,11 +50,11 @@ As the query progresses, HCP Terraform loads the results to the page.
5250

5351
In the **IaC** column, HCP Terraform indicates one of the following statuses for resources returned by the query:
5452

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.
5755
- **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.
5856

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.
6058

6159
You can perform the following actions in the results area:
6260

@@ -75,7 +73,7 @@ Copy the code to your Terraform configuration and apply the configuration. Befor
7573
Use one of the following methods to apply the configuration:
7674

7775
- 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.
7977
- If your workspace is configured to run on VCS changes, check the updated configuration into your VCS to trigger a new run.
8078

8179
## Next steps

content/terraform/v1.13.x/docs/cli/commands/import.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ The `terraform import` command imports existing resources into Terraform. Refer
99

1010
> **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.
1111
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.
15-
16-
</Note>
17-
1812
## Usage
1913

2014
Usage: `terraform import [options] ADDRESS ID`

content/terraform/v1.13.x/docs/cli/import/index.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ This topic provides an overview of the Terraform commands that let you import ex
1010

1111
> **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.
1212
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-
1913
## Workflows
2014

2115
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.

content/terraform/v1.13.x/docs/cli/import/usage.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ This topic describes how to use the `terraform import` command to import existin
99

1010
> **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.
1111
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-
1812
## Overview
1913

2014
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.

content/terraform/v1.13.x/docs/language/block/import.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ description: >-
88

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

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-
1711
## Configuration model
1812

1913
An `import` block supports the following configuration:

content/terraform/v1.13.x/docs/language/import/generating-configuration.mdx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,13 @@ description: >-
66

77
# Generating configuration
88

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).
1010

1111
~> **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.
1212

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-
1913
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.
2014

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.
2216

2317
```shell
2418
$ terraform plan -generate-config-out="generated_resources.tf"

content/terraform/v1.13.x/docs/language/import/index.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,6 @@ You can import existing infrastructure resources into your Terraform state so th
99

1010
> **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.
1111
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-
1812
## Overview
1913

2014
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.

content/terraform/v1.14.x/data/language-nav-data.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@
213213
{ "title": "Overview", "path": "import"},
214214
{
215215
"title": "Import resources in bulk",
216-
"path": "import/bulk"
216+
"path": "import/bulk",
217+
"alias": "search, terraform search, query, list"
217218
},
218219
{ "title": "Import a single resource", "path": "import/single-resource" },
219220
{
@@ -384,11 +385,7 @@
384385
{
385386
"title": "list",
386387
"path": "block/tfquery/list",
387-
"badge": {
388-
"text": "BETA",
389-
"type": "outlined",
390-
"color": "neutral"
391-
}
388+
"alias": "search, terraform search"
392389
},
393390
{
394391
"title": "locals",

0 commit comments

Comments
 (0)