alicloud_alidns_record
更新时间:
Provides a Alidns Record resource. For information about Alidns Domain Record and how to use it, see What is Resource Alidns Record.
-> NOTE: Available since v1.85.0.
-> NOTE: When the site is an international site, the type neither supports REDIRECT_URL nor REDIRECT_URL
Example Usage
resource "alicloud_alidns_domain_group" "default" {
domain_group_name = "tf-example"
}
resource "alicloud_alidns_domain" "default" {
domain_name = "starmove.com"
group_id = alicloud_alidns_domain_group.default.id
tags = {
Created = "TF",
For = "example",
}
}
resource "alicloud_alidns_record" "record" {
domain_name = alicloud_alidns_domain.default.domain_name
rr = "alimail"
type = "CNAME"
value = "mail.mxhichin.com"
remark = "tf-example"
status = "ENABLE"
}
Argument Reference
The following arguments are supported:
domain_name- (Required, ForceNew) Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix.shand.telare not supported.rr- (Required) Host record for the domain record. This host_record can have at most 253 characters, and each part split with.can have at most 63 characters, and must contain only alphanumeric characters or hyphens, such as-,.,*,@, and must not begin or end with-.type- (Required) The type of domain record. Valid values:A,NS,MX,TXT,CNAME,SRV,AAAA,CAA,REDIRECT_URLandFORWORD_URL.value- (Required) The value of domain record, When thetypeisMX,NS,CNAME,SRV, the server will treat thevalueas a fully qualified domain name, so it's no need to add a.at the end.ttl- (Optional) The effective time of domain record. Its scope depends on the edition of the cloud resolution. Free is[600, 86400], Basic is[120, 86400], Standard is[60, 86400], Ultimate is[10, 86400], Exclusive is[1, 86400]. Default value is600.priority- (Optional) The priority of domain record. Valid values:[1-10]. When thetypeisMX, this parameter is required.line- (Optional) The resolution line of domain record. When thetypeisFORWORD_URL, this parameter must bedefault. Default value isdefault. For checking all resolution lines enumeration please visit Alibaba Cloud DNS doc or using alicloud_dns_resolution_lines in data source to get the value.lang- (Optional) User language.remark- (Optional) The remark of the domain record.status- (Optional) The status of the domain record. Valid values:ENABLE,DISABLE.user_client_ip- (Optional) The IP address of the client.
Attributes Reference
The following attributes are exported:
id- The id of Domain Record.
Timeouts
-> NOTE: Available since v1.99.0.
The timeouts block allows you to specify timeouts for certain actions:
create- (Defaults to 4 mins) Used when create the Alidns record instance.update- (Defaults to 3 mins) Used when update the Alidns record instance.delete- (Defaults to 6 mins) Used when delete the Alidns record instance.
Import
Alidns Domain Record can be imported using the id, e.g.
$ terraform import alicloud_alidns_record.example abc123456
该文章对您有帮助吗?