Bryce Codell
07/11/2023, 5:48 PMHow do I specify which subnet and security group should be applied to ECS Tasks spun up by an ECS Worker? In Prefect 1 we were able to include that in the definition for our ECS Agent, but those settings aren’t being applied to ECS tasks spun up by our Prefect 2 Worker. We’re using Terraform to deploy the Worker (and were using Terraform for our Prefect 1 ECS Agent too)
Pedro Machado
07/25/2023, 5:22 AMBryce Codell
07/26/2023, 2:38 AM"task_run_request": {
"tags": "{{ labels }}",
"cluster": "{{ cluster }}",
"overrides": {
"cpu": "{{ cpu }}",
"memory": "{{ memory }}",
"taskRoleArn": "{{ task_role_arn }}",
"containerOverrides": [
{
"cpu": "{{ cpu }}",
"name": "{{ container_name }}",
"memory": "{{ memory }}",
"command": "{{ command }}",
"environment": "{{ env }}"
}
]
},
"launchType": "{{ launch_type }}",
"taskDefinition": "{{ task_definition_arn }}",
"networkConfiguration": {
"awsvpcConfiguration": {
"subnets": [
"subnet-1",
"subnet-2",
"subnet-3"
],
"assignPublicIp": "DISABLED",
"securityGroups": [
"sg-1",
"sg-2"
]
}
}
},
Pedro Machado
07/26/2023, 4:44 AM