Class Directory
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.
Example Usage
SimpleAD
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var main = new Aws.Ec2.Vpc("main", new Aws.Ec2.VpcArgs
{
CidrBlock = "10.0.0.0/16",
});
var foo = new Aws.Ec2.Subnet("foo", new Aws.Ec2.SubnetArgs
{
AvailabilityZone = "us-west-2a",
CidrBlock = "10.0.1.0/24",
VpcId = main.Id,
});
var barSubnet = new Aws.Ec2.Subnet("barSubnet", new Aws.Ec2.SubnetArgs
{
AvailabilityZone = "us-west-2b",
CidrBlock = "10.0.2.0/24",
VpcId = main.Id,
});
var barDirectory = new Aws.DirectoryService.Directory("barDirectory", new Aws.DirectoryService.DirectoryArgs
{
Password = "SuperSecretPassw0rd",
Size = "Small",
Tags =
{
{ "Project", "foo" },
},
VpcSettings = new Aws.DirectoryService.Inputs.DirectoryVpcSettingsArgs
{
SubnetIds =
{
foo.Id,
barSubnet.Id,
},
VpcId = main.Id,
},
});
}
}
Microsoft Active Directory (MicrosoftAD)
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var main = new Aws.Ec2.Vpc("main", new Aws.Ec2.VpcArgs
{
CidrBlock = "10.0.0.0/16",
});
var foo = new Aws.Ec2.Subnet("foo", new Aws.Ec2.SubnetArgs
{
AvailabilityZone = "us-west-2a",
CidrBlock = "10.0.1.0/24",
VpcId = main.Id,
});
var barSubnet = new Aws.Ec2.Subnet("barSubnet", new Aws.Ec2.SubnetArgs
{
AvailabilityZone = "us-west-2b",
CidrBlock = "10.0.2.0/24",
VpcId = main.Id,
});
var barDirectory = new Aws.DirectoryService.Directory("barDirectory", new Aws.DirectoryService.DirectoryArgs
{
Edition = "Standard",
Password = "SuperSecretPassw0rd",
Tags =
{
{ "Project", "foo" },
},
Type = "MicrosoftAD",
VpcSettings = new Aws.DirectoryService.Inputs.DirectoryVpcSettingsArgs
{
SubnetIds =
{
foo.Id,
barSubnet.Id,
},
VpcId = main.Id,
},
});
}
}
Microsoft Active Directory Connector (ADConnector)
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var main = new Aws.Ec2.Vpc("main", new Aws.Ec2.VpcArgs
{
CidrBlock = "10.0.0.0/16",
});
var foo = new Aws.Ec2.Subnet("foo", new Aws.Ec2.SubnetArgs
{
AvailabilityZone = "us-west-2a",
CidrBlock = "10.0.1.0/24",
VpcId = main.Id,
});
var bar = new Aws.Ec2.Subnet("bar", new Aws.Ec2.SubnetArgs
{
AvailabilityZone = "us-west-2b",
CidrBlock = "10.0.2.0/24",
VpcId = main.Id,
});
var connector = new Aws.DirectoryService.Directory("connector", new Aws.DirectoryService.DirectoryArgs
{
ConnectSettings = new Aws.DirectoryService.Inputs.DirectoryConnectSettingsArgs
{
CustomerDnsIps =
{
"A.B.C.D",
},
CustomerUsername = "Admin",
SubnetIds =
{
foo.Id,
bar.Id,
},
VpcId = main.Id,
},
Password = "SuperSecretPassw0rd",
Size = "Small",
Type = "ADConnector",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.DirectoryService
Assembly: Pulumi.Aws.dll
Syntax
public class Directory : CustomResource
Constructors
View SourceDirectory(String, DirectoryArgs, CustomResourceOptions)
Create a Directory resource with the given unique name, arguments, and options.
Declaration
public Directory(string name, DirectoryArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DirectoryArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAccessUrl
The access URL for the directory, such as http://alias.awsapps.com.
Declaration
public Output<string> AccessUrl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Alias
The alias for the directory (must be unique amongst all aliases in AWS). Required for enable_sso.
Declaration
public Output<string> Alias { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ConnectSettings
Connector related information about the directory. Fields documented below.
Declaration
public Output<DirectoryConnectSettings> ConnectSettings { get; }
Property Value
| Type | Description |
|---|---|
| Output<DirectoryConnectSettings> |
Description
A textual description for the directory.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DnsIpAddresses
A list of IP addresses of the DNS servers for the directory or connector.
Declaration
public Output<ImmutableArray<string>> DnsIpAddresses { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Edition
The MicrosoftAD edition (Standard or Enterprise). Defaults to Enterprise (applies to MicrosoftAD type only).
Declaration
public Output<string> Edition { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EnableSso
Whether to enable single-sign on for the directory. Requires alias. Defaults to false.
Declaration
public Output<bool?> EnableSso { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Name
The fully qualified name for the directory, such as corp.example.com
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Password
The password for the directory administrator or connector user.
Declaration
public Output<string> Password { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SecurityGroupId
The ID of the security group created by the directory.
Declaration
public Output<string> SecurityGroupId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ShortName
The short name of the directory, such as CORP.
Declaration
public Output<string> ShortName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Size
The size of the directory (Small or Large are accepted values).
Declaration
public Output<string> Size { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A map of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Type
The directory type (SimpleAD, ADConnector or MicrosoftAD are accepted values). Defaults to SimpleAD.
Declaration
public Output<string> Type { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
VpcSettings
VPC related information about the directory. Fields documented below.
Declaration
public Output<DirectoryVpcSettings> VpcSettings { get; }
Property Value
| Type | Description |
|---|---|
| Output<DirectoryVpcSettings> |
Methods
View SourceGet(String, Input<String>, DirectoryState, CustomResourceOptions)
Get an existing Directory resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Directory Get(string name, Input<string> id, DirectoryState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DirectoryState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Directory |