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
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Tell us about your request
What do you want us to build?
In the AWS console for the task definitions, when on the JSON tab, there is a button called "Download AWS CLI input". The downloaded json file looks different from when I run the corresponding AWS cli command to describe the task definition:
To be able to deploy a task definition via Github actions, the task definition json needs to look like what is being produced by the UI Button.
Hence the aws ecs describe-task-definition should be able to download the exact same json file.
Which service(s) is this request for?
ECS
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
Our task definition gets created via terraform including tags. The task definition then ultimately gets updated by a Github workflow when a new build of an image is available. We are following the workflow here: https://github.com/aws-actions/amazon-ecs-deploy-task-definition#task-definition-file (i.e. download the current task definition, render it with the newly built image tag, sanitize it, deploy it again).
However, after a deployment has happened, the task definition being deployed and the one being generated by terraform, differ and hence on the next terraform run, it wants to update the task definition again. This is because the task definition that is being downloaded by aws ecs describe-task-definition comes without tags. Even using the following the json looks different:
Only partly, with a lot of steps in a custom github action to download and "sanitize" the downloaded task definition, but we're still not being able to upload the tags again.
@anitakrueger would you be able to provide example of terraform code you have that generates TD. So I understand correctly, that you use Terraform to create TD AWS resource, but then run ecs-deploy-task-definition action to trigger deployment (is it update on the service?)
@genbit : I think the demand is clear enough. If you click on the "Download AWS CLI input" button in the AWS console you get a task JSON file, if you lake the same request with "aws ecs describe-task-definition" you get a different file.
Please provide a command to get the same file or fix the "aws ecs describe-task-definition" to reflect the console button.
Community Note
Tell us about your request
What do you want us to build?
In the AWS console for the task definitions, when on the JSON tab, there is a button called "Download AWS CLI input". The downloaded json file looks different from when I run the corresponding AWS cli command to describe the task definition:
To be able to deploy a task definition via Github actions, the task definition json needs to look like what is being produced by the UI Button.
Hence the
aws ecs describe-task-definition
should be able to download the exact same json file.Which service(s) is this request for?
ECS
Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?
Our task definition gets created via terraform including tags. The task definition then ultimately gets updated by a Github workflow when a new build of an image is available. We are following the workflow here: https://github.com/aws-actions/amazon-ecs-deploy-task-definition#task-definition-file (i.e. download the current task definition, render it with the newly built image tag, sanitize it, deploy it again).
However, after a deployment has happened, the task definition being deployed and the one being generated by terraform, differ and hence on the next terraform run, it wants to update the task definition again. This is because the task definition that is being downloaded by
aws ecs describe-task-definition
comes without tags. Even using the following the json looks different:Are you currently working around this issue?
Only partly, with a lot of steps in a custom github action to download and "sanitize" the downloaded task definition, but we're still not being able to upload the tags again.
This is still missing the tags though because they are on the same level as the taskDefinition dictionary in the json file.
The text was updated successfully, but these errors were encountered: