---
title: What Is Terraform and How It Integrates with OpusDNS
description: "Use the OpusDNS Terraform provider to manage domains and DNS records as infrastructure as code (IaC): version-controlled, reproducible and CI/CD-ready."
---

[Skip to content](https://help.opusdns.com/terraform-integration#main-content)

- [English](https://help.opusdns.com/terraform-integration)
- [Deutsch](https://help.opusdns.com/de/terraform-integration)

English

Show submenu for translations

[![opusdns.com](https://help.opusdns.com/hs-fs/hubfs/v2-Status%20Center.png?width=180&height=51&name=v2-Status%20Center.png)](https://help.opusdns.com/?hsLang=en)

Open main navigation

Close main navigation

- - [English](https://help.opusdns.com/terraform-integration)
    - [Deutsch](https://help.opusdns.com/de/terraform-integration)

  English
  
  Show submenu for translations
- [Submit Ticket](https://support.opusdns.com/)

[Submit Ticket](https://support.opusdns.com/?hsLang=en)

 How can we help?

- There are no suggestions because the search field is empty.

1. [OpusDNS Knowledgebase](https://help.opusdns.com/?hsLang=en)
2. [Services & Features](https://help.opusdns.com/services-features?hsLang=en)
3. [Terraform Integration](https://help.opusdns.com/services-features?hsLang=en#terraform-integration)

November 16, 2026

# What Is Terraform and How It Integrates with OpusDNS

## Manage domains and DNS records as code with the OpusDNS Terraform provider

### Terraform and its role in infrastructure management

Terraform is an Infrastructure as Code (IaC) tool. Teams define, provision and manage infrastructure in readable configuration files instead of configuring servers, networks or services by hand in dashboards or scripts. You describe the desired final state, and Terraform makes the changes needed to reach it.

Terraform is widely used by software engineers, DevOps teams, cloud architects and platform engineers, especially at hosting companies, SaaS providers, managed service providers and enterprises with multi-cloud or hybrid infrastructure. One of its key strengths is the provider ecosystem, which connects Terraform to third party services through their APIs.

 

### Terraform for domain and DNS management

OpusDNS integrates with Terraform through its own provider: [github.com/OpusDNS/terraform-provider-opusdns](https://github.com/OpusDNS/terraform-provider-opusdns). It is published in the Terraform Registry as [opusdns/opusdns](https://registry.terraform.io/providers/opusdns/opusdns/latest).

With the provider, you manage domain and DNS resources the same way as the rest of your infrastructure: automated, version controlled and reproducible. You can manage, among other things:

- DNS zones and records
- Domains, including registration and transfer, and their DNSSEC settings
- Contacts and contact attribute sets
- Host objects
- Email forwards and domain forwards
- Domain parking
- Users, role assignments and tags
- Connected registrars

Data sources let you read existing objects, for example zones, domains, contacts or domain availability. The full list is in the README of the provider.

Typical uses for hosting companies, SaaS providers and DevOps teams:

- Set up domains and DNS automatically for new customers or environments
- Manage DNS records together with cloud infrastructure in one workflow
- Keep application deployments and domain configuration consistent
- Integrate domain operations into CI/CD pipelines

 

### Getting started

1. Create an API key in the dashboard under **Developer \> API Credentials**, see [Creating API Credentials](https://help.opusdns.com/creating-api-credentials?hsLang=en). The API key is shown only once; store it like a password, for example in a secret manager.
2. Add the provider to your configuration and pass the API key with `api_key` or the environment variable `OPUSDNS_API_KEY`:
   
   ```
   terraform {
     required_providers {
       opusdns = {
         source  = "opusdns/opusdns"
         version = "~> 1.0"
       }
     }
   }
   
   provider "opusdns" {
     api_key = var.opusdns_api_key
   }
   ```
3. Define your resources, for example a zone and a record:
   
   ```
   resource "opusdns_zone" "example" {
     name = "example.com"
   }
   
   resource "opusdns_record" "www" {
     zone_name = opusdns_zone.example.name
     name      = "www"
     type      = "A"
     ttl       = 300
     records   = ["192.0.2.1"]
   }
   ```
4. Run `terraform init`, `terraform plan` and `terraform apply`.

The provider only uses an API key. The older arguments `org_id`, `client_secret`, `username` and `password` are no longer supported.

**Note:** the resource `opusdns_domain` registers or transfers a real domain, and this is charged to your account. Changing the name, the period, `create_zone` or the transfer settings replaces the resource. Always check `terraform plan` before you apply changes to domains. The resource `opusdns_parking` requires that your organization has signed up for domain parking.

 

### Summary

Terraform brings software engineering practices to infrastructure management. With the OpusDNS provider, domain and DNS management becomes part of the same code driven workflow as the rest of your infrastructure.

[![OpusDNS GitHub banner: Deploy faster with our official tools on GitHub, with the button View Our GitHub](https://help.opusdns.com/hs-fs/hubfs/Knowledge%20Banner_%20Github%20Dark%20(1).jpg?width=670&height=174&name=Knowledge%20Banner_%20Github%20Dark%20(1).jpg)](https://github.com/OpusDNS?utm_source=knowledgebase&utm_medium=referral&utm_campaign=signup&utm_content=cta_button)

- [Create your OpusDNS account](https://help.opusdns.com/create-your-opusdns-account?hsLang=en#main-content)

    - [Open Your Account](https://help.opusdns.com/create-your-opusdns-account?hsLang=en#open-your-account)
    - [FAQ](https://help.opusdns.com/create-your-opusdns-account?hsLang=en#faq)
    - [Getting Help with your Registration](https://help.opusdns.com/create-your-opusdns-account?hsLang=en#getting-help-with-your-registration)
- [OpusDNS API](https://help.opusdns.com/opusdns-api?hsLang=en#main-content)

    - [Getting Started with the API](https://help.opusdns.com/opusdns-api?hsLang=en#getting-started-with-the-api)
    - [Sandbox Environment](https://help.opusdns.com/opusdns-api?hsLang=en#sandbox-environment)
    - [OpusDNS MCP Server](https://help.opusdns.com/opusdns-api?hsLang=en#opusdns-mcp-server)
    - [FAQ](https://help.opusdns.com/opusdns-api?hsLang=en#faq)
    - [Getting Help with the OpusDNS API](https://help.opusdns.com/opusdns-api?hsLang=en#getting-help-with-the-opusdns-api)
- [OpusDNS Dashboard](https://help.opusdns.com/opusdns-dashboard?hsLang=en#main-content)

    - [Getting Started](https://help.opusdns.com/opusdns-dashboard?hsLang=en#getting-started)
    - [Plans & Pricing](https://help.opusdns.com/opusdns-dashboard?hsLang=en#plans-pricing)
    - [Billing & Payments](https://help.opusdns.com/opusdns-dashboard?hsLang=en#billing-payments)
    - [User & Organization Management](https://help.opusdns.com/opusdns-dashboard?hsLang=en#user-organization-management)
    - [Whitelabeling](https://help.opusdns.com/opusdns-dashboard?hsLang=en#whitelabeling)
    - [Account & Settings](https://help.opusdns.com/opusdns-dashboard?hsLang=en#account-settings)
    - [Security](https://help.opusdns.com/opusdns-dashboard?hsLang=en#security)
    - [AI Concierge](https://help.opusdns.com/opusdns-dashboard?hsLang=en#ai-concierge)
    - [Managing Contacts](https://help.opusdns.com/opusdns-dashboard?hsLang=en#managing-contacts)
    - [Managing DNS Zones & Nameservers](https://help.opusdns.com/opusdns-dashboard?hsLang=en#managing-dns-zones-nameservers)
    - [Register & Transfer Domains](https://help.opusdns.com/opusdns-dashboard?hsLang=en#register-transfer-domains)
    - [Managing Domains](https://help.opusdns.com/opusdns-dashboard?hsLang=en#managing-domains)
    - [Bulk Jobs](https://help.opusdns.com/opusdns-dashboard?hsLang=en#bulk-jobs)
    - [Developer Area](https://help.opusdns.com/opusdns-dashboard?hsLang=en#developer-area)
    - [Dashboard Functionality](https://help.opusdns.com/opusdns-dashboard?hsLang=en#dashboard-functionality)
    - [Dashboard home page](https://help.opusdns.com/opusdns-dashboard?hsLang=en#dashboard-home-page)
- [Services & Features](https://help.opusdns.com/services-features?hsLang=en#main-content)

    - [Domain forwarding](https://help.opusdns.com/services-features?hsLang=en#domain-forwarding)
    - [Email forwarding](https://help.opusdns.com/services-features?hsLang=en#email-forwarding)
    - [Reports](https://help.opusdns.com/services-features?hsLang=en#reports)
    - [Domain parking](https://help.opusdns.com/services-features?hsLang=en#domain-parking)
    - [WHMCS Integration](https://help.opusdns.com/services-features?hsLang=en#whmcs-integration)
    - [Hostware Integration](https://help.opusdns.com/services-features?hsLang=en#hostware-integration)
    - [Terraform Integration](https://help.opusdns.com/services-features?hsLang=en#terraform-integration)
    - [GO Integration](https://help.opusdns.com/services-features?hsLang=en#go-integration)
    - [Certificate Management with ACME and OpusDNS](https://help.opusdns.com/services-features?hsLang=en#certificate-management-with-acme-and-opusdns)
- [New to the Domain Industry?](https://help.opusdns.com/new-to-the-domain-industry?hsLang=en#main-content)

    - [Everything about Domains](https://help.opusdns.com/new-to-the-domain-industry?hsLang=en#everything-about-domains)
    - [Domain Industry](https://help.opusdns.com/new-to-the-domain-industry?hsLang=en#domain-industry)
    - [Reseller Essentials](https://help.opusdns.com/new-to-the-domain-industry?hsLang=en#reseller-essentials)

- [OpusDNS Homepage](https://www.opusdns.com/)
- [Legal Notice](https://www.opusdns.com/legal/notice-impressum)
- [Privacy Policy](https://www.opusdns.com/legal/privacy-policy)
- [Terms & Conditions](https://www.opusdns.com/legal/terms-conditions)

[![OpusDNS Homepage](https://help.opusdns.com/hubfs/6722ae7333e645c8919a4751_opusDNS-VT-3c-white-tagline.svg "OpusDNS Homepage")](https://www.opusdns.com/)

©2025 OpusDNS GmbH. All rights reserved.

<https://www.linkedin.com/company/opusdns/>

![icann](https://help.opusdns.com/hubfs/icann.svg).