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_url
optional computed - string -
alias
optional computed - string -
description
optional - string -
dns_ip_addresses
optional computed - set of string -
edition
optional computed - string -
enable_sso
optional - bool -
id
optional computed - string -
name
required - string -
password
required - string -
security_group_id
optional computed - string -
short_name
optional computed - string -
size
optional computed - string -
tags
optional - map from string to string -
type
optional - string -
connect_settings
list block-
availability_zones
optional computed - set of string -
connect_ips
optional computed - set of string -
customer_dns_ips
required - set of string -
customer_username
required - string -
subnet_ids
required - set of string -
vpc_id
required - string
-
-
vpc_settings
list block-
availability_zones
optional computed - set of string -
subnet_ids
required - set of string -
vpc_id
required - 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.