Add the close provider and provisioner transformers (#13102)

This commit is contained in:
Sander van Harmelen 2017-04-12 23:25:15 +02:00 committed by GitHub
parent 381adca0af
commit 051582d32a
6 changed files with 53 additions and 0 deletions

View File

@ -123,6 +123,10 @@ func (b *ApplyGraphBuilder) Steps() []GraphTransformer {
// Target
&TargetsTransformer{Targets: b.Targets},
// Close opened plugin connections
&CloseProviderTransformer{},
&CloseProvisionerTransformer{},
// Single root
&RootTransformer{},
}

View File

@ -510,6 +510,18 @@ module.child.provider.aws
provider.aws
module.child.provisioner.exec
provider.aws
provider.aws (close)
aws_instance.create
aws_instance.other
module.child.aws_instance.create
module.child.aws_instance.other
provider.aws
provisioner.exec (close)
module.child.aws_instance.create
root
meta.count-boundary (count boundary fixup)
provider.aws (close)
provisioner.exec (close)
`
const testApplyGraphBuilderDoubleCBDStr = `
@ -533,6 +545,15 @@ meta.count-boundary (count boundary fixup)
aws_instance.B (destroy)
provider.aws
provider.aws
provider.aws (close)
aws_instance.A
aws_instance.A (destroy)
aws_instance.B
aws_instance.B (destroy)
provider.aws
root
meta.count-boundary (count boundary fixup)
provider.aws (close)
`
const testApplyGraphBuilderDestroyCountStr = `
@ -546,4 +567,11 @@ meta.count-boundary (count boundary fixup)
aws_instance.B
provider.aws
provider.aws
provider.aws (close)
aws_instance.A[1] (destroy)
aws_instance.B
provider.aws
root
meta.count-boundary (count boundary fixup)
provider.aws (close)
`

View File

@ -62,6 +62,9 @@ func (b *ImportGraphBuilder) Steps() []GraphTransformer {
// This validates that the providers only depend on variables
&ImportProviderValidateTransformer{},
// Close opened plugin connections
&CloseProviderTransformer{},
// Single root
&RootTransformer{},

View File

@ -116,6 +116,10 @@ func (b *PlanGraphBuilder) Steps() []GraphTransformer {
// Target
&TargetsTransformer{Targets: b.Targets},
// Close opened plugin connections
&CloseProviderTransformer{},
&CloseProvisionerTransformer{},
// Single root
&RootTransformer{},
}

View File

@ -65,6 +65,17 @@ openstack_floating_ip.random
provider.openstack
provider.aws
openstack_floating_ip.random
provider.aws (close)
aws_instance.web
aws_load_balancer.weblb
aws_security_group.firewall
provider.aws
provider.openstack
provider.openstack (close)
openstack_floating_ip.random
provider.openstack
root
provider.aws (close)
provider.openstack (close)
var.foo
`

View File

@ -115,6 +115,9 @@ func (b *RefreshGraphBuilder) Steps() []GraphTransformer {
// Target
&TargetsTransformer{Targets: b.Targets},
// Close opened plugin connections
&CloseProviderTransformer{},
// Single root
&RootTransformer{},
}