backend/local: Stub out remaining planfile todos with errors
This is just to make sure they show up later when we are working on the tests, so we can be sure not to forget to address them.
This commit is contained in:
parent
fa3b4fc9de
commit
91d2de6a25
|
@ -195,9 +195,24 @@ func (b *Local) contextFromPlanFile(pf *planfile.Reader, opts terraform.ContextO
|
||||||
opts.Variables = variables
|
opts.Variables = variables
|
||||||
opts.Changes = plan.Changes
|
opts.Changes = plan.Changes
|
||||||
|
|
||||||
// TODO: targets
|
// There are some remaining things to reinstate here after refactoring.
|
||||||
// TODO: check that the states match
|
// These are just warnings for now so we can work on other tasks without
|
||||||
// TODO: impose provider SHA256 constraints
|
// forgetting to deal with these.
|
||||||
|
diags = diags.Append(tfdiags.Sourceless(
|
||||||
|
tfdiags.Error,
|
||||||
|
"Targets not yet implemented when reading from plan file",
|
||||||
|
"TODO: Need to deal with any -target arguments recorded in the plan file.",
|
||||||
|
))
|
||||||
|
diags = diags.Append(tfdiags.Sourceless(
|
||||||
|
tfdiags.Error,
|
||||||
|
"Plan state lineage checking not yet implemented",
|
||||||
|
"TODO: Need to check that the state recorded in the plan matches the current state, and fail if not.",
|
||||||
|
))
|
||||||
|
diags = diags.Append(tfdiags.Sourceless(
|
||||||
|
tfdiags.Error,
|
||||||
|
"Provider SHA256 checks not yet implemented",
|
||||||
|
"TODO: Need to register our saved provider SHA256 hashes with the provider resolver to ensure we get the same binaries that created this plan.",
|
||||||
|
))
|
||||||
|
|
||||||
tfCtx, ctxDiags := terraform.NewContext(&opts)
|
tfCtx, ctxDiags := terraform.NewContext(&opts)
|
||||||
diags = diags.Append(ctxDiags)
|
diags = diags.Append(ctxDiags)
|
||||||
|
|
|
@ -183,7 +183,7 @@ func TestLocal_planDestroy(t *testing.T) {
|
||||||
}
|
}
|
||||||
op.PlanOutBackend = &plans.Backend{
|
op.PlanOutBackend = &plans.Backend{
|
||||||
// Just a placeholder so that we can generate a valid plan file.
|
// Just a placeholder so that we can generate a valid plan file.
|
||||||
Type: "local",
|
Type: "local",
|
||||||
Config: cfgRaw,
|
Config: cfgRaw,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ func TestLocal_planOutPathNoChange(t *testing.T) {
|
||||||
}
|
}
|
||||||
op.PlanOutBackend = &plans.Backend{
|
op.PlanOutBackend = &plans.Backend{
|
||||||
// Just a placeholder so that we can generate a valid plan file.
|
// Just a placeholder so that we can generate a valid plan file.
|
||||||
Type: "local",
|
Type: "local",
|
||||||
Config: cfgRaw,
|
Config: cfgRaw,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue