AWS Directory Service Directory
This page shows how to write Terraform for AWS Directory Service Directory and write them securely.
aws_directory_service_directory (Terraform)
The Directory in AWS Directory Service can be configured in Terraform with the resource name aws_directory_service_directory. The following sections describe 4 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_directory_service_directory" "simple_ad_small" {
name = "simplead-small-123456"
type = "SimpleAD"
password = "SuperSecretPassw0rd"
size = "Small"
resource "aws_directory_service_directory" "microsoft_ad" {
count = local.ms_ad_count
name = var.ad_domain_fqdn
password = var.ad_admin_password
resource "aws_directory_service_directory" "this" {
name = var.directory.domain
short_name = var.directory.short_name
type = lookup(var.directory, "type", null)
edition = lookup(var.directory, "edition", null)
description = var.directory.description
resource "aws_directory_service_directory" "myapp_ad" {
name = var.dir_domain_name
password = var.dir_admin_password
size = "Large"
vpc_settings {
vpc_id = aws_vpc.vpc_myapp.id
Parameters
-
access_urloptional computed - string -
aliasoptional computed - string -
descriptionoptional - string -
dns_ip_addressesoptional computed - set of string -
editionoptional computed - string -
enable_ssooptional - bool -
idoptional computed - string -
namerequired - string -
passwordrequired - string -
security_group_idoptional computed - string -
short_nameoptional computed - string -
sizeoptional computed - string -
tagsoptional - map from string to string -
typeoptional - string -
connect_settingslist block-
availability_zonesoptional computed - set of string -
connect_ipsoptional computed - set of string -
customer_dns_ipsrequired - set of string -
customer_usernamerequired - string -
subnet_idsrequired - set of string -
vpc_idrequired - string
-
-
vpc_settingslist block-
availability_zonesoptional computed - set of string -
subnet_idsrequired - set of string -
vpc_idrequired - string
-
Explanation in Terraform Registry
Provides a Simple or Managed Microsoft directory in AWS Directory Service.
Note: All arguments including the password and customer username will be stored in the raw state as plain-text. Read more about sensitive data in state.
CloudFormation Example
CloudFormation code does not have the related resource.
Frequently asked questions
What is AWS Directory Service Directory?
AWS Directory Service Directory is a resource for Directory Service of Amazon Web Service. Settings can be wrote in Terraform.
Where can I find the example code for the AWS Directory Service Directory?
For Terraform, the infracost/infracost, RaduLupan/terraform-rdgateway-aws and santiagowork/Terraform source code examples are useful. See the Terraform Example section for further details.