infra

package
v0.55.2-rc.1 Latest Latest
Warning

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

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

Documentation

Overview

Package infra implements utilities to interact with a Pulumi infrastructure

Package infra implements utilities to interact with a Pulumi infrastructure

Package infra implements utilities to interact with a Pulumi infrastructure

Index

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, logWriter io.Writer) (err error)

DeleteStack safely deletes a stack

func (*StackManager) ForceRemoveStackConfiguration

func (sm *StackManager) ForceRemoveStackConfiguration(ctx context.Context, name string) (err 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) GetPulumiStackName added in v0.50.0

func (sm *StackManager) GetPulumiStackName(name string) (_ string, err error)

GetPulumiStackName returns the Pulumi stack name The internal Pulumi stack name should normally remain hidden as all the Pulumi interactions should be done via the StackManager. The only use case for getting the internal Pulumi stack name is to interact directly with Pulumi for debug purposes.

func (*StackManager) GetStack

func (sm *StackManager) GetStack(ctx context.Context, name string, config runner.ConfigMap, deployFunc pulumi.RunFunc, failOnMissing bool) (_ *auto.Stack, _ auto.UpResult, err 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, logWriter io.Writer, datadodatadogEventSender datadogEventSender) (_ *auto.Stack, _ auto.UpResult, err 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.

Jump to

Keyboard shortcuts

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