hclext

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: AGPL-3.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsString added in v1.0.0

func AsString(v cty.Value) (string, bool)

func CreateDotReferenceFromTraversal

func CreateDotReferenceFromTraversal(traversals ...hcl.Traversal) string

func ExportOutputs

func ExportOutputs(modules terraform.Modules) cty.Value

func InsertTupleElement

func InsertTupleElement(list cty.Value, idx int, val cty.Value) cty.Value

InsertTupleElement inserts a value into a tuple at the specified index. If the idx is outside the bounds of the list, it grows the tuple to the new size, and fills in `cty.NilVal` for the missing elements.

This function will not panic. If the list value is not a list, it will be replaced with an empty list.

func MergeObjects

func MergeObjects(a, b cty.Value) cty.Value

func MergeWithTupleElement

func MergeWithTupleElement(list cty.Value, idx int, val cty.Value) cty.Value

func ReferenceNames

func ReferenceNames(exp hcl.Expression) []string

func Serialize

func Serialize(blocks terraform.Blocks) string

Serialize makes a best effort to serialize the blocks back to HCL. This is not guaranteed to be the same as the original HCL, and should only be used for debugging.

Types

type ReferenceBuilder

type ReferenceBuilder []hcl.Traverser

func NewReferenceBuilder

func NewReferenceBuilder(path ...string) *ReferenceBuilder

func (*ReferenceBuilder) AddIndex

func (b *ReferenceBuilder) AddIndex(idx int) *ReferenceBuilder

func (*ReferenceBuilder) AddKey

func (b *ReferenceBuilder) AddKey(key string) *ReferenceBuilder

func (*ReferenceBuilder) AddPath

func (b *ReferenceBuilder) AddPath(path ...string) *ReferenceBuilder

func (ReferenceBuilder) Expression

func (b ReferenceBuilder) Expression() hcl.Expression

Jump to

Keyboard shortcuts

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