opentofu/internal/plans/mode.go
Martin Atkins 034e944070 Move plans/ to internal/plans/
This is part of a general effort to move all of Terraform's non-library
package surface under internal in order to reinforce that these are for
internal use within Terraform only.

If you were previously importing packages under this prefix into an
external codebase, you could pin to an earlier release tag as an interim
solution until you've make a plan to achieve the same functionality some
other way.
2021-05-17 14:09:07 -07:00

32 lines
1.2 KiB
Go

package plans
// Mode represents the various mutually-exclusive modes for creating a plan.
type Mode rune
//go:generate go run golang.org/x/tools/cmd/stringer -type Mode
const (
// NormalMode is the default planning mode, which aims to synchronize the
// prior state with remote objects and plan a set of actions intended to
// make those remote objects better match the current configuration.
NormalMode Mode = 0
// DestroyMode is a special planning mode for situations where the goal
// is to destroy all remote objects that are bound to instances in the
// prior state, even if the configuration for those instances is still
// present.
//
// This mode corresponds with the "-destroy" option to "terraform plan",
// and with the plan created by the "terraform destroy" command.
DestroyMode Mode = 'D'
// RefreshOnlyMode is a special planning mode which only performs the
// synchronization of prior state with remote objects, and skips any
// effort to generate any change actions for resource instances even if
// the configuration has changed relative to the state.
//
// This mode corresponds with the "-refresh-only" option to
// "terraform plan".
RefreshOnlyMode Mode = 'R'
)