On this page
digitalocean_record
Provides a DigitalOcean DNS record resource.
Example Usage
# Create a new domain
resource "digitalocean_domain" "default" {
name = "www.example.com"
ip_address = "${digitalocean_droplet.foo.ipv4_address}"
}
# Add a record to the domain
resource "digitalocean_record" "foobar" {
domain = "${digitalocean_domain.default.name}"
type = "A"
name = "foobar"
value = "192.168.0.11"
}
Argument Reference
The following arguments are supported:
type
- (Required) The type of recorddomain
- (Required) The domain to add the record tovalue
- (Optional) The value of the recordname
- (Optional) The name of the recordweight
- (Optional) The weight of the record, for SRV records.port
- (Optional) The port of the record, for SRV records.priority
- (Optional) The priority of the record, for MX and SRV records.ttl
- (Optional) The time to live for the record, in seconds.
Attributes Reference
The following attributes are exported:
© 2018 HashiCorp
Licensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/do/r/record.html