I’m looking at a particular issue. I am trying to import our DNS configuration into terraform using the AWS Route53 resources and I stumbled through a record called like this:
something._likethat.domain.ext. How can I import this to terraform?
I am using the 1.0.7 version with the AWS provider at version 3.59.0. The separator used to mark the hosted zone, the record name and the record type are the same as the special character from my domain. A terraform import attempt would result as follow:
terraform import aws_route53_record.my_record hostedzoneid_something._likethat.domain.ext_TXT aws_route53_record.my_record: Importing from ID "hostedzoneid_something._likethat.domain.ext_TXT"... aws_route53_record.my_record: Import prepared! Prepared aws_route53_record for import aws_route53_record.my_record: Refreshing state... [id=hostedzoneid_something._likethat.domain.ext_TXT] ╷ │ Error: InvalidInput: 1 validation error detected: Value 'likethat.domain.ext' at 'startRecordType' failed to satisfy constraint: Member must satisfy enum value set: [AAAA, A, CAA, NS, SOA, SPF, MX, PTR, CNAME, DS, TXT, SRV, NAPTR] │ status code: 400, request id: xxx
How can I properly import a resource like this?