c6a7d080d9
Previously there were only two planning modes: normal mode and destroy mode. In that context it made sense for these to be distinguished only by a boolean flag. We're now getting ready to add our third mode, "refresh only". This establishes the idea that planning can be done in one of a number of mutually-exclusive "modes", which are related to but separate from the various other options that serve as modifiers for the plan operation. This commit only introduces the new plans.Mode type and replaces the existing "destroy" flag with a variable of that type. This doesn't cause any change in effective behavior because Terraform Core still supports only NormalMode and DestroyMode, with NewContext rejecting an attempt to create a RefreshMode context for now. It is in retrospect a little odd that the "destroy" flag was part of ContextOpts rather than just an argument to the Plan method, but refactoring that would be too invasive a change for right now so we'll leave this as a field of the context for now and save revisiting that for another day. |
||
---|---|---|
.. | ||
testdata | ||
backend.go | ||
backend_apply.go | ||
backend_apply_test.go | ||
backend_local.go | ||
backend_local_test.go | ||
backend_plan.go | ||
backend_plan_test.go | ||
backend_refresh.go | ||
backend_refresh_test.go | ||
backend_test.go | ||
cli.go | ||
hook_state.go | ||
hook_state_test.go | ||
local_test.go | ||
testing.go |