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.
This commit is contained in:
parent
ff2a7b0262
commit
75ab4a9970
|
@ -111,7 +111,7 @@ func formatStateModuleExpand(
|
||||||
}
|
}
|
||||||
|
|
||||||
taintStr := ""
|
taintStr := ""
|
||||||
if rs.Primary.Tainted {
|
if rs.Primary != nil && rs.Primary.Tainted {
|
||||||
taintStr = " (tainted)"
|
taintStr = " (tainted)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue