@@ -16,11 +16,19 @@ func (in *PlanArgsModifier) Args(args []string) []string {
1616 return args
1717 }
1818
19+ if in .parallelism != nil {
20+ args = append (args , fmt .Sprintf ("-parallelism=%d" , * in .parallelism ))
21+ }
22+
23+ if in .refresh != nil {
24+ args = append (args , fmt .Sprintf ("-refresh=%t" , * in .refresh ))
25+ }
26+
1927 return append (args , fmt .Sprintf ("-out=%s" , in .planFileName ))
2028}
2129
22- func NewPlanArgsModifier (planFileName string ) v1.Modifier {
23- return & PlanArgsModifier {planFileName : planFileName }
30+ func ( tf * Terraform ) NewPlanArgsModifier (planFileName string ) v1.Modifier {
31+ return & PlanArgsModifier {planFileName : planFileName , parallelism : tf . parallelism , refresh : tf . refresh }
2432}
2533
2634// Args implements [v1.ArgsModifier] type.
@@ -33,9 +41,13 @@ func (in *ApplyArgsModifier) Args(args []string) []string {
3341 return args
3442 }
3543
44+ if in .parallelism != nil {
45+ args = append (args , fmt .Sprintf ("-parallelism=%d" , * in .parallelism ))
46+ }
47+
3648 return append (args , in .planFileName )
3749}
3850
39- func NewApplyArgsModifier (dir , planFileName string ) v1.Modifier {
40- return & ApplyArgsModifier {planFileName : planFileName , dir : dir }
51+ func ( tf * Terraform ) NewApplyArgsModifier (dir , planFileName string ) v1.Modifier {
52+ return & ApplyArgsModifier {planFileName : planFileName , dir : dir , parallelism : tf . parallelism , refresh : tf . refresh }
4153}
0 commit comments