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. |
||
---|---|---|
.. | ||
internal/planproto | ||
objchange | ||
planfile | ||
action.go | ||
action_string.go | ||
changes.go | ||
changes_src.go | ||
changes_state.go | ||
changes_sync.go | ||
doc.go | ||
dynamic_value.go | ||
mode.go | ||
mode_string.go | ||
plan.go | ||
plan_test.go |