1. Packages
  2. AWS
  3. API Docs
  4. directoryservice
  5. ConditionalForwader
AWS v6.75.0 published on Wednesday, Apr 2, 2025 by Pulumi

aws.directoryservice.ConditionalForwader

Explore with Pulumi AI

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

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.directoryservice.ConditionalForwader("example", {
    directoryId: ad.id,
    remoteDomainName: "example.com",
    dnsIps: [
        "8.8.8.8",
        "8.8.4.4",
    ],
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.directoryservice.ConditionalForwader("example",
    directory_id=ad["id"],
    remote_domain_name="example.com",
    dns_ips=[
        "8.8.8.8",
        "8.8.4.4",
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directoryservice"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := directoryservice.NewConditionalForwader(ctx, "example", &directoryservice.ConditionalForwaderArgs{
			DirectoryId:      pulumi.Any(ad.Id),
			RemoteDomainName: pulumi.String("example.com"),
			DnsIps: pulumi.StringArray{
				pulumi.String("8.8.8.8"),
				pulumi.String("8.8.4.4"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.DirectoryService.ConditionalForwader("example", new()
    {
        DirectoryId = ad.Id,
        RemoteDomainName = "example.com",
        DnsIps = new[]
        {
            "8.8.8.8",
            "8.8.4.4",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.directoryservice.ConditionalForwader;
import com.pulumi.aws.directoryservice.ConditionalForwaderArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ConditionalForwader("example", ConditionalForwaderArgs.builder()
            .directoryId(ad.id())
            .remoteDomainName("example.com")
            .dnsIps(            
                "8.8.8.8",
                "8.8.4.4")
            .build());

    }
}
Copy
resources:
  example:
    type: aws:directoryservice:ConditionalForwader
    properties:
      directoryId: ${ad.id}
      remoteDomainName: example.com
      dnsIps:
        - 8.8.8.8
        - 8.8.4.4
Copy

Create ConditionalForwader Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ConditionalForwader(name: string, args: ConditionalForwaderArgs, opts?: CustomResourceOptions);
@overload
def ConditionalForwader(resource_name: str,
                        args: ConditionalForwaderArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def ConditionalForwader(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        directory_id: Optional[str] = None,
                        dns_ips: Optional[Sequence[str]] = None,
                        remote_domain_name: Optional[str] = None)
func NewConditionalForwader(ctx *Context, name string, args ConditionalForwaderArgs, opts ...ResourceOption) (*ConditionalForwader, error)
public ConditionalForwader(string name, ConditionalForwaderArgs args, CustomResourceOptions? opts = null)
public ConditionalForwader(String name, ConditionalForwaderArgs args)
public ConditionalForwader(String name, ConditionalForwaderArgs args, CustomResourceOptions options)
type: aws:directoryservice:ConditionalForwader
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ConditionalForwaderArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ConditionalForwaderArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ConditionalForwaderArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ConditionalForwaderArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ConditionalForwaderArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var conditionalForwaderResource = new Aws.DirectoryService.ConditionalForwader("conditionalForwaderResource", new()
{
    DirectoryId = "string",
    DnsIps = new[]
    {
        "string",
    },
    RemoteDomainName = "string",
});
Copy
example, err := directoryservice.NewConditionalForwader(ctx, "conditionalForwaderResource", &directoryservice.ConditionalForwaderArgs{
	DirectoryId: pulumi.String("string"),
	DnsIps: pulumi.StringArray{
		pulumi.String("string"),
	},
	RemoteDomainName: pulumi.String("string"),
})
Copy
var conditionalForwaderResource = new ConditionalForwader("conditionalForwaderResource", ConditionalForwaderArgs.builder()
    .directoryId("string")
    .dnsIps("string")
    .remoteDomainName("string")
    .build());
Copy
conditional_forwader_resource = aws.directoryservice.ConditionalForwader("conditionalForwaderResource",
    directory_id="string",
    dns_ips=["string"],
    remote_domain_name="string")
Copy
const conditionalForwaderResource = new aws.directoryservice.ConditionalForwader("conditionalForwaderResource", {
    directoryId: "string",
    dnsIps: ["string"],
    remoteDomainName: "string",
});
Copy
type: aws:directoryservice:ConditionalForwader
properties:
    directoryId: string
    dnsIps:
        - string
    remoteDomainName: string
Copy

ConditionalForwader Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ConditionalForwader resource accepts the following input properties:

DirectoryId
This property is required.
Changes to this property will trigger replacement.
string
ID of directory.
DnsIps This property is required. List<string>
A list of forwarder IP addresses.
RemoteDomainName
This property is required.
Changes to this property will trigger replacement.
string
The fully qualified domain name of the remote domain for which forwarders will be used.
DirectoryId
This property is required.
Changes to this property will trigger replacement.
string
ID of directory.
DnsIps This property is required. []string
A list of forwarder IP addresses.
RemoteDomainName
This property is required.
Changes to this property will trigger replacement.
string
The fully qualified domain name of the remote domain for which forwarders will be used.
directoryId
This property is required.
Changes to this property will trigger replacement.
String
ID of directory.
dnsIps This property is required. List<String>
A list of forwarder IP addresses.
remoteDomainName
This property is required.
Changes to this property will trigger replacement.
String
The fully qualified domain name of the remote domain for which forwarders will be used.
directoryId
This property is required.
Changes to this property will trigger replacement.
string
ID of directory.
dnsIps This property is required. string[]
A list of forwarder IP addresses.
remoteDomainName
This property is required.
Changes to this property will trigger replacement.
string
The fully qualified domain name of the remote domain for which forwarders will be used.
directory_id
This property is required.
Changes to this property will trigger replacement.
str
ID of directory.
dns_ips This property is required. Sequence[str]
A list of forwarder IP addresses.
remote_domain_name
This property is required.
Changes to this property will trigger replacement.
str
The fully qualified domain name of the remote domain for which forwarders will be used.
directoryId
This property is required.
Changes to this property will trigger replacement.
String
ID of directory.
dnsIps This property is required. List<String>
A list of forwarder IP addresses.
remoteDomainName
This property is required.
Changes to this property will trigger replacement.
String
The fully qualified domain name of the remote domain for which forwarders will be used.

Outputs

All input properties are implicitly available as output properties. Additionally, the ConditionalForwader resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ConditionalForwader Resource

Get an existing ConditionalForwader resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ConditionalForwaderState, opts?: CustomResourceOptions): ConditionalForwader
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        directory_id: Optional[str] = None,
        dns_ips: Optional[Sequence[str]] = None,
        remote_domain_name: Optional[str] = None) -> ConditionalForwader
func GetConditionalForwader(ctx *Context, name string, id IDInput, state *ConditionalForwaderState, opts ...ResourceOption) (*ConditionalForwader, error)
public static ConditionalForwader Get(string name, Input<string> id, ConditionalForwaderState? state, CustomResourceOptions? opts = null)
public static ConditionalForwader get(String name, Output<String> id, ConditionalForwaderState state, CustomResourceOptions options)
resources:  _:    type: aws:directoryservice:ConditionalForwader    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
DirectoryId Changes to this property will trigger replacement. string
ID of directory.
DnsIps List<string>
A list of forwarder IP addresses.
RemoteDomainName Changes to this property will trigger replacement. string
The fully qualified domain name of the remote domain for which forwarders will be used.
DirectoryId Changes to this property will trigger replacement. string
ID of directory.
DnsIps []string
A list of forwarder IP addresses.
RemoteDomainName Changes to this property will trigger replacement. string
The fully qualified domain name of the remote domain for which forwarders will be used.
directoryId Changes to this property will trigger replacement. String
ID of directory.
dnsIps List<String>
A list of forwarder IP addresses.
remoteDomainName Changes to this property will trigger replacement. String
The fully qualified domain name of the remote domain for which forwarders will be used.
directoryId Changes to this property will trigger replacement. string
ID of directory.
dnsIps string[]
A list of forwarder IP addresses.
remoteDomainName Changes to this property will trigger replacement. string
The fully qualified domain name of the remote domain for which forwarders will be used.
directory_id Changes to this property will trigger replacement. str
ID of directory.
dns_ips Sequence[str]
A list of forwarder IP addresses.
remote_domain_name Changes to this property will trigger replacement. str
The fully qualified domain name of the remote domain for which forwarders will be used.
directoryId Changes to this property will trigger replacement. String
ID of directory.
dnsIps List<String>
A list of forwarder IP addresses.
remoteDomainName Changes to this property will trigger replacement. String
The fully qualified domain name of the remote domain for which forwarders will be used.

Import

Using pulumi import, import conditional forwarders using the directory id and remote_domain_name. For example:

$ pulumi import aws:directoryservice/conditionalForwader:ConditionalForwader example d-1234567890:example.com
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.