Skip to content

Commit 9991067

Browse files
authored
Merge pull request #44268 from hashicorp/d-param-identity-docs
TechDebt: Document import by identity for parameterized resources
2 parents 8ffa956 + c060995 commit 9991067

36 files changed

+1016
-43
lines changed

website/docs/r/appflow_connector_profile.html.markdown

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,32 @@ This resource exports the following attributes in addition to the arguments abov
324324

325325
## Import
326326

327+
In Terraform v1.12.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `identity` attribute. For example:
328+
329+
```terraform
330+
import {
331+
to = aws_appflow_connector_profile.example
332+
identity = {
333+
name = "example_profile"
334+
}
335+
}
336+
337+
resource "aws_appflow_connector_profile" "example" {
338+
### Configuration omitted for brevity ###
339+
}
340+
```
341+
342+
### Identity Schema
343+
344+
#### Required
345+
346+
* `name` (String) Name of the Appflow connector profile.
347+
348+
#### Optional
349+
350+
- `account_id` (String) AWS Account where this resource is managed.
351+
- `region` (String) Region where this resource is managed.
352+
327353
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import AppFlow Connector Profile using the connector profile `name`. For example:
328354

329355
```terraform

website/docs/r/appflow_flow.html.markdown

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,32 @@ This resource exports the following attributes in addition to the arguments abov
418418

419419
## Import
420420

421+
In Terraform v1.12.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `identity` attribute. For example:
422+
423+
```terraform
424+
import {
425+
to = aws_appflow_flow.example
426+
identity = {
427+
name = "example-flow"
428+
}
429+
}
430+
431+
resource "aws_appflow_flow" "example" {
432+
### Configuration omitted for brevity ###
433+
}
434+
```
435+
436+
### Identity Schema
437+
438+
#### Required
439+
440+
* `name` (String) Name of the AppFlow flow.
441+
442+
#### Optional
443+
444+
- `account_id` (String) AWS Account where this resource is managed.
445+
- `region` (String) Region where this resource is managed.
446+
421447
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import AppFlow flows using the `name`. For example:
422448

423449
```terraform

website/docs/r/cloudfront_key_value_store.html.markdown

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,31 @@ This resource exports the following attributes in addition to the arguments abov
4747

4848
## Import
4949

50+
In Terraform v1.12.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `identity` attribute. For example:
51+
52+
```terraform
53+
import {
54+
to = aws_cloudfront_key_value_store.example
55+
identity = {
56+
name = "example_store"
57+
}
58+
}
59+
60+
resource "aws_cloudfront_key_value_store" "example" {
61+
### Configuration omitted for brevity ###
62+
}
63+
```
64+
65+
### Identity Schema
66+
67+
#### Required
68+
69+
* `name` (String) Name of the CloudFront Key Value Store.
70+
71+
#### Optional
72+
73+
- `account_id` (String) AWS Account where this resource is managed.
74+
5075
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import CloudFront Key Value Store using the `name`. For example:
5176

5277
```terraform

website/docs/r/cloudfrontkeyvaluestore_key.html.markdown

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,33 @@ This resource exports the following attributes in addition to the arguments abov
4646

4747
## Import
4848

49+
In Terraform v1.12.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `identity` attribute. For example:
50+
51+
```terraform
52+
import {
53+
to = aws_cloudfrontkeyvaluestore_key.example
54+
identity = {
55+
key_value_store_arn = "arn:aws:cloudfront::111111111111:key-value-store/8562g61f-caba-2845-9d99-b97diwae5d3c"
56+
key = "someKey"
57+
}
58+
}
59+
60+
resource "aws_cloudfrontkeyvaluestore_key" "example" {
61+
### Configuration omitted for brevity ###
62+
}
63+
```
64+
65+
### Identity Schema
66+
67+
#### Required
68+
69+
* `key_value_store_arn` (String) ARN of the CloudFront Key Value Store.
70+
* `key` (String) Key name.
71+
72+
#### Optional
73+
74+
- `account_id` (String) AWS Account where this resource is managed.
75+
4976
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import CloudFront KeyValueStore Key using the `key_value_store_arn` and 'key' separated by `,`. For example:
5077

5178
```terraform

website/docs/r/cloudwatch_event_rule.html.markdown

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,46 @@ This resource exports the following attributes in addition to the arguments abov
8585

8686
## Import
8787

88+
In Terraform v1.12.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `identity` attribute. For example:
89+
90+
```terraform
91+
import {
92+
to = aws_cloudwatch_event_rule.example
93+
identity = {
94+
name = "capture-console-sign-in"
95+
event_bus_name = "example-event-bus"
96+
}
97+
}
98+
99+
resource "aws_cloudwatch_event_rule" "example" {
100+
### Configuration omitted for brevity ###
101+
}
102+
```
103+
104+
### Identity Schema
105+
106+
#### Required
107+
108+
* `name` (String) Name of the EventBridge rule.
109+
110+
#### Optional
111+
112+
* `event_bus_name` (String) Name of the event bus. If omitted, `default` is used.
113+
114+
- `account_id` (String) AWS Account where this resource is managed.
115+
- `region` (String) Region where this resource is managed.
116+
88117
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import EventBridge Rules using the `event_bus_name/rule_name` (if you omit `event_bus_name`, the `default` event bus will be used). For example:
89118

90119
```terraform
91120
import {
92-
to = aws_cloudwatch_event_rule.console
121+
to = aws_cloudwatch_event_rule.example
93122
id = "example-event-bus/capture-console-sign-in"
94123
}
95124
```
96125

97126
Using `terraform import`, import EventBridge Rules using the `event_bus_name/rule_name` (if you omit `event_bus_name`, the `default` event bus will be used). For example:
98127

99128
```console
100-
% terraform import aws_cloudwatch_event_rule.console example-event-bus/capture-console-sign-in
129+
% terraform import aws_cloudwatch_event_rule.example example-event-bus/capture-console-sign-in
101130
```

website/docs/r/cloudwatch_event_target.html.markdown

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,17 +690,47 @@ This resource exports no additional attributes.
690690

691691
## Import
692692

693+
In Terraform v1.12.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `identity` attribute. For example:
694+
695+
```terraform
696+
import {
697+
to = aws_cloudwatch_event_target.example
698+
identity = {
699+
event_bus_name = "default"
700+
rule = "rule-name"
701+
target_id = "target-id"
702+
}
703+
}
704+
705+
resource "aws_cloudwatch_event_target" "example" {
706+
### Configuration omitted for brevity ###
707+
}
708+
```
709+
710+
### Identity Schema
711+
712+
#### Required
713+
714+
* `event_bus_name` (String) Event bus name for the target.
715+
* `rule` (String) Rule name for the target.
716+
* `target_id` (String) Target ID.
717+
718+
#### Optional
719+
720+
- `account_id` (String) AWS Account where this resource is managed.
721+
- `region` (String) Region where this resource is managed.
722+
693723
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import EventBridge Targets using `event_bus_name/rule-name/target-id` (if you omit `event_bus_name`, the `default` event bus will be used). For example:
694724

695725
```terraform
696726
import {
697-
to = aws_cloudwatch_event_target.test-event-target
727+
to = aws_cloudwatch_event_target.example
698728
id = "rule-name/target-id"
699729
}
700730
```
701731

702732
Using `terraform import`, import EventBridge Targets using `event_bus_name/rule-name/target-id` (if you omit `event_bus_name`, the `default` event bus will be used). For example:
703733

704734
```console
705-
% terraform import aws_cloudwatch_event_target.test-event-target rule-name/target-id
735+
% terraform import aws_cloudwatch_event_target.example rule-name/target-id
706736
```

website/docs/r/cloudwatch_log_group.html.markdown

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,43 @@ This resource exports the following attributes in addition to the arguments abov
4949

5050
## Import
5151

52+
In Terraform v1.12.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `identity` attribute. For example:
53+
54+
```terraform
55+
import {
56+
to = aws_cloudwatch_log_group.example
57+
identity = {
58+
name = "yada"
59+
}
60+
}
61+
62+
resource "aws_cloudwatch_log_group" "example" {
63+
### Configuration omitted for brevity ###
64+
}
65+
```
66+
67+
### Identity Schema
68+
69+
#### Required
70+
71+
* `name` (String) Name of the CloudWatch log group.
72+
73+
#### Optional
74+
75+
- `account_id` (String) AWS Account where this resource is managed.
76+
- `region` (String) Region where this resource is managed.
77+
5278
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Cloudwatch Log Groups using the `name`. For example:
5379

5480
```terraform
5581
import {
56-
to = aws_cloudwatch_log_group.test_group
82+
to = aws_cloudwatch_log_group.example
5783
id = "yada"
5884
}
5985
```
6086

6187
Using `terraform import`, import Cloudwatch Log Groups using the `name`. For example:
6288

6389
```console
64-
% terraform import aws_cloudwatch_log_group.test_group yada
90+
% terraform import aws_cloudwatch_log_group.example yada
6591
```

website/docs/r/cloudwatch_metric_alarm.html.markdown

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,17 +249,43 @@ This resource exports the following attributes in addition to the arguments abov
249249

250250
## Import
251251

252+
In Terraform v1.12.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `identity` attribute. For example:
253+
254+
```terraform
255+
import {
256+
to = aws_cloudwatch_metric_alarm.example
257+
identity = {
258+
alarm_name = "alarm-12345"
259+
}
260+
}
261+
262+
resource "aws_cloudwatch_metric_alarm" "example" {
263+
### Configuration omitted for brevity ###
264+
}
265+
```
266+
267+
### Identity Schema
268+
269+
#### Required
270+
271+
* `alarm_name` (String) Name of the CloudWatch metric alarm.
272+
273+
#### Optional
274+
275+
- `account_id` (String) AWS Account where this resource is managed.
276+
- `region` (String) Region where this resource is managed.
277+
252278
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import CloudWatch Metric Alarm using the `alarm_name`. For example:
253279

254280
```terraform
255281
import {
256-
to = aws_cloudwatch_metric_alarm.test
282+
to = aws_cloudwatch_metric_alarm.example
257283
id = "alarm-12345"
258284
}
259285
```
260286

261287
Using `terraform import`, import CloudWatch Metric Alarm using the `alarm_name`. For example:
262288

263289
```console
264-
% terraform import aws_cloudwatch_metric_alarm.test alarm-12345
290+
% terraform import aws_cloudwatch_metric_alarm.example alarm-12345
265291
```

website/docs/r/cognito_log_delivery_configuration.html.markdown

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,32 @@ This resource exports the following attributes in addition to the arguments abov
202202

203203
## Import
204204

205+
In Terraform v1.12.0 and later, the [`import` block](https://developer.hashicorp.com/terraform/language/import) can be used with the `identity` attribute. For example:
206+
207+
```terraform
208+
import {
209+
to = aws_cognito_log_delivery_configuration.example
210+
identity = {
211+
user_pool_id = "us-west-2_example123"
212+
}
213+
}
214+
215+
resource "aws_cognito_log_delivery_configuration" "example" {
216+
### Configuration omitted for brevity ###
217+
}
218+
```
219+
220+
### Identity Schema
221+
222+
#### Required
223+
224+
* `user_pool_id` (String) ID of the Cognito User Pool.
225+
226+
#### Optional
227+
228+
- `account_id` (String) AWS Account where this resource is managed.
229+
- `region` (String) Region where this resource is managed.
230+
205231
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Cognito IDP (Identity Provider) Log Delivery Configuration using the `user_pool_id`. For example:
206232

207233
```terraform

0 commit comments

Comments
 (0)