import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * `aws.ec2.Vpc` provides details about a specific VPC. * * This resource can prove useful when a module accepts a vpc id as * an input variable and needs to, for example, determine the CIDR block of that * VPC. * * ## Example Usage * * The following example shows how one might accept a VPC id as a variable * and use this data source to obtain the data necessary to create a subnet * within it. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as std from "@pulumi/std"; * * const config = new pulumi.Config(); * const vpcId = config.requireObject("vpcId"); * const selected = aws.ec2.getVpc({ * id: vpcId, * }); * const example = new aws.ec2.Subnet("example", { * vpcId: selected.then(selected => selected.id), * availabilityZone: "us-west-2a", * cidrBlock: selected.then(selected => std.cidrsubnet({ * input: selected.cidrBlock, * newbits: 4, * netnum: 1, * })).then(invoke => invoke.result), * }); * ``` */ export declare function getVpc(args?: GetVpcArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getVpc. */ export interface GetVpcArgs { /** * CIDR block of the desired VPC. */ cidrBlock?: string; /** * Boolean constraint on whether the desired VPC is the default VPC for the region. */ default?: boolean; /** * DHCP options id of the desired VPC. */ dhcpOptionsId?: string; /** * Custom filter block as described below. See `filter` Block below. */ filters?: inputs.ec2.GetVpcFilter[]; /** * ID of the specific VPC to retrieve. */ id?: 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?: string; /** * Current state of the desired VPC. Can be either `"pending"` or `"available"`. */ state?: string; /** * Map of tags, each pair of which must exactly match a pair on the desired VPC. */ tags?: { [key: string]: string; }; } /** * A collection of values returned by getVpc. */ export interface GetVpcResult { /** * ARN of VPC. */ readonly arn: string; /** * CIDR block for the association. */ readonly cidrBlock: string; /** * Information about the IPv4 CIDR blocks associated with the VPC. See `cidrBlockAssociations` Block below. */ readonly cidrBlockAssociations: outputs.ec2.GetVpcCidrBlockAssociation[]; readonly default: boolean; readonly dhcpOptionsId: string; /** * Whether the VPC has DNS hostname support. */ readonly enableDnsHostnames: boolean; /** * Whether the VPC has DNS support. */ readonly enableDnsSupport: boolean; /** * Whether Network Address Usage metrics are enabled for your VPC. */ readonly enableNetworkAddressUsageMetrics: boolean; readonly filters?: outputs.ec2.GetVpcFilter[]; readonly id: string; /** * Allowed tenancy of instances launched into the selected VPC. May be any of `"default"`, `"dedicated"`, or `"host"`. */ readonly instanceTenancy: string; /** * (**Deprecated** use `ipv6CidrBlockAssociations` instead) Association ID for the IPv6 CIDR block. * * @deprecated ipv6_association_id is deprecated. Use ipv6CidrBlockAssociations instead. */ readonly ipv6AssociationId: string; /** * IPv6 CIDR block for the association. * * @deprecated ipv6_cidr_block is deprecated. Use ipv6CidrBlockAssociations instead. */ readonly ipv6CidrBlock: string; /** * Information about the IPv6 CIDR blocks associated with the VPC. See `ipv6CidrBlockAssociations` Block below. */ readonly ipv6CidrBlockAssociations: outputs.ec2.GetVpcIpv6CidrBlockAssociation[]; /** * ID of the main route table associated with this VPC. */ readonly mainRouteTableId: string; /** * ID of the AWS account that owns the VPC. */ readonly ownerId: string; readonly region: string; /** * State of the association. */ readonly state: string; readonly tags: { [key: string]: string; }; } /** * `aws.ec2.Vpc` provides details about a specific VPC. * * This resource can prove useful when a module accepts a vpc id as * an input variable and needs to, for example, determine the CIDR block of that * VPC. * * ## Example Usage * * The following example shows how one might accept a VPC id as a variable * and use this data source to obtain the data necessary to create a subnet * within it. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as std from "@pulumi/std"; * * const config = new pulumi.Config(); * const vpcId = config.requireObject("vpcId"); * const selected = aws.ec2.getVpc({ * id: vpcId, * }); * const example = new aws.ec2.Subnet("example", { * vpcId: selected.then(selected => selected.id), * availabilityZone: "us-west-2a", * cidrBlock: selected.then(selected => std.cidrsubnet({ * input: selected.cidrBlock, * newbits: 4, * netnum: 1, * })).then(invoke => invoke.result), * }); * ``` */ export declare function getVpcOutput(args?: GetVpcOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getVpc. */ export interface GetVpcOutputArgs { /** * CIDR block of the desired VPC. */ cidrBlock?: pulumi.Input; /** * Boolean constraint on whether the desired VPC is the default VPC for the region. */ default?: pulumi.Input; /** * DHCP options id of the desired VPC. */ dhcpOptionsId?: pulumi.Input; /** * Custom filter block as described below. See `filter` Block below. */ filters?: pulumi.Input[] | undefined>; /** * ID of the specific VPC to retrieve. */ id?: pulumi.Input; /** * 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; /** * Current state of the desired VPC. Can be either `"pending"` or `"available"`. */ state?: pulumi.Input; /** * Map of tags, each pair of which must exactly match a pair on the desired VPC. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; } //# sourceMappingURL=getVpc.d.ts.map