From 75ab4a99702d3e31cbd295f5ee74f60b440a8912 Mon Sep 17 00:00:00 2001 From: James Nugent Date: Mon, 13 Jun 2016 09:25:21 +0200 Subject: [PATCH] core: Fix crash with tainted resource This commit fixes a crash in `terraform show` where there is no primary resource, but there is a tainted resource, because of the changes made to tainted resource handling in 0.7. --- command/format_state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/format_state.go b/command/format_state.go index 9076af79e..d54a7648a 100644 --- a/command/format_state.go +++ b/command/format_state.go @@ -111,7 +111,7 @@ func formatStateModuleExpand( } taintStr := "" - if rs.Primary.Tainted { + if rs.Primary != nil && rs.Primary.Tainted { taintStr = " (tainted)" }