2014-07-25 01:16:03 +02:00
|
|
|
---
|
|
|
|
layout: "digitalocean"
|
|
|
|
page_title: "DigitalOcean: digitalocean_domain"
|
|
|
|
sidebar_current: "docs-do-resource-domain"
|
2014-10-22 05:21:56 +02:00
|
|
|
description: |-
|
|
|
|
Provides a DigitalOcean domain resource.
|
2014-07-25 01:16:03 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
# digitalocean\_domain
|
|
|
|
|
|
|
|
Provides a DigitalOcean domain resource.
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
|
|
|
```
|
2016-11-01 03:14:43 +01:00
|
|
|
# Create a new domain
|
2014-07-25 01:16:03 +02:00
|
|
|
resource "digitalocean_domain" "default" {
|
|
|
|
name = "www.example.com"
|
|
|
|
ip_address = "${digitalocean_droplet.foo.ipv4_address}"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `name` - (Required) The name of the domain
|
2014-07-25 16:23:26 +02:00
|
|
|
* `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.
|
2014-07-25 01:16:03 +02:00
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
|
|
|
* `id` - The name of the domain
|
|
|
|
|
2016-07-19 18:22:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
## Import
|
|
|
|
|
|
|
|
Domains can be imported using the `domain name`, e.g.
|
|
|
|
|
|
|
|
```
|
|
|
|
terraform import digitalocean_domain.mydomain mytestdomain.com
|
2016-11-01 03:14:43 +01:00
|
|
|
```
|