NOTES, THOUGHTS, SCRIBBLES

Terraform for Clerk DNS records.

Terraform your Clerk production DNS records into AWS Route53 🌎

route53.tf

Expect to see:

Plan: 5 to add, 0 to change, 0 to destroy.

Hit an error?

Error: creating Route 53 Record: InvalidChangeBatch: [Tried to create resource record set [name='clk._domainkey.[[DOMAIN.COM]].', type='CNAME'] but it already exists]

This is most likely because you’re retroactively attemping to manage preexisting resources created unbeknownst to Terraform.

You'll have to terraform import for each of the records.

~/

If you can afford some potential downtime, manually deleting them and then running terraform apply is a very sane alternative as well. Think of this as allowing Terraform to start from a clean slate.