Today I Learned

Creating DNS record for current origin in AWS Route53

Raw DNS zone:

@ 3600   IN   MX  1 aspmx.l.google.com.
@ 3600   IN   MX  10  aspmx2.googlemail.com.
@ 3600   IN   MX  10  aspmx3.googlemail.com.
@ 3600   IN   MX  5 alt1.aspmx.l.google.com.
@ 3600   IN   MX  5 alt2.aspmx.l.google.com.

From rfc1035:

A free standing @ is used to denote the current origin.

when using Terraform just leave the name blank:

resource "aws_route53_record" "google_mail_mx" {
  zone_id = aws_route53_zone.primary.zone_id
  name    = "" # 
  type    = "MX"
  ttl     = 3600

  records = [
    "1 aspmx.l.google.com.",
    "5 alt1.aspmx.l.google.com.",
    "5 alt2.aspmx.l.google.com.",
    "10 aspmx2.googlemail.com.",
    "10 aspmx3.googlemail.com."
  ]
}