remove feature flag from invoke flag

This commit is contained in:
Daniel Schmidt 2025-09-16 15:58:03 +02:00
parent 2ccc5a2655
commit 332e0386ea
2 changed files with 2 additions and 20 deletions

View file

@ -274,11 +274,11 @@ func (c *ApplyCommand) OperationRequest(
opReq.Type = backendrun.OperationTypeApply
opReq.View = view.Operation()
opReq.StatePersistInterval = c.Meta.StatePersistInterval()
opReq.ActionTargets = args.ActionTargets
// EXPERIMENTAL: maybe enable deferred actions
if c.AllowExperimentalFeatures {
opReq.DeferralAllowed = args.DeferralAllowed
opReq.ActionTargets = args.ActionTargets
} else if args.DeferralAllowed {
// Belated flag parse error, since we don't know about experiments
// support at actual parse time.
@ -288,15 +288,6 @@ func (c *ApplyCommand) OperationRequest(
"The -allow-deferral flag is only valid in experimental builds of Terraform.",
))
return nil, diags
} else if len(args.ActionTargets) > 0 {
// Belated flag parse error, since we don't know about experiments
// support at actual parse time.
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Failed to parse command-line flags",
"The -invoke flag is only valid in experimental builds of Terraform.",
))
return nil, diags
}
var err error

View file

@ -164,11 +164,11 @@ func (c *PlanCommand) OperationRequest(
opReq.ForceReplace = args.ForceReplace
opReq.Type = backendrun.OperationTypePlan
opReq.View = view.Operation()
opReq.ActionTargets = args.ActionTargets
// EXPERIMENTAL: maybe enable deferred actions
if c.AllowExperimentalFeatures {
opReq.DeferralAllowed = args.DeferralAllowed
opReq.ActionTargets = args.ActionTargets
} else if args.DeferralAllowed {
// Belated flag parse error, since we don't know about experiments
// support at actual parse time.
@ -178,15 +178,6 @@ func (c *PlanCommand) OperationRequest(
"The -allow-deferral flag is only valid in experimental builds of Terraform.",
))
return nil, diags
} else if len(args.ActionTargets) > 0 {
// Belated flag parse error, since we don't know about experiments
// support at actual parse time.
diags = diags.Append(tfdiags.Sourceless(
tfdiags.Error,
"Failed to parse command-line flags",
"The -invoke flag is only valid in experimental builds of Terraform.",
))
return nil, diags
}
var err error