We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc2eccb commit 15f4463Copy full SHA for 15f4463
.github/scripts/validate-deploy.sh
@@ -33,4 +33,14 @@ if ! ibmcloud is vpc "${VPC_ID}"; then
33
exit 1
34
fi
35
36
+echo "Testing security group rules"
37
+ibmcloud is security-groups --output JSON | \
38
+ jq --arg VPC_NAME "${VPC_NAME}" '.[] | select(.vpc.name == $VPC_NAME) | .rules[]'
39
+OPEN_RULES=$(ibmcloud is security-groups --output JSON | jq -c --arg VPC_NAME "${VPC_NAME}" '.[] | select(.vpc.name == $VPC_NAME) | .rules[] | select(.remote.cidr == "0.0.0.0/0")')
40
+if [[ -n "${OPEN_RULES}" ]]; then
41
+ echo "Rules found with public internet address"
42
+ echo "${OPEN_RULES}"
43
+ exit 1
44
+fi
45
+
46
exit 0
0 commit comments