You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When developers are done with an ECS service that presents a feature branch of the app they are working on, I would like to be able to remove all aspects of that feature branch automatically. At the moment I can do almost everything except for the ECS Task Definitions. It seems it is currently not possible to retrieve a list of revisions of a Task Definition with the Ansible module, nor is it possible to delete them (we can only deregister).
Issue Type
Feature Idea
Component Name
ecs_taskdefinition_info
ecs_taskdefinition
Additional Information
It looks like support for deletion of Task Definitions is pretty new, see:
Then on the manipulation side we need more than the current two status options. We currently have present and absent, but absent really means deregistered, not deleted. I would suggest adding a deleted status so we don't change any existing behaviour. If deleted were an option that called the necessary API method, e.g.
Then it would be possible to achieve deleting all the revisions of a whole Task Definition doing something like this:
# This requires a new 'family' option that returns all task definitions
- name: Get task definition details.community.aws.ecs_taskdefinition_info:
region: eu-west-2profile: my-accountfamily: my-test-featureregister: _task_definition_info# This would already work if we can build a list of ARNs of task definitions, but we can't easily
- name: Deregister task definitions.community.aws.ecs_taskdefinition:
region: eu-west-2profile: my-accountarn: "{{ item }}"containers: []state: absentwith_items: "{{ _task_definition_info.task_definition_arns }}"# This does not exist yet, but can be implemented since the feature release in February 2023
- name: Delete task definitions.community.aws.ecs_taskdefinition:
region: eu-west-2profile: my-accountarn: "{{ item }}"containers: []state: deletedwith_items: "{{ _task_definition_info.task_definition_arns }}"
Code of Conduct
I agree to follow the Ansible Code of Conduct
The text was updated successfully, but these errors were encountered:
Summary
When developers are done with an ECS service that presents a feature branch of the app they are working on, I would like to be able to remove all aspects of that feature branch automatically. At the moment I can do almost everything except for the ECS Task Definitions. It seems it is currently not possible to retrieve a list of revisions of a Task Definition with the Ansible module, nor is it possible to delete them (we can only deregister).
Issue Type
Feature Idea
Component Name
ecs_taskdefinition_info
ecs_taskdefinition
Additional Information
It looks like support for deletion of Task Definitions is pretty new, see:
In order to do this we need two things.
ecs_taskdefinition_info
We need the info module to be able to return all revisions of a Task Definition, not just the latest one. This is possible with the CLI, like so:
So it would be nice if you could ask the ecs_taskdefinition_info module for all the revisions by passing family, e.g.
And if the response contained a list of ARNs of all the Task Definitions in that family, like this:
ecs_taskdefinition
Then on the manipulation side we need more than the current two status options. We currently have
present
andabsent
, butabsent
really means deregistered, not deleted. I would suggest adding adeleted
status so we don't change any existing behaviour. Ifdeleted
were an option that called the necessary API method, e.g.Then it would be possible to achieve deleting all the revisions of a whole Task Definition doing something like this:
Code of Conduct
The text was updated successfully, but these errors were encountered: