AWS Directory Service Conditional Forwarder

This page shows how to write Terraform for AWS Directory Service Conditional Forwarder and write them securely.

aws_directory_service_conditional_forwarder (Terraform)

The Conditional Forwarder in AWS Directory Service can be configured in Terraform with the resource name aws_directory_service_conditional_forwarder. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub
resource "aws_directory_service_conditional_forwarder" "directory_service_conditional_forwarder" {
  count = var.enable_directory_service_conditional_forwarder ? 1 : 0

  directory_id       = var.directory_service_conditional_forwarder_directory_id != "" ? var.directory_service_conditional_forwarder_directory_id : (var.enable_directory_service_directory ? element(aws_directory_service_directory.directory_service_directory.*.id, 0) : null)
  remote_domain_name = var.directory_service_conditional_forwarder_remote_domain_name
  dns_ips            = var.directory_service_conditional_forwarder_dns_ips
resource "aws_directory_service_conditional_forwarder" "ds_forwarders" {
  for_each = var.create ? var.ds_forwarders : {}

  directory_id       = aws_directory_service_directory.ds[0].id
  remote_domain_name = each.key
  dns_ips            = each.value

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).


Explanation in Terraform Registry

Provides a conditional forwarder for managed Microsoft AD in AWS Directory Service.

CloudFormation Example

CloudFormation code does not have the related resource.

Frequently asked questions

What is AWS Directory Service Conditional Forwarder?

AWS Directory Service Conditional Forwarder 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 Conditional Forwarder?

For Terraform, the asrkata/SebastianUA-terraform and syousry6/Modules source code examples are useful. See the Terraform Example section for further details.


Automate config file reviews on your commits

Fix issues in your infrastructure as code with auto-generated patches.