Provides a DigitalOcean domain resource.

Example Usage

# Create a new domain record
resource "digitalocean_domain" "default" {
    name = ""
    ip_address = "${}"

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the domain
  • ip_address - (Required) The IP address of the domain. This IP is used to created an initial A record for the domain. It is required upstream by the DigitalOcean API.

Attributes Reference

The following attributes are exported:

  • id - The name of the domain


Domains can be imported using the domain name, e.g.

terraform import digitalocean_domain.mydomain