terraform/plans
Martin Atkins c6a7d080d9 core: Generalize the idea of a "plan mode", vs just destroy flag
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.
2021-04-27 08:23:54 -07:00
..
internal/planproto plans/planfile: Add required-replace and sensitive 2021-03-25 14:42:34 -04:00
objchange use new dynamic decoding behavior 2021-04-14 12:13:22 -04:00
planfile plans/planfile: Add required-replace and sensitive 2021-03-25 14:42:34 -04:00
action.go Version tools per Go convention under tools.go 2019-10-17 22:23:39 +02:00
action_string.go stringer: Regenerate files with latest version 2019-05-13 15:34:27 +01:00
changes.go core: Reduce string allocations for addrs Equal 2021-03-05 13:23:32 -05:00
changes_src.go plans/planfile: Add required-replace and sensitive 2021-03-25 14:42:34 -04:00
changes_state.go plans: New package for in-memory plan models 2018-10-16 18:50:29 -07:00
changes_sync.go s/FullDestroy/IsFullDdestroy/ 2020-10-05 10:50:25 -04:00
doc.go plans: New package for in-memory plan models 2018-10-16 18:50:29 -07:00
dynamic_value.go Use UnmarkDeepWithPaths and MarkWithPaths 2020-09-10 11:04:17 -04:00
mode.go core: Generalize the idea of a "plan mode", vs just destroy flag 2021-04-27 08:23:54 -07:00
mode_string.go core: Generalize the idea of a "plan mode", vs just destroy flag 2021-04-27 08:23:54 -07:00
plan.go add state to plans.Plan 2020-09-17 09:54:59 -04:00
plan_test.go don't render plan for module outputs 2020-11-17 09:31:18 -05:00