Skip to content

Commit 145e90a

Browse files
trujillo-adamdbanckdsa0x
authored
Apply suggestions from code review
Co-authored-by: Daniel Banck <dbanck@users.noreply.github.com> Co-authored-by: Samsondeen <40821565+dsa0x@users.noreply.github.com>
1 parent e0f8c7a commit 145e90a

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@
338338
]
339339
},
340340
{
341-
"title": "tfquery blocks",
341+
"title": "Query blocks",
342342
"routes": [
343343
{
344344
"title": "list",

content/terraform/v1.14.x (alpha)/docs/cli/commands/query.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,5 @@ $ terraform query -generate-config=to-import/file.tf
8484
The following command prints `import` and `resource` blocks for the query results as json:
8585

8686
```shell-session
87-
$ terraform query -generate-config=to-import -json
87+
$ terraform query -generate-config=file.tf -json
8888
```

content/terraform/v1.14.x (alpha)/docs/language/block/tfquery/list.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,21 @@ You must set the following arguments for every `list` block:
5555

5656
### `provider`
5757

58-
The `provider` argument instructs Terraform to use an alternate provider configuration.
58+
The `provider` argument specifies which provider configuration Terraform uses to query infrastructure.
5959

6060
```hcl
6161
list "<TYPE>" "<LABEL>" {
62-
provider = <provider>.<alias>
62+
provider = <provider>
6363
}
6464
```
6565

66-
Terraform uses the default `provider` configuration to query resources, but you can create multiple provider configurations and use a non-default configuration for specific queries. Refer to the [`provider` block reference](/terraform/language/block/provider) for information about defining alternate provider configurations.
66+
Terraform does not implicitly use the default `provider` configuration when querying resources. As a result, the `provider` argument is required.
67+
68+
You can create multiple provider configurations and use a non-default configuration for specific queries. Refer to the [`provider` block reference](/terraform/language/block/provider) for information about defining alternate provider configurations.
6769

6870
Use the `<PROVIDER>.<ALIAS>` syntax to reference a provider configuration in the `provider` argument. Refer to [Select an alternate provider configuration](#select-an-alternate-provider-configuration) for an example of how to reference a specific provider configuration.
6971

70-
The `provider` argument is a meta-argument, which is built into Terraform and controls the way that Terraform creates resources. Refer to [Meta-arguments](/terraform/language/meta-arguments) for more information.
72+
The `provider` argument is a meta-argument, which is built into Terraform and controls the way that Terraform queries resources. Refer to [Meta-arguments](/terraform/language/meta-arguments) for more information.
7173

7274
#### Summary
7375

@@ -289,7 +291,7 @@ list "azurerm_resource_group" "rg" {
289291
The following example creates four lists using a set created with the `toset()` function:
290292

291293
```hcl
292-
resource "aws_iam_user" "the-accounts" {
294+
list "aws_iam_user" "the-accounts" {
293295
provider = aws
294296
for_each = toset(["Todd", "James", "Alice", "Dottie"])
295297
}

content/terraform/v1.14.x (alpha)/docs/language/import/bulk.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ Complete the following steps to find and import resources in bulk:
2121
- After importing resources, you can remove the generated `import` block or keep it as an historical record.
2222

2323

24-
## Requirements
25-
26-
Terraform v1.12 or newer is required to uniquely ID resources according the resource identity. For v1.11 and older, Terraform uses the cloud provider ID attribute.
2724

2825
## Define a query
2926

@@ -63,6 +60,7 @@ The following example queries AWS for `aws_instance` resources that match {. . .
6360

6461
```hcl
6562
list "aws_instance" "prod" {
63+
provider = aws
6664
include_resource = true
6765
limit = 50
6866
config {

content/terraform/v1.14.x (alpha)/docs/partials/beta.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Use this parital for general beta callouts -->
1+
<!-- Use this partial for general beta callouts -->
22
<Note>
33

44
This feature is currently in beta. Do not use beta functionality in production environments.

0 commit comments

Comments
 (0)