mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Merge pull request #17911 from vkatsikaros/patch-2
Expand example explanation
This commit is contained in:
commit
f9f7320438
@ -39,12 +39,14 @@ resource configuration:
|
|||||||
$ terraform import aws_instance.example i-abcd1234
|
$ terraform import aws_instance.example i-abcd1234
|
||||||
```
|
```
|
||||||
|
|
||||||
This command locates the AWS instance with ID `i-abcd1234` and attaches
|
This command locates the AWS instance with ID `i-abcd1234`. Then it attaches
|
||||||
its existing settings, as described by the EC2 API, to the name
|
the existing settings of the instance, as described by the EC2 API, to the
|
||||||
`aws_instance.example` in the Terraform state.
|
name `aws_instance.example` of a module. In this example the module path
|
||||||
|
implies that the root module is used. Finally, the mapping is saved in the
|
||||||
|
Terraform state.
|
||||||
|
|
||||||
It is also possible to import to resources in child modules and to single
|
It is also possible to import to resources in child modules, using their paths,
|
||||||
instances of a resource with `count` set. See
|
and to single instances of a resource with `count` or `for_each` set. See
|
||||||
[_Resource Addressing_](/docs/internals/resource-addressing.html) for more
|
[_Resource Addressing_](/docs/internals/resource-addressing.html) for more
|
||||||
details on how to specify a target resource.
|
details on how to specify a target resource.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user