diff --git a/command/format_state.go b/command/format_state.go index 4a67ef7ee..a7df48291 100644 --- a/command/format_state.go +++ b/command/format_state.go @@ -39,7 +39,14 @@ func FormatState(s *terraform.State, c *colorstring.Colorize) string { id = "" } - buf.WriteString(fmt.Sprintf("%s:\n", k)) + taintStr := "" + if s.Tainted != nil { + if _, ok := s.Tainted[id]; ok { + taintStr = " (tainted)" + } + } + + buf.WriteString(fmt.Sprintf("%s:%s\n", k, taintStr)) buf.WriteString(fmt.Sprintf(" id = %s\n", id)) // Sort the attributes