Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download tags and cleanup unneeded properties from downloaded task definition #317

Open
FISHMANPET opened this issue Aug 7, 2024 · 3 comments · May be fixed by #325
Open

Download tags and cleanup unneeded properties from downloaded task definition #317

FISHMANPET opened this issue Aug 7, 2024 · 3 comments · May be fixed by #325
Labels
feature-request A feature should be added or improved.

Comments

@FISHMANPET
Copy link

After the changes in #311, the action now has the ability to download the existing task definition from AWS. However it doesn't include the existing tags on the image, and it also includes a number of unneeded properties that are returned by AWS but aren't used by the amazon-ecs-deploy-task-definition action, and their presence in the task definition generates a number of warnings.

Since these two actions are clearly intended to work together, I think that it would make sense to also include the tags in the downloaded task definition file, and to remove any unneeded properties before writing the task definition to disk.

@sweMezza
Copy link

sweMezza commented Sep 6, 2024

We're facing the same problem, this would be awesome to have fixed.

Our case:

  1. We have tags on the task definitions (tags on all resources as part of our IaC)
  2. As part of our Github Actions workflow, new container images are being built, pushed to ECR and the task definition updated.
  3. The tags for the task definition are gone, even after trying the new propagate tags feature.

@anitakrueger
Copy link

We have had this same problem for a couple of years now and are using a custom composite action to download the task definition including tags. It does look like though the v3 ecs client can do this with the correct inputs:
https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ecs/command/DescribeTaskDefinitionCommand/

const input = { // DescribeTaskDefinitionRequest
  taskDefinition: "STRING_VALUE", // required
  include: [ // TaskDefinitionFieldList
    "TAGS",
  ],
};

It'll have to be added somewhere in the params here: https://github.com/shesaave/amazon-ecs-render-task-definition/blob/master/index.js#L61

@karanbokil
Copy link

I do believe this is being worked on in #325

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants