aws.directoryservice.ConditionalForwarder
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.ConditionalForwarder("example", {
directoryId: ad.id,
remoteDomainName: "example.com",
dnsIps: [
"8.8.8.8",
"8.8.4.4",
],
});
import pulumi
import pulumi_aws as aws
example = aws.directoryservice.ConditionalForwarder("example",
directory_id=ad["id"],
remote_domain_name="example.com",
dns_ips=[
"8.8.8.8",
"8.8.4.4",
])
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.NewConditionalForwarder(ctx, "example", &directoryservice.ConditionalForwarderArgs{
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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.DirectoryService.ConditionalForwarder("example", new()
{
DirectoryId = ad.Id,
RemoteDomainName = "example.com",
DnsIps = new[]
{
"8.8.8.8",
"8.8.4.4",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.directoryservice.ConditionalForwarder;
import com.pulumi.aws.directoryservice.ConditionalForwarderArgs;
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 ConditionalForwarder("example", ConditionalForwarderArgs.builder()
.directoryId(ad.id())
.remoteDomainName("example.com")
.dnsIps(
"8.8.8.8",
"8.8.4.4")
.build());
}
}
resources:
example:
type: aws:directoryservice:ConditionalForwarder
properties:
directoryId: ${ad.id}
remoteDomainName: example.com
dnsIps:
- 8.8.8.8
- 8.8.4.4
Create ConditionalForwarder Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ConditionalForwarder(name: string, args: ConditionalForwarderArgs, opts?: CustomResourceOptions);
@overload
def ConditionalForwarder(resource_name: str,
args: ConditionalForwarderArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ConditionalForwarder(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 NewConditionalForwarder(ctx *Context, name string, args ConditionalForwarderArgs, opts ...ResourceOption) (*ConditionalForwarder, error)
public ConditionalForwarder(string name, ConditionalForwarderArgs args, CustomResourceOptions? opts = null)
public ConditionalForwarder(String name, ConditionalForwarderArgs args)
public ConditionalForwarder(String name, ConditionalForwarderArgs args, CustomResourceOptions options)
type: aws:directoryservice:ConditionalForwarder
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ConditionalForwarderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ConditionalForwarderArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ConditionalForwarderArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConditionalForwarderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ConditionalForwarderArgs
- 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 conditionalForwarderResource = new Aws.DirectoryService.ConditionalForwarder("conditionalForwarderResource", new()
{
DirectoryId = "string",
DnsIps = new[]
{
"string",
},
RemoteDomainName = "string",
});
example, err := directoryservice.NewConditionalForwarder(ctx, "conditionalForwarderResource", &directoryservice.ConditionalForwarderArgs{
DirectoryId: pulumi.String("string"),
DnsIps: pulumi.StringArray{
pulumi.String("string"),
},
RemoteDomainName: pulumi.String("string"),
})
var conditionalForwarderResource = new ConditionalForwarder("conditionalForwarderResource", ConditionalForwarderArgs.builder()
.directoryId("string")
.dnsIps("string")
.remoteDomainName("string")
.build());
conditional_forwarder_resource = aws.directoryservice.ConditionalForwarder("conditionalForwarderResource",
directory_id="string",
dns_ips=["string"],
remote_domain_name="string")
const conditionalForwarderResource = new aws.directoryservice.ConditionalForwarder("conditionalForwarderResource", {
directoryId: "string",
dnsIps: ["string"],
remoteDomainName: "string",
});
type: aws:directoryservice:ConditionalForwarder
properties:
directoryId: string
dnsIps:
- string
remoteDomainName: string
ConditionalForwarder 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 ConditionalForwarder resource accepts the following input properties:
- Directory
Id string - ID of directory.
- Dns
Ips List<string> - A list of forwarder IP addresses.
- Remote
Domain stringName - The fully qualified domain name of the remote domain for which forwarders will be used.
- Directory
Id string - ID of directory.
- Dns
Ips []string - A list of forwarder IP addresses.
- Remote
Domain stringName - The fully qualified domain name of the remote domain for which forwarders will be used.
- directory
Id String - ID of directory.
- dns
Ips List<String> - A list of forwarder IP addresses.
- remote
Domain StringName - The fully qualified domain name of the remote domain for which forwarders will be used.
- directory
Id string - ID of directory.
- dns
Ips string[] - A list of forwarder IP addresses.
- remote
Domain stringName - The fully qualified domain name of the remote domain for which forwarders will be used.
- directory_
id str - ID of directory.
- dns_
ips Sequence[str] - A list of forwarder IP addresses.
- remote_
domain_ strname - The fully qualified domain name of the remote domain for which forwarders will be used.
- directory
Id String - ID of directory.
- dns
Ips List<String> - A list of forwarder IP addresses.
- remote
Domain StringName - 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 ConditionalForwarder 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 ConditionalForwarder Resource
Get an existing ConditionalForwarder 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?: ConditionalForwarderState, opts?: CustomResourceOptions): ConditionalForwarder
@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) -> ConditionalForwarder
func GetConditionalForwarder(ctx *Context, name string, id IDInput, state *ConditionalForwarderState, opts ...ResourceOption) (*ConditionalForwarder, error)
public static ConditionalForwarder Get(string name, Input<string> id, ConditionalForwarderState? state, CustomResourceOptions? opts = null)
public static ConditionalForwarder get(String name, Output<String> id, ConditionalForwarderState state, CustomResourceOptions options)
resources: _: type: aws:directoryservice:ConditionalForwarder get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Directory
Id string - ID of directory.
- Dns
Ips List<string> - A list of forwarder IP addresses.
- Remote
Domain stringName - The fully qualified domain name of the remote domain for which forwarders will be used.
- Directory
Id string - ID of directory.
- Dns
Ips []string - A list of forwarder IP addresses.
- Remote
Domain stringName - The fully qualified domain name of the remote domain for which forwarders will be used.
- directory
Id String - ID of directory.
- dns
Ips List<String> - A list of forwarder IP addresses.
- remote
Domain StringName - The fully qualified domain name of the remote domain for which forwarders will be used.
- directory
Id string - ID of directory.
- dns
Ips string[] - A list of forwarder IP addresses.
- remote
Domain stringName - The fully qualified domain name of the remote domain for which forwarders will be used.
- directory_
id str - ID of directory.
- dns_
ips Sequence[str] - A list of forwarder IP addresses.
- remote_
domain_ strname - The fully qualified domain name of the remote domain for which forwarders will be used.
- directory
Id String - ID of directory.
- dns
Ips List<String> - A list of forwarder IP addresses.
- remote
Domain StringName - 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/conditionalForwarder:ConditionalForwarder example d-1234567890:example.com
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.