v012

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compatibility

type Compatibility struct{}

Compatibility implements the def.VersionCompatibility interface

func (*Compatibility) GetInvalidArgs

func (c *Compatibility) GetInvalidArgs(command string) []string

GetInvalidArgs returns invalid arguments for command. These are invalid because they are usually set by tau and should not be configured by user.

func (*Compatibility) GetValidCommands

func (c *Compatibility) GetValidCommands() []string

GetValidCommands returns valid commands for terraform 0.12

type DependencyProcessor

type DependencyProcessor struct {
	// ParsedFile is the parent file that its currently resolving dependencies for
	ParsedFile *loader.ParsedFile

	// DepFile is the dependency in parent file it is processing. This is for instance used
	// to retrieve the name of the dependency
	DepFile *loader.ParsedFile
	File    *hclwrite.File
	// contains filtered or unexported fields
}

DependencyProcessor implements the def.DepdendencyProcessor interface

func NewDependencyProcessor

func NewDependencyProcessor(file *loader.ParsedFile, depFile *loader.ParsedFile, executor *Executor, runner *hooks.Runner, runInSeparateEnv bool) *DependencyProcessor

NewDependencyProcessor creates a new dependencyProcessor structure from input arguments

func (*DependencyProcessor) Process

func (d *DependencyProcessor) Process() (map[string]cty.Value, bool, error)

Process the dependency and return the variables from output.

func (*DependencyProcessor) Write

func (d *DependencyProcessor) Write(line string) bool

Write implements the shell.OutputProcessor interface so it can use DependencyProcessor as a processor when executing commands, and therefore set acceptApplyFailure if it detects acceptable error messages in output

func (*DependencyProcessor) WriteContent

func (d *DependencyProcessor) WriteContent(dest string) error

WriteContent writes the context of main.tf

type Engine

type Engine struct {
	Compatibility
	Generator
	Executor
}

Engine is an engine for terraform 0.12 versions.

func NewEngine

func NewEngine(options *def.Options) *Engine

NewEngine creates a new engine and returns reference

type Executor

type Executor struct{}

Executor to execute shell commands, implements def.Executor interface

func (*Executor) Execute

func (e *Executor) Execute(options *shell.Options, command string, args ...string) error

Execute wraps shell.Execute to execute terraform commands

func (*Executor) NewOutputProcessor

func (e *Executor) NewOutputProcessor() def.OutputProcessor

NewOutputProcessor returns a new output processor

type Generator

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

Generator implements the def.Generator interface and can generate files for terraform 0.12 version

func (*Generator) GenerateDependencies

func (g *Generator) GenerateDependencies(file *loader.ParsedFile) ([]def.DependencyProcessor, bool, error)

GenerateDependencies returns a list of all dependency processors that will generate dependencies.

func (*Generator) GenerateOverrides

func (g *Generator) GenerateOverrides(file *loader.ParsedFile) ([]byte, bool, error)

GenerateOverrides generates overrides file bytes

func (*Generator) GenerateVariables

func (g *Generator) GenerateVariables(file *loader.ParsedFile) ([]byte, error)

GenerateVariables generates the input variables

type OutputProcessor

type OutputProcessor struct {
	processors.Buffer
	// contains filtered or unexported fields
}

OutputProcessor processes output from terrafrom and parses them into variables. Implements the def.OutputProcessor interface

func (*OutputProcessor) GetOutput

func (op *OutputProcessor) GetOutput() (map[string]cty.Value, error)

GetOutput takes the output from terraform command and parses the output into a map of string -> cty.Value

Jump to

Keyboard shortcuts

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