{"id":77313,"date":"2026-01-31T17:27:43","date_gmt":"2026-01-31T11:57:43","guid":{"rendered":"https:\/\/2thenew.today\/blog\/?p=77313"},"modified":"2026-02-13T14:40:41","modified_gmt":"2026-02-13T09:10:41","slug":"dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform","status":"publish","type":"post","link":"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/","title":{"rendered":"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform"},"content":{"rendered":"<h2><span style=\"text-decoration: underline;\"><strong>Introduction<\/strong><\/span><\/h2>\n<p>DNS is rarely the first thing teams modernise. In most client environments we work with at To The New, CI\/CD, cloud infrastructure, and observability mature quickly. DNS, however, often remains manually managed through dashboards, handled by a few people, and changed mostly during incidents. That gap usually goes unnoticed until traffic needs to be rerouted, a migration is planned, or an issue arises in production.<\/p>\n<div id=\"attachment_77308\" style=\"width: 635px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-77308\" class=\"wp-image-77308 size-large\" src=\"https:\/\/2thenew.today\/blog\/wp-ttn-blog\/uploads\/2026\/01\/Screenshot-2026-01-03-at-11.16.11\u202fAM-1024x681.png\" alt=\"DNS As Code\" width=\"625\" height=\"416\" srcset=\"https:\/\/2thenew.today\/blog\/wp-content\/uploads\/2026\/01\/Screenshot-2026-01-03-at-11.16.11\u202fAM-1024x681.png 1024w, https:\/\/2thenew.today\/blog\/wp-content\/uploads\/2026\/01\/Screenshot-2026-01-03-at-11.16.11\u202fAM-300x200.png 300w, https:\/\/2thenew.today\/blog\/wp-content\/uploads\/2026\/01\/Screenshot-2026-01-03-at-11.16.11\u202fAM-768x511.png 768w, https:\/\/2thenew.today\/blog\/wp-content\/uploads\/2026\/01\/Screenshot-2026-01-03-at-11.16.11\u202fAM-624x415.png 624w, \/blog\/wp-ttn-blog\/uploads\/2026\/01\/Screenshot-2026-01-03-at-11.16.11\u202fAM.png 1166w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-77308\" class=\"wp-caption-text\">DNS As Code<\/p><\/div>\n<p>This blog shares how, in one of our ad-tech client projects, we transitioned DNS from manual operations to <strong>DNS as Code<\/strong>, utilizing <strong>NS1 (an IBM product) and Terraform<\/strong>, and what changes occurred afterward.<\/p>\n<h2><span style=\"text-decoration: underline;\"><strong>What We Found in the Client Setup<\/strong><\/span><\/h2>\n<p>The client had a reasonably mature DevOps setup:<\/p>\n<ul>\n<li>Infrastructure managed using Terraform<\/li>\n<li>Clear deployment pipelines<\/li>\n<li>Defined environments<\/li>\n<\/ul>\n<p>But DNS changes were different. They were:<\/p>\n<ul>\n<li>Made directly in the NS1 UI<\/li>\n<li>Applied mostly in production<\/li>\n<li>Not reviewed or documented<\/li>\n<li>Hard to trace during incidents<\/li>\n<li>DNS had effectively become a manual production dependency.<\/li>\n<\/ul>\n<h2><span style=\"text-decoration: underline;\"><strong>Why We Pushed for DNS as Code<\/strong><\/span><\/h2>\n<p>At To The New, our default approach is simple:<\/p>\n<ul>\n<li>If it affects production traffic, it should live in Git.<\/li>\n<li>DNS is the very first layer users hit. Managing it outside version control increases operational risk, especially when traffic routing and failover logic are involved.<\/li>\n<li>Since the client already used Terraform extensively, bringing DNS under the same workflow was a natural next step.<\/li>\n<\/ul>\n<h2><span style=\"text-decoration: underline;\"><strong>Why NS1 Fits This Approach<\/strong><\/span><\/h2>\n<p>NS1 wasn\u2019t just being used as a DNS provider; it was already part of the client\u2019s traffic management strategy. What worked in our favour:<\/p>\n<ul>\n<li>Support for weighted routing<\/li>\n<li>Metadata-based decisions<\/li>\n<li>Clear Terraform support<\/li>\n<li>This allowed us to model DNS behavior declaratively, rather than treating it as a static configuration.<\/li>\n<\/ul>\n<h2><span style=\"text-decoration: underline;\"><strong>Terraform + NS1: The Core Model<\/strong><\/span><\/h2>\n<p>In Terraform, you manage:<\/p>\n<ul>\n<li><strong>Zones<\/strong><\/li>\n<li><strong>Records<\/strong><\/li>\n<li><strong>Answers<\/strong><\/li>\n<li><strong>Metadata<\/strong><\/li>\n<li><strong>Routing behavior<\/strong><\/li>\n<li><strong>Everything lives in Git.<\/strong><\/li>\n<\/ul>\n<p>Provider Configuration<\/p>\n<pre>provider \"ns1\" {\r\n\u00a0 api_key = var.ns1_api_key\r\n}<\/pre>\n<p>This makes NS1 just another Terraform provider\u2014no special treatment, no UI dependency. Managing DNS Records Declaratively.<\/p>\n<p>Example: Simple A Record<\/p>\n<pre>resource \"ns1_record\" \"application_1\" {\r\n\u00a0 zone \u00a0 = \"demo.com\"\r\n\u00a0 domain = \"app1.demo.com\"\r\n\u00a0 type \u00a0 = \"A\"\r\n\u00a0 ttl\u00a0 \u00a0 = 60\r\n\u00a0 answers {\r\n\u00a0 \u00a0 answer = [\"10.53.1.98\"]\r\n\u00a0 }\r\n}<\/pre>\n<p>A DNS record is now:<\/p>\n<ul>\n<li><strong>Versioned<\/strong><\/li>\n<li><strong>Reviewable<\/strong><\/li>\n<li><strong>Reproducible<\/strong><\/li>\n<\/ul>\n<p>No surprises.<\/p>\n<p>Sample Command used for importing existing records into Terraform:<\/p>\n<pre>terraform import ns1_record.&lt;terraform_resource_name&gt; &lt;zone&gt;\/&lt;domain&gt;\/&lt;type&gt;<\/pre>\n<h2><span style=\"text-decoration: underline;\"><strong>Moving DNS into Terraform<\/strong><\/span><\/h2>\n<p>We started small. Existing records were recreated in Terraform, without changing behavior. The goal was not optimisation, it was control and visibility. Once records lived in code:<\/p>\n<ul>\n<li>Every change had a history<\/li>\n<li>Reviews became mandatory<\/li>\n<li>Ownership was clear<\/li>\n<li>DNS stopped being something \u201chandled on the side\u201d.<\/li>\n<\/ul>\n<h2><span style=\"text-decoration: underline;\"><strong>GitOps in Practice for DNS<\/strong><\/span><\/h2>\n<p>After this, DNS changes followed the same workflow as infrastructure changes:<\/p>\n<ul>\n<li>Change proposed through a pull request<\/li>\n<li>Terraform plan reviewed by the team<\/li>\n<li>Merge triggered Terraform apply<\/li>\n<li>NS1 updated records automatically<\/li>\n<li>No direct NS1 dashboard access was required for day-to-day work.<\/li>\n<\/ul>\n<p>This alone reduced risky, last-minute DNS changes significantly.<\/p>\n<h2><span style=\"text-decoration: underline;\"><strong>A Real Use Case: Gradual Traffic Migration<\/strong><\/span><\/h2>\n<p>One practical scenario where this helped was a backend migration. Instead of switching traffic in one go, we used weighted DNS routing to:<\/p>\n<ul>\n<li>Route a small percentage of traffic to the new backend<\/li>\n<li>Observe behavior in real traffic<\/li>\n<li>Gradually increase the load<\/li>\n<li>Each weight change was a Git commit.<\/li>\n<li>Each adjustment was reviewed.<\/li>\n<\/ul>\n<p>There was no ambiguity about what changed or when. Environment Consistency Improved Immediately.<\/p>\n<p>Before Terraform: DNS records for non-production environments were created manually and didn\u2019t always match production logic.<\/p>\n<p><strong>With DNS as Code:<\/strong><\/p>\n<ul>\n<li>Same structure across all environments<\/li>\n<li>Only the values differed<\/li>\n<li>No accidental drift<\/li>\n<li>Debugging environment-specific issues became much easier.<\/li>\n<li>Rollbacks Stopped Being Stressful<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>Earlier, rolling back a DNS change meant:<\/strong><\/span><\/p>\n<ul>\n<li>Remembering the previous state<\/li>\n<li>Manually updating records<\/li>\n<li>Hoping nothing was missed<\/li>\n<\/ul>\n<p>With Terraform:<\/p>\n<ul>\n<li>Revert the commit<\/li>\n<li>Apply the change<\/li>\n<li>Done<\/li>\n<li>DNS rollbacks became routine instead of risky.<\/li>\n<\/ul>\n<h2><span style=\"text-decoration: underline;\"><strong>Lessons from the Implementation<\/strong><\/span><\/h2>\n<p>A few things we learnt during this project:<\/p>\n<ul>\n<li>Keep TTLs low for records involved in routing decisions<\/li>\n<li>Avoid making \u201cquick fixes\u201d directly in the UI<\/li>\n<li>Start with simple routing logic and evolve gradually<\/li>\n<li>Treat DNS changes like application changes<\/li>\n<li>DNS doesn\u2019t need to be complicated\u2014but it does need discipline.<\/li>\n<\/ul>\n<h2><span style=\"text-decoration: underline;\"><strong>Closing Thoughts<\/strong><\/span><\/h2>\n<p>DNS is often treated as background infrastructure. In reality, it\u2019s a critical part of the request flow and availability. In this client engagement, bringing DNS into the GitOps model using NS1 and Terraform:<\/p>\n<ul>\n<li>Reduced operational risk<\/li>\n<li>Improved confidence during changes<\/li>\n<li>Aligned DNS with the rest of the platform<\/li>\n<\/ul>\n<p>At <strong>To The New<\/strong>, this approach has now become a standard recommendation for teams using intelligent DNS at scale. DNS may be old, but how we manage it should reflect modern engineering practices.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction DNS is rarely the first thing teams modernise. In most client environments we work with at To The New, CI\/CD, cloud infrastructure, and observability mature quickly. DNS, however, often remains manually managed through dashboards, handled by a few people, and changed mostly during incidents. That gap usually goes unnoticed until traffic needs to be [&hellip;]<\/p>\n","protected":false},"author":1601,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":77,"footnotes":""},"categories":[2348],"tags":[8293,6620,1892,8289,8291,7603,6835,8290,7323,8292,1585,2987,6468],"class_list":["post-77313","post","type-post","status-publish","format-standard","hentry","category-devops-technology","tag-clientcasestudy","tag-cloudinfrastructure","tag-devops","tag-dnsascode","tag-dnsautomation","tag-gitops","tag-infrastructureascode","tag-ns1","tag-platformengineering","tag-productionreliability","tag-terraform","tag-tothenew","tag-trafficmanagement"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Introduction DNS is rarely the first thing teams modernise. In most client environments we work with at To The New, CI\/CD, cloud infrastructure, and observability mature quickly. DNS, however, often remains manually managed through dashboards, handled by a few people, and changed mostly during incidents. That gap usually goes unnoticed until traffic needs to be\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Karandeep Singh\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Introduction DNS is rarely the first thing teams modernise. In most client environments we work with at To The New, CI\/CD, cloud infrastructure, and observability mature quickly. DNS, however, often remains manually managed through dashboards, handled by a few people, and changed mostly during incidents. That gap usually goes unnoticed until traffic needs to be\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Introduction DNS is rarely the first thing teams modernise. In most client environments we work with at To The New, CI\/CD, cloud infrastructure, and observability mature quickly. DNS, however, often remains manually managed through dashboards, handled by a few people, and changed mostly during incidents. That gap usually goes unnoticed until traffic needs to be\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\\\/#article\",\"name\":\"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform | TO THE NEW Blog\",\"headline\":\"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/karandeep-singh\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2026\\\/01\\\/Screenshot-2026-01-03-at-11.16.11\\u202fAM-1024x681.png\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\\\/#articleImage\"},\"datePublished\":\"2026-01-31T17:27:43+05:30\",\"dateModified\":\"2026-02-13T14:40:41+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\\\/#webpage\"},\"articleSection\":\"DevOps, ClientCaseStudy, CloudInfrastructure, devops, DNSasCode, DNSAutomation, gitops, InfrastructureAsCode, NS1, PlatformEngineering, ProductionReliability, terraform, tothenew, TrafficManagement\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/devops-technology\\\/#listItem\",\"name\":\"DevOps\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/devops-technology\\\/#listItem\",\"position\":2,\"name\":\"DevOps\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/devops-technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\\\/#listItem\",\"name\":\"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\\\/#listItem\",\"position\":3,\"name\":\"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/devops-technology\\\/#listItem\",\"name\":\"DevOps\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/karandeep-singh\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/karandeep-singh\\\/\",\"name\":\"Karandeep Singh\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/ec210e8c-175b-400c-9f2d-23bff0207f59_3646-Karandeep-Singh-PROFILEPICTURE.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Karandeep Singh\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\\\/\",\"name\":\"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform | TO THE NEW Blog\",\"description\":\"Introduction DNS is rarely the first thing teams modernise. In most client environments we work with at To The New, CI\\\/CD, cloud infrastructure, and observability mature quickly. DNS, however, often remains manually managed through dashboards, handled by a few people, and changed mostly during incidents. That gap usually goes unnoticed until traffic needs to be\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/karandeep-singh\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/karandeep-singh\\\/#author\"},\"datePublished\":\"2026-01-31T17:27:43+05:30\",\"dateModified\":\"2026-02-13T14:40:41+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform | TO THE NEW Blog","description":"Introduction DNS is rarely the first thing teams modernise. In most client environments we work with at To The New, CI\/CD, cloud infrastructure, and observability mature quickly. DNS, however, often remains manually managed through dashboards, handled by a few people, and changed mostly during incidents. That gap usually goes unnoticed until traffic needs to be","canonical_url":"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/#article","name":"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform | TO THE NEW Blog","headline":"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform","author":{"@id":"https:\/\/2thenew.today\/blog\/author\/karandeep-singh\/#author"},"publisher":{"@id":"https:\/\/2thenew.today\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/2thenew.today\/blog\/wp-ttn-blog\/uploads\/2026\/01\/Screenshot-2026-01-03-at-11.16.11\u202fAM-1024x681.png","@id":"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/#articleImage"},"datePublished":"2026-01-31T17:27:43+05:30","dateModified":"2026-02-13T14:40:41+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/#webpage"},"articleSection":"DevOps, ClientCaseStudy, CloudInfrastructure, devops, DNSasCode, DNSAutomation, gitops, InfrastructureAsCode, NS1, PlatformEngineering, ProductionReliability, terraform, tothenew, TrafficManagement"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.today\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/category\/devops-technology\/#listItem","name":"DevOps"}},{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/category\/devops-technology\/#listItem","position":2,"name":"DevOps","item":"https:\/\/2thenew.today\/blog\/category\/devops-technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/#listItem","name":"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform"},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/#listItem","position":3,"name":"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/category\/devops-technology\/#listItem","name":"DevOps"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.today\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.today\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.today\/blog\/author\/karandeep-singh\/#author","url":"https:\/\/2thenew.today\/blog\/author\/karandeep-singh\/","name":"Karandeep Singh","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/ec210e8c-175b-400c-9f2d-23bff0207f59_3646-Karandeep-Singh-PROFILEPICTURE.jpeg","width":96,"height":96,"caption":"Karandeep Singh"}},{"@type":"WebPage","@id":"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/#webpage","url":"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/","name":"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform | TO THE NEW Blog","description":"Introduction DNS is rarely the first thing teams modernise. In most client environments we work with at To The New, CI\/CD, cloud infrastructure, and observability mature quickly. DNS, however, often remains manually managed through dashboards, handled by a few people, and changed mostly during incidents. That gap usually goes unnoticed until traffic needs to be","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.today\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.today\/blog\/author\/karandeep-singh\/#author"},"creator":{"@id":"https:\/\/2thenew.today\/blog\/author\/karandeep-singh\/#author"},"datePublished":"2026-01-31T17:27:43+05:30","dateModified":"2026-02-13T14:40:41+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.today\/blog\/#website","url":"https:\/\/2thenew.today\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.today\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform | TO THE NEW Blog","og:description":"Introduction DNS is rarely the first thing teams modernise. In most client environments we work with at To The New, CI\/CD, cloud infrastructure, and observability mature quickly. DNS, however, often remains manually managed through dashboards, handled by a few people, and changed mostly during incidents. That gap usually goes unnoticed until traffic needs to be","og:url":"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/","og:image":"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform | TO THE NEW Blog","twitter:description":"Introduction DNS is rarely the first thing teams modernise. In most client environments we work with at To The New, CI\/CD, cloud infrastructure, and observability mature quickly. DNS, however, often remains manually managed through dashboards, handled by a few people, and changed mostly during incidents. That gap usually goes unnoticed until traffic needs to be","twitter:image":"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"77313","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"limit_modified_date":false,"created":"2026-01-03 05:58:58","updated":"2026-02-13 09:10:43","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.today\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.today\/blog\/category\/devops-technology\/\" title=\"DevOps\">DevOps<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tDNS as Code in Action: Lessons from a Client Project with NS1 and Terraform\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.today\/blog"},{"label":"DevOps","link":"https:\/\/2thenew.today\/blog\/category\/devops-technology\/"},{"label":"DNS as Code in Action: Lessons from a Client Project with NS1 and Terraform","link":"https:\/\/2thenew.today\/blog\/dns-as-code-in-action-lessons-from-a-client-project-with-ns1-and-terraform\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts\/77313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/users\/1601"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/comments?post=77313"}],"version-history":[{"count":4,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts\/77313\/revisions"}],"predecessor-version":[{"id":77792,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts\/77313\/revisions\/77792"}],"wp:attachment":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/media?parent=77313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/categories?post=77313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/tags?post=77313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}