文档

alicloud_alidns_domain

更新时间:

Provides a Alidns domain resource.

-> NOTE: The domain name which you want to add must be already registered and had not added by another account. Every domain name can only exist in a unique group.

-> NOTE: Available since v1.95.0.

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",
  }
}

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(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.
    • Key: It can be [1, 20] characters in length. It can contain A-Z, a-z, numbers, underscores (_), and hyphens (-). It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string.
    • Value: It can be [1, 20] characters in length. It can contain A-Z, a-z, numbers, underscores (_), and hyphens (-). It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.

Attributes Reference

The following attributes are exported:

  • id - This ID of this resource. The value is set to domain_name.
  • domain_id - The domain ID.
  • dns_servers - A list of the dns server name.
  • group_name - Domain name group name.
  • puny_code - Only return punycode codes for Chinese domain names.

Timeouts

-> NOTE: Available in 1.97.0+.

The timeouts block allows you to specify timeouts for certain actions:

  • delete - (Defaults to 6 mins) Used when terminating the Alidns domain instance.

Import

Alidns domain can be imported using the id or domain name, e.g.

$ terraform import alicloud_alidns_domain.example aliyun.com

  • 本页导读 (0)
文档反馈