Introducing PostScale -- email API for transactional, inbound, and masked addresses. PostScale

    Introducing the DNScale Terraform Provider: DNS as Code

    Published on January 07, 2026

    Manage your DNS infrastructure with Terraform. Automate zone creation, record management, and DNSSEC configuration with a single terraform apply.

    Have you ever wished managing DNS was as easy as terraform apply? Now it is.

    We're excited to announce the official DNScale Terraform Provider, now available on the HashiCorp Terraform Registry. This release brings full Infrastructure as Code capabilities to your DNS management, letting you define zones, records, and DNSSEC configuration alongside the rest of your infrastructure.

    Why Terraform for DNS?

    DNS is often the forgotten piece of infrastructure automation. Teams spend hours perfecting their CI/CD pipelines, containerizing applications, and codifying cloud resources, only to manage DNS through point-and-click web interfaces or ad-hoc API scripts.

    The DNScale Terraform Provider changes that. Now you can:

    • Version control your DNS - Track every change in Git, review modifications through pull requests
    • Automate deployments - Spin up environments complete with DNS configuration in minutes
    • Ensure consistency - Use the same DNS patterns across development, staging, and production
    • Reduce human error - Let Terraform handle the details, catch mistakes before they go live
    • Document implicitly - Your Terraform files become living documentation of your DNS setup

    What You Can Manage

    The provider gives you complete control over DNScale resources:

    Zones

    Create and manage DNS zones with automatic nameserver assignment:

    resource "dnscale_zone" "production" {
      name   = "myapp.com"
      region = "eu"
    }

    Records

    All 14 record types supported by DNScale, including A, AAAA, CNAME, MX, TXT, SRV, and more:

    resource "dnscale_record" "api" {
      zone_id = dnscale_zone.production.id
      name    = "api"
      type    = "A"
      content = "203.0.113.10"
      ttl     = 300
    }

    DNSSEC

    Enable cryptographic zone signing with automatic key management:

    resource "dnscale_dnssec_key" "ksk" {
      zone_id   = dnscale_zone.production.id
      key_type  = "ksk"
      algorithm = 13
      bits      = 256
      active    = true
      published = true
    }

    Data Sources

    Query existing zones, records, and DNSSEC status for use in your configurations:

    data "dnscale_zones" "all" {}
    data "dnscale_records" "production" {
      zone_id = dnscale_zone.production.id
    }

    Quick Start

    Getting started takes just a few minutes:

    terraform {
      required_providers {
        dnscale = {
          source  = "dnscaleou/dnscale"
          version = "~> 1.0"
        }
      }
    }
     
    provider "dnscale" {
      api_key = var.dnscale_api_key
    }
     
    resource "dnscale_zone" "main" {
      name   = "example.com"
      region = "eu"
    }
     
    resource "dnscale_record" "www" {
      zone_id = dnscale_zone.main.id
      name    = "www"
      type    = "A"
      content = "192.0.2.1"
      ttl     = 3600
    }

    Run terraform init and terraform apply. That's it. Your zone is created, your record is configured, and everything is tracked in state.

    Real-World Use Cases

    Multi-Environment Deployments

    Use Terraform workspaces to manage DNS across environments:

    terraform workspace new staging
    terraform apply -var="domain=staging.myapp.com"
     
    terraform workspace new production
    terraform apply -var="domain=myapp.com"

    Blue-Green Deployments

    Switch traffic between environments with a simple variable change:

    variable "active_environment" {
      default = "blue"
    }
     
    resource "dnscale_record" "www" {
      zone_id = dnscale_zone.main.id
      name    = "www"
      type    = "A"
      content = var.active_environment == "blue" ? var.blue_ip : var.green_ip
      ttl     = 60
    }

    Import Existing Infrastructure

    Already using DNScale? Import your existing zones and records:

    terraform import dnscale_zone.existing abc123-zone-id
    terraform import dnscale_record.www abc123-zone-id/def456-record-id

    Built for Teams

    The Terraform workflow naturally supports team collaboration:

    1. Propose changes in a feature branch
    2. Review DNS modifications alongside application code
    3. Apply through CI/CD with proper approvals
    4. Audit trail of who changed what and when

    No more wondering who updated that MX record last Tuesday. Every change is documented, reviewed, and traceable.

    Get Started Today

    The DNScale Terraform Provider is available now:

    If you don't have a DNScale account yet, sign up and grab your API key from the dashboard. Your first zone is on us.

    What's Next

    This initial release covers the core DNScale functionality. We're already planning enhancements based on community feedback:

    • Additional data sources for advanced querying
    • Terraform Cloud integration examples
    • Module library for common DNS patterns

    Have a feature request? Open an issue on GitHub or reach out to our team.


    DNS as Code isn't just a nice-to-have anymore. It's how modern teams manage infrastructure. With the DNScale Terraform Provider, your DNS configuration finally gets the same treatment as everything else in your stack: versioned, reviewed, automated, and reliable.

    terraform apply your DNS today.