alicloud_ecd_ad_connector_directory
更新时间:
Provides a ECD Ad Connector Directory resource.
For information about ECD Ad Connector Directory and how to use it, see What is Ad Connector Directory.
-> NOTE: Available since v1.174.0.
Example Usage
Basic Usage
provider "alicloud" {
region = "cn-hangzhou"
}
variable "name" {
default = "terraform-example"
}
data "alicloud_ecd_zones" "default" {}
resource "alicloud_vpc" "default" {
vpc_name = var.name
cidr_block = "172.16.0.0/16"
}
resource "alicloud_vswitch" "default" {
vpc_id = alicloud_vpc.default.id
cidr_block = "172.16.0.0/24"
zone_id = data.alicloud_ecd_zones.default.ids.0
vswitch_name = var.name
}
resource "random_integer" "default" {
min = 10000
max = 99999
}
resource "alicloud_ecd_ad_connector_directory" "default" {
directory_name = "${var.name}-${random_integer.default.result}"
desktop_access_type = "INTERNET"
dns_address = ["127.0.0.2"]
domain_name = "corp.example.com"
domain_password = "Example1234"
domain_user_name = "sAMAccountName"
enable_admin_access = false
mfa_enabled = false
specification = 1
sub_domain_dns_address = ["127.0.0.3"]
sub_domain_name = "child.example.com"
vswitch_ids = [alicloud_vswitch.default.id]
}
Argument Reference
The following arguments are supported:
directory_name
- (Required, ForceNew) The name of the directory. The name must be 2 to 255 characters in length. It must start with a letter but cannot start withhttp://
orhttps://
. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).desktop_access_type
- (Optional, ForceNew, Computed) The desktop access type. Valid values:VPC
,INTERNET
,ANY
.dns_address
- (Required, ForceNew) The DNS address list.domain_name
- (Required, ForceNew) The name of the domain.domain_password
- (Required, Sensitive) The user password of the domain administrator. The maximum number of English characters is 64.domain_user_name
- (Required, ForceNew) The username of the domain administrator. The maximum number of English characters is 64.enable_admin_access
- (Optional, ForceNew, Computed) Whether to grant local administrator rights to users who use cloud desktops.mfa_enabled
- (Optional, ForceNew, Computed) Whether MFA authentication is enabled. After all AD users in this directory log on to the cloud desktop, enter the correct password and then enter the dynamic verification code generated by the MFA device. NOTE: The MFA device needs to be bound when logging in for the first time.specification
- (Optional) The AD Connector specifications. Valid values:1
,2
.sub_domain_dns_address
- (Optional, ForceNew) The Enterprise already has the DNS address of the AD subdomain. Ifsub_domain_name
is set and this parameter is not set, the child Domain DNS is considered consistent with the parent domain.sub_domain_name
- (Optional, ForceNew) The Enterprise already has a fully qualified domain name (FQDN) of an AD subdomain, with both a host name and a domain name.vswitch_ids
- (Required, ForceNew) List of VSwitch IDs in the directory.
Attributes Reference
The following attributes are exported:
id
- The resource ID in terraform of Ad Connector Directory.status
- The status of directory.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 1 mins) Used when create the Ad Connector Directory.delete
- (Defaults to 3 mins) Used when delete the Ad Connector Directory.
Import
ECD Ad Connector Directory can be imported using the id, e.g.
$ terraform import alicloud_ecd_ad_connector_directory.example <id>
文档内容是否对您有帮助?