Documentation ¶
Overview ¶
Package varparser contains the logic for parsing Terraform and environment variables that Tharsis API supports. It supports parsing variables passed in via flags and from files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ParseEnvironmentVariablesInput ¶ added in v0.13.0
ParseEnvironmentVariablesInput defines the input for ProcessEnvironmentVariables.
type ParseTerraformVariablesInput ¶ added in v0.13.0
ParseTerraformVariablesInput defines the input for ProcessTerraformVariables.
type Variable ¶ added in v0.5.1
type Variable struct { Value string Key string Category sdktypes.VariableCategory HCL bool }
Variable represents a parsed terraform or environment variable.
type VariableParser ¶ added in v0.13.0
type VariableParser struct {
// contains filtered or unexported fields
}
VariableParser implements functionalities needed to parse variables.
func NewVariableParser ¶ added in v0.13.0
func NewVariableParser(moduleDirectory *string, withTfVarsFromEnvironment bool) *VariableParser
NewVariableParser returns a new VariableProcessor.
func (*VariableParser) ParseEnvironmentVariables ¶ added in v0.13.0
func (v *VariableParser) ParseEnvironmentVariables(input *ParseEnvironmentVariablesInput) ([]Variable, error)
ParseEnvironmentVariables dispatches functions to parse environment variables and returns a unique slice of parsed Variables.
Parsing precedence: 1. --env-var-file option(s). 2. --env-var option(s).
func (*VariableParser) ParseTerraformVariables ¶ added in v0.13.0
func (v *VariableParser) ParseTerraformVariables(input *ParseTerraformVariablesInput) ([]Variable, error)
ParseTerraformVariables dispatches the functions to parse Terraform variables and returns a unique slice of parsed Variables.
Parsing precedence: 1. Terraform variables from the environment. 2. terraform.tfvars file, if present. 3. terraform.tfvars.json file, if present. 4. *.auto.tfvars.* files, if present. 5. --tf-var-file option(s). 6. --tf-var option(s).