Skip to content
Odinex Cloud
Terraform providerReferenceResources

odinex_rdns

Manages the reverse DNS (PTR) entry of a server's public IP, a primary IP or a floating IP. Exactly one of server_id, primary_ip_id and floating_ip_id must be set. The import ID is s-<server_id>-<ip>, p-<primary_ip_id>-<ip> or f-<floating_ip_id>-<ip>.

Manages the reverse DNS (PTR) entry of a server's public IP, a primary IP or a floating IP. Exactly one of server_id, primary_ip_id and floating_ip_id must be set. The import ID is s-<server_id>-<ip>, p-<primary_ip_id>-<ip> or f-<floating_ip_id>-<ip>.

Example Usage

resource "odinex_rdns" "web" {
  server_id  = odinex_server.web.id
  ip_address = odinex_server.web.ipv4_address
  dns_ptr    = "web-1.example.com"
}

resource "odinex_rdns" "floating" {
  floating_ip_id = odinex_floating_ip.web.id
  ip_address     = odinex_floating_ip.web.ip_address
  dns_ptr        = "www.example.com"
}

Schema

Required

  • dns_ptr (String) Hostname the IP resolves to. It must already resolve to the IP (forward-confirmed reverse DNS).
  • ip_address (String) The IP address the entry is for.

Optional

  • floating_ip_id (Number) ID of the floating IP.
  • primary_ip_id (Number) ID of the primary IP.
  • server_id (Number) ID of the server whose public IP gets the entry.

Read-Only

  • id (String) Unique ID of the resource.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# s-<server_id>-<ip>, p-<primary_ip_id>-<ip> or f-<floating_ip_id>-<ip>
terraform import odinex_rdns.web s-42-198.51.100.7
terraform import odinex_rdns.floating f-8-203.0.113.9

On this page