terraform: fix formatting of node name with index -1

This commit is contained in:
Mitchell Hashimoto 2015-02-11 17:20:05 -08:00
parent f7bed9a2f9
commit 57eae5f9a8
1 changed files with 4 additions and 0 deletions

View File

@ -61,6 +61,10 @@ type graphNodeExpandedResource struct {
}
func (n *graphNodeExpandedResource) Name() string {
if n.Index == -1 {
return n.Resource.Id()
}
return fmt.Sprintf("%s #%d", n.Resource.Id(), n.Index)
}