Difference between revisions of "Terraform state (command)"

From wikieduonline
Jump to navigation Jump to search
m (Welcome moved page Terraform state to Terraform state (command))
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
* <code>[[terraform]] state</code>
+
https://www.terraform.io/docs/language/state/index.html
* <code>[[terraform state list]]</code>
 
*<code>[[terraform state show]]</code>
 
  
<pre>
+
<code>[[terraform]] state</code> and <code>[[terraform state --help]]</code>
terraform state
 
Usage: terraform [global options] state <subcommand> [options] [args]
 
  
  This command has subcommands for advanced state management.
+
== Examples ==
 
+
* <code>[[terraform state list]]</code>  List resources in the state
  These subcommands can be used to slice and dice the Terraform state.
+
* <code>[[terraform state show]]</code>
  This is sometimes necessary in advanced cases. For your safety, all
+
* <code>[[terraform state mv]]</code>
  state management commands that modify the state create a timestamped
+
* <code>[[terraform state pull]]</code>
  backup of the state prior to making modifications.
+
* <code>[[terraform state push]]</code>
 
+
* <code>[[terraform state replace-provider]]</code>
  The structure and output of the commands is specifically tailored to work
+
* <code>[[terraform state rm]]</code>
  well with the common Unix utilities such as grep, awk, etc. We recommend
 
  using those tools to perform more advanced state tasks.
 
 
 
Subcommands:
 
    list               List resources in the state
 
    mv                  Move an item in the state
 
    pull                Pull current state and output to stdout
 
    push                Update remote state from a local state file
 
    replace-provider   Replace provider in the state
 
    rm                 Remove instances from the state
 
    show                Show a resource in the state
 
</pre>
 
  
 +
== Related terms ==
 +
* [[Terraform state files]]: <code>[[terraform.tfstate]]</code>
  
 
== See also ==
 
== See also ==
 +
* {{terraform state}}
 +
* {{tf files}}
 
* {{terraform cmd}}
 
* {{terraform cmd}}
* {{Terraform}}
 
  
 
[[Category:Terraform]]
 
[[Category:Terraform]]

Latest revision as of 23:40, 25 February 2022

Advertising: