Documentation
¶
Overview ¶
Package dynamicblock expands Terraform dynamic blocks into the nested blocks they generate.
Index ¶
Constants ¶
View Source
const ( // MaxExpansion caps the blocks one dynamic block generates; a larger // for_each is kept as written rather than expanded in part. MaxExpansion = 256 // MaxGeneratedPerResource caps the blocks the dynamic blocks under one resource // (or other top-level block) generate in total, nested ones included, so // nesting cannot multiply the per-block cap. MaxGeneratedPerResource = 1024 )
Variables ¶
This section is empty.
Functions ¶
func GeneratedType ¶
GeneratedType is the type of the blocks b generates.
func IteratorName ¶
IteratorName is the variable the content reads the current element through.
Types ¶
type Expansion ¶
type Expansion struct {
// Iterators holds the iterator value of every block generated; empty unless Resolved.
Iterators []cty.Value
// Requested is how many blocks for_each asks for, whether or not they were
// expanded; zero when for_each does not resolve.
Requested int
// Resolved is false when for_each cannot be resolved, or asks for more than
// MaxExpansion blocks: how many blocks the dynamic block generates, possibly
// none, is then unknown, and callers keep it as written so rules can tell a
// block that may be absent from one that is present, and no generated block
// is silently dropped.
Resolved bool
// OverCap is set when for_each resolves but asks for more than MaxExpansion.
OverCap bool
}
Expansion is what a dynamic block's for_each yields under an evaluation context.
Click to show internal directories.
Click to hide internal directories.