From 0ffa2b2d1b81a6789aa47921a6f0d6a3421297d0 Mon Sep 17 00:00:00 2001 From: Fabio Ramos Date: Thu, 24 Jun 2021 19:33:48 +1000 Subject: [PATCH] Added security groups variable to FARGATE task --- src/run-task.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/run-task.sh b/src/run-task.sh index eb1ae78..5d7139e 100755 --- a/src/run-task.sh +++ b/src/run-task.sh @@ -37,7 +37,7 @@ if [[ "$SERVICE_TYPE" == "FARGATE" ]]; then TASK_ID=$(aws ecs run-task \ --cluster $CLUSTER_NAME \ --task-definition $TASK_ARN \ - --network-configuration "awsvpcConfiguration={subnets=[${SUBNETS}]}" \ + --network-configuration "awsvpcConfiguration={subnets=[${SUBNETS}],securityGroups=[${SECURITY_GROUPS}]}" \ --launch-type FARGATE \ --query="tasks[0].taskArn" \ --output=text)