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

[Enhancement]: Expose container definitions as lists on ECS Task Definitions #35856

Open
PeterBocan opened this issue Feb 16, 2024 · 1 comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ecs Issues and PRs that pertain to the ecs service.

Comments

@PeterBocan
Copy link

PeterBocan commented Feb 16, 2024

Description

Currently, the AWS ECS Task Definition resource source does not expose container definitions as lists. On top if, the AWS ECS Task Definition Data resource does not expose the container definition either.

This makes it hard to work with the task definitions in Terraform. It is impossible to exclude changes which may occur in one of the container definitions. The current support of an opaque JSON document does not suit us with the further integration.

The task definition data source does not expose the container definitions either. This makes it non-trivial to keep it up-to-date with changes that are done in separate CI/CD pipelines via aws CLI.

Affected Resource(s) and/or Data Source(s)

  • aws_ecs_task_definition
  • data.aws_ecs_task_definition

Potential Terraform Configuration

resource "aws_ecs_task_definition" "task_definitions" {

  family             = "family"
  network_mode       = "awsvpc"
  execution_role_arn = "..."
  task_role_arn      = "..."

  // exposes container definitions as a list of objects, instead of the OPAQUE string
  container_definitions = [
     {
         name: "main", 
         image: "...",
      }
   ]
}

data  "aws_ecs_task_definition" "task_definition" {
    family = "my-task"
    // exposes container definitions as a list of objects instead. Currently the field is missing.

}

References

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecs_task_definition
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ecs_task_definition

Would you like to implement a fix?

No

@PeterBocan PeterBocan added the enhancement Requests to existing resources that expand the functionality or scope. label Feb 16, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/ecs Issues and PRs that pertain to the ecs service. label Feb 16, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 16, 2024
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ecs Issues and PRs that pertain to the ecs service.
Projects
None yet
Development

No branches or pull requests

2 participants