Documentation
¶
Index ¶
- Variables
- type Cfnctl
- func (c *Cfnctl) ApplyChangeSet() error
- func (c *Cfnctl) ChangeSetExists(stackName, changesetName string) (bool, error)
- func (c *Cfnctl) CreateChangeSet() error
- func (c *Cfnctl) DeleteChangeSet() error
- func (c *Cfnctl) DescribeChangeSet() ([]types.Change, error)
- func (c *Cfnctl) DescribeStack() (string, error)
- func (c *Cfnctl) DescribeStackResources() ([]types.StackResource, error)
- func (c *Cfnctl) DestroyStack() error
- func (c *Cfnctl) IsStackCreated() (bool, error)
- func (c *Cfnctl) ListChangeSet() (types.ChangeSetStatus, error)
- func (c *Cfnctl) ListExportValues() ([]types.Export, error)
- func (c *Cfnctl) ValidateCFTemplate() error
- type CloudformationAPI
- type Option
- func WithAutoApprove(b bool) Option
- func WithChangesetName(changesetName string) Option
- func WithOutput(out io.Writer) Option
- func WithStackName(stackName string) Option
- func WithSvc(svc CloudformationAPI) Option
- func WithTemplateBody(file string) Option
- func WithTemplatePath(filePath string) Option
- func WithVarsFile(varsFile string) Option
Constants ¶
This section is empty.
Variables ¶
var ErrStackNotFound = errors.New("stack does not exist")
Functions ¶
This section is empty.
Types ¶
type Cfnctl ¶
type Cfnctl struct {
AutoApprove bool
VarsFile string
StackName string
ChangesetName string
TemplateBody string
TemplatePath string
Parameters []types.Parameter
Output io.Writer
Svc CloudformationAPI
DoDeleteChangeset bool
}
Cfnctl provides access to all actions in the programs lifecycle
func (*Cfnctl) ApplyChangeSet ¶
ApplyChangeSet executes a CloudFormation changeset
func (*Cfnctl) ChangeSetExists ¶
ChangeSetExists checks whether a CloudFormation changeset exists or not
func (*Cfnctl) CreateChangeSet ¶
CreateChangeSet creates a CloudFormation changeset
func (*Cfnctl) DeleteChangeSet ¶
DeleteChangeSet deletes a CloudFormation changeset
func (*Cfnctl) DescribeChangeSet ¶
DescribeChangeSet describes a CloudFormation changeset
func (*Cfnctl) DescribeStack ¶
DescribeStack describes a CloudFormation stack If the stack doesn't exist, an ValidationError is returned.
func (*Cfnctl) DescribeStackResources ¶
func (c *Cfnctl) DescribeStackResources() ([]types.StackResource, error)
DescribeStackResources describes the resources from a particular CloudFormation stack
func (*Cfnctl) DestroyStack ¶
Deletes a specified stack. Once the call completes successfully, stack deletion starts. Deleted stacks do not show up in the DescribeStacks API if the deletion has been completed successfully
func (*Cfnctl) IsStackCreated ¶
IsStackCreated checks whether a CloudFormation stack is created or not
func (*Cfnctl) ListChangeSet ¶
func (c *Cfnctl) ListChangeSet() (types.ChangeSetStatus, error)
ListChangeSet lists all changesets. Can be used to get status if changeset created or not
func (*Cfnctl) ValidateCFTemplate ¶
ValidateCFTemplate validates a particular CloudFormation template
type CloudformationAPI ¶
type CloudformationAPI interface {
ExecuteChangeSet(ctx context.Context, params *cloudformation.ExecuteChangeSetInput, optFns ...func(*cloudformation.Options)) (*cloudformation.ExecuteChangeSetOutput, error)
CreateChangeSet(ctx context.Context, params *cloudformation.CreateChangeSetInput, optFns ...func(*cloudformation.Options)) (*cloudformation.CreateChangeSetOutput, error)
DescribeChangeSet(ctx context.Context, params *cloudformation.DescribeChangeSetInput, optFns ...func(*cloudformation.Options)) (*cloudformation.DescribeChangeSetOutput, error)
DeleteChangeSet(ctx context.Context, params *cloudformation.DeleteChangeSetInput, optFns ...func(*cloudformation.Options)) (*cloudformation.DeleteChangeSetOutput, error)
DescribeStacks(ctx context.Context, params *cloudformation.DescribeStacksInput, optFns ...func(*cloudformation.Options)) (*cloudformation.DescribeStacksOutput, error)
DescribeStackResources(ctx context.Context, params *cloudformation.DescribeStackResourcesInput, optFns ...func(*cloudformation.Options)) (*cloudformation.DescribeStackResourcesOutput, error)
ListChangeSets(ctx context.Context, params *cloudformation.ListChangeSetsInput, optFns ...func(*cloudformation.Options)) (*cloudformation.ListChangeSetsOutput, error)
ListStacks(ctx context.Context, params *cloudformation.ListStacksInput, optFns ...func(*cloudformation.Options)) (*cloudformation.ListStacksOutput, error)
ValidateTemplate(ctx context.Context, params *cloudformation.ValidateTemplateInput, optFns ...func(*cloudformation.Options)) (*cloudformation.ValidateTemplateOutput, error)
ListExports(ctx context.Context, params *cloudformation.ListExportsInput, optFns ...func(*cloudformation.Options)) (*cloudformation.ListExportsOutput, error)
DeleteStack(ctx context.Context, params *cloudformation.DeleteStackInput, optFns ...func(*cloudformation.Options)) (*cloudformation.DeleteStackOutput, error)
}
CloudformationAPI provides access to AWS CloudFormation API
type Option ¶
type Option func(*Cfnctl)
Option is used to implement Option Pattern on the client
func WithAutoApprove ¶
WithAutoApprove provides access creating a new client
func WithChangesetName ¶
WithChangesetName provides access creating a new client
func WithOutput ¶
WithOutput provides access creating a new client
func WithStackName ¶
WithStackName provides access creating a new client
func WithSvc ¶
func WithSvc(svc CloudformationAPI) Option
WithSvc provides access creating a new client
func WithTemplateBody ¶
WithTemplateBody provides access creating a new client
func WithTemplatePath ¶
WithTemplatePath provides access creating a new client
func WithVarsFile ¶
WithVarsFile provides access creating a new client