Documentation ¶
Overview ¶
Package hcl handle the parsing of your terraform file
Package hcl handle the parsing of your terraform file
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TerraformBlockIsEmpty ¶
TerraformBlockIsEmpty return true if terraform variable is empty else false
Types ¶
type Data ¶
type Data nameType
Data get all needed information of data blocks for terraform-validator
type Locals ¶
type Locals []string
Locals get all needed information of Locals config blocks for terraform-validator
type Module ¶
type Module nameVersion
Module get all needed information of module blocks for terraform-validator
type Output ¶
type Output nameDescription
Output get all needed information of output blocks for terraform-validator
type ParsedFile ¶
type ParsedFile struct { Name string Blocks TerraformBlocks }
ParsedFile get all needed information of all blocks for terraform-validator
func GetFolderParsedContents ¶
func GetFolderParsedContents(path string) []ParsedFile
GetFolderParsedContents returns you a []ParsedFile that define every file inside the given path
func GetParsedContent ¶
func GetParsedContent(f fs.File) ParsedFile
GetParsedContent will parse a file for you and return the associated ParsedFile
func (ParsedFile) GetBlockNamesByType ¶
func (parsedfile ParsedFile) GetBlockNamesByType() map[string][]string
GetBlockNamesByType return you a map[string][]string defining the blocktypes present in the given parsedfile and the blocknames for each blocktype
type Provider ¶
type Provider nameVersion
Provider get all needed information of provider blocks for terraform-validator
type Resource ¶
type Resource nameType
Resource get all needed information of resource blocks for terraform-validator
type Terraform ¶
Terraform get all needed information of terraform config blocks for terraform-validator
type TerraformBlocks ¶
type TerraformBlocks struct { Variables []Variable Terraform Terraform Modules []Module Providers []Provider Data []Data Resources []Resource Locals []Locals Outputs []Output }
TerraformBlocks is the structure that define a whole terraform file and contains all the blocks informations needed by terraform-validator