Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bug: <AWS ECS Tasks not fetching tasks with STOPPED desired_status> #11981

@Eitan1112

Description

@Eitan1112

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

  1. Create an ECS cluster, service, start a task inside the service and stop it.
  2. 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions