A resource for managing DNS records within Vultr domains, allowing creation and configuration of domain name system entries.
Provides a Vultr DNS Record resource. This can be used to create, read, modify, and delete DNS Records.
Create a new DNS Record
resource "vultr_dns_domain" "my_domain" {
domain = "domain.com"
ip = "66.42.94.227"
}
resource "vultr_dns_record" "my_record" {
domain = "${vultr_dns_domain.my_domain.id}"
name = "www"
data = "66.42.94.227"
type = "A"
}
The following arguments are supported:
data
- (Required) IP Address of the instance the domain is associated with.domain
- (Required) Name of the DNS Domain this record will belong to.name
- (Required) Name (subdomain) for this record.type
- (Required) Type of record.priority
- (Optional) Priority of this record (only required for MX and SRV).ttl
- (Optional) The time to live of this record.The following attributes are exported:
id
- ID associated with the record.data
- IP Address of the instance the domain is associated with.domain
- Name of the DNS Domain this record will belong to.name
- Name for this record (Can be subdomain).type
- Type of record.priority
- Priority of this record (only required for MX and SRV).ttl
- The time to live of this record.DNS Records can be imported using the Dns Domain domain
and DNS Record ID
e.g.
terraform import vultr_dns_record.rec domain.com,1a0019bd-7645-4310-81bd-03bc5906940f
No comments yet.