list stacks by project name for ecs

Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
aiordache 2020-09-07 14:59:02 +02:00
parent 3ed90ea467
commit 66c92595e5
1 changed files with 5 additions and 1 deletions

View File

@ -303,7 +303,11 @@ func (s sdk) GetStackID(ctx context.Context, name string) (string, error) {
}
func (s sdk) ListStacks(ctx context.Context, name string) ([]compose.Stack, error) {
cfStacks, err := s.CF.DescribeStacksWithContext(ctx, &cloudformation.DescribeStacksInput{})
params := cloudformation.DescribeStacksInput{}
if name != "" {
params.StackName = &name
}
cfStacks, err := s.CF.DescribeStacksWithContext(ctx, &params)
if err != nil {
return nil, err
}