terraform: add TargetsTransformer to plan

This commit is contained in:
Mitchell Hashimoto 2016-11-07 14:09:11 -08:00
parent a2d71388c2
commit f95f904ba8
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
2 changed files with 7 additions and 0 deletions

View File

@ -519,6 +519,7 @@ func (c *Context) Plan() (*Plan, error) {
Module: c.module,
State: c.state,
Providers: c.components.ResourceProviders(),
Targets: c.targets,
}).Build(RootModulePath)
}
if err != nil && !newGraphEnabled {

View File

@ -26,6 +26,9 @@ type PlanGraphBuilder struct {
// Providers is the list of providers supported.
Providers []string
// Targets are resources to target
Targets []string
// DisableReduce, if true, will not reduce the graph. Great for testing.
DisableReduce bool
}
@ -78,6 +81,9 @@ func (b *PlanGraphBuilder) Steps() []GraphTransformer {
Module: b.Module,
},
// Target
&TargetsTransformer{Targets: b.Targets},
// Attach the configuration to any resources
&AttachResourceConfigTransformer{Module: b.Module},