Archived
1.9 KiB
1.9 KiB
dynu_dns_record Resource
Manages a Dynu DNS record under the Dynu root domain resolved from hostname.
Example Usage
A record
resource "dynu_dns_record" "a" {
hostname = "www.example.com"
record_type = "A"
content = "198.51.100.20"
ttl = 300
}
CNAME record
resource "dynu_dns_record" "cname" {
hostname = "app.example.com"
record_type = "CNAME"
content = "target.example.net"
}
MX record
resource "dynu_dns_record" "mx" {
hostname = "example.com"
record_type = "MX"
content = "mail.example.com"
priority = 10
}
TXT record
resource "dynu_dns_record" "txt" {
hostname = "example.com"
record_type = "TXT"
content = "v=spf1 include:_spf.example.com ~all"
}
SRV record
resource "dynu_dns_record" "srv" {
hostname = "_sip._tcp.example.com"
record_type = "SRV"
content = "sip.example.com"
priority = 10
weight = 5
port = 5060
}
Schema
Required
hostname(String) Fully-qualified hostname.record_type(String) DNS record type.
Optional + Computed
content(String)dynamic(Boolean)ttl(Number)enabled(Boolean, defaults totrue)group(String)host(String)priority(Number)weight(Number)port(Number)flags(Number)tag(String)value(String)node_name(String)
Type-specific notes:
A/AAAAsupport dynamic semantics using omittedcontentor explicitdynamic = true.MXandSRVusepriority.SRValso usesweightandport.CAAusesflags,tag, andvalue.
Computed
id(String) Composite ID indomain_id/record_idformat.domain_id(Number)domain_name(String)updated_on(String)
Import
Import using domain_id/record_id:
terraform import dynu_dns_record.example 1234/5678