external-dns icon indicating copy to clipboard operation
external-dns copied to clipboard

Cannot create TXT records (AWS Zones)

Open timothyclarke opened this issue 1 year ago • 0 comments
trafficstars

https://github.com/kubernetes-sigs/external-dns/blob/master/docs/sources/txt-record.md indicates that TXT records are only for digitalocean zones, however simple TXT records are already being used in other environments for state so I consider this a bug rather than a feature request

What happened: Errors in logs and when attempting to create a TXT record

Failure in zone <zone> when submitting change batch: InvalidChangeBatch: [Invalid Resource Record: ' 'FATAL problem: InvalidCharacterString (Value should be enclosed in quotation marks) encountered with '<value>'']\n\tstatus code: 400, request id: <UUID>" profile=default zoneID=/hostedzone/<Zone ID> zoneName=<zone name>

What you expected to happen: TXT record successfully created

How to reproduce it (as minimally and precisely as possible): Ensure the cli arg --managed-record-types TXT is provided (You'll also need three additional args with A, AAAA and CNAME to ensure backwards compatibility if testing in pre-existing zones)

Create a resource similar to the following for an AWS hosted zone

apiVersion: externaldns.k8s.io/v1alpha1
kind: DNSEndpoint
metadata:
  name: examplednsrecord-txt
spec:
  endpoints:
  - dnsName: txt.example.com
    recordTTL: 180
    recordType: txt
    targets:
    - example-string

Anything else we need to know?:

Environment:

  • External-DNS version (use external-dns --version): container bitnami/external-dns:0.15.0-debian-12-r2
  • DNS provider: AWS (Route53)
  • Others:

This issue is referenced in

  • https://github.com/kubernetes-sigs/external-dns/issues/3979 which was resolved without addressing the TXT issue. Note that issue stated that quotes weren't the problem but a trailing '.'

Note I am trying to create a VPC enpoint DNS entry so my target contains a colon : and is mixed case alpha numeric eg vpce:abC1234. however when I use a target of vpce-aBc1234 I get the same error

timothyclarke avatar Oct 07 '24 12:10 timothyclarke