terraform

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidCloudToken = errors.New("Invalid Terraform Cloud Token")
View Source
var ErrMissingCloudToken = errors.New("No Terraform Cloud Token is set")

Functions

func Cmd added in v0.6.3

func Cmd(opts *CmdOptions, args ...string) ([]byte, error)

func CreateConfigFile added in v0.7.10

func CreateConfigFile(dir string, terraformCloudHost string, terraformCloudToken string) (string, error)

func GetUsageOnlyResources added in v0.7.12

func GetUsageOnlyResources() []string

func HasSupportedProvider added in v0.7.3

func HasSupportedProvider(rType string) bool

func IsTerraformDir added in v0.8.0

func IsTerraformDir(path string) bool

func NewDirProvider added in v0.8.0

func NewDirProvider(ctx *config.ProjectContext) schema.Provider

func NewPlanJSONProvider added in v0.8.0

func NewPlanJSONProvider(ctx *config.ProjectContext) schema.Provider

func NewPlanProvider added in v0.8.0

func NewPlanProvider(ctx *config.ProjectContext) schema.Provider

func NewStateJSONProvider added in v0.8.0

func NewStateJSONProvider(ctx *config.ProjectContext) schema.Provider

func NewTerragruntProvider added in v0.9.7

func NewTerragruntProvider(ctx *config.ProjectContext) schema.Provider

func ReadPlanCache added in v0.9.12

func ReadPlanCache(p *DirProvider) ([]byte, error)

func StripSetupTerraformWrapper added in v0.9.14

func StripSetupTerraformWrapper(b []byte) ([]byte, bool)

StripTerraformWrapper removes any output added from the setup-terraform GitHub action terraform wrapper, so we can parse the output of this as valid JSON. It returns the stripped out JSON and a boolean that is true if the wrapper output was found and removed.

func UsePlanCache added in v0.9.12

func UsePlanCache(p *DirProvider) bool

func WritePlanCache added in v0.9.12

func WritePlanCache(p *DirProvider, planJSON []byte)

Types

type CmdError added in v0.6.3

type CmdError struct {
	Stderr []byte
	// contains filtered or unexported fields
}

func (*CmdError) Error added in v0.6.3

func (e *CmdError) Error() string

type CmdOptions added in v0.6.2

type CmdOptions struct {
	TerraformBinary     string
	Dir                 string
	TerraformWorkspace  string
	TerraformConfigFile string
	Env                 map[string]string
	Flags               []string
}

type DirProvider added in v0.8.0

type DirProvider struct {
	Path string

	IsTerragrunt        bool
	PlanFlags           string
	Workspace           string
	UseState            bool
	TerraformBinary     string
	TerraformCloudHost  string
	TerraformCloudToken string
	Env                 map[string]string
	// contains filtered or unexported fields
}

func (*DirProvider) AddMetadata added in v0.9.0

func (p *DirProvider) AddMetadata(metadata *schema.ProjectMetadata)

func (*DirProvider) DisplayType added in v0.8.0

func (p *DirProvider) DisplayType() string

func (*DirProvider) LoadResources added in v0.8.0

func (p *DirProvider) LoadResources(usage map[string]*schema.UsageData) ([]*schema.Project, error)

func (*DirProvider) Type added in v0.8.0

func (p *DirProvider) Type() string

type Parser added in v0.7.17

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

func NewParser added in v0.7.17

func NewParser(ctx *config.ProjectContext) *Parser

type PlanJSONProvider added in v0.8.0

type PlanJSONProvider struct {
	Path string
	// contains filtered or unexported fields
}

func (*PlanJSONProvider) AddMetadata added in v0.9.0

func (p *PlanJSONProvider) AddMetadata(metadata *schema.ProjectMetadata)

func (*PlanJSONProvider) DisplayType added in v0.8.0

func (p *PlanJSONProvider) DisplayType() string

func (*PlanJSONProvider) LoadResources added in v0.8.0

func (p *PlanJSONProvider) LoadResources(usage map[string]*schema.UsageData) ([]*schema.Project, error)

func (*PlanJSONProvider) Type added in v0.8.0

func (p *PlanJSONProvider) Type() string

type PlanProvider added in v0.8.0

type PlanProvider struct {
	*DirProvider
	Path string
	// contains filtered or unexported fields
}

func (*PlanProvider) DisplayType added in v0.8.0

func (p *PlanProvider) DisplayType() string

func (*PlanProvider) LoadResources added in v0.8.0

func (p *PlanProvider) LoadResources(usage map[string]*schema.UsageData) ([]*schema.Project, error)

func (*PlanProvider) Type added in v0.8.0

func (p *PlanProvider) Type() string

type ResourceRegistryMap added in v0.6.3

type ResourceRegistryMap map[string]*schema.RegistryItem

func GetResourceRegistryMap added in v0.6.0

func GetResourceRegistryMap() *ResourceRegistryMap

type RunShowOptions added in v0.9.7

type RunShowOptions struct {
	CmdOptions *CmdOptions
}

type StateJSONProvider added in v0.8.0

type StateJSONProvider struct {
	Path string
	// contains filtered or unexported fields
}

func (*StateJSONProvider) AddMetadata added in v0.9.0

func (p *StateJSONProvider) AddMetadata(metadata *schema.ProjectMetadata)

func (*StateJSONProvider) DisplayType added in v0.8.0

func (p *StateJSONProvider) DisplayType() string

func (*StateJSONProvider) LoadResources added in v0.8.0

func (p *StateJSONProvider) LoadResources(usage map[string]*schema.UsageData) ([]*schema.Project, error)

func (*StateJSONProvider) Type added in v0.8.0

func (p *StateJSONProvider) Type() string

type TerragruntInfo added in v0.9.7

type TerragruntInfo struct {
	ConfigPath string
	WorkingDir string
}

type TerragruntProvider added in v0.9.7

type TerragruntProvider struct {
	Path            string
	TerragruntFlags string
	*DirProvider
	// contains filtered or unexported fields
}

func (*TerragruntProvider) AddMetadata added in v0.9.7

func (p *TerragruntProvider) AddMetadata(metadata *schema.ProjectMetadata)

func (*TerragruntProvider) DisplayType added in v0.9.7

func (p *TerragruntProvider) DisplayType() string

func (*TerragruntProvider) LoadResources added in v0.9.7

func (p *TerragruntProvider) LoadResources(usage map[string]*schema.UsageData) ([]*schema.Project, error)

func (*TerragruntProvider) Type added in v0.9.7

func (p *TerragruntProvider) Type() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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