Added -parallelism to refresh and plan cli UI

This commit is contained in:
Kevin Nuckolls 2015-05-07 10:21:00 -05:00 committed by Joseph Anthony Pasquale Holsten
parent f59c71b35a
commit fc60b2858c
2 changed files with 9 additions and 5 deletions

View File

@ -27,6 +27,7 @@ func (c *PlanCommand) Run(args []string) int {
cmdFlags.BoolVar(&refresh, "refresh", true, "refresh")
c.addModuleDepthFlag(cmdFlags, &moduleDepth)
cmdFlags.StringVar(&outPath, "out", "", "path")
cmdFlags.IntVar(&c.Meta.parallelism, "parallelism", 0, "parallelism")
cmdFlags.StringVar(&c.Meta.statePath, "state", DefaultStateFilename, "path")
cmdFlags.StringVar(&c.Meta.backupPath, "backup", "", "path")
cmdFlags.BoolVar(&detailed, "detailed-exitcode", false, "detailed-exitcode")
@ -60,6 +61,7 @@ func (c *PlanCommand) Run(args []string) int {
Destroy: destroy,
Path: path,
StatePath: c.Meta.statePath,
Parallelism: c.Meta.parallelism,
})
if err != nil {
c.Ui.Error(err.Error())

View File

@ -18,6 +18,7 @@ func (c *RefreshCommand) Run(args []string) int {
cmdFlags := c.Meta.flagSet("refresh")
cmdFlags.StringVar(&c.Meta.statePath, "state", DefaultStateFilename, "path")
cmdFlags.IntVar(&c.Meta.parallelism, "parallelism", 0, "parallelism")
cmdFlags.StringVar(&c.Meta.stateOutPath, "state-out", "", "path")
cmdFlags.StringVar(&c.Meta.backupPath, "backup", "", "path")
cmdFlags.Usage = func() { c.Ui.Error(c.Help()) }
@ -80,6 +81,7 @@ func (c *RefreshCommand) Run(args []string) int {
ctx, _, err := c.Context(contextOpts{
Path: configPath,
StatePath: c.Meta.statePath,
Parallelism: c.Meta.parallelism,
})
if err != nil {
c.Ui.Error(err.Error())