From d8ecb32a7cbb244ae0c6ea3161ef26cb20326710 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Mon, 24 Nov 2014 15:50:15 -0800 Subject: [PATCH] terraform: test module is marked for destroy --- terraform/diff.go | 4 ++++ terraform/terraform_test.go | 1 + 2 files changed, 5 insertions(+) diff --git a/terraform/diff.go b/terraform/diff.go index 3abb3cd4a..c5e821cdf 100644 --- a/terraform/diff.go +++ b/terraform/diff.go @@ -193,6 +193,10 @@ func (d *ModuleDiff) IsRoot() bool { func (d *ModuleDiff) String() string { var buf bytes.Buffer + if d.Destroy { + buf.WriteString("DESTROY MODULE\n") + } + names := make([]string, 0, len(d.Resources)) for name, _ := range d.Resources { names = append(names, name) diff --git a/terraform/terraform_test.go b/terraform/terraform_test.go index 543862950..bca1a1c8f 100644 --- a/terraform/terraform_test.go +++ b/terraform/terraform_test.go @@ -739,6 +739,7 @@ DIFF: DESTROY: aws_instance.foo module.child: + DESTROY MODULE DESTROY: aws_instance.foo STATE: