Documentation ¶
Overview ¶
Package modifiers contains plan modifier related functions to be used with resource and data sources written using Terraform Provider Framework
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualUpToPrefixFunc ¶
EqualUpToPrefixFunc returns function that compares if two strings are equal stripping prefix
func PreventStringUpdate ¶
func PreventStringUpdate() planmodifier.String
PreventStringUpdate returns a plan modifier that ensures given field cannot be updated after creation.
func SetUseStateIf ¶
func SetUseStateIf(eqFunc func(string, string) bool) planmodifier.Set
SetUseStateIf returns a plan modifier that copies a known prior state value into the planned value if given function returns true. Use this when you want to suppress value changes. Value will remain the same after a resource update.
To prevent Terraform errors, the framework automatically sets unconfigured and Computed attributes to an unknown value "(known after apply)" on update. Using this plan modifier will instead display the prior state value in the plan, unless a prior plan modifier adjusts the value.
func StringUseStateIf ¶
func StringUseStateIf(pred func(string, string) bool) planmodifier.String
StringUseStateIf returns a plan modifier that copies a known prior state value into the planned value if given function returns true. Use this when you want to suppress value changes. Value will remain the same after a resource update.
To prevent Terraform errors, the framework automatically sets unconfigured and Computed attributes to an unknown value "(known after apply)" on update. Using this plan modifier will instead display the prior state value in the plan, unless a prior plan modifier adjusts the value.
Types ¶
This section is empty.