Added -parallelism to refresh and plan cli UI
This commit is contained in:
parent
f59c71b35a
commit
fc60b2858c
|
@ -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")
|
||||
|
@ -57,9 +58,10 @@ func (c *PlanCommand) Run(args []string) int {
|
|||
c.Meta.extraHooks = []terraform.Hook{countHook}
|
||||
|
||||
ctx, _, err := c.Context(contextOpts{
|
||||
Destroy: destroy,
|
||||
Path: path,
|
||||
StatePath: c.Meta.statePath,
|
||||
Destroy: destroy,
|
||||
Path: path,
|
||||
StatePath: c.Meta.statePath,
|
||||
Parallelism: c.Meta.parallelism,
|
||||
})
|
||||
if err != nil {
|
||||
c.Ui.Error(err.Error())
|
||||
|
|
|
@ -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()) }
|
||||
|
@ -78,8 +79,9 @@ func (c *RefreshCommand) Run(args []string) int {
|
|||
|
||||
// Build the context based on the arguments given
|
||||
ctx, _, err := c.Context(contextOpts{
|
||||
Path: configPath,
|
||||
StatePath: c.Meta.statePath,
|
||||
Path: configPath,
|
||||
StatePath: c.Meta.statePath,
|
||||
Parallelism: c.Meta.parallelism,
|
||||
})
|
||||
if err != nil {
|
||||
c.Ui.Error(err.Error())
|
||||
|
|
Loading…
Reference in New Issue