diff --git a/internal/backend/backend.go b/internal/backend/backend.go index 0e1daef40..4124b2abd 100644 --- a/internal/backend/backend.go +++ b/internal/backend/backend.go @@ -275,13 +275,6 @@ type Operation struct { // the variables set in the plan are used instead, and they must be valid. AllowUnsetVariables bool - // When loading a plan file for a read-only operation, we may want to - // disable the state lineage checks which are only relevant for operations - // which can modify state. An example where this is important is showing - // a plan which was prepared against a non-default state file, because the - // lineage checks are always against the default state. - DisablePlanFileStateLineageChecks bool - // View implements the logic for all UI interactions. View views.Operation diff --git a/internal/backend/local/backend_local.go b/internal/backend/local/backend_local.go index a4a4fb67e..6082bfdf6 100644 --- a/internal/backend/local/backend_local.go +++ b/internal/backend/local/backend_local.go @@ -284,7 +284,7 @@ func (b *Local) localRunForPlanFile(op *backend.Operation, pf *planfile.Reader, )) return nil, snap, diags } - if !op.DisablePlanFileStateLineageChecks && currentStateMeta != nil { + if currentStateMeta != nil { // If the caller sets this, we require that the stored prior state // has the same metadata, which is an extra safety check that nothing // has changed since the plan was created. (All of the "real-world"