Conversation
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.
There was a problem hiding this comment.
💡 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".
| 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" |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
Adds AWS Route53 as an alternative DNS provider to Cloudflare for the AWS deployment, addressing #2305.
dns_providervariable (cloudflaredefault,route53supported) to make DNS pluggablecount = 0when using Route53)init/is conditionally includedConfiguration
Set in
.envfile:Files changed
iac/provider-aws/variables.tf— newdns_providerandroute53_zone_idvariablesiac/provider-aws/domain.tf— conditional Cloudflare/Route53 resources, shared ACM certiac/provider-aws/main.tf— conditional Cloudflare provider, passdns_providerto initiac/provider-aws/init/— conditional Cloudflare moduleiac/provider-aws/Makefile— pass new env vars.env.aws.template— document new optionsself-host.md— updated prerequisites and setup stepsTest plan
DNS_PROVIDER=route53nomad.<domain>Closes #2305