We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5709b0b commit 05340a0Copy full SHA for 05340a0
1 file changed
functions/scw
@@ -7,19 +7,19 @@ scw_allow_ip() {
7
shift 1 || true
8
9
http_init_client
10
- http_request "https://ifconfig.co/ip"
+ http_request -4 "https://ifconfig.co/ip"
11
if [[ ${HTTP_STATUS} != "200" ]]; then
12
http_handle_error "Unable to get public IP"
13
return 1
14
fi
15
16
- http_init_client --header "X-Auth-Token: $(pass_get "dev/scaleway" "secret_key")" -4
17
-
18
local PUBLIC_IP
19
PUBLIC_IP="$(cat "${HTTP_OUTPUT}")"
20
21
printf "Public IP is %s\n" "${PUBLIC_IP}"
22
+ http_init_client --header "X-Auth-Token: $(pass_get "dev/scaleway" "secret_key")"
+
23
http_request "https://api.scaleway.com/instance/v1/zones/${ZONE}/security_groups/"
24
25
http_handle_error "Unable to find security group id"
0 commit comments