Automatic DNS record removal option
When using the single liner like seen here https://developers.cloudflare.com/cloudflare-one/tutorials/single-command
it would be really nice if there was an extra flag that could be passed to delete the DNS record on exit. Maybe something like --clean so that when the cloudflared execution ends the DNS record is deleted.
This is useful for when you have relatively or very ephemeral tunnels that have unique subdomains.
I'll add that the current solution is to catch SIGTERM and run 2 API calls to delete the record (get record ID from a query, then delete with that ID).
I also imagine some CF side thing would be useful so that even if the process crashes, after some time CF realizes the DNS record for that tunnel is no longer being used and cleans it
@abelinkinbio I don't think so, since we need the subdomains from our DNS and Quick Tunnels does not seem to offer that. It does work in the case that we don't need the subdomains, but we do want the subdomain.
For example we have 2 containers running in a pod in k8s, and with quicktunnels I don't see how one container could ask the cloudflare container what the UUID is? Maybe I could have them share access to the file that cloudflared would write to
No, you're correct. That would be a fair concern here. Updating our CLI library isn't on the immediate roadmap as mentioned in #461, but when we do this will certainly make the cut.