Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pages/common/terraform-apply.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

- Apply changes to a specific resource:

`terraform apply -target {{resource_type.resource_name[instance index]}}`
`terraform apply -target {{resource_type.resource_name[instance_index]}}`

- Replace a specific resource:

`terraform apply -replace {{resource_type.resource_name[instance index]}}`
`terraform apply -replace {{resource_type.resource_name[instance_index]}}`

- Destroy Terraform-managed infrastructure:

Expand Down
28 changes: 28 additions & 0 deletions pages/common/terraform-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# terraform destroy

> Destroy all objects managed by a Terraform configuration.
> More information: <https://developer.hashicorp.com/terraform/cli/commands/destroy>.

- Destroy all infrastructure in the current directory:

`terraform destroy`

- Destroy infrastructure, skipping interactive approval:

`terraform destroy -auto-approve`

- Destroy a specific resource:

`terraform destroy -target {{resource_type.resource_name[instance_index]}}`

- Specify values for input variables:

`terraform destroy -var '{{name1}}={{value1}}' -var '{{name2}}={{value2}}'`

- Specify values for input variables from a file:

`terraform destroy -var-file {{path/to/file.tfvars}}`

- Destroy infrastructure with compact warnings:

`terraform destroy -compact-warnings`
2 changes: 1 addition & 1 deletion pages/common/terraform-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

- Focus Terraform's attention on only a subset of resources:

`terraform plan -target {{resource_type.resource_name[instance index]}}`
`terraform plan -target {{resource_type.resource_name[instance_index]}}`

- Output a plan as JSON:

Expand Down
2 changes: 1 addition & 1 deletion pages/common/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@

`terraform apply`

- Destroy Terraform-managed infrastructure:
- Destroy all infrastructure in the current directory:

`terraform destroy`