aws.directoryservice.ServiceRegion
Explore with Pulumi AI
Manages a replicated Region and directory for Multi-Region replication. Multi-Region replication is only supported for the Enterprise Edition of AWS Managed Microsoft AD.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";
const example = aws.getRegion({});
const available = aws.getAvailabilityZones({
state: "available",
filters: [{
name: "opt-in-status",
values: ["opt-in-not-required"],
}],
});
const exampleVpc = new aws.ec2.Vpc("example", {
cidrBlock: "10.0.0.0/16",
tags: {
Name: "Primary",
},
});
const exampleSubnet: aws.ec2.Subnet[] = [];
for (const range = {value: 0}; range.value < 2; range.value++) {
exampleSubnet.push(new aws.ec2.Subnet(`example-${range.value}`, {
vpcId: exampleVpc.id,
availabilityZone: available.then(available => available.names[range.value]),
cidrBlock: exampleVpc.cidrBlock.apply(cidrBlock => std.cidrsubnetOutput({
input: cidrBlock,
newbits: 8,
netnum: range.value,
})).apply(invoke => invoke.result),
tags: {
Name: "Primary",
},
}));
}
const exampleDirectory = new aws.directoryservice.Directory("example", {
name: "example.com",
password: "SuperSecretPassw0rd",
type: "MicrosoftAD",
vpcSettings: {
vpcId: exampleVpc.id,
subnetIds: exampleSubnet.map(__item => __item.id),
},
});
const available-secondary = aws.getAvailabilityZones({
state: "available",
filters: [{
name: "opt-in-status",
values: ["opt-in-not-required"],
}],
});
const example_secondary = new aws.ec2.Vpc("example-secondary", {
cidrBlock: "10.1.0.0/16",
tags: {
Name: "Secondary",
},
});
const example_secondarySubnet: aws.ec2.Subnet[] = [];
for (const range = {value: 0}; range.value < 2; range.value++) {
example_secondarySubnet.push(new aws.ec2.Subnet(`example-secondary-${range.value}`, {
vpcId: example_secondary.id,
availabilityZone: available_secondary.then(available_secondary => available_secondary.names[range.value]),
cidrBlock: example_secondary.cidrBlock.apply(cidrBlock => std.cidrsubnetOutput({
input: cidrBlock,
newbits: 8,
netnum: range.value,
})).apply(invoke => invoke.result),
tags: {
Name: "Secondary",
},
}));
}
const exampleServiceRegion = new aws.directoryservice.ServiceRegion("example", {
directoryId: exampleDirectory.id,
regionName: example.then(example => example.name),
vpcSettings: {
vpcId: example_secondary.id,
subnetIds: example_secondarySubnet.map(__item => __item.id),
},
tags: {
Name: "Secondary",
},
});
import pulumi
import pulumi_aws as aws
import pulumi_std as std
example = aws.get_region()
available = aws.get_availability_zones(state="available",
filters=[{
"name": "opt-in-status",
"values": ["opt-in-not-required"],
}])
example_vpc = aws.ec2.Vpc("example",
cidr_block="10.0.0.0/16",
tags={
"Name": "Primary",
})
example_subnet = []
for range in [{"value": i} for i in range(0, 2)]:
example_subnet.append(aws.ec2.Subnet(f"example-{range['value']}",
vpc_id=example_vpc.id,
availability_zone=available.names[range["value"]],
cidr_block=example_vpc.cidr_block.apply(lambda cidr_block: std.cidrsubnet_output(input=cidr_block,
newbits=8,
netnum=range["value"])).apply(lambda invoke: invoke.result),
tags={
"Name": "Primary",
}))
example_directory = aws.directoryservice.Directory("example",
name="example.com",
password="SuperSecretPassw0rd",
type="MicrosoftAD",
vpc_settings={
"vpc_id": example_vpc.id,
"subnet_ids": [__item.id for __item in example_subnet],
})
available_secondary = aws.get_availability_zones(state="available",
filters=[{
"name": "opt-in-status",
"values": ["opt-in-not-required"],
}])
example_secondary = aws.ec2.Vpc("example-secondary",
cidr_block="10.1.0.0/16",
tags={
"Name": "Secondary",
})
example_secondary_subnet = []
for range in [{"value": i} for i in range(0, 2)]:
example_secondary_subnet.append(aws.ec2.Subnet(f"example-secondary-{range['value']}",
vpc_id=example_secondary.id,
availability_zone=available_secondary.names[range["value"]],
cidr_block=example_secondary.cidr_block.apply(lambda cidr_block: std.cidrsubnet_output(input=cidr_block,
newbits=8,
netnum=range["value"])).apply(lambda invoke: invoke.result),
tags={
"Name": "Secondary",
}))
example_service_region = aws.directoryservice.ServiceRegion("example",
directory_id=example_directory.id,
region_name=example.name,
vpc_settings={
"vpc_id": example_secondary.id,
"subnet_ids": [__item.id for __item in example_secondary_subnet],
},
tags={
"Name": "Secondary",
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directoryservice"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := aws.GetRegion(ctx, &aws.GetRegionArgs{
}, nil);
if err != nil {
return err
}
available, err := aws.GetAvailabilityZones(ctx, &aws.GetAvailabilityZonesArgs{
State: pulumi.StringRef("available"),
Filters: []aws.GetAvailabilityZonesFilter{
{
Name: "opt-in-status",
Values: []string{
"opt-in-not-required",
},
},
},
}, nil);
if err != nil {
return err
}
exampleVpc, err := ec2.NewVpc(ctx, "example", &ec2.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
Tags: pulumi.StringMap{
"Name": pulumi.String("Primary"),
},
})
if err != nil {
return err
}
var exampleSubnet []*ec2.Subnet
for index := 0; index < 2; index++ {
key0 := index
val0 := index
__res, err := ec2.NewSubnet(ctx, fmt.Sprintf("example-%v", key0), &ec2.SubnetArgs{
VpcId: exampleVpc.ID(),
AvailabilityZone: pulumi.String(available.Names[val0]),
CidrBlock: pulumi.String(exampleVpc.CidrBlock.ApplyT(func(cidrBlock string) (std.CidrsubnetResult, error) {
return std.CidrsubnetResult(interface{}(std.CidrsubnetOutput(ctx, std.CidrsubnetOutputArgs{
Input: cidrBlock,
Newbits: 8,
Netnum: val0,
}, nil))), nil
}).(std.CidrsubnetResultOutput).ApplyT(func(invoke std.CidrsubnetResult) (*string, error) {
return invoke.Result, nil
}).(pulumi.StringPtrOutput)),
Tags: pulumi.StringMap{
"Name": pulumi.String("Primary"),
},
})
if err != nil {
return err
}
exampleSubnet = append(exampleSubnet, __res)
}
exampleDirectory, err := directoryservice.NewDirectory(ctx, "example", &directoryservice.DirectoryArgs{
Name: pulumi.String("example.com"),
Password: pulumi.String("SuperSecretPassw0rd"),
Type: pulumi.String("MicrosoftAD"),
VpcSettings: &directoryservice.DirectoryVpcSettingsArgs{
VpcId: exampleVpc.ID(),
SubnetIds: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:44,17-36),
},
})
if err != nil {
return err
}
available_secondary, err := aws.GetAvailabilityZones(ctx, &aws.GetAvailabilityZonesArgs{
State: pulumi.StringRef("available"),
Filters: []aws.GetAvailabilityZonesFilter{
{
Name: "opt-in-status",
Values: []string{
"opt-in-not-required",
},
},
},
}, nil);
if err != nil {
return err
}
_, err = ec2.NewVpc(ctx, "example-secondary", &ec2.VpcArgs{
CidrBlock: pulumi.String("10.1.0.0/16"),
Tags: pulumi.StringMap{
"Name": pulumi.String("Secondary"),
},
})
if err != nil {
return err
}
var example_secondarySubnet []*ec2.Subnet
for index := 0; index < 2; index++ {
key0 := index
val0 := index
__res, err := ec2.NewSubnet(ctx, fmt.Sprintf("example-secondary-%v", key0), &ec2.SubnetArgs{
VpcId: example_secondary.ID(),
AvailabilityZone: pulumi.String(available_secondary.Names[val0]),
CidrBlock: pulumi.String(example_secondary.CidrBlock.ApplyT(func(cidrBlock string) (std.CidrsubnetResult, error) {
return std.CidrsubnetResult(interface{}(std.CidrsubnetOutput(ctx, std.CidrsubnetOutputArgs{
Input: cidrBlock,
Newbits: 8,
Netnum: val0,
}, nil))), nil
}).(std.CidrsubnetResultOutput).ApplyT(func(invoke std.CidrsubnetResult) (*string, error) {
return invoke.Result, nil
}).(pulumi.StringPtrOutput)),
Tags: pulumi.StringMap{
"Name": pulumi.String("Secondary"),
},
})
if err != nil {
return err
}
example_secondarySubnet = append(example_secondarySubnet, __res)
}
_, err = directoryservice.NewServiceRegion(ctx, "example", &directoryservice.ServiceRegionArgs{
DirectoryId: exampleDirectory.ID(),
RegionName: pulumi.String(example.Name),
VpcSettings: &directoryservice.ServiceRegionVpcSettingsArgs{
VpcId: example_secondary.ID(),
SubnetIds: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:87,17-46),
},
Tags: pulumi.StringMap{
"Name": pulumi.String("Secondary"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var example = Aws.GetRegion.Invoke();
var available = Aws.GetAvailabilityZones.Invoke(new()
{
State = "available",
Filters = new[]
{
new Aws.Inputs.GetAvailabilityZonesFilterInputArgs
{
Name = "opt-in-status",
Values = new[]
{
"opt-in-not-required",
},
},
},
});
var exampleVpc = new Aws.Ec2.Vpc("example", new()
{
CidrBlock = "10.0.0.0/16",
Tags =
{
{ "Name", "Primary" },
},
});
var exampleSubnet = new List<Aws.Ec2.Subnet>();
for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
{
var range = new { Value = rangeIndex };
exampleSubnet.Add(new Aws.Ec2.Subnet($"example-{range.Value}", new()
{
VpcId = exampleVpc.Id,
AvailabilityZone = available.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Names)[range.Value],
CidrBlock = exampleVpc.CidrBlock.Apply(cidrBlock => Std.Cidrsubnet.Invoke(new()
{
Input = cidrBlock,
Newbits = 8,
Netnum = range.Value,
})).Apply(invoke => invoke.Result),
Tags =
{
{ "Name", "Primary" },
},
}));
}
var exampleDirectory = new Aws.DirectoryService.Directory("example", new()
{
Name = "example.com",
Password = "SuperSecretPassw0rd",
Type = "MicrosoftAD",
VpcSettings = new Aws.DirectoryService.Inputs.DirectoryVpcSettingsArgs
{
VpcId = exampleVpc.Id,
SubnetIds = exampleSubnet.Select(__item => __item.Id).ToList(),
},
});
var available_secondary = Aws.GetAvailabilityZones.Invoke(new()
{
State = "available",
Filters = new[]
{
new Aws.Inputs.GetAvailabilityZonesFilterInputArgs
{
Name = "opt-in-status",
Values = new[]
{
"opt-in-not-required",
},
},
},
});
var example_secondary = new Aws.Ec2.Vpc("example-secondary", new()
{
CidrBlock = "10.1.0.0/16",
Tags =
{
{ "Name", "Secondary" },
},
});
var example_secondarySubnet = new List<Aws.Ec2.Subnet>();
for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
{
var range = new { Value = rangeIndex };
example_secondarySubnet.Add(new Aws.Ec2.Subnet($"example-secondary-{range.Value}", new()
{
VpcId = example_secondary.Id,
AvailabilityZone = available_secondary.Apply(available_secondary => available_secondary.Apply(getAvailabilityZonesResult => getAvailabilityZonesResult.Names)[range.Value]),
CidrBlock = example_secondary.CidrBlock.Apply(cidrBlock => Std.Cidrsubnet.Invoke(new()
{
Input = cidrBlock,
Newbits = 8,
Netnum = range.Value,
})).Apply(invoke => invoke.Result),
Tags =
{
{ "Name", "Secondary" },
},
}));
}
var exampleServiceRegion = new Aws.DirectoryService.ServiceRegion("example", new()
{
DirectoryId = exampleDirectory.Id,
RegionName = example.Apply(getRegionResult => getRegionResult.Name),
VpcSettings = new Aws.DirectoryService.Inputs.ServiceRegionVpcSettingsArgs
{
VpcId = example_secondary.Id,
SubnetIds = example_secondarySubnet.Select(__item => __item.Id).ToList(),
},
Tags =
{
{ "Name", "Secondary" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.inputs.GetRegionArgs;
import com.pulumi.aws.inputs.GetAvailabilityZonesArgs;
import com.pulumi.aws.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
import com.pulumi.aws.ec2.Subnet;
import com.pulumi.aws.ec2.SubnetArgs;
import com.pulumi.aws.directoryservice.Directory;
import com.pulumi.aws.directoryservice.DirectoryArgs;
import com.pulumi.aws.directoryservice.inputs.DirectoryVpcSettingsArgs;
import com.pulumi.aws.directoryservice.ServiceRegion;
import com.pulumi.aws.directoryservice.ServiceRegionArgs;
import com.pulumi.aws.directoryservice.inputs.ServiceRegionVpcSettingsArgs;
import com.pulumi.codegen.internal.KeyedValue;
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) {
final var example = AwsFunctions.getRegion();
final var available = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
.state("available")
.filters(GetAvailabilityZonesFilterArgs.builder()
.name("opt-in-status")
.values("opt-in-not-required")
.build())
.build());
var exampleVpc = new Vpc("exampleVpc", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.tags(Map.of("Name", "Primary"))
.build());
for (var i = 0; i < 2; i++) {
new Subnet("exampleSubnet-" + i, SubnetArgs.builder()
.vpcId(exampleVpc.id())
.availabilityZone(available.applyValue(getAvailabilityZonesResult -> getAvailabilityZonesResult.names())[range.value()])
.cidrBlock(exampleVpc.cidrBlock().applyValue(cidrBlock -> StdFunctions.cidrsubnet()).applyValue(invoke -> invoke.result()))
.tags(Map.of("Name", "Primary"))
.build());
}
var exampleDirectory = new Directory("exampleDirectory", DirectoryArgs.builder()
.name("example.com")
.password("SuperSecretPassw0rd")
.type("MicrosoftAD")
.vpcSettings(DirectoryVpcSettingsArgs.builder()
.vpcId(exampleVpc.id())
.subnetIds(exampleSubnet.stream().map(element -> element.id()).collect(toList()))
.build())
.build());
final var available-secondary = AwsFunctions.getAvailabilityZones(GetAvailabilityZonesArgs.builder()
.state("available")
.filters(GetAvailabilityZonesFilterArgs.builder()
.name("opt-in-status")
.values("opt-in-not-required")
.build())
.build());
var example_secondary = new Vpc("example-secondary", VpcArgs.builder()
.cidrBlock("10.1.0.0/16")
.tags(Map.of("Name", "Secondary"))
.build());
for (var i = 0; i < 2; i++) {
new Subnet("example-secondarySubnet-" + i, SubnetArgs.builder()
.vpcId(example_secondary.id())
.availabilityZone(available_secondary.names()[range.value()])
.cidrBlock(example_secondary.cidrBlock().applyValue(cidrBlock -> StdFunctions.cidrsubnet()).applyValue(invoke -> invoke.result()))
.tags(Map.of("Name", "Secondary"))
.build());
}
var exampleServiceRegion = new ServiceRegion("exampleServiceRegion", ServiceRegionArgs.builder()
.directoryId(exampleDirectory.id())
.regionName(example.applyValue(getRegionResult -> getRegionResult.name()))
.vpcSettings(ServiceRegionVpcSettingsArgs.builder()
.vpcId(example_secondary.id())
.subnetIds(example_secondarySubnet.stream().map(element -> element.id()).collect(toList()))
.build())
.tags(Map.of("Name", "Secondary"))
.build());
}
}
Coming soon!
Create ServiceRegion Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServiceRegion(name: string, args: ServiceRegionArgs, opts?: CustomResourceOptions);
@overload
def ServiceRegion(resource_name: str,
args: ServiceRegionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServiceRegion(resource_name: str,
opts: Optional[ResourceOptions] = None,
directory_id: Optional[str] = None,
region_name: Optional[str] = None,
vpc_settings: Optional[ServiceRegionVpcSettingsArgs] = None,
desired_number_of_domain_controllers: Optional[int] = None,
tags: Optional[Mapping[str, str]] = None)
func NewServiceRegion(ctx *Context, name string, args ServiceRegionArgs, opts ...ResourceOption) (*ServiceRegion, error)
public ServiceRegion(string name, ServiceRegionArgs args, CustomResourceOptions? opts = null)
public ServiceRegion(String name, ServiceRegionArgs args)
public ServiceRegion(String name, ServiceRegionArgs args, CustomResourceOptions options)
type: aws:directoryservice:ServiceRegion
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 ServiceRegionArgs
- 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 ServiceRegionArgs
- 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 ServiceRegionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceRegionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServiceRegionArgs
- 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 serviceRegionResource = new Aws.DirectoryService.ServiceRegion("serviceRegionResource", new()
{
DirectoryId = "string",
RegionName = "string",
VpcSettings = new Aws.DirectoryService.Inputs.ServiceRegionVpcSettingsArgs
{
SubnetIds = new[]
{
"string",
},
VpcId = "string",
},
DesiredNumberOfDomainControllers = 0,
Tags =
{
{ "string", "string" },
},
});
example, err := directoryservice.NewServiceRegion(ctx, "serviceRegionResource", &directoryservice.ServiceRegionArgs{
DirectoryId: pulumi.String("string"),
RegionName: pulumi.String("string"),
VpcSettings: &directoryservice.ServiceRegionVpcSettingsArgs{
SubnetIds: pulumi.StringArray{
pulumi.String("string"),
},
VpcId: pulumi.String("string"),
},
DesiredNumberOfDomainControllers: pulumi.Int(0),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var serviceRegionResource = new ServiceRegion("serviceRegionResource", ServiceRegionArgs.builder()
.directoryId("string")
.regionName("string")
.vpcSettings(ServiceRegionVpcSettingsArgs.builder()
.subnetIds("string")
.vpcId("string")
.build())
.desiredNumberOfDomainControllers(0)
.tags(Map.of("string", "string"))
.build());
service_region_resource = aws.directoryservice.ServiceRegion("serviceRegionResource",
directory_id="string",
region_name="string",
vpc_settings={
"subnet_ids": ["string"],
"vpc_id": "string",
},
desired_number_of_domain_controllers=0,
tags={
"string": "string",
})
const serviceRegionResource = new aws.directoryservice.ServiceRegion("serviceRegionResource", {
directoryId: "string",
regionName: "string",
vpcSettings: {
subnetIds: ["string"],
vpcId: "string",
},
desiredNumberOfDomainControllers: 0,
tags: {
string: "string",
},
});
type: aws:directoryservice:ServiceRegion
properties:
desiredNumberOfDomainControllers: 0
directoryId: string
regionName: string
tags:
string: string
vpcSettings:
subnetIds:
- string
vpcId: string
ServiceRegion 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 ServiceRegion resource accepts the following input properties:
- Directory
Id string - The identifier of the directory to which you want to add Region replication.
- Region
Name string - The name of the Region where you want to add domain controllers for replication.
- Vpc
Settings ServiceRegion Vpc Settings - VPC information in the replicated Region. Detailed below.
- Desired
Number intOf Domain Controllers - The number of domain controllers desired in the replicated directory. Minimum value of
2
. - Dictionary<string, string>
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Directory
Id string - The identifier of the directory to which you want to add Region replication.
- Region
Name string - The name of the Region where you want to add domain controllers for replication.
- Vpc
Settings ServiceRegion Vpc Settings Args - VPC information in the replicated Region. Detailed below.
- Desired
Number intOf Domain Controllers - The number of domain controllers desired in the replicated directory. Minimum value of
2
. - map[string]string
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- directory
Id String - The identifier of the directory to which you want to add Region replication.
- region
Name String - The name of the Region where you want to add domain controllers for replication.
- vpc
Settings ServiceRegion Vpc Settings - VPC information in the replicated Region. Detailed below.
- desired
Number IntegerOf Domain Controllers - The number of domain controllers desired in the replicated directory. Minimum value of
2
. - Map<String,String>
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- directory
Id string - The identifier of the directory to which you want to add Region replication.
- region
Name string - The name of the Region where you want to add domain controllers for replication.
- vpc
Settings ServiceRegion Vpc Settings - VPC information in the replicated Region. Detailed below.
- desired
Number numberOf Domain Controllers - The number of domain controllers desired in the replicated directory. Minimum value of
2
. - {[key: string]: string}
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- directory_
id str - The identifier of the directory to which you want to add Region replication.
- region_
name str - The name of the Region where you want to add domain controllers for replication.
- vpc_
settings ServiceRegion Vpc Settings Args - VPC information in the replicated Region. Detailed below.
- desired_
number_ intof_ domain_ controllers - The number of domain controllers desired in the replicated directory. Minimum value of
2
. - Mapping[str, str]
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- directory
Id String - The identifier of the directory to which you want to add Region replication.
- region
Name String - The name of the Region where you want to add domain controllers for replication.
- vpc
Settings Property Map - VPC information in the replicated Region. Detailed below.
- desired
Number NumberOf Domain Controllers - The number of domain controllers desired in the replicated directory. Minimum value of
2
. - Map<String>
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServiceRegion resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Id string
- The provider-assigned unique ID for this managed resource.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id string
- The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id str
- The provider-assigned unique ID for this managed resource.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- id String
- The provider-assigned unique ID for this managed resource.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Look up Existing ServiceRegion Resource
Get an existing ServiceRegion 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?: ServiceRegionState, opts?: CustomResourceOptions): ServiceRegion
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
desired_number_of_domain_controllers: Optional[int] = None,
directory_id: Optional[str] = None,
region_name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
vpc_settings: Optional[ServiceRegionVpcSettingsArgs] = None) -> ServiceRegion
func GetServiceRegion(ctx *Context, name string, id IDInput, state *ServiceRegionState, opts ...ResourceOption) (*ServiceRegion, error)
public static ServiceRegion Get(string name, Input<string> id, ServiceRegionState? state, CustomResourceOptions? opts = null)
public static ServiceRegion get(String name, Output<String> id, ServiceRegionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Desired
Number intOf Domain Controllers - The number of domain controllers desired in the replicated directory. Minimum value of
2
. - Directory
Id string - The identifier of the directory to which you want to add Region replication.
- Region
Name string - The name of the Region where you want to add domain controllers for replication.
- Dictionary<string, string>
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Vpc
Settings ServiceRegion Vpc Settings - VPC information in the replicated Region. Detailed below.
- Desired
Number intOf Domain Controllers - The number of domain controllers desired in the replicated directory. Minimum value of
2
. - Directory
Id string - The identifier of the directory to which you want to add Region replication.
- Region
Name string - The name of the Region where you want to add domain controllers for replication.
- map[string]string
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Vpc
Settings ServiceRegion Vpc Settings Args - VPC information in the replicated Region. Detailed below.
- desired
Number IntegerOf Domain Controllers - The number of domain controllers desired in the replicated directory. Minimum value of
2
. - directory
Id String - The identifier of the directory to which you want to add Region replication.
- region
Name String - The name of the Region where you want to add domain controllers for replication.
- Map<String,String>
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc
Settings ServiceRegion Vpc Settings - VPC information in the replicated Region. Detailed below.
- desired
Number numberOf Domain Controllers - The number of domain controllers desired in the replicated directory. Minimum value of
2
. - directory
Id string - The identifier of the directory to which you want to add Region replication.
- region
Name string - The name of the Region where you want to add domain controllers for replication.
- {[key: string]: string}
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc
Settings ServiceRegion Vpc Settings - VPC information in the replicated Region. Detailed below.
- desired_
number_ intof_ domain_ controllers - The number of domain controllers desired in the replicated directory. Minimum value of
2
. - directory_
id str - The identifier of the directory to which you want to add Region replication.
- region_
name str - The name of the Region where you want to add domain controllers for replication.
- Mapping[str, str]
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc_
settings ServiceRegion Vpc Settings Args - VPC information in the replicated Region. Detailed below.
- desired
Number NumberOf Domain Controllers - The number of domain controllers desired in the replicated directory. Minimum value of
2
. - directory
Id String - The identifier of the directory to which you want to add Region replication.
- region
Name String - The name of the Region where you want to add domain controllers for replication.
- Map<String>
- Map of tags to assign to this resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - vpc
Settings Property Map - VPC information in the replicated Region. Detailed below.
Supporting Types
ServiceRegionVpcSettings, ServiceRegionVpcSettingsArgs
- subnet_
ids Sequence[str] - The identifiers of the subnets for the directory servers.
- vpc_
id str - The identifier of the VPC in which to create the directory.
Import
Using pulumi import
, import Replicated Regions using directory ID,Region name. For example:
$ pulumi import aws:directoryservice/serviceRegion:ServiceRegion example d-9267651497,us-east-2
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.