File tree Expand file tree Collapse file tree 2 files changed +2
-20
lines changed Expand file tree Collapse file tree 2 files changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -274,11 +274,11 @@ func (c *ApplyCommand) OperationRequest(
274274 opReq .Type = backendrun .OperationTypeApply
275275 opReq .View = view .Operation ()
276276 opReq .StatePersistInterval = c .Meta .StatePersistInterval ()
277+ opReq .ActionTargets = args .ActionTargets
277278
278279 // EXPERIMENTAL: maybe enable deferred actions
279280 if c .AllowExperimentalFeatures {
280281 opReq .DeferralAllowed = args .DeferralAllowed
281- opReq .ActionTargets = args .ActionTargets
282282 } else if args .DeferralAllowed {
283283 // Belated flag parse error, since we don't know about experiments
284284 // support at actual parse time.
@@ -288,15 +288,6 @@ func (c *ApplyCommand) OperationRequest(
288288 "The -allow-deferral flag is only valid in experimental builds of Terraform." ,
289289 ))
290290 return nil , diags
291- } else if len (args .ActionTargets ) > 0 {
292- // Belated flag parse error, since we don't know about experiments
293- // support at actual parse time.
294- diags = diags .Append (tfdiags .Sourceless (
295- tfdiags .Error ,
296- "Failed to parse command-line flags" ,
297- "The -invoke flag is only valid in experimental builds of Terraform." ,
298- ))
299- return nil , diags
300291 }
301292
302293 var err error
Original file line number Diff line number Diff line change @@ -164,11 +164,11 @@ func (c *PlanCommand) OperationRequest(
164164 opReq .ForceReplace = args .ForceReplace
165165 opReq .Type = backendrun .OperationTypePlan
166166 opReq .View = view .Operation ()
167+ opReq .ActionTargets = args .ActionTargets
167168
168169 // EXPERIMENTAL: maybe enable deferred actions
169170 if c .AllowExperimentalFeatures {
170171 opReq .DeferralAllowed = args .DeferralAllowed
171- opReq .ActionTargets = args .ActionTargets
172172 } else if args .DeferralAllowed {
173173 // Belated flag parse error, since we don't know about experiments
174174 // support at actual parse time.
@@ -178,15 +178,6 @@ func (c *PlanCommand) OperationRequest(
178178 "The -allow-deferral flag is only valid in experimental builds of Terraform." ,
179179 ))
180180 return nil , diags
181- } else if len (args .ActionTargets ) > 0 {
182- // Belated flag parse error, since we don't know about experiments
183- // support at actual parse time.
184- diags = diags .Append (tfdiags .Sourceless (
185- tfdiags .Error ,
186- "Failed to parse command-line flags" ,
187- "The -invoke flag is only valid in experimental builds of Terraform." ,
188- ))
189- return nil , diags
190181 }
191182
192183 var err error
You can’t perform that action at this time.
0 commit comments