terraform: State string includes how many resources are tainted

This commit is contained in:
Armon Dadgar 2014-09-19 14:55:59 -07:00
parent 9594ed6e1c
commit ff42a92636
2 changed files with 3 additions and 3 deletions

View File

@ -134,7 +134,7 @@ func (s *State) String() string {
taintStr := "" taintStr := ""
if len(rs.Tainted) > 0 { if len(rs.Tainted) > 0 {
taintStr = " (tainted)" taintStr = fmt.Sprintf(" (%d tainted)", len(rs.Tainted))
} }
buf.WriteString(fmt.Sprintf("%s:%s\n", k, taintStr)) buf.WriteString(fmt.Sprintf("%s:%s\n", k, taintStr))

View File

@ -137,7 +137,7 @@ aws_instance.foo:
` `
const testTerraformApplyProvisionerFailStr = ` const testTerraformApplyProvisionerFailStr = `
aws_instance.bar: (tainted) aws_instance.bar: (1 tainted)
ID = foo ID = foo
aws_instance.foo: aws_instance.foo:
ID = foo ID = foo
@ -500,7 +500,7 @@ DESTROY/CREATE: aws_instance.bar
STATE: STATE:
aws_instance.bar: (tainted) aws_instance.bar: (1 tainted)
ID = baz ID = baz
aws_instance.foo: aws_instance.foo:
ID = bar ID = bar