From 79f144649cbde2d19fb732948ec14da195870f0a Mon Sep 17 00:00:00 2001 From: Dillon Scott <67511512+dillydally414@users.noreply.github.com> Date: Wed, 29 Nov 2023 01:21:47 -0500 Subject: [PATCH 1/2] propagate tags in run-task --- infrastructure/aws/run-task | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/aws/run-task b/infrastructure/aws/run-task index a1140cc0..50f90ecf 100755 --- a/infrastructure/aws/run-task +++ b/infrastructure/aws/run-task @@ -19,4 +19,4 @@ echo "Running one-off task on $CLUSTER cluster with command: $2" NETCONFIG=$(aws ecs describe-services --cluster $CLUSTER --services $SERVICE_WEB --output json | jq '.services[0].networkConfiguration' | jq '.awsvpcConfiguration.assignPublicIp = "DISABLED"') OVERRIDES=$(printf '{"containerOverrides":[{"name":"%s","command":["%s"]}]}' "$TASK" $(join_by '","' $2)) -aws ecs run-task --overrides "$OVERRIDES" --started-by "one-off task CLI" --group "one-off" --launch-type "FARGATE" --network-configuration "$NETCONFIG" --task-definition $TASK_WEB --cluster $CLUSTER --output json +aws ecs run-task --overrides "$OVERRIDES" --started-by "one-off task CLI" --group "one-off" --launch-type "FARGATE" --network-configuration "$NETCONFIG" --tags '[{"key": "team", "value": "searchneu"}]' --propagate-tags "TASK_DEFINITION" --task-definition $TASK_WEB --cluster $CLUSTER --output json From 66e8c5e859b3d359b7b8b6b72c5c6f1ef26e3bc4 Mon Sep 17 00:00:00 2001 From: Dillon Scott <67511512+dillydally414@users.noreply.github.com> Date: Wed, 29 Nov 2023 01:22:39 -0500 Subject: [PATCH 2/2] propagate tags in scrape task --- infrastructure/aws/scrape | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/aws/scrape b/infrastructure/aws/scrape index 82134ea6..54278188 100755 --- a/infrastructure/aws/scrape +++ b/infrastructure/aws/scrape @@ -17,4 +17,4 @@ echo "Scraping on $CLUSTER cluster" # Get the network config from the web app service NETCONFIG=$(aws ecs describe-services --cluster $CLUSTER --services $SERVICE_WEB --output json | jq '.services[0].networkConfiguration' | jq '.awsvpcConfiguration.assignPublicIp = "ENABLED"') -aws ecs run-task --started-by "CLI scrape" --launch-type "FARGATE" --network-configuration "$NETCONFIG" --task-definition $TASK --cluster $CLUSTER --output json +aws ecs run-task --started-by "CLI scrape" --launch-type "FARGATE" --network-configuration "$NETCONFIG" --tags '[{"key": "team", "value": "searchneu"}]' --propagate-tags "TASK_DEFINITION" --task-definition $TASK --cluster $CLUSTER --output json