Documentation
¶
Overview ¶
Package variable provides a way to parse and validate variables in a HCL file. Portions of this file are derived from the Waypoint project. Modifications have been made to meet the needs of the Phobos project. Source: https://github.com/hashicorp/waypoint/blob/7128fba03891df32b77e341d2380fe8f48a0b508/internal/config/variables/variables.go License: Mozilla Public License 2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeVariablesWithContext ¶ added in v0.39.0
func DecodeVariablesWithContext(hclVariables map[string]hcl.Body, evalCtx *hcl.EvalContext) (map[string]*Variable, hcl.Diagnostics)
DecodeVariablesWithContext decodes variables from a HCL config and returns a map of variables and any diagnostics, with support for evaluating default values using the provided HCL evaluation context.
func GetCtyValuesForVariablesWithContext ¶ added in v0.39.0
func GetCtyValuesForVariablesWithContext( hclVariables map[string]hcl.Body, variableValues map[string]string, unknownVars bool, evalCtx *hcl.EvalContext, ) (map[string]cty.Value, error)
GetCtyValuesForVariablesWithContext returns a map of cty values for the given variable definitions and raw string values, with support for evaluating default values using the provided HCL evaluation context.