deploycfn

package
v0.0.0-...-f184c2c Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2018 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deploy

func Deploy(input DeployInput) error

Deploy creates or updates the specified CloudFormation template to AWS.

If you secify nil for awsConfigProvider, a default one will be used.

This is a handy function to call from your main, i.e.:

func main() {
	dnsName := flag.String("name", "example.com", "the DNS name")
	flag.Parse()

	template := makeTemplate(*dnsName)
	if err := deploycfn.Deploy(nil, "Example", template); err != nil {
		log.Fatalf("deploy: %s", err)
	}
}

Types

type DeployInput

type DeployInput struct {
	Session        client.ConfigProvider
	StackName      string
	Template       *cfn.Template
	Parameters     map[string]string
	TemplateBucket string
}

type StackEventWatcher

type StackEventWatcher struct {
	Service   *cloudformation.CloudFormation
	StackName string
	// contains filtered or unexported fields
}

StackEventWatcher watches a CloudFormation stack for events and emits them to the log channel.

func NewStackEventWatcher

func NewStackEventWatcher(session client.ConfigProvider, stackName string) (*StackEventWatcher, error)

NewStackEventWatcher returns a new StackEventWatcher that emits events for the specified stack. It scans all the existing events and adds them to seenEvents so that events the occur prior to the invocation of this function will not be printed.

func (*StackEventWatcher) Watch

func (sw *StackEventWatcher) Watch() error

Watch monitors the stack for events, reporting each unseen event to the log channel. Returns when the stack enters a non-transitional state. The return value is non-nil if the final state is an error state.

Jump to

Keyboard shortcuts

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