Difference between revisions of "Terraform state push --help"
Jump to navigation
Jump to search
(Created page with "{{lc}} == See also == * {{terraform state}} * {{terraform state cmd}} Category:Terraform") |
|||
Line 1: | Line 1: | ||
{{lc}} | {{lc}} | ||
+ | <pre> | ||
+ | Usage: terraform [global options] state push [options] PATH | ||
+ | |||
+ | Update remote state from a local state file at PATH. | ||
+ | |||
+ | This command "pushes" a local state and overwrites remote state | ||
+ | with a local state file. The command will protect you against writing | ||
+ | an older serial or a different state file lineage unless you specify the | ||
+ | "-force" flag. | ||
+ | |||
+ | This command works with local state (it will overwrite the local | ||
+ | state), but is less useful for this use case. | ||
+ | |||
+ | If PATH is "-", then this command will read the state to push from stdin. | ||
+ | Data from stdin is not streamed to the backend: it is loaded completely | ||
+ | (until pipe close), verified, and then pushed. | ||
+ | |||
+ | Options: | ||
+ | |||
+ | -force Write the state even if lineages don't match or the | ||
+ | remote serial is higher. | ||
+ | |||
+ | -lock=false Don't hold a state lock during the operation. This is | ||
+ | dangerous if others might concurrently run commands | ||
+ | against the same workspace. | ||
+ | |||
+ | -lock-timeout=0s Duration to retry a state lock. | ||
+ | </pre> | ||
Revision as of 05:15, 21 March 2023
Usage: terraform [global options] state push [options] PATH Update remote state from a local state file at PATH. This command "pushes" a local state and overwrites remote state with a local state file. The command will protect you against writing an older serial or a different state file lineage unless you specify the "-force" flag. This command works with local state (it will overwrite the local state), but is less useful for this use case. If PATH is "-", then this command will read the state to push from stdin. Data from stdin is not streamed to the backend: it is loaded completely (until pipe close), verified, and then pushed. Options: -force Write the state even if lineages don't match or the remote serial is higher. -lock=false Don't hold a state lock during the operation. This is dangerous if others might concurrently run commands against the same workspace. -lock-timeout=0s Duration to retry a state lock.
See also
Advertising: