Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions common/dns/clawbench.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
resource "aws_route53_zone" "clawbench_subzone" {
name = "clawbench.${var.domain_name}"
}

resource "aws_route53_record" "clawbench_ns" {
zone_id = aws_route53_zone.perryz_net_zone.zone_id
name = "clawbench.${var.domain_name}"
type = "NS"
ttl = "300"
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ttl is set as a quoted string. The aws_route53_record.ttl argument is a number, so this will fail type-checking during terraform plan/apply. Use an unquoted numeric literal (e.g., 300).

Copilot uses AI. Check for mistakes.
records = aws_route53_zone.clawbench_subzone.name_servers
}

# MX Record
resource "aws_route53_record" "clawbench_mx" {
zone_id = aws_route53_zone.clawbench_subzone.zone_id
name = ""
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name = "" is not a valid record name for Route53 records. For apex records in the hosted zone, set name to the zone name (e.g., aws_route53_zone.clawbench_subzone.name) or the explicit FQDN; leaving it empty will typically be rejected by the provider/AWS API.

Copilot uses AI. Check for mistakes.
type = "MX"
ttl = "3600"
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ttl is set as a quoted string. The aws_route53_record.ttl argument is a number, so this will fail type-checking during terraform plan/apply. Use an unquoted numeric literal (e.g., 3600).

Copilot uses AI. Check for mistakes.
records = [
"10 mailserver.purelymail.com."
]
}

# TXT / SPF Record
resource "aws_route53_record" "clawbench_spf" {
zone_id = aws_route53_zone.clawbench_subzone.zone_id
name = ""
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name = "" is not a valid record name for Route53 records. For apex records in the hosted zone, set name to the zone name (e.g., aws_route53_zone.clawbench_subzone.name) or the explicit FQDN.

Copilot uses AI. Check for mistakes.
type = "TXT"
ttl = "3600"
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ttl is set as a quoted string. The aws_route53_record.ttl argument is a number, so this will fail type-checking during terraform plan/apply. Use an unquoted numeric literal (e.g., 3600).

Copilot uses AI. Check for mistakes.
records = [
"v=spf1 include:_spf.purelymail.com ~all"
]
}

# Ownership TXT Record
resource "aws_route53_record" "clawbench_ownership" {
zone_id = aws_route53_zone.clawbench_subzone.zone_id
name = ""
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name = "" is not a valid record name for Route53 records. For apex records in the hosted zone, set name to the zone name (e.g., aws_route53_zone.clawbench_subzone.name) or the explicit FQDN.

Copilot uses AI. Check for mistakes.
type = "TXT"
ttl = "3600"
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ttl is set as a quoted string. The aws_route53_record.ttl argument is a number, so this will fail type-checking during terraform plan/apply. Use an unquoted numeric literal (e.g., 3600).

Copilot uses AI. Check for mistakes.
records = [
"purelymail_ownership_proof=05ebc6732a9fdf83aaac36fac2bfc3df55b2c5c3a698f16e89086d610c7265e2777f2982e1646833e0eca00f6835ad74dc00b98fde13c4b6e7ab16d4c29032aa"
]
}

# DKIM Records
resource "aws_route53_record" "clawbench_dkim_1" {
zone_id = aws_route53_zone.clawbench_subzone.zone_id
name = "purelymail1._domainkey"
type = "CNAME"
ttl = "3600"
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ttl is set as a quoted string. The aws_route53_record.ttl argument is a number, so this will fail type-checking during terraform plan/apply. Use an unquoted numeric literal (e.g., 3600).

Copilot uses AI. Check for mistakes.
records = ["key1.dkimroot.purelymail.com."]
}

resource "aws_route53_record" "clawbench_dkim_2" {
zone_id = aws_route53_zone.clawbench_subzone.zone_id
name = "purelymail2._domainkey"
type = "CNAME"
ttl = "3600"
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ttl is set as a quoted string. The aws_route53_record.ttl argument is a number, so this will fail type-checking during terraform plan/apply. Use an unquoted numeric literal (e.g., 3600).

Copilot uses AI. Check for mistakes.
records = ["key2.dkimroot.purelymail.com."]
}

resource "aws_route53_record" "clawbench_dkim_3" {
zone_id = aws_route53_zone.clawbench_subzone.zone_id
name = "purelymail3._domainkey"
type = "CNAME"
ttl = "3600"
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ttl is set as a quoted string. The aws_route53_record.ttl argument is a number, so this will fail type-checking during terraform plan/apply. Use an unquoted numeric literal (e.g., 3600).

Copilot uses AI. Check for mistakes.
records = ["key3.dkimroot.purelymail.com."]
}

# DMARC Record
resource "aws_route53_record" "clawbench_dmarc" {
zone_id = aws_route53_zone.clawbench_subzone.zone_id
name = "_dmarc"
type = "CNAME"
ttl = "3600"
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ttl is set as a quoted string here. The aws_route53_record.ttl argument is a number, so this will fail type-checking during terraform plan/apply. Use an unquoted numeric literal (e.g., 3600).

Copilot uses AI. Check for mistakes.
records = [
"dmarcroot.purelymail.com."
Comment on lines +75 to +78
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DMARC is typically published as a TXT record at _dmarc.<domain>. Using type = "CNAME" here may not be honored by all DMARC evaluators and diverges from the existing DMARC TXT pattern in this repo (e.g., apps/cloud-chat-app/usw2dev/dns.tf). Consider switching this to a TXT record (or otherwise confirm the email provider’s required DNS format).

Suggested change
type = "CNAME"
ttl = "3600"
records = [
"dmarcroot.purelymail.com."
type = "TXT"
ttl = "3600"
records = [
"v=DMARC1; p=none; rua=mailto:postmaster@clawbench.${var.domain_name}"

Copilot uses AI. Check for mistakes.
]
}
Loading