cloudformation

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package cloudformation implements common CloudFormation utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTags

func NewTags(input map[string]string) (tags []*svccfn.Tag)

NewTags returns a list of default CloudFormation tags.

func Poll

func Poll(
	ctx context.Context,
	stopc chan struct{},
	osSig chan os.Signal,
	lg *zap.Logger,
	cfnAPI cloudformationiface.CloudFormationAPI,
	stackID string,
	desiredStackStatus string,
	initialWait time.Duration,
	wait time.Duration,
) <-chan StackStatus

Poll periodically fetches the stack status until the stack becomes the desired state.

func StackCreateFailed

func StackCreateFailed(status string) bool

StackCreateFailed return true if cloudformation status indicates its creation failure.

CREATE_IN_PROGRESS
CREATE_FAILED
CREATE_COMPLETE
ROLLBACK_IN_PROGRESS
ROLLBACK_FAILED
ROLLBACK_COMPLETE
DELETE_IN_PROGRESS
DELETE_FAILED
DELETE_COMPLETE
UPDATE_IN_PROGRESS
UPDATE_COMPLETE_CLEANUP_IN_PROGRESS
UPDATE_COMPLETE
UPDATE_ROLLBACK_IN_PROGRESS
UPDATE_ROLLBACK_FAILED
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS
UPDATE_ROLLBACK_COMPLETE
REVIEW_IN_PROGRESS

ref. https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Stack.html

func StackNotExist

func StackNotExist(err error) bool

StackNotExist returns true if cloudformation errror indicates that the stack has already been deleted. This message is Go client specific. e.g. ValidationError: Stack with id AWSTESTER-155460CAAC98A17003-CF-STACK-VPC does not exist\n\tstatus code: 400, request id: bf45410b-b863-11e8-9550-914acc220b7c

Types

type StackStatus

type StackStatus struct {
	Stack *svccfn.Stack
	Error error
}

StackStatus represents the CloudFormation status.

Jump to

Keyboard shortcuts

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