import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an exclusive set of IP routes for an AWS Directory Service directory. IP routes are used to route traffic from an AWS Managed Microsoft AD or AD Connector directory to an IPv4 or IPv6 CIDR block, such as an on-premises network reachable over a VPN or AWS Direct Connect connection, or a peered VPC. * * > This resource takes exclusive ownership over the IP routes of a directory. This includes removal of IP routes which are not explicitly configured. To prevent persistent drift, ensure any `aws.directoryservice.IpRoute` resources managed alongside this resource have an equivalent `ipRoute` block. * * > Destruction of this resource means Terraform will no longer manage reconciliation of the configured IP routes. It __will not__ remove the configured IP routes from the directory. * * > Adding an IPv6 route (`cidrIpv6`) requires the directory's network type to be dual-stack (IPv4 and IPv6). Enabling IPv6 support on a directory is a one-way operation performed outside of Terraform; see [Updating directory network type](https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_update-directory-type.html). * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.directoryservice.Directory("example", { * vpcSettings: { * vpcId: exampleAwsVpc.id, * subnetIds: exampleAwsSubnet.map(__item => __item.id), * }, * name: "corp.example.com", * password: "SuperSecretPassw0rd", * type: "MicrosoftAD", * }); * const exampleIpRoutesExclusive = new aws.directoryservice.IpRoutesExclusive("example", { * ipRoutes: [ * { * cidrIp: "10.0.0.0/24", * description: "On-premises network", * }, * { * cidrIp: "192.168.100.0/24", * description: "Peered VPC", * }, * ], * directoryId: example.id, * updateSecurityGroupForDirectoryControllers: true, * }); * ``` * * ### IPv6 * * IPv6 routes require an existing directory that has been updated to dual-stack. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.directoryservice.IpRoutesExclusive("example", { * ipRoutes: [{ * cidrIpv6: "2001:db8::/64", * description: "On-premises IPv6 network", * }], * directoryId: "d-1234567890", * }); * ``` * * ### Disallow IP Routes * * To remove all IP routes from a directory, omit all `ipRoute` blocks. Any IP routes added outside of Terraform are detected on the next refresh and removed on the next apply. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.directoryservice.IpRoutesExclusive("example", {directoryId: exampleAwsDirectoryServiceDirectory.id}); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `directoryId` (String) Identifier of the directory. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import exclusive management of IP routes using the directory ID. For example: * * ```sh * $ pulumi import aws:directoryservice/ipRoutesExclusive:IpRoutesExclusive example d-1234567890 * ``` */ export declare class IpRoutesExclusive extends pulumi.CustomResource { /** * Get an existing IpRoutesExclusive 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, state?: IpRoutesExclusiveState, opts?: pulumi.CustomResourceOptions): IpRoutesExclusive; /** * Check whether an existing IpRoutesExclusive resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: IpRoutesExclusiveState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of IpRoutesExclusive. 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 IpRoutesExclusive; /** * Identifier of the directory. Changing this forces a new resource to be created. * * The following arguments are optional: */ readonly directoryId: pulumi.Output; /** * Set of IP routes the directory should have. Omit all `ipRoute` blocks to remove every IP route from the directory. See `ipRoute` Block below. */ readonly ipRoutes: pulumi.Output; /** * Region where this resource is managed. Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; readonly timeouts: pulumi.Output; /** * Whether to update the inbound and outbound rules of the security group for the directory controllers when adding IP routes. Applies only to IP routes added by this resource. Defaults to `false`. */ readonly updateSecurityGroupForDirectoryControllers: pulumi.Output; /** * Create a IpRoutesExclusive 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: IpRoutesExclusiveArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering IpRoutesExclusive resources. */ export interface IpRoutesExclusiveState { /** * Identifier of the directory. Changing this forces a new resource to be created. * * The following arguments are optional: */ directoryId?: pulumi.Input; /** * Set of IP routes the directory should have. Omit all `ipRoute` blocks to remove every IP route from the directory. See `ipRoute` Block below. */ ipRoutes?: pulumi.Input[] | undefined>; /** * Region where this resource is managed. Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; timeouts?: pulumi.Input; /** * Whether to update the inbound and outbound rules of the security group for the directory controllers when adding IP routes. Applies only to IP routes added by this resource. Defaults to `false`. */ updateSecurityGroupForDirectoryControllers?: pulumi.Input; } /** * The set of arguments for constructing a IpRoutesExclusive resource. */ export interface IpRoutesExclusiveArgs { /** * Identifier of the directory. Changing this forces a new resource to be created. * * The following arguments are optional: */ directoryId: pulumi.Input; /** * Set of IP routes the directory should have. Omit all `ipRoute` blocks to remove every IP route from the directory. See `ipRoute` Block below. */ ipRoutes?: pulumi.Input[] | undefined>; /** * Region where this resource is managed. Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; timeouts?: pulumi.Input; /** * Whether to update the inbound and outbound rules of the security group for the directory controllers when adding IP routes. Applies only to IP routes added by this resource. Defaults to `false`. */ updateSecurityGroupForDirectoryControllers?: pulumi.Input; } //# sourceMappingURL=ipRoutesExclusive.d.ts.map