backend/local: Remove unused DisablePlanFileStateLineageChecks flag

Now that show command has been refactored to remove its dependence
on a local backend and local run, this flag is no longer needed to
fix #30195.
This commit is contained in:
Krista LaFentres 2022-01-11 16:53:36 -06:00
parent fea8f6cfa2
commit 64e1241ae3
2 changed files with 1 additions and 8 deletions

View File

@ -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

View File

@ -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"