terraform

package
v0.0.0-...-fa22197 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddApplicationToStack

func AddApplicationToStack(appConfig *config.AppConfig, location string, meta *marketplace.MarketplaceMetadata, install *marketplace.Install, db database.Datastore, deploymentID uint) error

AddApplicationToStack adds the given application configuration to the stack. It takes care of creating the necessary workspace directory, generating the HCL file, and writing the required attributes.

func DestroyAllTerraform

func DestroyAllTerraform(appconf *config.AppConfig, wsmgr *ws.WebSocketManager, id string, executor TerraformExecutor) error

func RunTerraform

func RunTerraform(appconf *config.AppConfig, wsmgr *ws.WebSocketManager, id string, executor TerraformExecutor, target string) error

Types

type RealTerraformExecutor

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

func (*RealTerraformExecutor) Apply

func (*RealTerraformExecutor) Init

func (*RealTerraformExecutor) NewTerraform

func (r *RealTerraformExecutor) NewTerraform(dir string, execPath string) (*tfexec.Terraform, error)

func (*RealTerraformExecutor) Plan

func (r *RealTerraformExecutor) Plan(ctx context.Context, opts ...tfexec.PlanOption) (bool, error)

func (*RealTerraformExecutor) SetLogger

func (r *RealTerraformExecutor) SetLogger(l *log.Logger)

func (*RealTerraformExecutor) SetStderr

func (r *RealTerraformExecutor) SetStderr(w io.Writer)

func (*RealTerraformExecutor) SetStdout

func (r *RealTerraformExecutor) SetStdout(w io.Writer)

type TerraformExecutor

type TerraformExecutor interface {
	NewTerraform(string, string) (*tfexec.Terraform, error)
	Init(context.Context, ...tfexec.InitOption) error
	Plan(context.Context, ...tfexec.PlanOption) (bool, error)
	Apply(context.Context, ...tfexec.ApplyOption) error
	SetStdout(io.Writer)
	SetStderr(io.Writer)
	SetLogger(*log.Logger)
}

type Varstruct

type Varstruct struct {
	Name      string
	Value     interface{}
	Tfobjtype cty.Type
}

Jump to

Keyboard shortcuts

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