Configures an ECS task definition with container settings for inference acceleration.

Terraform Template

resource "aws_ecs_task_definition" "test" {
  container_definitions = <<-EOF
    [
     {
     "cpu": 10,
     "command": ["sleep", "10"],
     "entryPoint": ["/"],
     "environment": [
     {"name": "VARNAME", "value": "VARVAL"}
     ],
     "essential": true,
     "image": "jenkins",
     "memory": 128,
     "name": "jenkins",
     "portMappings": [
     {
     "containerPort": 80,
     "hostPort": 8080
     }
     ],
     "resourceRequirements":[
     {
     "type":"InferenceAccelerator",
     "value":"device_1"
     }
     ]
     }
    ]
    
  EOF
  family = "test"

  inference_accelerator {
    device_name = "device_1"
    device_type = "eia1.medium"
  }
}