From 2055885a0fb52ff6a49766e936b7bc193cc6b059 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 20 Jan 2017 23:23:55 -0800 Subject: [PATCH] website: add destroy provisioners to getting started --- terraform/debug_test.go | 2 +- .../source/intro/getting-started/provision.html.md | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/terraform/debug_test.go b/terraform/debug_test.go index 927632350..b80111fc7 100644 --- a/terraform/debug_test.go +++ b/terraform/debug_test.go @@ -156,7 +156,7 @@ func TestDebugHook_nilArgs(t *testing.T) { h.PostApply(nil, nil, nil) h.PostDiff(nil, nil) h.PostImportState(nil, nil) - h.PostProvision(nil, "") + h.PostProvision(nil, "", nil) h.PostProvisionResource(nil, nil) h.PostRefresh(nil, nil) h.PostStateUpdate(nil) diff --git a/website/source/intro/getting-started/provision.html.md b/website/source/intro/getting-started/provision.html.md index 78d79f00d..f78c3a412 100644 --- a/website/source/intro/getting-started/provision.html.md +++ b/website/source/intro/getting-started/provision.html.md @@ -100,6 +100,20 @@ If you create an execution plan with a tainted resource, however, the plan will clearly state that the resource will be destroyed because it is tainted. +## Destroy Provisioners + +Provisioners can also be defined that run only during a destroy +operation. These are useful for performing system cleanup, extracting +data, etc. + +For many resources, using built-in cleanup mechanisms is recommended +if possible (such as init scripts), but provisioners can be used if +necessary. + +The getting started guide won't show any destroy provisioner examples. +If you need to use destroy provisioners, please +[see the provisioner documentation](/docs/provisioners). + ## Next Provisioning is important for being able to bootstrap instances.