Documentation ¶
Index ¶
- func BlocksToMap(blocks hcl.Blocks) map[string]*hcl.Block
- func FindChildBlocks(parentBlock *hcl.Block, blockType string) hcl.Blocks
- func FindFirstChildBlock(parentBlock *hcl.Block, blockType string) *hcl.Block
- func GetFirstBlockOfType(blocks hcl.Blocks, blockType string) *hcl.Block
- func ResourceNameFromTraversal(resourceType string, traversal hcl.Traversal) (string, bool)
- func TraversalAsString(traversal hcl.Traversal) string
- func TraversalsEqual(t1, t2 hcl.Traversal) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlocksToMap ¶ added in v0.20.0
func BlocksToMap(blocks hcl.Blocks) map[string]*hcl.Block
BlocksToMap convert an array of blocks to a map keyed by block laabel NOTE: this panics if any blocks do not have a label
func FindChildBlocks ¶ added in v0.20.0
func FindChildBlocks(parentBlock *hcl.Block, blockType string) hcl.Blocks
func FindFirstChildBlock ¶ added in v0.20.0
func FindFirstChildBlock(parentBlock *hcl.Block, blockType string) *hcl.Block
func GetFirstBlockOfType ¶ added in v0.20.0
func GetFirstBlockOfType(blocks hcl.Blocks, blockType string) *hcl.Block
func ResourceNameFromTraversal ¶
ResourceNameFromTraversal converts a traversal to the name of the referenced resource We must take into account possible mod-name as first traversal element
func TraversalAsString ¶
func TraversalAsString(traversal hcl.Traversal) string
TraversalAsString converts a traversal to a path string (if an absolute traversal is passed - convert to relative)
func TraversalsEqual ¶
func TraversalsEqual(t1, t2 hcl.Traversal) bool
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.