The DigitalOcean metadata endpoint for reserved/floating IPv4 is
/metadata/v1/{reserved,floating}_ip/ipv4/ip_address, not .../address.
The .../active check works but the wrong IP path returned an empty
body, causing the script to silently fall through to ipify on every
droplet with a reserved/floating IP attached.
Verified on a droplet:
curl .../reserved_ip/ipv4/ip_address -> 45.55.111.240
curl .../reserved_ip/ipv4/address -> (empty)
856 B
Executable File
856 B
Executable File