Documentation ¶
Overview ¶
Package strict provides utilities used by Terragrunt to support a "strict" mode. By default strict mode is disabled, but when enabled, any breaking changes to Terragrunt behavior that is not backwards compatible will result in an error.
Note that any behavior outlined here should be documented in /docs/_docs/04_reference/strict-mode.md
That is how users will know what to expect when they enable strict mode, and how to customize it.
Index ¶
Constants ¶
const ( // SpinUp is the control that prevents the deprecated `spin-up` command from being used. SpinUp = "spin-up" // TearDown is the control that prevents the deprecated `tear-down` command from being used. TearDown = "tear-down" // PlanAll is the control that prevents the deprecated `plan-all` command from being used. PlanAll = "plan-all" // ApplyAll is the control that prevents the deprecated `apply-all` command from being used. ApplyAll = "apply-all" // DestroyAll is the control that prevents the deprecated `destroy-all` command from being used. DestroyAll = "destroy-all" // OutputAll is the control that prevents the deprecated `output-all` command from being used. OutputAll = "output-all" // ValidateAll is the control that prevents the deprecated `validate-all` command from being used. ValidateAll = "validate-all" // SkipDependenciesInputs is the control that prevents reading dependencies inputs and get performance boost. SkipDependenciesInputs = "skip-dependencies-inputs" )
Variables ¶
var ( // ErrInvalidStrictControl is returned when an invalid strict control is used. ErrInvalidStrictControl = errors.New("Invalid value(s) used for --strict-control.") //nolint:stylecheck,revive )
var StrictControls = Controls{ SpinUp: { Error: errors.New("The `spin-up` command is no longer supported. Use `terragrunt run-all apply` instead."), Warning: "The `spin-up` command is deprecated and will be removed in a future version. Use `terragrunt run-all apply` instead.", }, TearDown: { Error: errors.New("The `tear-down` command is no longer supported. Use `terragrunt run-all destroy` instead."), Warning: "The `tear-down` command is deprecated and will be removed in a future version. Use `terragrunt run-all destroy` instead.", }, PlanAll: { Error: errors.New("The `plan-all` command is no longer supported. Use `terragrunt run-all plan` instead."), Warning: "The `plan-all` command is deprecated and will be removed in a future version. Use `terragrunt run-all plan` instead.", }, ApplyAll: { Error: errors.New("The `apply-all` command is no longer supported. Use `terragrunt run-all apply` instead."), Warning: "The `apply-all` command is deprecated and will be removed in a future version. Use `terragrunt run-all apply` instead.", }, DestroyAll: { Error: errors.New("The `destroy-all` command is no longer supported. Use `terragrunt run-all destroy` instead."), Warning: "The `destroy-all` command is deprecated and will be removed in a future version. Use `terragrunt run-all destroy` instead.", }, OutputAll: { Error: errors.New("The `output-all` command is no longer supported. Use `terragrunt run-all output` instead."), Warning: "The `output-all` command is deprecated and will be removed in a future version. Use `terragrunt run-all output` instead.", }, ValidateAll: { Error: errors.New("The `validate-all` command is no longer supported. Use `terragrunt run-all validate` instead."), Warning: "The `validate-all` command is deprecated and will be removed in a future version. Use `terragrunt run-all validate` instead.", }, SkipDependenciesInputs: { Error: errors.New("The `skip-dependencies-inputs` is no longer supported. Dependencies inputs handling will be changed."), Warning: "The `skip-dependencies-inputs` is deprecated and will be removed in a future version. Dependencies inputs handling will be changed.", }, }
Functions ¶
This section is empty.
Types ¶
type Control ¶
type Control struct { // Error is the error that will be returned when the control is enabled. Error error // Warning is a warning that will be logged when the control is not enabled. Warning string }
Control represents a control that can be enabled or disabled in strict mode. When the control is enabled, Terragrunt will behave in a way that is not backwards compatible.
func GetStrictControl ¶
GetStrictControl returns the strict control with the given name.