ctyutil

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConcreteString

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

ConcreteString returns a Go string when v is a materialized cty.String.

func ContainsNestedUnknown

func ContainsNestedUnknown(v cty.Value) bool

ContainsNestedUnknown reports whether a wholly-known value still contains unknown or dynamic-typed elements that must be preserved as source references.

func FormatIndexKey

func FormatIndexKey(key cty.Value) (string, bool)

FormatIndexKey renders a materialized string or number index for HCL traversals.

func LiteralInt

func LiteralInt(v cty.Value) (int, bool)

LiteralInt parses a materialized number or decimal string as int (e.g. count).

func Materialized

func Materialized(v cty.Value) bool

Materialized reports whether v is known and non-null. cty's integration methods (AsString, LengthInt, ElementIterator, AsValueSlice, …) panic on null even when IsWhollyKnown() is true.

func StringFromAttribute

func StringFromAttribute(attr *hclsyntax.Attribute, ctx *hcl.EvalContext) string

StringFromAttribute evaluates attr under ctx and returns a concrete string, or "".

Types

This section is empty.

Jump to

Keyboard shortcuts

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