structure

package
v0.57.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2024 License: MPL-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSchemaBlock added in v0.25.0

func GetSchemaBlock(
	r *schema.Resource,
	d *schema.ResourceData,
	k []string,
	i int,
	allowDefault bool,
) (map[string]interface{}, error)

GetSchemaBlock returns a map[string]interface{} of a nested resource by key(s) from a schema.ResourceData.

func MergeSchema

func MergeSchema(dst, src map[string]*schema.Schema)

MergeSchema merges the map[string]*schema.Schema from src into dst. Panicking enforces safety against conflicts.

func SuppressIfListsAreEqualIgnoringOrder added in v0.25.0

func SuppressIfListsAreEqualIgnoringOrder(key, _, _ string, d *schema.ResourceData) bool

SuppressIfListsAreEqualIgnoringOrder is a customdiff.SuppressionFunc that suppresses changes to a list if the old and new lists are equal, ignoring the order of the elements. It will be called for each list item, so it is not super efficient. It is recommended to use it only for small lists. Ref: https://github.com/hashicorp/terraform-plugin-sdk/issues/477

func SuppressIfListsOfMapsAreEqualIgnoringOrderByKey added in v0.52.0

func SuppressIfListsOfMapsAreEqualIgnoringOrderByKey(
	keyAttr string,
	ignoreKeys ...string,
) schema.SchemaDiffSuppressFunc

SuppressIfListsOfMapsAreEqualIgnoringOrderByKey is a customdiff.SuppressionFunc that suppresses changes to a list of resources if the old and new lists are equal, ignoring the order of the elements. It will be called for each resource attribute, so it is not super efficient. It is recommended to use it only for small lists / small resources. The keyAttr is the attribute that will be used as the key to compare the resources. The ignoreKeys are the keys that will be ignored when comparing the resources. Include computed read-only attributes here.

Ref: https://github.com/hashicorp/terraform-plugin-sdk/issues/477

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL