terraform

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentType = "terraform"

	AutoApproveFlag = "-auto-approve"
)

Variables

This section is empty.

Functions

func Clean

func Clean(ctx context.Context, clearDataDir bool) error

func CleanPlanFile added in v0.2.0

func CleanPlanFile(ctx context.Context) error

func ConstructWorkspaceName added in v0.2.0

func ConstructWorkspaceName(stack *stack.Stack, componentName string, config stack.ConfigWithMetadata) (string, error)

func ExecuteCommand added in v0.2.0

func ExecuteCommand(ctx context.Context, args []string) error

func ExecuteShell added in v0.2.0

func ExecuteShell(ctx context.Context) error

func GenerateBackendFile

func GenerateBackendFile(ctx context.Context, format string) error

func GenerateVarFileFile

func GenerateVarFileFile(ctx context.Context, format string) error

func NewExecutionContext added in v0.2.0

func NewExecutionContext(ctx context.Context, stk *stack.Stack, component stack.Component, dryRun bool) (context.Context, error)

func NewKubeConfigProvider added in v0.3.0

func NewKubeConfigProvider(conf *v1.ConfigSpec) (plugins.KubeConfigProvider, error)

func SelectOrCreateWorkspace added in v0.2.0

func SelectOrCreateWorkspace(ctx context.Context) error

Types

type Backend

type Backend struct {
	Type string         `hcle:",label"`
	Data map[string]any `hcle:",body"`
}

type Config added in v0.3.0

type Config struct {
	BasePath                string `yaml:"base_path" json:"base_path" mapstructure:"base_path"`
	ApplyAutoApprove        bool   `yaml:"apply_auto_approve" json:"apply_auto_approve" mapstructure:"apply_auto_approve"`
	DeployRunInit           bool   `yaml:"deploy_run_init" json:"deploy_run_init" mapstructure:"deploy_run_init"`
	InitRunReconfigure      bool   `yaml:"init_run_reconfigure" json:"init_run_reconfigure" mapstructure:"init_run_reconfigure"`
	AutoGenerateBackendFile bool   `yaml:"auto_generate_backend_file" json:"auto_generate_backend_file" mapstructure:"auto_generate_backend_file"`
	ClusterNamePattern      string `yaml:"cluster_name_pattern" json:"cluster_name_pattern" mapstructure:"cluster_name_pattern"`
}

type Root

type Root struct {
	Terraform Terraform `json:"terraform" hcle:"terraform,block"`
}

type Settings added in v0.2.1

type Settings struct {
	PlanFile      string
	VarFile       string
	WorkspaceName string
}

func GetTerraformSettings added in v0.2.1

func GetTerraformSettings(ctx context.Context) Settings

type Terraform

type Terraform struct {
	Backend Backend `json:"-" hcle:"backend,block"`

	JSONBackend map[string]map[string]any `json:"backend,inline" `
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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