config: simplify

This commit is contained in:
Mitchell Hashimoto 2014-05-24 13:58:33 -07:00
parent dac18c823a
commit bdeb278728
1 changed files with 3 additions and 7 deletions

View File

@ -68,16 +68,12 @@ func (r *Resource) Id() string {
// ResourceGraph returns a dependency graph of the resources from this
// Terraform configuration.
func (c *Config) ResourceGraph() *depgraph.Graph {
resource2Noun := func(r *Resource) *depgraph.Noun {
return &depgraph.Noun{
nouns := make(map[string]*depgraph.Noun)
for _, r := range c.Resources {
noun := &depgraph.Noun{
Name: r.Id(),
Meta: r,
}
}
nouns := make(map[string]*depgraph.Noun)
for _, r := range c.Resources {
noun := resource2Noun(r)
nouns[noun.Name] = noun
}