terraform

package
v0.0.0-...-62c8998 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 22 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, application *types.InstalledMarketplaceApplication, db database.Datastore) 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 DestroyTerraformModule

func DestroyTerraformModule(appconf *config.AppConfig, logfile string, executor TerraformExecutor, moduleName string) error

func GenerateRandomString

func GenerateRandomString(length int) string

func RunTerraform

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

func RunTerraformLogOutToFile

func RunTerraformLogOutToFile(appconf *config.AppConfig, logfile string, executor TerraformExecutor, target string) error

Types

type RealTerraformExecutor

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

func (*RealTerraformExecutor) Apply

func (*RealTerraformExecutor) Destroy

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
	Destroy(context.Context, ...tfexec.DestroyOption) 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