Dns Record
generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "porkbun_dns_record Resource - terraform-provider-porkbun" subcategory: "" description: |- Manage a DNS record for a domain.
porkbun_dns_record (Resource)
Manage a DNS record for a domain.
Example Usage
resource "porkbun_dns_record" "example" {
domain = "jiancodes.com"
type = "A"
content = "127.0.0.1"
}
resource "porkbun_dns_record" "example" {
domain = "jiancodes.com"
subdomain = "www"
type = "A"
content = "127.0.0.1"
}
resource "porkbun_dns_record" "example" {
domain = "jiancodes.com"
type = "ALIAS"
content = "pixie.porkbun.com"
}
resource "porkbun_dns_record" "example" {
domain = "jiancodes.com"
subdomain = "*"
type = "CNAME"
content = "pixie.porkbun.com"
}
import {
to = porkbun_dns_record.example
id = "123456789_jiancodes.com_CNAME"
}
Schema
Required
content(String) The record value.domain(String) (Force new) The domain name.type(String) The DNS record type. Valid values:A,MX,CNAME,ALIAS,TXT,NS,AAAA,SRV,TLSA,CAA,HTTPS,SVCB.
Optional
notes(String) Optional notes to store with the record. Not served in DNS.priority(Number) The priority forMXandSRVrecords. Defaults to 0 if omitted.subdomain(String) (Force new) The subdomain for the record being created, not including the domain itself. Omit to create a record on the root domain. Use * to create a wildcard record.ttl(Number) Time to live in seconds. Minimum is determined by account settings (typically 600). Defaults to the account minimum if omitted or 0.
Read-Only
id(String) The record ID.name(String) The full name of the record being created, including the subdomain and the domain itself.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
terraform import porkbun_dns_record.example <record_id>_<domain>_<type>
terraform import porkbun_dns_record.example 123456789_jiancodes.com_CNAME