Documentation ¶
Index ¶
- func AddApplicationToStack(appConfig *config.AppConfig, location string, ...) error
- func DestroyAllTerraform(appconf *config.AppConfig, wsmgr *ws.WebSocketManager, id string, ...) error
- func DestroyTerraformModule(appconf *config.AppConfig, logfile string, executor TerraformExecutor, ...) error
- func GenerateRandomString(length int) string
- func RunTerraform(appconf *config.AppConfig, wsmgr *ws.WebSocketManager, id string, ...) error
- func RunTerraformLogOutToFile(appconf *config.AppConfig, logfile string, executor TerraformExecutor, ...) error
- type RealTerraformExecutor
- func (r *RealTerraformExecutor) Apply(ctx context.Context, opts ...tfexec.ApplyOption) error
- func (r *RealTerraformExecutor) Destroy(ctx context.Context, opts ...tfexec.DestroyOption) error
- func (r *RealTerraformExecutor) Init(ctx context.Context, opts ...tfexec.InitOption) error
- func (r *RealTerraformExecutor) NewTerraform(dir string, execPath string) (*tfexec.Terraform, error)
- func (r *RealTerraformExecutor) Plan(ctx context.Context, opts ...tfexec.PlanOption) (bool, error)
- func (r *RealTerraformExecutor) SetLogger(l *log.Logger)
- func (r *RealTerraformExecutor) SetStderr(w io.Writer)
- func (r *RealTerraformExecutor) SetStdout(w io.Writer)
- type TerraformExecutor
- type Varstruct
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 GenerateRandomString ¶
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 (r *RealTerraformExecutor) Apply(ctx context.Context, opts ...tfexec.ApplyOption) error
func (*RealTerraformExecutor) Destroy ¶
func (r *RealTerraformExecutor) Destroy(ctx context.Context, opts ...tfexec.DestroyOption) error
func (*RealTerraformExecutor) Init ¶
func (r *RealTerraformExecutor) Init(ctx context.Context, opts ...tfexec.InitOption) error
func (*RealTerraformExecutor) NewTerraform ¶
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) }
Click to show internal directories.
Click to hide internal directories.