Skip to content

Commit

Permalink
Unable to remove ROSA cluster due to osd-network-verifier SecurityGroup
Browse files Browse the repository at this point in the history
 Closes #841

Signed-off-by: Ryan Emerson <[email protected]>
  • Loading branch information
ryanemerson committed Jun 5, 2024
1 parent 7fac3a6 commit 79df6d5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions provision/aws/rosa_delete_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ if [ -z "$REGION" ]; then echo "Variable REGION needs to be set."; exit 1; fi
./rds/aurora_delete_peering_connection.sh || true
./rosa_efs_delete.sh || true

# Explicitly delete OSD Network Verifier that's sometimes created as it prevents VPC being deleted
OSD_VERIFIER_SG=$(aws ec2 describe-security-groups \
--filters Name=tag:Name,Values=osd-network-verifier \
--filters Name=tag:cluster,Values=${CLUSTER_NAME} \
--query 'SecurityGroups[*].GroupId' \
--region ${REGION} \
--output text)
if [ -n "${OSD_VERIFIER_SG}" ]; then
aws ec2 delete-security-group \
--group-id ${OSD_VERIFIER_SG} \
--region ${REGION} \
--no-cli-pager || true
fi

#Creating Logs directory for each cluster
LOG_DIR="${SCRIPT_DIR}/logs/${CLUSTER_NAME}"
mkdir -p ${LOG_DIR}
Expand Down

0 comments on commit 79df6d5

Please sign in to comment.