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 ¶ added in v1.1.0
func ExtractVariables(file File) (ValueMap, ExpressionMap, error)
ExtractVariables extracts the input variables and local values from the provided file
func GenerateDebugLogs ¶ added in v0.4.0
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 ¶ added in v1.1.0
type ExpressionMap map[string]hcl.Expression
type InputVariablesByFile ¶ added in v0.6.0
type ModuleVariables ¶ added in v0.6.0
type ModuleVariables struct {
// contains filtered or unexported fields
}
type NewParserParams ¶ added in v0.6.0
type NewParserParams struct {
// contains filtered or unexported fields
}
type ParseModuleResult ¶ added in v0.6.0
type ParseModuleResult struct {
// contains filtered or unexported fields
}
type PrioritisableFile ¶ added in v0.3.0
type PrioritisableFile struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.