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") |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{lc}} | {{lc}} | ||
+ | |||
+ | [[terraform state push]] --help | ||
+ | <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> | ||
Latest revision as of 05:16, 21 March 2023
terraform state push --help
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[edit]
Advertising: