@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
365 lines (364 loc) • 13.4 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Provides a Simple or Managed Microsoft directory in AWS Directory Service.
*
* ## Example Usage
*
* ### SimpleAD
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const main = new aws.ec2.Vpc("main", {cidrBlock: "10.0.0.0/16"});
* const foo = new aws.ec2.Subnet("foo", {
* vpcId: main.id,
* availabilityZone: "us-west-2a",
* cidrBlock: "10.0.1.0/24",
* });
* const barSubnet = new aws.ec2.Subnet("bar", {
* vpcId: main.id,
* availabilityZone: "us-west-2b",
* cidrBlock: "10.0.2.0/24",
* });
* const bar = new aws.directoryservice.Directory("bar", {
* name: "corp.notexample.com",
* password: "SuperSecretPassw0rd",
* size: "Small",
* vpcSettings: {
* vpcId: main.id,
* subnetIds: [
* foo.id,
* barSubnet.id,
* ],
* },
* tags: {
* Project: "foo",
* },
* });
* ```
*
* ### Microsoft Active Directory (MicrosoftAD)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const main = new aws.ec2.Vpc("main", {cidrBlock: "10.0.0.0/16"});
* const foo = new aws.ec2.Subnet("foo", {
* vpcId: main.id,
* availabilityZone: "us-west-2a",
* cidrBlock: "10.0.1.0/24",
* });
* const barSubnet = new aws.ec2.Subnet("bar", {
* vpcId: main.id,
* availabilityZone: "us-west-2b",
* cidrBlock: "10.0.2.0/24",
* });
* const bar = new aws.directoryservice.Directory("bar", {
* name: "corp.notexample.com",
* password: "SuperSecretPassw0rd",
* edition: "Standard",
* type: "MicrosoftAD",
* vpcSettings: {
* vpcId: main.id,
* subnetIds: [
* foo.id,
* barSubnet.id,
* ],
* },
* tags: {
* Project: "foo",
* },
* });
* ```
*
* ### Microsoft Active Directory Connector (ADConnector)
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const main = new aws.ec2.Vpc("main", {cidrBlock: "10.0.0.0/16"});
* const foo = new aws.ec2.Subnet("foo", {
* vpcId: main.id,
* availabilityZone: "us-west-2a",
* cidrBlock: "10.0.1.0/24",
* });
* const bar = new aws.ec2.Subnet("bar", {
* vpcId: main.id,
* availabilityZone: "us-west-2b",
* cidrBlock: "10.0.2.0/24",
* });
* const connector = new aws.directoryservice.Directory("connector", {
* name: "corp.notexample.com",
* password: "SuperSecretPassw0rd",
* size: "Small",
* type: "ADConnector",
* connectSettings: {
* customerDnsIps: ["A.B.C.D"],
* customerUsername: "Admin",
* subnetIds: [
* foo.id,
* bar.id,
* ],
* vpcId: main.id,
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import DirectoryService directories using the directory `id`. For example:
*
* ```sh
* $ pulumi import aws:directoryservice/directory:Directory sample d-926724cf57
* ```
*/
export declare class Directory extends pulumi.CustomResource {
/**
* Get an existing Directory resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DirectoryState, opts?: pulumi.CustomResourceOptions): Directory;
/**
* Returns true if the given object is an instance of Directory. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Directory;
/**
* The access URL for the directory, such as `http://alias.awsapps.com`.
*/
readonly accessUrl: pulumi.Output<string>;
/**
* The alias for the directory (must be unique amongst all aliases in AWS). Required for `enableSso`.
*/
readonly alias: pulumi.Output<string>;
/**
* Connector related information about the directory. Fields documented below.
*/
readonly connectSettings: pulumi.Output<outputs.directoryservice.DirectoryConnectSettings | undefined>;
/**
* A textual description for the directory.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The number of domain controllers desired in the directory. Minimum value of `2`. Scaling of domain controllers is only supported for `MicrosoftAD` directories.
*/
readonly desiredNumberOfDomainControllers: pulumi.Output<number>;
/**
* A list of IP addresses of the DNS servers for the directory or connector.
*/
readonly dnsIpAddresses: pulumi.Output<string[]>;
/**
* The MicrosoftAD edition (`Standard` or `Enterprise`). Defaults to `Enterprise`.
*/
readonly edition: pulumi.Output<string>;
/**
* Whether to enable single-sign on for the directory. Requires `alias`. Defaults to `false`.
*/
readonly enableSso: pulumi.Output<boolean | undefined>;
/**
* The fully qualified name for the directory, such as `corp.example.com`
*/
readonly name: pulumi.Output<string>;
/**
* The password for the directory administrator or connector user.
*/
readonly password: pulumi.Output<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* The ID of the security group created by the directory.
*/
readonly securityGroupId: pulumi.Output<string>;
/**
* The short name of the directory, such as `CORP`.
*/
readonly shortName: pulumi.Output<string>;
/**
* (For `SimpleAD` and `ADConnector` types) The size of the directory (`Small` or `Large` are accepted values). `Large` by default.
*/
readonly size: pulumi.Output<string>;
/**
* A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
readonly tagsAll: pulumi.Output<{
[key: string]: string;
}>;
/**
* The directory type (`SimpleAD`, `ADConnector` or `MicrosoftAD` are accepted values). Defaults to `SimpleAD`.
*/
readonly type: pulumi.Output<string | undefined>;
/**
* VPC related information about the directory. Fields documented below.
*/
readonly vpcSettings: pulumi.Output<outputs.directoryservice.DirectoryVpcSettings | undefined>;
/**
* Create a Directory resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: DirectoryArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Directory resources.
*/
export interface DirectoryState {
/**
* The access URL for the directory, such as `http://alias.awsapps.com`.
*/
accessUrl?: pulumi.Input<string>;
/**
* The alias for the directory (must be unique amongst all aliases in AWS). Required for `enableSso`.
*/
alias?: pulumi.Input<string>;
/**
* Connector related information about the directory. Fields documented below.
*/
connectSettings?: pulumi.Input<inputs.directoryservice.DirectoryConnectSettings>;
/**
* A textual description for the directory.
*/
description?: pulumi.Input<string>;
/**
* The number of domain controllers desired in the directory. Minimum value of `2`. Scaling of domain controllers is only supported for `MicrosoftAD` directories.
*/
desiredNumberOfDomainControllers?: pulumi.Input<number>;
/**
* A list of IP addresses of the DNS servers for the directory or connector.
*/
dnsIpAddresses?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The MicrosoftAD edition (`Standard` or `Enterprise`). Defaults to `Enterprise`.
*/
edition?: pulumi.Input<string>;
/**
* Whether to enable single-sign on for the directory. Requires `alias`. Defaults to `false`.
*/
enableSso?: pulumi.Input<boolean>;
/**
* The fully qualified name for the directory, such as `corp.example.com`
*/
name?: pulumi.Input<string>;
/**
* The password for the directory administrator or connector user.
*/
password?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* The ID of the security group created by the directory.
*/
securityGroupId?: pulumi.Input<string>;
/**
* The short name of the directory, such as `CORP`.
*/
shortName?: pulumi.Input<string>;
/**
* (For `SimpleAD` and `ADConnector` types) The size of the directory (`Small` or `Large` are accepted values). `Large` by default.
*/
size?: pulumi.Input<string>;
/**
* A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
*/
tagsAll?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The directory type (`SimpleAD`, `ADConnector` or `MicrosoftAD` are accepted values). Defaults to `SimpleAD`.
*/
type?: pulumi.Input<string>;
/**
* VPC related information about the directory. Fields documented below.
*/
vpcSettings?: pulumi.Input<inputs.directoryservice.DirectoryVpcSettings>;
}
/**
* The set of arguments for constructing a Directory resource.
*/
export interface DirectoryArgs {
/**
* The alias for the directory (must be unique amongst all aliases in AWS). Required for `enableSso`.
*/
alias?: pulumi.Input<string>;
/**
* Connector related information about the directory. Fields documented below.
*/
connectSettings?: pulumi.Input<inputs.directoryservice.DirectoryConnectSettings>;
/**
* A textual description for the directory.
*/
description?: pulumi.Input<string>;
/**
* The number of domain controllers desired in the directory. Minimum value of `2`. Scaling of domain controllers is only supported for `MicrosoftAD` directories.
*/
desiredNumberOfDomainControllers?: pulumi.Input<number>;
/**
* The MicrosoftAD edition (`Standard` or `Enterprise`). Defaults to `Enterprise`.
*/
edition?: pulumi.Input<string>;
/**
* Whether to enable single-sign on for the directory. Requires `alias`. Defaults to `false`.
*/
enableSso?: pulumi.Input<boolean>;
/**
* The fully qualified name for the directory, such as `corp.example.com`
*/
name: pulumi.Input<string>;
/**
* The password for the directory administrator or connector user.
*/
password: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
/**
* The short name of the directory, such as `CORP`.
*/
shortName?: pulumi.Input<string>;
/**
* (For `SimpleAD` and `ADConnector` types) The size of the directory (`Small` or `Large` are accepted values). `Large` by default.
*/
size?: pulumi.Input<string>;
/**
* A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The directory type (`SimpleAD`, `ADConnector` or `MicrosoftAD` are accepted values). Defaults to `SimpleAD`.
*/
type?: pulumi.Input<string>;
/**
* VPC related information about the directory. Fields documented below.
*/
vpcSettings?: pulumi.Input<inputs.directoryservice.DirectoryVpcSettings>;
}