2016-03-22 18:41:02 +01:00
|
|
|
---
|
2020-10-27 01:58:30 +01:00
|
|
|
layout: "docs"
|
2016-03-22 18:41:02 +01:00
|
|
|
page_title: "Command: state resource addressing"
|
2018-12-21 03:18:13 +01:00
|
|
|
sidebar_current: "docs-commands-state-address"
|
2016-03-22 18:41:02 +01:00
|
|
|
description: |-
|
|
|
|
The `terraform state` command is used for advanced state management.
|
|
|
|
---
|
|
|
|
|
|
|
|
# Resource Addressing
|
|
|
|
|
2019-03-18 19:49:30 +01:00
|
|
|
The `terraform state` subcommands use
|
2021-01-19 22:43:01 +01:00
|
|
|
[standard address syntax](/docs/cli/state/resource-addressing.html) to refer
|
2019-03-18 19:49:30 +01:00
|
|
|
to individual resources, resource instances, and modules. This is the same
|
|
|
|
syntax used for the `-target` option to the `apply` and `plan` commands.
|
2016-03-22 18:41:02 +01:00
|
|
|
|
2019-03-18 19:49:30 +01:00
|
|
|
Most state commands allow referring to individual resource instances, whole
|
|
|
|
resources (which may have multiple instances if `count` or `for_each` is used),
|
|
|
|
or even whole modules.
|
2016-03-22 18:41:02 +01:00
|
|
|
|
2021-01-19 22:43:01 +01:00
|
|
|
For more information on the syntax, see [Resource Addressing](/docs/cli/state/resource-addressing.html).
|