cf

package module
v0.0.0-...-1c4073b Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2018 License: MIT Imports: 5 Imported by: 2

README

aws-cloudformation-go

Simple library to facilitate interacting with cloudformation sdk

TODO:

  1. add tests against interface
  2. add much better tests for executor implementation

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCloudformationParameters

func CreateCloudformationParameters(parameterMap *map[string]string) []*cloudformation.Parameter

CreateCloudformationParameters is a method to convert a map of parameter key value pairs into AWS Parameters

func GetOutputValue

func GetOutputValue(stack cloudformation.Stack, key string) string

GetOutputValue method will retrieve an output value from Output array

Types

type Executor

type Executor interface {
	CreateStack(templateBody string, stackName string, parameterMap *map[string]string, tags *map[string]string) error
	CreateStackFromS3(templateURL string, stackName string, parameterMap *map[string]string, tags *map[string]string) error

	UpdateStack(templateBody string, stackName string, parameterMap *map[string]string, tags *map[string]string) error

	PauseUntilCreateFinished(stackName string) error
	PauseUntilUpdateFinished(stackName string) error
}

Executor is an interface to execute and create stacks

type IaaSExecutor

type IaaSExecutor struct {
	Client cloudformationiface.CloudFormationAPI
}

IaaSExecutor struct used to create cloudformation stacks

func (IaaSExecutor) CreateStack

func (executor IaaSExecutor) CreateStack(templateBody string, stackName string,
	parameterMap *map[string]string, tags *map[string]string) error

CreateStack is a general method to create aws cloudformation stacks

func (IaaSExecutor) CreateStackFromS3

func (executor IaaSExecutor) CreateStackFromS3(templateURL string, stackName string,
	parameterMap *map[string]string, tags *map[string]string) error

CreateStackFromS3 is a general method to create aws cloudformation stacks

func (IaaSExecutor) PauseUntilCreateFinished

func (executor IaaSExecutor) PauseUntilCreateFinished(stackName string) error

PauseUntilCreateFinished is a method to wait on the status of a cloudformation stack until it finishes

func (IaaSExecutor) PauseUntilUpdateFinished

func (executor IaaSExecutor) PauseUntilUpdateFinished(stackName string) error

PauseUntilUpdateFinished is a method to wait on the status of a cloudformation stack until it finishes

func (IaaSExecutor) UpdateStack

func (executor IaaSExecutor) UpdateStack(templateBody string, stackName string,
	parameterMap *map[string]string, tags *map[string]string) error

UpdateStack is a method to update Cloudformation stack

type Resource

type Resource interface {
	GetStack(stackName *string) (cloudformation.Stack, error)
}

Resource is a generic interface for retrieving information on a infrastruture stack

type Stack

type Stack struct {
	Client cloudformationiface.CloudFormationAPI
}

Stack is a struct representing an AWS Cloudformation Stack

func (Stack) GetStack

func (stack Stack) GetStack(stackName *string) (cloudformation.Stack, error)

GetStack is a method to retrieve an AWS stack by stack name

Jump to

Keyboard shortcuts

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