terraform: emit ID of tainted resource in string

This commit is contained in:
Armon Dadgar 2014-09-16 17:27:14 -07:00
parent edccc2de3f
commit 71782c57b3
1 changed files with 5 additions and 1 deletions

View File

@ -122,7 +122,11 @@ func (s *State) String() string {
id = rs.Primary.ID
}
if id == "" {
id = "<not created>"
if len(rs.Tainted) > 0 {
id = rs.Tainted[0].ID
} else {
id = "<not created>"
}
}
taintStr := ""