page_title | subcategory | description |
---|---|---|
namecheap_domain_records Resource - terraform-provider-namecheap |
Follow Namecheap domain records guide to get detailed information about each argument and usage examples.
resource "namecheap_domain_records" "my-domain-com" {
domain = "my-domain.com"
email_type = "NONE"
record {
hostname = "blog"
type = "A"
address = "10.11.12.13"
}
record {
hostname = "@"
type = "ALIAS"
address = "www.testdomain.com"
}
}
resource "namecheap_domain_records" "my-domain2-com" {
domain = "my-domain2.com"
mode = "OVERWRITE" // Warning: this will remove all manually set records
nameservers = [
"ns1.some-domain.com",
"ns2.some-domain.com"
]
}
domain
- (Required) Purchased available domain name on your accountmode
- (Optional) Possible values:MERGE
(default),OVERWRITE
- removes all manually set records & sets only ones that were specified in TF configemail_type
- (Optional) Possible values: NONE, FWD, MXE, MX, OX, GMAIL. Conflicts withnameservers
record
- (Optional) (see below for nested schema) Might contain one or morerecord
records. Conflicts withnameservers
nameservers
- (Optional) List of nameservers. Conflicts withemail_type
andrecord
address
- (Required) Possible values are URL or IP address. The value for this parameter is based on record typehostname
- (Required) Sub-domain/hostname to create the record fortype
- (Required) Possible values: A, AAAA, ALIAS, CAA, CNAME, MX, MXE, NS, TXT, URL, URL301, FRAMEmx_pref
- (Optional) MX preference for host. Applicable for MX records onlyttl
- (Optional) Time to live for all record types. Possible values: any value between 60 to 60000
~> It is strongly recommended to set address
, hostname
, nameservers
in lower case to prevent undefined behavior!
Domain records can be imported using by domain name, e.g.,
terraform import namecheap_domain_records.main example.com