godeploycfn

package module
v0.0.0-...-4a02f35 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

README

go-deploy-cfn

A helper library which can be used in a Go project to deploy a cloudformation yaml template easier.

The main function is CloudFormationDeploy which takes a yaml string and returns an error type. It deploys a cloudformation template to AWS, waiting for the stack to finish updating for about 5 minutes. It simplifies the create-or-update semantics, and handles retries for status checking.

Contributing

This project welcomes contributions or suggestions of any kind. Please feel free to create an issue to discuss changes or create a Pull Request if you see room for improvement.

Documentation

Overview

Package godeploycfn allows deployment of a Cloudformation template to be a bit easier

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLogicalName

func CreateLogicalName(s string) string

CreateLogicalName creates a logical name used in the CloudFormation template.

func CreateStackName

func CreateStackName(s string) string

CreateStackName creates a valid stack name from the given alarm name.

Types

type Cloudformation

type Cloudformation struct {
	CFClient    cloudformationiface.CloudFormationAPI
	StackName   string
	LogrusEntry *logrus.Entry
}

Cloudformation is a utility wrapper around the original aws api to make common operations more intuitive.

func (*Cloudformation) CloudFormationDeploy

func (c *Cloudformation) CloudFormationDeploy(templateBody string, namedIAM bool) error

CloudFormationDeploy deploys the given Cloudformation Template to the given Cloudformation Stack.

type CloudformationAPI

type CloudformationAPI interface {
	CloudFormationDeploy(templateBody string, namedIAM bool) error
}

CloudformationAPI provides an API which can be used instead of a concrete client for testing/mocking purposes.

Jump to

Keyboard shortcuts

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