mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 01:41:48 -06:00
command: output tainted state to CLI
This commit is contained in:
parent
2b68015034
commit
51b2a8e7f2
@ -39,7 +39,14 @@ func FormatState(s *terraform.State, c *colorstring.Colorize) string {
|
||||
id = "<not created>"
|
||||
}
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user