simple program to update ips on your CF zones
should be run periodically (e.g. crontab)
go build
shall output ./cloudflare-dynamic-ip-fixer-upper
this program will go through every zone allocated to whatever api token you give it, so generally you should use a scoped token instead of a global one.
Create an API Token
Edit zone DNS template works fine.
Add whatever zones you want this to affect to zone resources
You could do client IP address filtering too, but something tells me if you're using this script you probably don't have the liberty of a static IP :p
Set the TTL for however long you wish.
Create your token and you're good to go :)
copy .env.example and change values
cp .env.example .env
CLOUDFLARE_API_TOKEN
is the token you generated earlier
DOMAINS
is a comma deliminated list of DNS records you want to update
add this to your crontab
this will run every 30 minutes
crontab -e
add this line (replace the directory tho)
30 * * * * cd /home/phillip/cloudflare-dynamic-ip-fixer-upper && ./cloudflare-dynamic-ip-fixer-upper