Provides a DNS domain resource.
# Add a new Domain.
resource "alicloud_dns_domain" "dns" {
domain_name = "starmove.com"
group_id = "85ab8713-4a30-4de4-9d20-155ff830****"
tags = {
Created = "Terraform"
Environment = "test"
}
}
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(domain name subject, excluding suffix), 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 .sh
and .tel
are not supported.group_id
- (Optional) Id of the group in which the domain will add. If not supplied, then use default group.resource_group_id
- (Optional, ForceNew) The Id of resource group which the dns domain belongs.lang
- (Optional) User language.remark
- (Optional) Remarks information for your domain name.tags
- (Optional) A mapping of tags to assign to the resource.
The following attributes are exported:
id
- This ID of this resource. The value is set to domain_name
.domain_id
- The domain ID.dns_server
- A list of the dns server name.DNS domain can be imported using the id or domain name, e.g.
$ terraform import alicloud_dns_domain.example aliyun.com