Documentation
¶
Index ¶
- Constants
- Variables
- func ExtractVariables(file File) (ValueMap, ExpressionMap, error)
- func GenerateDebugLogs(err error) string
- func ParseHclToJson(fileName string, fileContent string, variables ModuleVariables) (string, error)
- func ParseModule(rawFiles map[string]interface{}) map[string]interface{}
- type CustomError
- type ExpressionMap
- type File
- type InputVariablesByFile
- type JSON
- type ModuleVariables
- type NewParserParams
- type Options
- type ParseModuleResult
- type Parser
- type PrioritisableFile
- type ValueMap
Constants ¶
View Source
const ( TF = ".tf" TFVARS = ".tfvars" AUTO_TFVARS = ".auto.tfvars" DEFAULT_TFVARS = "terraform.tfvars" )
Variables ¶
View Source
var VALID_TERRAFORM_FILES = [...]string{TF}
View Source
var VALID_VARIABLE_FILES = [...]string{TF, AUTO_TFVARS}
Functions ¶
func ExtractVariables ¶
func ExtractVariables(file File) (ValueMap, ExpressionMap, error)
ExtractVariables extracts the input variables and local values from the provided file
func GenerateDebugLogs ¶
func ParseHclToJson ¶
func ParseHclToJson(fileName string, fileContent string, variables ModuleVariables) (string, error)
ParseHclToJson parses a provided HCL file to JSON and dereferences any known variables using the provided variables
func ParseModule ¶
ParseModule iterates through all the provided files in a module (.tf, terraform.tfvars, and *.auto.tfvars files) It extracts the variables from each one, merges them, and dereferences them one by one
Types ¶
type CustomError ¶
type CustomError struct {
// contains filtered or unexported fields
}
func (*CustomError) Error ¶
func (err *CustomError) Error() string
type ExpressionMap ¶
type ExpressionMap map[string]hcl.Expression
type InputVariablesByFile ¶
type ModuleVariables ¶
type ModuleVariables struct {
// contains filtered or unexported fields
}
type NewParserParams ¶
type NewParserParams struct {
// contains filtered or unexported fields
}
type ParseModuleResult ¶
type ParseModuleResult struct {
// contains filtered or unexported fields
}
type PrioritisableFile ¶
type PrioritisableFile struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.