Closed mtricht closed 4 years ago
Same issue here.
How can this error be reproduced?
@mholt Minimal docker image with DO module:
FROM caddy:2-builder AS builder
RUN caddy-builder \
github.com/caddy-dns/digitalocean
FROM caddy:2-alpine
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
Minimal caddyfile:
*.example.com {
tls {
dns digitalocean {token}
}
}
Oh, you're using Caddy. These libraries are independent of any web server. This should probably be moved to caddy-dns/digitalocean.
Actually we can probably work around the problem here. Caddy uses FQDNs with the DNS provider APIs, but apparently DigitalOcean doesn't support them. I think that's stupid -- if that's the case, they should just ignore any .
at the end if present -- but we can do that here too, I guess: strings.TrimSuffix(domain, ".")
or something.
The following API call is made to DO:
POST https://api.digitalocean.com/v2/domains/example.com./records
returning404 The resource you were accessing could not be found.
. There should be no dot at the end of the domain as documented here: https://developers.digitalocean.com/documentation/v2/#update-a-domain-record