Documentation ¶
Index ¶
- Constants
- func Client(region string) *cfnservice.Client
- func CountCompleted(data map[string]CloudFormationResource) int
- func CreateChangeSet(client DeployInterface, name string, template *cloudformation.Template)
- func CreateStack(client DeployInterface, name string, template *cloudformation.Template)
- func DeleteStack(client DeployInterface, name string)
- func DumpTemplate(template *cloudformation.Template)
- func IsStackCompleted(data map[string]CloudFormationResource) bool
- func PopulateData(client DeployInterface, name string, data map[string]CloudFormationResource) map[string]CloudFormationResource
- func ShowStatus(client DeployInterface, name string, template *cloudformation.Template, ...)
- func UpdateStack(client DeployInterface, name string, template *cloudformation.Template)
- type CloudFormationResource
- type DeployInterface
Constants ¶
const ( // ColorDefault default color ColorDefault = "\x1b[39m" // ColorRed red for screen ColorRed = "\x1b[91m" // ColorGreen green for screen ColorGreen = "\x1b[32m" // ColorBlue blue for screen ColorBlue = "\x1b[94m" // ColorGray for screen ColorGray = "\x1b[90m" )
const StatusCreateComplete = "CREATE_COMPLETE"
StatusCreateComplete CloudFormation Status
const StatusCreateInProgress = "CREATE_IN_PROGRESS"
StatusCreateInProgress CloudFormation Status
const StatusDeleteComplete = "DELETE_COMPLETE"
StatusDeleteComplete CloudFormation Status
const StatusUpdateComplete = "UPDATE_COMPLETE"
StatusUpdateComplete text for update
Variables ¶
This section is empty.
Functions ¶
func Client ¶
func Client(region string) *cfnservice.Client
Client get a CloudFormation service client
func CountCompleted ¶ added in v0.1.4
func CountCompleted(data map[string]CloudFormationResource) int
CountCompleted how many completed
func CreateChangeSet ¶ added in v0.1.4
func CreateChangeSet(client DeployInterface, name string, template *cloudformation.Template)
CreateChangeSet start an Change Set cycle
func CreateStack ¶
func CreateStack(client DeployInterface, name string, template *cloudformation.Template)
CreateStack first time stack creation client - the aws cloudformation client name - name if the Cloudformaiton template template - a goformation template
func DeleteStack ¶
func DeleteStack(client DeployInterface, name string)
DeleteStack first time stack creation
func DumpTemplate ¶ added in v0.1.4
func DumpTemplate(template *cloudformation.Template)
DumpTemplate for debugging
func IsStackCompleted ¶
func IsStackCompleted(data map[string]CloudFormationResource) bool
IsStackCompleted check for everything "completed"
func PopulateData ¶
func PopulateData(client DeployInterface, name string, data map[string]CloudFormationResource) map[string]CloudFormationResource
PopulateData update status from describe call
func ShowStatus ¶
func ShowStatus(client DeployInterface, name string, template *cloudformation.Template, endState string)
ShowStatus status of stack
func UpdateStack ¶ added in v0.1.3
func UpdateStack(client DeployInterface, name string, template *cloudformation.Template)
UpdateStack first time stack creation client - the aws cloudformation client name - name if the Cloudformaiton template template - a goformation template
Types ¶
type CloudFormationResource ¶
type CloudFormationResource struct { LogicalResourceID string PhysicalResourceID string Status string Type string Timestamp time.Time ResourceStatusReason string }
CloudFormationResource holder for status
type DeployInterface ¶
type DeployInterface interface { CreateStack(ctx context.Context, params *cfn.CreateStackInput, optFns ...func(*cfn.Options)) (*cfn.CreateStackOutput, error) DescribeStackEvents(ctx context.Context, params *cfn.DescribeStackEventsInput, optFns ...func(*cfn.Options)) (*cfn.DescribeStackEventsOutput, error) DeleteStack(ctx context.Context, params *cfn.DeleteStackInput, optFns ...func(*cfn.Options)) (*cfn.DeleteStackOutput, error) UpdateStack(ctx context.Context, params *cfn.UpdateStackInput, optFns ...func(*cfn.Options)) (*cfn.UpdateStackOutput, error) CreateChangeSet(ctx context.Context, params *cfn.CreateChangeSetInput, optFns ...func(*cfn.Options)) (*cfn.CreateChangeSetOutput, error) ExecuteChangeSet(ctx context.Context, params *cfn.ExecuteChangeSetInput, optF ...func(*cfn.Options)) (*cfn.ExecuteChangeSetOutput, error) }
DeployInterface all deployment functions