Skip to content

Support AWS Route53 DNS provider#2392

Open
Nofar-Sin wants to merge 2 commits intoe2b-dev:mainfrom
Nofar-Sin:feat/route53-dns-provider
Open

Support AWS Route53 DNS provider#2392
Nofar-Sin wants to merge 2 commits intoe2b-dev:mainfrom
Nofar-Sin:feat/route53-dns-provider

Conversation

@Nofar-Sin
Copy link
Copy Markdown

@Nofar-Sin Nofar-Sin commented Apr 14, 2026

Summary

Adds AWS Route53 as an alternative DNS provider to Cloudflare for the AWS deployment, addressing #2305.

  • Introduces dns_provider variable (cloudflare default, route53 supported) to make DNS pluggable
  • All Cloudflare resources become conditional (count = 0 when using Route53)
  • Adds Route53 equivalents: zone lookup, ACM cert validation records, wildcard CNAME routing
  • Cloudflare module in init/ is conditionally included
  • No breaking changes — existing Cloudflare deployments work unchanged

Configuration

Set in .env file:

DNS_PROVIDER=route53
ROUTE53_ZONE_ID=<your-hosted-zone-id>

Files changed

  • iac/provider-aws/variables.tf — new dns_provider and route53_zone_id variables
  • iac/provider-aws/domain.tf — conditional Cloudflare/Route53 resources, shared ACM cert
  • iac/provider-aws/main.tf — conditional Cloudflare provider, pass dns_provider to init
  • iac/provider-aws/init/ — conditional Cloudflare module
  • iac/provider-aws/Makefile — pass new env vars
  • .env.aws.template — document new options
  • self-host.md — updated prerequisites and setup steps

Test plan

  • Deployed full e2b stack on AWS with DNS_PROVIDER=route53
  • Route53 delegated subdomain zone resolves correctly
  • ACM wildcard certificate issued and validated via Route53 DNS
  • ALB serves HTTPS with valid cert
  • Nomad cluster accessible via nomad.<domain>
  • All Nomad jobs deployed successfully
  • Verify existing Cloudflare deployments are unaffected (default behavior)

Closes #2305

Nofar Sinder and others added 2 commits April 14, 2026 18:48
Allow self-hosters to use AWS Route53 instead of Cloudflare for DNS
management by introducing a `dns_provider` variable. This removes
Cloudflare as a hard dependency for AWS deployments.

Set DNS_PROVIDER=route53 and ROUTE53_ZONE_ID in your .env file to use it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ute53

Terraform validates the Cloudflare provider config even when no Cloudflare
resources are created. Use a 40-char dummy token to pass validation.
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5608007c3c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread iac/provider-aws/main.tf
api_token = module.init.cloudflare.token
# When not using Cloudflare, provide a syntactically valid dummy token.
# No Cloudflare resources are created (all have count=0), but Terraform still validates the provider config.
api_token = var.dns_provider == "cloudflare" ? module.init.cloudflare[0].token : "0000000000000000000000000000000000000000"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Read Cloudflare token from nested module output

When dns_provider is cloudflare (the default), this expression dereferences module.init.cloudflare[0].token, but module.init.cloudflare is now a list of module.cloudflare instances (from init/outputs.tf), where the token is nested under the cloudflare output. In that mode Terraform will fail resolving this attribute (unsupported attribute), blocking plan/apply on the default path.

Useful? React with 👍 / 👎.

@sitole sitole assigned sitole and unassigned ValentaTomas Apr 15, 2026
@sitole sitole self-requested a review April 15, 2026 09:19
@sitole sitole changed the title Feat/route53 dns provider Support AWS Route53 DNS provider Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Route53 instead of Coudflare provider

3 participants