Skip to main content Skip to search
James McCarthy
Posted by
James McCarthy on
June 9, 2020

Using Terraform to automate DNS Management

Leveraging Integrations to Increase the Velocity of Application and Infrastructure Delivery

Learn how automations and integrations can improve your workflow when you leverage Ansible, Terraform, and Kubernetes.

How does Terraform work?

It is important to understand how Terraform works before adopting this approach. Terraform is declarative: we declare what the desired state of the infrastructure we are managing is by configuring individual resources. Terraform then uses the provider’s API to achieve that state. Note that here we are using the Terraform definition of resources and not a shortening of the DNS resource record -- although we will be defining our resource records as Terraform resources in our configuration files!

To do this, Terraform keeps a local state of the resources you have defined in your configuration. Before making a change it will refresh this state before informing you of what will be changed if you do choose to apply this change. You can then confirm you are happy with these changes and Terraform will use NS1’s API to make those changes on our platform. These changes will then rapidly propagate across our network.

How do I get started?

To see an example of using Terraform to create a simple DNS zone you can view this Help Center article. We will also be adding further documentation for Terraform which will help you move beyond simple examples.

Request a Demo

Contact Us

Looking for help? Please email [email protected]

Get Pricing

Learn More About our Partner Program