cloudformation

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2019 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCloudformationClient added in v0.3.7

func GetCloudformationClient(profile string, region string) (string, *cloudformation.CloudFormation)

GetCloudformationClient from the standard credential chain

func GetStackName

func GetStackName(manifestFile *manifest.Manifest, fileName, environment, stackNameFlag string) string

GetStackName cleaned to fix AWS requirements

func ResolveParameters

func ResolveParameters(
	environment string,
	cliParams map[string]string,
	cfYaml YamlCloudformation,
	manifestFile *manifest.Manifest,
) []*awsCF.Parameter

ResolveParameters for the template

func ResolveParametersS3

func ResolveParametersS3(
	c *cli.Context,
	manifestFile *manifest.Manifest,
) []*awsCF.Parameter

ResolveParametersS3 for an S3 based template

Types

type GenerateParams

type GenerateParams struct {
	ObjectStore            core.ObjectStore
	Filename               string
	Directory              string
	WriteParams            bool
	EnvFile                string
	Env                    string
	GenerateDefaultOutputs bool
	ParamMap               map[string]string
	Plugins                []*plugins.PluginLoaded
}

GenerateParams are required to generate a cloudformation yaml template

type Parameter added in v0.3.4

type Parameter struct {
	ParameterKey     string
	ParameterValue   string
	ResolvedValue    string `json:"ResolvedValue,omitempty"`
	UsePreviousValue bool   `json:"UsePreviousValue,omitempty"`
}

CloudFormation Parameter data type: https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_Parameter.html

type StackDeleter added in v0.3.7

type StackEventer added in v0.3.7

type StackEventer interface {
	Open(string, string) string
	DescribeStackEvents(*awsCF.DescribeStackEventsInput) (*awsCF.DescribeStackEventsOutput, error)
	DescribeStackEventsPages(*awsCF.DescribeStackEventsInput, func(*awsCF.DescribeStackEventsOutput, bool) bool) error
}

Subset of AWS API calls required by the events task, as a mockable interface.

type StackUpserter added in v0.3.7

Subset of AWS API calls required by the upsert task, as a mockable interface.

type Wrapper added in v0.3.7

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

func NewWrapper added in v0.3.7

func NewWrapper(client *awsCF.CloudFormation) *Wrapper

Placeholder helper so that tasks still using awsCF.CloudFormation directly can wrap it to use helpers that have been updated to use interfaces.

func (*Wrapper) CreateChangeSet added in v0.3.7

func (wr *Wrapper) CreateChangeSet(in *awsCF.CreateChangeSetInput) (*awsCF.CreateChangeSetOutput, error)

func (*Wrapper) DeleteChangeSet added in v0.3.7

func (wr *Wrapper) DeleteChangeSet(in *awsCF.DeleteChangeSetInput) (*awsCF.DeleteChangeSetOutput, error)

func (*Wrapper) DeleteStack added in v0.3.7

func (wr *Wrapper) DeleteStack(in *awsCF.DeleteStackInput) (*awsCF.DeleteStackOutput, error)

func (*Wrapper) DescribeChangeSet added in v0.3.7

func (wr *Wrapper) DescribeChangeSet(in *awsCF.DescribeChangeSetInput) (*awsCF.DescribeChangeSetOutput, error)

func (*Wrapper) DescribeStackEvents added in v0.3.7

func (wr *Wrapper) DescribeStackEvents(input *awsCF.DescribeStackEventsInput) (*awsCF.DescribeStackEventsOutput, error)

func (*Wrapper) DescribeStackEventsPages added in v0.3.7

func (wr *Wrapper) DescribeStackEventsPages(input *awsCF.DescribeStackEventsInput, fn func(*awsCF.DescribeStackEventsOutput, bool) bool) error

func (*Wrapper) DescribeStacks added in v0.3.7

func (wr *Wrapper) DescribeStacks(in *awsCF.DescribeStacksInput) (*awsCF.DescribeStacksOutput, error)

func (*Wrapper) ExecuteChangeSet added in v0.3.7

func (wr *Wrapper) ExecuteChangeSet(in *awsCF.ExecuteChangeSetInput) (*awsCF.ExecuteChangeSetOutput, error)

func (*Wrapper) Open added in v0.3.7

func (wr *Wrapper) Open(profile, region string) string

func (*Wrapper) WaitUntilChangeSetCreateComplete added in v0.3.7

func (wr *Wrapper) WaitUntilChangeSetCreateComplete(in *awsCF.DescribeChangeSetInput) error

type YamlCloudformation

type YamlCloudformation struct {
	AWSTemplateFormatVersion string               `yaml:"AWSTemplateFormatVersion,omitempty"`
	Description              string               `yaml:"Description,omitempty"`
	Metadata                 types.TemplateObject `yaml:"Metadata,omitempty"`
	Parameters               types.TemplateObject `yaml:"Parameters,omitempty"`
	Mappings                 types.TemplateObject `yaml:"Mappings,omitempty"`
	Conditions               types.TemplateObject `yaml:"Conditions,omitempty"`
	Transform                types.TemplateObject `yaml:"Transform,omitempty"`
	Resources                types.TemplateObject `yaml:"Resources"`
	Outputs                  types.TemplateObject `yaml:"Outputs,omitempty"`
}

YamlCloudformation -

func GenerateYamlTemplate added in v0.3.0

func GenerateYamlTemplate(params GenerateParams) (compiledTemplate YamlCloudformation, err error)

GenerateYamlTemplate - generate a cloudformation template

type YamlConfig

type YamlConfig struct {
	AWSTemplateFormatVersion string                      `yaml:"AWSTemplateFormatVersion,omitempty"`
	Description              string                      `yaml:"Description,omitempty"`
	Metadata                 types.TemplateObject        `yaml:"Metadata,omitempty"`
	Parameters               types.TemplateObject        `yaml:"Parameters,omitempty"`
	Mappings                 types.TemplateObject        `yaml:"Mappings,omitempty"`
	Conditions               types.TemplateObject        `yaml:"Conditions,omitempty"`
	Transform                types.TemplateObject        `yaml:"Transform,omitempty"`
	Resources                map[string]types.CfResource `yaml:"Resources"`
	Outputs                  types.TemplateObject        `yaml:"Outputs,omitempty"`
}

YamlConfig -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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