Skip to content

infra: clawbench email dns#176

Merged
Perry2004 merged 1 commit into
mainfrom
clawbench-dns
Mar 20, 2026
Merged

infra: clawbench email dns#176
Perry2004 merged 1 commit into
mainfrom
clawbench-dns

Conversation

@Perry2004
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 20, 2026 02:28
@Perry2004 Perry2004 merged commit 5ce06d4 into main Mar 20, 2026
3 of 4 checks passed
@Perry2004 Perry2004 deleted the clawbench-dns branch March 20, 2026 02:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds Route53 DNS infrastructure under the common/dns stack to delegate and configure email-related DNS records for the clawbench.<domain> subdomain.

Changes:

  • Creates a new hosted zone for clawbench.<domain> and delegates it from the parent zone via an NS record.
  • Adds email DNS records in the clawbench subzone for Purelymail (MX, SPF TXT, ownership TXT, DKIM CNAMEs, DMARC).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread common/dns/clawbench.tf
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.
Comment thread common/dns/clawbench.tf
# 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.
Comment thread common/dns/clawbench.tf
zone_id = aws_route53_zone.clawbench_subzone.zone_id
name = ""
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.
Comment thread common/dns/clawbench.tf
# 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.
Comment thread common/dns/clawbench.tf
zone_id = aws_route53_zone.clawbench_subzone.zone_id
name = ""
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.
Comment thread common/dns/clawbench.tf
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.
Comment thread common/dns/clawbench.tf
zone_id = aws_route53_zone.clawbench_subzone.zone_id
name = ""
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.
Comment thread common/dns/clawbench.tf
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.
Comment thread common/dns/clawbench.tf
Comment on lines +75 to +78
type = "CNAME"
ttl = "3600"
records = [
"dmarcroot.purelymail.com."
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.
Comment thread common/dns/clawbench.tf
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants