mirror of https://github.com/docker/compose.git
Detect stack already exists
This will later be used to switch to ChangeSet logic Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
0972776e6d
commit
87f053d710
|
@ -14,7 +14,6 @@ import (
|
|||
|
||||
func (c client) Convert(project *compose.Project, loadBalancerArn *string) (*cloudformation.Template, error) {
|
||||
template := cloudformation.NewTemplate()
|
||||
|
||||
vpc, err := c.GetDefaultVPC()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -10,6 +10,16 @@ import (
|
|||
)
|
||||
|
||||
func (c *client) ComposeUp(project *compose.Project, loadBalancerArn *string) error {
|
||||
stacks, err := c.CF.DescribeStacks(&cloudformation.DescribeStacksInput{
|
||||
StackName: aws.String(project.Name),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(stacks.Stacks) > 0 {
|
||||
return fmt.Errorf("we do not (yet) support updating an existing CloudFormation stack")
|
||||
}
|
||||
|
||||
template, err := c.Convert(project, loadBalancerArn)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue