caddy-dns / route53

Caddy module: dns.providers.route53
MIT License
43 stars 32 forks source link

The region, under DNS-01, is mandatory now #48

Closed it-praktyk closed 2 months ago

it-praktyk commented 5 months ago

Recently I've realized that certificate request those use DNS-01 and the Route53 service fail with the message

{"level":"error","ts":1719576942.1737874,"logger":"tls.obtain","msg":"could not get certificate from issuer","identifier":"my-host.myfakedomain.com","issuer":"acme-v02.api.letsencrypt.org-directory","error":"[my-host.myfakedomain.com] solving challenges: presenting for challenge: adding temporary record for zone \"substitue-subdomain.myfakedomain.com.\": operation error Route 53: ListHostedZonesByName, failed to resolve service endpoint, endpoint rule error, Invalid Configuration: Missing Region (order=https://acme-staging-v02.api.letsencrypt.org/acme/order/118825834/17470847283) (ca=https://acme-staging-v02.api.letsencrypt.org/directory)"}

IMHO, at least, documentation of the plugin should be updated. The region parameter should be marked as the mandatory.

KeisukeYamashita commented 4 months ago

If the region is empty, AFAK, the underlying libdns Route53 provider will read from AWS_REGION environment variable so it's optional to configure it on Caddyfile-level.

Ref: https://github.com/libdns/route53/blob/5afde8b82bff9494c83a6ed5a58c5ca3a6b0b93f/provider.go#L18C62-L18C72