terraform/backend
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
..
init backend: remove deprecated atlas backend 2020-10-26 14:05:18 -04:00
local core: Generalize the idea of a "plan mode", vs just destroy flag 2021-04-27 08:23:54 -07:00
remote core: Generalize the idea of a "plan mode", vs just destroy flag 2021-04-27 08:23:54 -07:00
remote-state Add config_paths and drop KUBECONFIG env variable in kubernetes backend (#26997) 2021-04-20 10:05:45 -04:00
backend.go backend: Replace ShowDiagnostics with view.Diagnostics 2021-02-25 11:26:05 -05:00
backend_test.go helper: deprecate pathorcontents 2020-10-08 08:42:16 -04:00
cli.go backend: Replace ShowDiagnostics with view.Diagnostics 2021-02-25 11:26:05 -05:00
operation_type.go Version tools per Go convention under tools.go 2019-10-17 22:23:39 +02:00
operationtype_string.go stringer: Regenerate files with latest version 2019-05-13 15:34:27 +01:00
testing.go call the InConfigBody with addresses 2021-04-06 15:15:52 -04:00
unparsed_value.go Remove deprecation on undeclared variable, docs, and summary adjustment (#27795) 2021-02-18 11:11:52 -05:00
unparsed_value_test.go Remove deprecation on undeclared variable, docs, and summary adjustment (#27795) 2021-02-18 11:11:52 -05:00