docs/commands: Switch using count/for_each to configured with count/for_each
Reference: https://github.com/hashicorp/terraform/pull/22318#discussion_r310587243
This commit is contained in:
parent
3ad05e50a4
commit
3a1a39bed3
|
@ -126,18 +126,18 @@ The example below will import an AWS instance into the `aws_instance` resource n
|
|||
$ terraform import module.foo.aws_instance.bar i-abcd1234
|
||||
```
|
||||
|
||||
## Example: Import into Resource using count
|
||||
## Example: Import into Resource configured with count
|
||||
|
||||
The example below will import an AWS instance into the first instance of the `aws_instance` resource named `baz` using
|
||||
The example below will import an AWS instance into the first instance of the `aws_instance` resource named `baz` configured with
|
||||
[`count`](/docs/configuration/resources.html#count-multiple-resource-instances-by-count):
|
||||
|
||||
```shell
|
||||
$ terraform import 'aws_instance.baz[0]' i-abcd1234
|
||||
```
|
||||
|
||||
## Example: Import into Resource using for_each
|
||||
## Example: Import into Resource configured with for_each
|
||||
|
||||
The example below will import an AWS instance into the `"example"` instance of the `aws_instance` resource named `baz` using
|
||||
The example below will import an AWS instance into the `"example"` instance of the `aws_instance` resource named `baz` configured with
|
||||
[`for_each`](/docs/configuration/resources.html#for_each-multiple-resource-instances-defined-by-a-map-or-set-of-strings):
|
||||
|
||||
Linux, Mac OS, and UNIX:
|
||||
|
|
|
@ -92,21 +92,21 @@ The source and destination are the same meaning we're keeping the same name.
|
|||
$ terraform state mv -state-out=other.tfstate 'module.app' 'module.app'
|
||||
```
|
||||
|
||||
## Example: Move a Resource using count
|
||||
## Example: Move a Resource configured with count
|
||||
|
||||
The example below moves the first instance of a `packet_device` resource named `worker` using
|
||||
The example below moves the first instance of a `packet_device` resource named `worker` configured with
|
||||
[`count`](/docs/configuration/resources.html#count-multiple-resource-instances-by-count) to
|
||||
the first instance of a resource named `helper` also using `count`:
|
||||
the first instance of a resource named `helper` also configured with `count`:
|
||||
|
||||
```shell
|
||||
$ terraform state mv 'packet_device.worker[0]' 'packet_device.helper[0]'
|
||||
```
|
||||
|
||||
## Example: Move a Resource using for_each
|
||||
## Example: Move a Resource configured with for_each
|
||||
|
||||
The example below moves the `"example123"` instance of a `packet_device` resource named `worker` using
|
||||
The example below moves the `"example123"` instance of a `packet_device` resource named `worker` configured with
|
||||
[`for_each`](/docs/configuration/resources.html#for_each-multiple-resource-instances-defined-by-a-map-or-set-of-strings)
|
||||
to the `"example456"` instance of a resource named `helper` also using `for_each`:
|
||||
to the `"example456"` instance of a resource named `helper` also configuring `for_each`:
|
||||
|
||||
Linux, Mac OS, and UNIX:
|
||||
|
||||
|
|
|
@ -75,18 +75,18 @@ The example below removes the `packet_device` resource named `worker` inside a m
|
|||
$ terraform state rm 'module.foo.packet_device.worker'
|
||||
```
|
||||
|
||||
## Example: Remove a Resource using count
|
||||
## Example: Remove a Resource configured with count
|
||||
|
||||
The example below removes the first instance of a `packet_device` resource named `worker` using
|
||||
The example below removes the first instance of a `packet_device` resource named `worker` configured with
|
||||
[`count`](/docs/configuration/resources.html#count-multiple-resource-instances-by-count):
|
||||
|
||||
```shell
|
||||
$ terraform state rm 'packet_device.worker[0]'
|
||||
```
|
||||
|
||||
## Example: Remove a Resource using for_each
|
||||
## Example: Remove a Resource configured with for_each
|
||||
|
||||
The example below removes the `"example"` instance of a `packet_device` resource named `worker` using
|
||||
The example below removes the `"example"` instance of a `packet_device` resource named `worker` configured with
|
||||
[`for_each`](/docs/configuration/resources.html#for_each-multiple-resource-instances-defined-by-a-map-or-set-of-strings):
|
||||
|
||||
Linux, Mac OS, and UNIX:
|
||||
|
|
|
@ -55,18 +55,18 @@ The example below shows a `packet_device` resource named `worker` inside a modul
|
|||
$ terraform state show 'module.foo.packet_device.worker'
|
||||
```
|
||||
|
||||
## Example: Show a Resource using count
|
||||
## Example: Show a Resource configured with count
|
||||
|
||||
The example below shows the first instance of a `packet_device` resource named `worker` using
|
||||
The example below shows the first instance of a `packet_device` resource named `worker` configured with
|
||||
[`count`](/docs/configuration/resources.html#count-multiple-resource-instances-by-count):
|
||||
|
||||
```shell
|
||||
$ terraform state show 'packet_device.worker[0]'
|
||||
```
|
||||
|
||||
## Example: Show a Resource using for_each
|
||||
## Example: Show a Resource configured with for_each
|
||||
|
||||
The example below shows the `"example"` instance of a `packet_device` resource named `worker` using
|
||||
The example below shows the `"example"` instance of a `packet_device` resource named `worker` configured with
|
||||
[`for_each`](/docs/configuration/resources.html#for_each-multiple-resource-instances-defined-by-a-map-or-set-of-strings):
|
||||
|
||||
Linux, Mac OS, and UNIX:
|
||||
|
|
Loading…
Reference in New Issue