Manage CloudFlare DNS records with Terraform Cloudflare provider.
-
Initialize Terraform with providers
terraform init
-
Setup credentials
export CLOUDFLARE_EMAIL=your.email@domain.tld export CLOUDFLARE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-
Apply
terraform apply
- Idempotency fails: Terraform DNS provider aggregates multiple entries to
record sets after apply. Need to refactor
records.yml
structure to work with IP sets. - Issue with record ordering in
records.yml
. Inserting or deleting records cause changes to previous records. - Terraform DNS provider does not support
@
(apex entries), nor zone root FQDNs for A, records (provider bug). - Remove secrets from DNS provider - setup variables and a
.tfvars
file. - TODO: PTR, TXT records