Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElemField ¶
type ElemField interface { Normalizer // Schema returns the schema for the element field. Schema() *schema.Schema }
ElemField defines a set element field. ElemField must always implement Normalizer to ensure that each set element hash is stable.
func NotNormalized ¶
NotNormalized returns an ElemField for a element field schema which already encodes stable values and thus does need to implement Normalizer.
Note that any field which implements a DiffSuppressFunc will be rejected if it is declared as NotNormalized.
type Normalizer ¶
Normalizer takes a value and converts it to a stable representation.
type Set ¶
type Set struct { Required bool MinItems int // ElemFields defines the element field schema, where the keys are the name // of the element fields and the values are the schemas for said field. ElemFields map[string]ElemField }
Set defines the parameters of a TypeSet field in a Terraform schema. Set must be used to build any TypeSet schemas which contains complex objects to ensure that diff-ing is implemented correctly (TL;DR TypeSet has tons of bugs and requires very specific configuration).