From 5ebcd60759767d88dfb4045ef81fcda94d232c4e Mon Sep 17 00:00:00 2001 From: Jonathan Newnham Date: Thu, 2 Feb 2023 15:24:48 +1300 Subject: [PATCH] Update destroy.mdx mention -target --- website/docs/cli/commands/destroy.mdx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/website/docs/cli/commands/destroy.mdx b/website/docs/cli/commands/destroy.mdx index beb9782ebf..49f0c208bf 100644 --- a/website/docs/cli/commands/destroy.mdx +++ b/website/docs/cli/commands/destroy.mdx @@ -44,3 +44,14 @@ you the proposed destroy changes without executing them. -> **Note:** The `-destroy` option to `terraform apply` exists only in Terraform v0.15.2 and later. For earlier versions, you _must_ use `terraform destroy` to get the effect of `terraform apply -destroy`. + +## Options + +In exceptional circumstances, it may be useful to use the `-target` option. +This will destroy only a particular resource (and its dependencies): + +``` +terraform destroy -target RESOURCE_TYPE.NAME +``` + +For more about `-target`, see [`plan`](/cli/commands/plan).