cloudformation

package
v5.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsOutputNotFound

func IsOutputNotFound(err error) bool

IsOutputNotFound asserts outputNotFoundError.

func IsOutputsNotAccessible

func IsOutputsNotAccessible(err error) bool

IsOutputsNotAccessible asserts outputsNotAccessibleError.

func IsStackNotFound

func IsStackNotFound(err error) bool

IsStackNotFound asserts stackNotFoundError and stack not found errors from the upstream's API message.

FIXME: The validation error returned by the CloudFormation API doesn't make things easy to check, other than looking for the returned string. There's no constant in the AWS golang SDK for defining this string, it comes from the service. This is the same in setup/error.go.

func IsTooManyStacks

func IsTooManyStacks(err error) bool

IsTooManyStacks asserts tooManyStacksError.

Types

type CF

type CF interface {
	DescribeStacks(input *cloudformation.DescribeStacksInput) (*cloudformation.DescribeStacksOutput, error)
}

CF provides a set of methods to work with CloudFormation stacks. *CloudFormation struct from "github.com/aws/aws-sdk-go/service/cloudformation" fulfils this interface.

type CloudFormation

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

func New

func New(config Config) (*CloudFormation, error)

func (*CloudFormation) DescribeOutputsAndStatus

func (c *CloudFormation) DescribeOutputsAndStatus(stackName string) ([]Output, string, error)

DescribeOutputsAndStatus returns stack outputs, stack status and error. The stack status is returned when the error is nil or the error is matched by IsOutputsNotAccessible.

func (*CloudFormation) GetOutputValue

func (c *CloudFormation) GetOutputValue(outputs []Output, key string) (string, error)

type Config

type Config struct {
	Client CF
}

type Output

type Output struct {
	OutputKey   string
	OutputValue string
}

Jump to

Keyboard shortcuts

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