terraform: graph root doesn't need to depend on providers
This commit is contained in:
parent
83795bc54d
commit
2ffbe56b1b
|
@ -400,6 +400,11 @@ func graphAddProviderConfigs(g *depgraph.Graph, c *config.Config) {
|
|||
func graphAddRoot(g *depgraph.Graph) {
|
||||
root := &depgraph.Noun{Name: GraphRootNode}
|
||||
for _, n := range g.Nouns {
|
||||
// The root only needs to depend on all the resources
|
||||
if _, ok := n.Meta.(*GraphNodeResource); !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
root.Deps = append(root.Deps, &depgraph.Dependency{
|
||||
Name: n.Name,
|
||||
Source: root,
|
||||
|
|
|
@ -224,7 +224,6 @@ root
|
|||
root -> aws_load_balancer.weblb
|
||||
root -> aws_security_group.firewall
|
||||
root -> openstack_floating_ip.random
|
||||
root -> provider.aws
|
||||
`
|
||||
|
||||
const testTerraformGraphDiffStr = `
|
||||
|
@ -269,5 +268,4 @@ root
|
|||
root -> aws_load_balancer.weblb
|
||||
root -> aws_security_group.firewall
|
||||
root -> openstack_floating_ip.random
|
||||
root -> provider.aws
|
||||
`
|
||||
|
|
Loading…
Reference in New Issue