terraform/backend/remote
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
..
testdata clean up go mod for go-tfe 2019-09-27 14:16:41 -07:00
backend.go backend/remote: Add IsLocalOperations 2021-04-16 11:43:57 -04:00
backend_apply.go cli: Remove deprecated destroy -force flag 2021-02-03 15:05:05 -05:00
backend_apply_test.go Enable --auto-approve for Policy checks on Remote Backend (Terraform Cloud) (#27804) 2021-03-01 08:54:30 -05:00
backend_common.go Enable --auto-approve for Policy checks on Remote Backend (Terraform Cloud) (#27804) 2021-03-01 08:54:30 -05:00
backend_context.go core: Generalize the idea of a "plan mode", vs just destroy flag 2021-04-27 08:23:54 -07:00
backend_context_test.go clistate: Update clistate.Locker for command views 2021-02-16 07:19:22 -05:00
backend_mock.go backend: Validate remote backend Terraform version 2020-11-19 13:19:40 -05:00
backend_plan.go clistate: Update clistate.Locker for command views 2021-02-16 07:19:22 -05:00
backend_plan_test.go backend: Replace ShowDiagnostics with view.Diagnostics 2021-02-25 11:26:05 -05:00
backend_state.go backend/remote: Fix broken state lock retry 2021-02-19 15:47:18 -05:00
backend_state_test.go refactor tests to use modern states.State in favor of terraform.State where possible 2020-09-30 16:07:54 -04:00
backend_test.go backend/remote: Fix new workspace state migration 2021-03-15 15:48:14 -04:00
cli.go backend: Add per-operation diagnostic rendering 2021-02-12 14:30:35 -05:00
colorize.go backend/remote: implement the Local interface 2018-11-26 20:50:25 +01:00
remote_test.go backend: Faster remote backend tests 2020-11-18 16:00:05 -05:00
testing.go backend: Replace ShowDiagnostics with view.Diagnostics 2021-02-25 11:26:05 -05:00