mirror of
https://github.com/hashicorp/terraform.git
synced 2026-06-08 16:35:25 -04:00
command: output tainted state to CLI
This commit is contained in:
parent
2b68015034
commit
51b2a8e7f2
1 changed files with 8 additions and 1 deletions
|
|
@ -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 a new issue