parser

package
v0.68.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallModule

type CallModule struct {
	Source string              `json:"source"`
	Module ConfigurationModule `json:"module"`
}

type Change

type Change struct {
	Before map[string]interface{} `json:"before"`
	After  map[string]interface{} `json:"after"`
}

type ChildModule

type ChildModule struct {
	Module
	Address string `json:"address"`
}

type Configuration

type Configuration struct {
	RootModule ConfigurationModule `json:"root_module"`
}

type ConfigurationChildModule

type ConfigurationChildModule struct {
	ConfigurationModule
	Address string `json:"address"`
}

type ConfigurationModule

type ConfigurationModule struct {
	Resources   []ConfigurationResource `json:"resources"`
	ModuleCalls map[string]CallModule   `json:"module_calls"`
}

type ConfigurationResource

type ConfigurationResource struct {
	Resource
	Expressions map[string]interface{} `json:"expressions"`
}

type Module

type Module struct {
	Resources    []Resource    `json:"resources"`
	ChildModules []ChildModule `json:"child_modules"`
}

type Option

type Option func(p *Parser)

func OptionStopOnHCLError

func OptionStopOnHCLError(stop bool) Option

func OptionWithDebugWriter

func OptionWithDebugWriter(w io.Writer) Option

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func New

func New(options ...Option) *Parser

func (*Parser) Parse

func (p *Parser) Parse(reader io.Reader) (*PlanFile, error)

func (*Parser) ParseFile

func (p *Parser) ParseFile(filepath string) (*PlanFile, error)

func (*Parser) SetDebugWriter

func (p *Parser) SetDebugWriter(writer io.Writer)

func (*Parser) SetStopOnHCLError

func (p *Parser) SetStopOnHCLError(b bool)

type PlanFile

type PlanFile struct {
	FormatVersion    string           `json:"format_version"`
	TerraformVersion string           `json:"terraform_version"`
	PlannedValues    PlannedValues    `json:"planned_values"`
	ResourceChanges  []ResourceChange `json:"resource_changes"`
	Configuration    Configuration    `json:"configuration"`
}

func (*PlanFile) ToFS

func (p *PlanFile) ToFS() (*memoryfs.FS, error)

type PlannedValues

type PlannedValues struct {
	RootModule Module `json:"root_module"`
}

type Resource

type Resource struct {
	Address       string `json:"address"`
	ModuleAddress string `json:"module_address"`
	Mode          string `json:"mode"`
	Type          string `json:"type"`
	Name          string `json:"name"`
	ProviderName  string `json:"provider_name"`
	SchemaVersion int    `json:"schema_version"`
}

type ResourceChange

type ResourceChange struct {
	Resource
	Change `json:"change"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL