Difference between revisions of "Terraform destroy --help"
Jump to navigation
Jump to search
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{lowercase}} | |
− | |||
Destroy Terraform-managed infrastructure. | Destroy Terraform-managed infrastructure. | ||
+ | * <code>Usage: [[terraform destroy]] [options] [DIR]</code> | ||
− | + | Options: | |
− | + | ||
− | + | -backup=path Path to backup the existing state file before | |
modifying. Defaults to the "-state-out" path with | modifying. Defaults to the "-state-out" path with | ||
".backup" extension. Set to "-" to disable backup. | ".backup" extension. Set to "-" to disable backup. | ||
− | + | ||
-auto-approve Skip interactive approval before destroying. | -auto-approve Skip interactive approval before destroying. | ||
− | + | ||
-force Deprecated: same as auto-approve. | -force Deprecated: same as auto-approve. | ||
− | + | ||
-lock=true Lock the state file when locking is supported. | -lock=true Lock the state file when locking is supported. | ||
− | + | ||
-lock-timeout=0s Duration to retry a state lock. | -lock-timeout=0s Duration to retry a state lock. | ||
− | + | ||
-no-color If specified, output won't contain any color. | -no-color If specified, output won't contain any color. | ||
− | + | ||
-parallelism=n Limit the number of concurrent operations. | -parallelism=n Limit the number of concurrent operations. | ||
Defaults to 10. | Defaults to 10. | ||
− | + | ||
-refresh=true Update state prior to checking for differences. This | -refresh=true Update state prior to checking for differences. This | ||
has no effect if a plan file is given to apply. | has no effect if a plan file is given to apply. | ||
− | + | ||
-state=path Path to read and save state (unless state-out | -state=path Path to read and save state (unless state-out | ||
is specified). Defaults to "terraform.tfstate". | is specified). Defaults to "terraform.tfstate". | ||
− | + | ||
-state-out=path Path to write state to that is different than | -state-out=path Path to write state to that is different than | ||
"-state". This can be used to preserve the old | "-state". This can be used to preserve the old | ||
state. | state. | ||
− | + | ||
-target=resource Resource to target. Operation will be limited to this | -target=resource Resource to target. Operation will be limited to this | ||
resource and its dependencies. This flag can be used | resource and its dependencies. This flag can be used | ||
multiple times. | multiple times. | ||
− | + | ||
-var 'foo=bar' Set a variable in the Terraform configuration. This | -var 'foo=bar' Set a variable in the Terraform configuration. This | ||
flag can be set multiple times. | flag can be set multiple times. | ||
− | + | ||
-var-file=foo Set variables in the Terraform configuration from | -var-file=foo Set variables in the Terraform configuration from | ||
a file. If "terraform.tfvars" or any ".auto.tfvars" | a file. If "terraform.tfvars" or any ".auto.tfvars" | ||
− | files are present, they will be automatically loaded.</ | + | files are present, they will be automatically loaded. |
+ | |||
+ | == Related == | ||
+ | * <code>[[terraform apply]]</code> | ||
+ | |||
+ | == See also == | ||
+ | * {{terraform destroy}} | ||
+ | |||
+ | [[Category:Terraform]] |
Latest revision as of 09:24, 21 November 2023
Destroy Terraform-managed infrastructure.
Usage: terraform destroy [options] [DIR]
Options: -backup=path Path to backup the existing state file before modifying. Defaults to the "-state-out" path with ".backup" extension. Set to "-" to disable backup. -auto-approve Skip interactive approval before destroying. -force Deprecated: same as auto-approve. -lock=true Lock the state file when locking is supported. -lock-timeout=0s Duration to retry a state lock. -no-color If specified, output won't contain any color. -parallelism=n Limit the number of concurrent operations. Defaults to 10. -refresh=true Update state prior to checking for differences. This has no effect if a plan file is given to apply. -state=path Path to read and save state (unless state-out is specified). Defaults to "terraform.tfstate". -state-out=path Path to write state to that is different than "-state". This can be used to preserve the old state. -target=resource Resource to target. Operation will be limited to this resource and its dependencies. This flag can be used multiple times. -var 'foo=bar' Set a variable in the Terraform configuration. This flag can be set multiple times. -var-file=foo Set variables in the Terraform configuration from a file. If "terraform.tfvars" or any ".auto.tfvars" files are present, they will be automatically loaded.
Related[edit]
See also[edit]
Advertising: