selectel_domains_rrset_v2
Эта инструкция — копия документации Selectel Terraform-провайдера в Terraform Registry.
Creates and manages an RRSet in DNS Hosting (actual) using public API v2. For more information about RRSets, see the official Selectel documentation.
Example usage
A RRSet
resource "selectel_domains_rrset_v2" "a_rrset_1" {
zone_id = selectel_domains_zone_v2.zone_1.id
name = "example.com."
type = "A"
ttl = 60
project_id = selectel_vpc_project_v2.project_1.id
records {
content = "127.0.0.1"
# The content value is "<ipv4_address>"
}
}
AAAA RRSet
resource "selectel_domains_rrset_v2" "aaaa_rrset_1" {
zone_id = selectel_domains_zone_v2.zone_1.id
name = "example.com."
type = "AAAA"
ttl = 60
project_id = selectel_vpc_project_v2.project_1.id
records {
content = "2400:cb00:2049:1::a29f:1804"
# The content value is "<ipv6_address>"
}
}
TXT RRSet
resource "selectel_domains_rrset_v2" "txt_rrset_1" {
zone_id = selectel_domains_zone_v2.zone_1.id
name = "example.com."
type = "TXT"
ttl = 60
project_id = selectel_vpc_project_v2.project_1.id
records {
content = "\"hello, world!\""
# The content value is "<text>"
}
}
CNAME RRSet
resource "selectel_domains_rrset_v2" "cname_rrset_1" {
zone_id = selectel_domains_zone_v2.zone_1.id
name = "example.com."
type = "CNAME"
ttl = 60
project_id = selectel_vpc_project_v2.project_1.id
records {
content = "origin.com."
# The content value is "<target>"
}
}
MX RRSet
resource "selectel_domains_rrset_v2" "mx_rrset_1" {
zone_id = selectel_domains_zone_v2.zone_1.id
name = "example.com."
type = "MX"
ttl = 60
project_id = selectel_vpc_project_v2.project_1.id
records {
content = "10 mail.example.org."
# The content value is "<priority> <host>"
}
}
NS RRSet
resource "selectel_domains_rrset_v2" "ns_rrset_1" {
zone_id = selectel_domains_zone_v2.zone_1.id
name = "subdomain.example.com."
type = "NS"
ttl = 60
project_id = selectel_vpc_project_v2.project_1.id
records {
content = "a.ns.selectel.ru."
# The content value is "<name_server>"
}
}
SRV RRSet
resource "selectel_domains_rrset_v2" "srv_rrset_1" {
zone_id = selectel_domains_zone_v2.zone_1.id
name = "_sip._tcp.example.com."
type = "SRV"
ttl = 120
project_id = selectel_vpc_project_v2.project_1.id
records {
content = "10 20 30 example.org."
# The content value is "<priority> <weight> <port> <target>"
}
}
SSHFP RRSet
resource "selectel_domains_rrset_v2" "sshfp_rrset_1" {
zone_id = selectel_domains_zone_v2.zone_1.id
name = "example.com."
type = "SSHFP"
ttl = 60
project_id = selectel_vpc_project_v2.project_1.id
records {
content = "1 1 7491973e5f8b39d5327cd4e08bc81b05f7710b49"
# The content value is "<algorithm> <fingerprint_type> <fingerprint>"
}
}
ALIAS RRSet
resource "selectel_domains_rrset_v2" "alias_rrset_1" {
zone_id = selectel_domains_zone_v2.zone_1.id
name = "example.com."
type = "ALIAS"
ttl = 60
project_id = selectel_vpc_project_v2.project_1.id
records {
content = "origin.com."
# The content value is "<target>"
}
}
CAA RRSet
resource "selectel_domains_rrset_v2" "caa_rrset_1" {
zone_id = selectel_domains_zone_v2.zone_1.id
name = "example.com."
type = "CAA"
ttl = 60
project_id = selectel_vpc_project_v2.project_1.id
records {
content = "128 issue \"letsencrypt.com.\""
# The content value is "<flag> <tag> <value>"
}
}
Argument Reference
-
zone_id
— (Required) Unique identifier of the zone. Changing this creates a new RRSet. Retrieved from the selectel_domains_zone_v2 resource. -
name
— (Required) RRSet name. Changing this creates a new RRSet. The value must be the same as the zone name. Iftype
isNS
, you can create an RRSet only for a subdomain, so the value must be a subzone name, the parent zone of which is delegated to DNS hosting (actual). Iftype
isSRV
, the name must also include service and protocol, see the example usage for SRV RRSet. -
type
— (Required) RRSet type. Changing this creates a new RRSet. Available types areA
,AAAA
,TXT
,CNAME
,MX
,NS
,SRV
,SSHFP
,ALIAS
,CAA
. -
ttl
— (Required) RRSet time-to-live in seconds. The available range is from 60 to 604800. -
records
— (Required) List of records in the RRSet.-
content
— (Required) Record value. The value depends on the RRSet type.-
<ipv4_address>
— IPv4-address. Applicable only to A RRSets. -
<ipv6_address>
-
-