Question
How to update DNS records? Receiving "Data needs to end with a dot (.)"
doctl compute domain records list do.${ME}.com
ID Type Name Data Priority Port TTL Weight
12345678 CNAME my-domain ... 0 0 1800 0
But:
doctl compute domain records update do.${ME}.com \
--record-id 12345678 \
--record-ttl 43200
Error: PUT https://api.digitalocean.com/v2/domains/do.${ME}.com/records/12345678: 422 Data needs to end with a dot (.)
And:
https://developers.digitalocean.com/documentation/v2/#update-a-domain-record
“Any attribute valid for the record type can be set to a new value for the record.”
And:
curl \
--request PUT \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${TOKEN}" \
--data '{"ttl": 43200}' https://api.digitalocean.com/v2/domains/do.${ME}.com/records/12345678
{"id":"unprocessable_entity","message":"Data needs to end with a dot (.)"}
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
This appears to affect MX record creation via the API as well, but the provided workaround doesn’t work. The response message is, “record name is invalid: must be a fqdn (may contain wildcards)”.