Datasource aws_ecs_task_definition should be able to query inside container definitions. #527
Labels
enhancement
Requests to existing resources that expand the functionality or scope.
service/ecs
Issues and PRs that pertain to the ecs service.
stale
Old or inactive issues managed by automation, if no further action taken these will get closed.
This issue was originally opened by @maartenvanderhoef as hashicorp/terraform#11907. It was migrated here as part of the provider split. The original body of the issue is below.
Hi Everyone,
Feature request regarding the latest added datasource: aws_ecs_task_definition. I think it would be an advantage to be able to query the inside of the container definitions, especially retrieving the docker image-path through the datasource aws_ecs_task_definition would be extremely practical to be able to make changes to the task_definition without having to input the current image defined in the task_definition.
This would make it easier to deploy to ECS without terraform and meanwhile keep using TF for changes to the task_definition.
Adding to that having a data source for the aws_ecs_service would be helpful to get the desired_count of the current active aws_ecs_service or make the desired_count optional as described in hashicorp/terraform#9690
With a setup as describe below I can use different tools for docker image deployment and still use Terraform for modifications to the task definition (memory, cpu, etc. ). When applying
those modifications the current running docker image is being used freeing me of inputting the current running running image which looks closer like
12345.dkr.ecr.us-east-1.amazonaws.com/myapp:201702-97cd14affc2f0dc965813929dfeb9cef60a308a2 than mongo:latest.
The text was updated successfully, but these errors were encountered: