Documentation ¶
Overview ¶
Package stringplanmodifier provides a plan modifier for string values.
Package stringplanmodifier provides a plan modifier for string values.
Package stringplanmodifier provides a plan modifier for string values.
Package stringplanmodifier provides a plan modifier for string values.
Package stringplanmodifier provides a plan modifier for string values.
Package stringplanmodifier provides a plan modifier for string values.
Package stringplanmodifier provides a plan modifier for string values.
Package stringplanmodifier provides a plan modifier for string values.
Index ¶
- func RequireReplaceIfBool(path path.Path, exceptedValue bool) planmodifier.String
- func SetDefault(str string) planmodifier.String
- func SetDefaultEmptyString() planmodifier.String
- func SetDefaultEnvVar(envVar string) planmodifier.String
- func SetDefaultFunc(f DefaultFunc) planmodifier.String
- func ToLower() planmodifier.String
- func ToUpper() planmodifier.String
- type DefaultFunc
- type DefaultFuncResponse
- type StringChangeFunc
- type StringChangeFuncResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequireReplaceIfBool ¶
func RequireReplaceIfBool(path path.Path, exceptedValue bool) planmodifier.String
RequireReplaceIfBool
returns a plan modifier that requires replacement if the attribute value is equal to the excepted value.
func SetDefault ¶
func SetDefault(str string) planmodifier.String
SetDefault
SetDefault returns a plan modifier that sets the plan value to the provided value if the following conditions are met:
- The resource is planned for update.
- The plan and state values are not equal.
- The plan or state values are not null or known
func SetDefaultEmptyString ¶
func SetDefaultEmptyString() planmodifier.String
SetDefaultEmptyString returns a plan modifier that conditionally requires resource replacement if:
- The resource is planned for update.
- The plan and state values are not equal.
- The plan or state values are not null or known
func SetDefaultEnvVar ¶
func SetDefaultEnvVar(envVar string) planmodifier.String
SetDefaultEnvVar returns a plan modifier that conditionally requires resource replacement if:
- The resource is planned for update.
- The plan and state values are not equal.
- The plan or state values are not null or known
func SetDefaultFunc ¶
func SetDefaultFunc(f DefaultFunc) planmodifier.String
SetDefaultFunc returns a plan modifier that conditionally requires resource replacement if:
- The resource is planned for update.
- The plan and state values are not equal.
- The plan or state values are not null or known
func ToLower ¶
func ToLower() planmodifier.String
func ToUpper ¶
func ToUpper() planmodifier.String
Types ¶
type DefaultFunc ¶
type DefaultFunc func(context.Context, planmodifier.StringRequest, *DefaultFuncResponse)
DefaultFunc is a function that can be used to set a default value for a string attribute.
type DefaultFuncResponse ¶
type DefaultFuncResponse struct { // Diagnostics report errors or warnings related to this logic. An empty // or unset slice indicates success, with no warnings or errors generated. Diagnostics diag.Diagnostics // Value is the value to use by default if the attribute is not configured. Value string }
DefaultFuncResponse is the response type for a DefaultFunc.
type StringChangeFunc ¶
type StringChangeFunc func(context.Context, planmodifier.StringRequest, *StringChangeFuncResponse)
StringChangeFunc is a function that can be used to change a string value.
type StringChangeFuncResponse ¶
type StringChangeFuncResponse struct { // Diagnostics report errors or warnings related to this logic. An empty // or unset slice indicates success, with no warnings or errors generated. Diagnostics diag.Diagnostics // Value is the value to use by default if the attribute is not configured. Value types.String }
StringChangeFuncResponse is the response type for a DefaultFunc.