Documentation
¶
Index ¶
- func CopyUnknowns(ctx context.Context, src, dest any, keepUnknown []string)
- func EqualJSON(old, newStr, errContext string) bool
- func FindChanges(ctx context.Context, src, dest any) []string
- func HasUnknowns(obj any) bool
- type AttributeChanges
- func (a *AttributeChanges) AttributeChanged(name string) bool
- func (a *AttributeChanges) KeepUnknown(attributeEffectedMapping map[string][]string) []string
- func (a *AttributeChanges) LeafChanges() map[string]bool
- func (a *AttributeChanges) ListIndexChanged(name string, index int) bool
- func (a *AttributeChanges) ListLenChanges(name string) bool
- func (a *AttributeChanges) NestedListLenChanges(fullPath string) bool
- type UpdateOnlyString
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyUnknowns ¶ added in v1.26.1
CopyUnknowns use reflection to copy unknown fields from src to dest. The implementation is similar to internal/common/conversion/model_generation.go#CopyModel keepUnknown is a list of fields that should not be copied, should always use the TF config name (snake_case) nestedStructMapping is a map of field names to their type: object, list. (`set` not implemented yet)
func HasUnknowns ¶ added in v1.26.1
HasUnknowns uses reflection to check if the object has any unknown fields Pass &TFModel{} Will only check the root level attributes
Types ¶
type AttributeChanges ¶ added in v1.28.0
type AttributeChanges struct {
Changes []string
}
func FindAttributeChanges ¶ added in v1.28.0
func FindAttributeChanges(ctx context.Context, src, dest any) AttributeChanges
FindAttributeChanges: Iterates through TFModel of state+plan and returns AttributeChanges for querying changed attributes The implementation is similar to KeepUnknown, no support for types.Set or types.Tuple yet
func (*AttributeChanges) AttributeChanged ¶ added in v1.28.0
func (a *AttributeChanges) AttributeChanged(name string) bool
func (*AttributeChanges) KeepUnknown ¶ added in v1.28.0
func (a *AttributeChanges) KeepUnknown(attributeEffectedMapping map[string][]string) []string
func (*AttributeChanges) LeafChanges ¶ added in v1.28.0
func (a *AttributeChanges) LeafChanges() map[string]bool
func (*AttributeChanges) ListIndexChanged ¶ added in v1.28.0
func (a *AttributeChanges) ListIndexChanged(name string, index int) bool
ListIndexChanged returns true if the list at the given index has changed, false if it was added or removed
func (*AttributeChanges) ListLenChanges ¶ added in v1.28.0
func (a *AttributeChanges) ListLenChanges(name string) bool
func (*AttributeChanges) NestedListLenChanges ¶ added in v1.28.0
func (a *AttributeChanges) NestedListLenChanges(fullPath string) bool
NestedListLenChanges accepts a fullPath, e.g., "replication_specs[0].region_configs" and returns true if the length of the nested list has changed
type UpdateOnlyString ¶ added in v1.22.0
type UpdateOnlyString struct{}
func PlanModifyStringUpdateOnly ¶ added in v1.22.0
func PlanModifyStringUpdateOnly() UpdateOnlyString
func (UpdateOnlyString) Description ¶ added in v1.22.0
func (u UpdateOnlyString) Description(ctx context.Context) string
func (UpdateOnlyString) MarkdownDescription ¶ added in v1.22.0
func (u UpdateOnlyString) MarkdownDescription(ctx context.Context) string
func (UpdateOnlyString) PlanModifyString ¶ added in v1.22.0
func (u UpdateOnlyString) PlanModifyString(ctx context.Context, req planmodifier.StringRequest, resp *planmodifier.StringResponse)