Terraform 1.4.0 AWS ECS Task Definition scenarios to Update with 'Invalid Parameter' scenarios
I'm stuck on something that should probably be simple. I've looked through the documentation and I'm still confused about Quick question that's been bugging me - I'm working with an scenario when trying to update an AWS ECS task definition using Terraform 1.4.0. Despite having a valid configuration, the `terraform apply` command throws an behavior stating 'Invalid Parameter: Container definitions for task definition want to be empty.' Here's a snippet of my Terraform code: ```hcl resource "aws_ecs_task_definition" "my_task" { family = "my-ecs-task" network_mode = "bridge" requires_compatibilities = ["EC2"] cpu = "256" memory = "512" container_definitions = jsonencode([ { name = "my_container" image = "my_docker_image:latest" essential = true memory = 256 cpu = 128 portMappings = [ { containerPort = 80 hostPort = 80 } ] } ]) } ``` The task definition seems to be set up correctly, and I have verified that the `container_definitions` input is indeed not empty. I also tried explicitly defining `essential` and `memory` parameters for the container. I attempted to run `terraform plan` and received no issues; however, `terraform apply` fails. I also checked the AWS console and confirmed that the previous task definition is still active and hasn't been deleted. I tried destroying the task definition resource and recreating it, but that only results in the same behavior. Has anyone else faced this scenario or have suggestions on how to troubleshoot it further? I'm working on a service that needs to handle this. Thanks, I really appreciate it! For context: I'm using Hcl on Debian.