diff --git a/command/state_list.go b/command/state_list.go index daa96b684..4aa4a688b 100644 --- a/command/state_list.go +++ b/command/state_list.go @@ -54,19 +54,19 @@ func (c *StateListCommand) Run(args []string) int { func (c *StateListCommand) Help() string { helpText := ` -Usage: terraform state list [options] [pattern...] +Usage: terraform state list [options] [address...] List resources in the Terraform state. - This command lists resources in the Terraform state. The pattern argument - can be used to filter the resources by resource or module. If no pattern + This command lists resources in the Terraform state. The address argument + can be used to filter the resources by resource or module. If no address is given, all resources are listed. - The pattern argument is meant to provide very simple filtering. For + The address argument is meant to provide very simple filtering. For advanced filtering, please use tools such as "grep". The output of this command is designed to be friendly for this usage. - The pattern argument accepts any resource targeting syntax. Please + The address argument accepts any resource targeting syntax. Please refer to the documentation on resource targeting syntax for more information. diff --git a/command/state_show.go b/command/state_show.go index 0f1b7285c..55bc30910 100644 --- a/command/state_show.go +++ b/command/state_show.go @@ -77,12 +77,12 @@ func (c *StateShowCommand) Run(args []string) int { func (c *StateShowCommand) Help() string { helpText := ` -Usage: terraform state show [options] PATTERN +Usage: terraform state show [options] ADDRESS Shows the attributes of a resource in the Terraform state. This command shows the attributes of a single resource in the Terraform - state. The pattern argument must be used to specify a single resource. + state. The address argument must be used to specify a single resource. You can view the list of available resources with "terraform state list". Options: diff --git a/website/source/docs/commands/state/list.html.md b/website/source/docs/commands/state/list.html.md index a571d6ff5..a785e90b4 100644 --- a/website/source/docs/commands/state/list.html.md +++ b/website/source/docs/commands/state/list.html.md @@ -13,10 +13,10 @@ The `terraform state list` command is used to list resources within a ## Usage -Usage: `terraform state list [options] [pattern...]` +Usage: `terraform state list [options] [address...]` The command will list all resources in the state file matching the given -patterns (if any). If no patterns are given, all resources are listed. +addresses (if any). If no addresses are given, all resources are listed. The resources listed are sorted according to module depth order followed by alphabetical. This means that resources that are in your immediate @@ -24,7 +24,7 @@ configuration are listed first, and resources that are more deeply nested within modules are listed last. For complex infrastructures, the state can contain thousands of resources. -To filter these, provide one or more patterns to the command. Patterns are +To filter these, provide one or more addresses to the command. Addresses are in [resource addressing format](/docs/commands/state/addressing.html). The command-line flags are all optional. The list of available flags are: diff --git a/website/source/docs/commands/state/show.html.md b/website/source/docs/commands/state/show.html.md index 3ca6e9619..c55b90018 100644 --- a/website/source/docs/commands/state/show.html.md +++ b/website/source/docs/commands/state/show.html.md @@ -14,17 +14,17 @@ single resource in the ## Usage -Usage: `terraform state show [options] PATTERN` +Usage: `terraform state show [options] ADDRESS` The command will show the attributes of a single resource in the -state file that matches the given pattern. +state file that matches the given address. The attributes are listed in alphabetical order (with the except of "id" which is always at the top). They are outputted in a way that is easy to parse on the command-line. -This command requires a pattern that points to a single resource in the -state. Patterns are +This command requires a address that points to a single resource in the +state. Addresses are in [resource addressing format](/docs/commands/state/addressing.html). The command-line flags are all optional. The list of available flags are: