From 66c92595e5d21edae8f3ffc2e6f52316cecc40c6 Mon Sep 17 00:00:00 2001 From: aiordache Date: Mon, 7 Sep 2020 14:59:02 +0200 Subject: [PATCH] list stacks by project name for ecs Signed-off-by: aiordache --- ecs/sdk.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ecs/sdk.go b/ecs/sdk.go index 0833f97f5..e11ac7097 100644 --- a/ecs/sdk.go +++ b/ecs/sdk.go @@ -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, ¶ms) if err != nil { return nil, err }