Documentation ¶
Index ¶
- Variables
- func DescribeStack(cfnSvc cloudformationiface.CloudFormationAPI, stackName string) (*cloudformation.Stack, error)
- func GetCFNTemplateBody(cfnTemplate string, input interface{}) (string, error)
- func IsComplete(status string) bool
- func IsFailed(status string) bool
- func IsPending(status string) bool
- func IsStackDoesNotExist(err error) bool
- type MockCloudformationAPI
- func (m *MockCloudformationAPI) CreateStack(input *cloudformation.CreateStackInput) (*cloudformation.CreateStackOutput, error)
- func (m *MockCloudformationAPI) DeleteStack(input *cloudformation.DeleteStackInput) (*cloudformation.DeleteStackOutput, error)
- func (m *MockCloudformationAPI) DescribeStacks(input *cloudformation.DescribeStacksInput) (*cloudformation.DescribeStacksOutput, error)
- func (m *MockCloudformationAPI) UpdateStack(input *cloudformation.UpdateStackInput) (*cloudformation.UpdateStackOutput, error)
- func (m *MockCloudformationAPI) WaitUntilStackCreateComplete(input *cloudformation.DescribeStacksInput) error
- func (m *MockCloudformationAPI) WaitUntilStackDeleteComplete(input *cloudformation.DescribeStacksInput) error
Constants ¶
This section is empty.
Variables ¶
var CompleteStatuses = []string{ cloudformation.StackStatusCreateComplete, cloudformation.StackStatusUpdateComplete, cloudformation.StackStatusDeleteComplete, }
CompleteStatuses contains all CloudFormation status strings considered complete
var FailedStatuses = []string{ cloudformation.StackStatusCreateFailed, cloudformation.StackStatusRollbackComplete, cloudformation.StackStatusRollbackFailed, cloudformation.StackStatusUpdateRollbackFailed, cloudformation.StackStatusUpdateRollbackComplete, cloudformation.StackStatusDeleteFailed, }
FailedStatuses contains all CloudFormation status strings considered failed
var PendingStatuses = []string{ cloudformation.StackStatusCreateInProgress, cloudformation.StackStatusDeleteInProgress, cloudformation.StackStatusRollbackInProgress, cloudformation.StackStatusUpdateCompleteCleanupInProgress, cloudformation.StackStatusUpdateInProgress, cloudformation.StackStatusUpdateRollbackCompleteCleanupInProgress, cloudformation.StackStatusUpdateRollbackInProgress, cloudformation.StackStatusReviewInProgress, }
PendingStatuses contains all CloudFormation status strings consideredpending
Functions ¶
func DescribeStack ¶
func DescribeStack(cfnSvc cloudformationiface.CloudFormationAPI, stackName string) (*cloudformation.Stack, error)
DescribeStack takes a stackName as input and returns the Stack information along with any errors.
func GetCFNTemplateBody ¶
GetCFNTemplateBody takes a cfnTemplate and a corresponding struct as input and return the rendered template
func IsComplete ¶
IsComplete tests if the specified string is considered a completed cloudformation stack state
func IsFailed ¶
IsFailed tests if the specified string is considered a failed cloudformation stack state
func IsPending ¶
IsPending tests if the specified string is considered a pending cloudformation stack state
func IsStackDoesNotExist ¶
IsStackDoesNotExist Checks if the error recieved for DescribeStacks denotes if the stack is non exsistent
Types ¶
type MockCloudformationAPI ¶
type MockCloudformationAPI struct { cloudformationiface.CloudFormationAPI Writes int Err error Status string FailCreate bool FailDescribe bool FailDelete bool }
MockCloudformationAPI provides mocked interface to AWS Cloudformation service
func (*MockCloudformationAPI) CreateStack ¶
func (m *MockCloudformationAPI) CreateStack(input *cloudformation.CreateStackInput) (*cloudformation.CreateStackOutput, error)
func (*MockCloudformationAPI) DeleteStack ¶
func (m *MockCloudformationAPI) DeleteStack(input *cloudformation.DeleteStackInput) (*cloudformation.DeleteStackOutput, error)
func (*MockCloudformationAPI) DescribeStacks ¶
func (m *MockCloudformationAPI) DescribeStacks(input *cloudformation.DescribeStacksInput) (*cloudformation.DescribeStacksOutput, error)
func (*MockCloudformationAPI) UpdateStack ¶
func (m *MockCloudformationAPI) UpdateStack(input *cloudformation.UpdateStackInput) (*cloudformation.UpdateStackOutput, error)
func (*MockCloudformationAPI) WaitUntilStackCreateComplete ¶
func (m *MockCloudformationAPI) WaitUntilStackCreateComplete(input *cloudformation.DescribeStacksInput) error
func (*MockCloudformationAPI) WaitUntilStackDeleteComplete ¶
func (m *MockCloudformationAPI) WaitUntilStackDeleteComplete(input *cloudformation.DescribeStacksInput) error