Documentation ¶
Overview ¶
Package infra implements utilities to interact with a Pulumi infrastructure
Index ¶
- type StackManager
- func (sm *StackManager) Cleanup(ctx context.Context) []error
- func (sm *StackManager) DeleteStack(ctx context.Context, name string) error
- func (sm *StackManager) ForceRemoveStackConfiguration(ctx context.Context, name string) error
- func (sm *StackManager) GetStack(ctx context.Context, name string, config runner.ConfigMap, ...) (*auto.Stack, auto.UpResult, error)
- func (sm *StackManager) GetStackNoDeleteOnFailure(ctx context.Context, name string, config runner.ConfigMap, ...) (*auto.Stack, auto.UpResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StackManager ¶
type StackManager struct {
// contains filtered or unexported fields
}
StackManager handles
func GetStackManager ¶
func GetStackManager() *StackManager
GetStackManager returns a stack manager, initialising on first call
func (*StackManager) Cleanup ¶
func (sm *StackManager) Cleanup(ctx context.Context) []error
Cleanup delete any existing stack
func (*StackManager) DeleteStack ¶
func (sm *StackManager) DeleteStack(ctx context.Context, name string) error
DeleteStack safely deletes a stack
func (*StackManager) ForceRemoveStackConfiguration ¶
func (sm *StackManager) ForceRemoveStackConfiguration(ctx context.Context, name string) error
ForceRemoveStackConfiguration removes the configuration files pulumi creates for managing a stack. It DOES NOT perform any cleanup of the resources created by the stack. Call `DeleteStack` for correct cleanup.
func (*StackManager) GetStack ¶
func (sm *StackManager) GetStack(ctx context.Context, name string, config runner.ConfigMap, deployFunc pulumi.RunFunc, failOnMissing bool) (*auto.Stack, auto.UpResult, error)
GetStack creates or return a stack based on stack name and config, if error occurs during stack creation it destroy all the resources created
func (*StackManager) GetStackNoDeleteOnFailure ¶
func (sm *StackManager) GetStackNoDeleteOnFailure(ctx context.Context, name string, config runner.ConfigMap, deployFunc pulumi.RunFunc, failOnMissing bool) (*auto.Stack, auto.UpResult, error)
GetStackNoDeleteOnFailure creates or return a stack based on stack name and config, if error occurs during stack creation, it will not destroy the created resources. Using this can lead to resource leaks.