import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an IP route 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. * * > To manage the complete set of IP routes for a directory, and remove any not configured in Terraform, use `aws.directoryservice.IpRoutesExclusive` instead. Using both resources for the same directory causes persistent drift unless every `aws.directoryservice.IpRoute` has an equivalent `ipRoute` block. * * > 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 exampleIpRoute = new aws.directoryservice.IpRoute("example", { * directoryId: example.id, * cidrIp: "10.0.0.0/24", * description: "On-premises network", * }); * ``` * * ### 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.IpRoute("example", { * directoryId: "d-1234567890", * cidrIpv6: "2001:db8::/64", * description: "On-premises IPv6 network", * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `directoryId` (String) Identifier of the directory. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `cidrIp` (String) IPv4 CIDR block. Exactly one of `cidrIp` or `cidrIpv6` must be set. * * `cidrIpv6` (String) IPv6 CIDR block. Exactly one of `cidrIp` or `cidrIpv6` must be set. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import an IP route using the directory ID and CIDR block separated by a comma (`,`). For example: * * ```sh * $ pulumi import aws:directoryservice/ipRoute:IpRoute example d-1234567890,10.0.0.0/24 * ``` */ export declare class IpRoute extends pulumi.CustomResource { /** * Get an existing IpRoute 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?: IpRouteState, opts?: pulumi.CustomResourceOptions): IpRoute; /** * Check whether an existing IpRoute 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?: IpRouteState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of IpRoute. 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 IpRoute; /** * IPv4 CIDR block, such as `10.0.0.0/24`. For a single address, use a `/32` block, such as `10.0.0.0/32`. Exactly one of `cidrIp` or `cidrIpv6` must be set. Changing this forces a new resource to be created. */ readonly cidrIp: pulumi.Output; /** * IPv6 CIDR block, such as `2001:db8::/64`. For a single address, use a `/128` block. Exactly one of `cidrIp` or `cidrIpv6` must be set. Changing this forces a new resource to be created. */ readonly cidrIpv6: pulumi.Output; /** * Description of the address block. Changing this forces a new resource to be created. */ readonly description: pulumi.Output; /** * Identifier of the directory to which to add the IP route. Changing this forces a new resource to be created. * * The following arguments are optional: */ readonly directoryId: 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. Changing this forces a new resource to be created. Defaults to `false`. */ readonly updateSecurityGroupForDirectoryControllers: pulumi.Output; /** * Create a IpRoute 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: IpRouteArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering IpRoute resources. */ export interface IpRouteState { /** * IPv4 CIDR block, such as `10.0.0.0/24`. For a single address, use a `/32` block, such as `10.0.0.0/32`. Exactly one of `cidrIp` or `cidrIpv6` must be set. Changing this forces a new resource to be created. */ cidrIp?: pulumi.Input; /** * IPv6 CIDR block, such as `2001:db8::/64`. For a single address, use a `/128` block. Exactly one of `cidrIp` or `cidrIpv6` must be set. Changing this forces a new resource to be created. */ cidrIpv6?: pulumi.Input; /** * Description of the address block. Changing this forces a new resource to be created. */ description?: pulumi.Input; /** * Identifier of the directory to which to add the IP route. Changing this forces a new resource to be created. * * The following arguments are optional: */ directoryId?: pulumi.Input; /** * 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. Changing this forces a new resource to be created. Defaults to `false`. */ updateSecurityGroupForDirectoryControllers?: pulumi.Input; } /** * The set of arguments for constructing a IpRoute resource. */ export interface IpRouteArgs { /** * IPv4 CIDR block, such as `10.0.0.0/24`. For a single address, use a `/32` block, such as `10.0.0.0/32`. Exactly one of `cidrIp` or `cidrIpv6` must be set. Changing this forces a new resource to be created. */ cidrIp?: pulumi.Input; /** * IPv6 CIDR block, such as `2001:db8::/64`. For a single address, use a `/128` block. Exactly one of `cidrIp` or `cidrIpv6` must be set. Changing this forces a new resource to be created. */ cidrIpv6?: pulumi.Input; /** * Description of the address block. Changing this forces a new resource to be created. */ description?: pulumi.Input; /** * Identifier of the directory to which to add the IP route. Changing this forces a new resource to be created. * * The following arguments are optional: */ directoryId: pulumi.Input; /** * 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. Changing this forces a new resource to be created. Defaults to `false`. */ updateSecurityGroupForDirectoryControllers?: pulumi.Input; } //# sourceMappingURL=ipRoute.d.ts.map