aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

DescribeStacks should provide a regex filter

Open
#578 0 comments 10 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

## 1. Title
Currently, the DescribeStacks API offers one way to filter stacks - by stack name. It would be nice for the API to support a regex filter - where we could ask for all stack names that match a certain regular expression, instead of an exact match. Something like describe-stacks --stack-name mytest*. If not full regex support we would also be quite happy with a "startsWith" type filter that returns all stacks that start with a particular string.
We are hoping that the title makes it easy for others to scan it quickly in kanban board or issue list.

## 2. Scope of request
describe-stacks API call

## 3. Expected behavior
We're currently using the describeStacks API endpoint in several places in our deployment workflow. Our stacks are named after the github repos they're created from (e.g. {repoName}-{environment}, where environment could be 'testing', 'staging' 'production' etc.). So, to list stacks associated with a repo, we typically retrieve all the stacks that are deployed in all our accounts and then filter them in memory to return stacks that start with {repoName}. It would be nice if this filtering could be done by the API endpoint itself so we don't have to maintain/optimize infrastructure to do the filtering.

## 4. Suggest specific test cases

If someone runs 'describe-stacks --stack-name myrepo*', it should works for any stack whose name begins with the word 'myrepo' such as myrepo-prod, myrepo-dev etc.

## 5. Helpful Links to speed up research and evaluation

N/A

Contributor guide

Open the contributing guide

Research direction

Begin with the DescribeStacks API request and the `describe-stacks --stack-name` example in this issue. Determine whether the endpoint should support regex matching or a startsWith filter, then verify that a request for `myrepo*` returns stacks such as `myrepo-prod` and `myrepo-dev` without requiring client-side filtering.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
api, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.