From 0685dcb8c5d8b76df2b217b93c5fcf0e8807c384 Mon Sep 17 00:00:00 2001
From: Eesaan Atluri <atlurie@uab.edu>
Date: Wed, 15 Jan 2025 00:39:19 -0500
Subject: [PATCH] feat: Add a way to define multiple security groups

Closes https://gitlab.rc.uab.edu/rc/hpc-factory/-/issues/203
---
 .gitlab-ci.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e2956f7..cc90b82 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -309,7 +309,10 @@ deploy_login_node:
       cmd+=" -c id -f value --image $LOGIN_IMAGE_ID"
       cmd+=" --flavor $INSTANCE_FLAVOR"
       cmd+=" --network $INSTANCE_NETWORK"
-      cmd+=" --security-group allow-ssh"
+      for security_group in ${SECURITY_GROUP_LIST[@]};
+      do
+        cmd+=" --security-group $security_group"
+      done
       cmd+=" --user-data user_data.txt"
       if [ -n "$LOGIN_PORT" ];then cmd+=" --port $LOGIN_PORT"; fi
       cmd+=" --wait $LOGIN_INSTANCE_NAME"
-- 
GitLab