Skip to content

Commit 05340a0

Browse files
committed
fix: Fixing scw allow
Signed-off-by: Vincent Boutour <bob@vibioh.fr>
1 parent 5709b0b commit 05340a0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

functions/scw

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ scw_allow_ip() {
77
shift 1 || true
88

99
http_init_client
10-
http_request "https://ifconfig.co/ip"
10+
http_request -4 "https://ifconfig.co/ip"
1111
if [[ ${HTTP_STATUS} != "200" ]]; then
1212
http_handle_error "Unable to get public IP"
1313
return 1
1414
fi
1515

16-
http_init_client --header "X-Auth-Token: $(pass_get "dev/scaleway" "secret_key")" -4
17-
1816
local PUBLIC_IP
1917
PUBLIC_IP="$(cat "${HTTP_OUTPUT}")"
2018

2119
printf "Public IP is %s\n" "${PUBLIC_IP}"
2220

21+
http_init_client --header "X-Auth-Token: $(pass_get "dev/scaleway" "secret_key")"
22+
2323
http_request "https://api.scaleway.com/instance/v1/zones/${ZONE}/security_groups/"
2424
if [[ ${HTTP_STATUS} != "200" ]]; then
2525
http_handle_error "Unable to find security group id"

0 commit comments

Comments
 (0)