-
Notifications
You must be signed in to change notification settings - Fork 542
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Currently, ECS tasks that are desired_state=stopped are not being fetched, because when calling AWS API it required to specifically specify when you want to fetch STOPPED/PENDING tasks (without specifying it you only get running tasks)
Expected Behavior
Tasks in STOPPED/PENDING state should also be fetched
CloudQuery (redacted) config
Basic AWS source config with any destination config
Steps To Reproduce
- Create an ECS cluster, service, start a task inside the service and stop it.
- With the most basic AWS source plugin and any destination plugin, you can see it won't be fetched
CloudQuery (redacted) logs
N/A
CloudQuery version
4.2.2
Additional Context
I believe this file should be changed:
https://github.com/cloudquery/cloudquery/blob/main/plugins/source/aws/resources/services/ecs/cluster_tasks.go
Unfortunately I am not strong enough in golang to make proposed change myself but I believe you should add another fetching operation, that will specify the desired_status=stopped/pending when calling the aws api.
See more information here:
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs/client/list_tasks.html
Pull request (optional)
- I can submit a pull request