@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
147 lines • 4.44 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "../types/output";
/**
* Get a subnetwork within GCE from its name and region.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_subnetwork = gcp.compute.getSubnetwork({
* name: "default-us-east1",
* region: "us-east1",
* });
* ```
*/
export declare function getSubnetwork(args?: GetSubnetworkArgs, opts?: pulumi.InvokeOptions): Promise<GetSubnetworkResult>;
/**
* A collection of arguments for invoking getSubnetwork.
*/
export interface GetSubnetworkArgs {
/**
* The name of the subnetwork. One of `name` or `selfLink`
* must be specified.
*/
name?: string;
/**
* The ID of the project in which the resource belongs. If it
* is not provided, the provider project is used.
*/
project?: string;
/**
* The region this subnetwork has been created in. If
* unspecified, this defaults to the region configured in the provider.
*/
region?: string;
/**
* The self link of the subnetwork. If `selfLink` is
* specified, `name`, `project`, and `region` are ignored.
*/
selfLink?: string;
}
/**
* A collection of values returned by getSubnetwork.
*/
export interface GetSubnetworkResult {
/**
* Description of this subnetwork.
*/
readonly description: string;
/**
* The external IPv6 address range that is assigned to this subnetwork.
*/
readonly externalIpv6Prefix: string;
/**
* The IP address of the gateway.
*/
readonly gatewayAddress: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* The internal IPv6 address range that is assigned to this subnetwork.
*/
readonly internalIpv6Prefix: string;
/**
* The range of IP addresses belonging to this subnetwork
* secondary range.
*/
readonly ipCidrRange: string;
/**
* The access type of IPv6 address this subnet holds. Possible values are: `EXTERNAL`, `INTERNAL`.
*/
readonly ipv6AccessType: string;
readonly name?: string;
/**
* The network name or resource link to the parent
* network of this subnetwork.
*/
readonly network: string;
/**
* Whether the VMs in this subnet
* can access Google services without assigned external IP
* addresses.
*/
readonly privateIpGoogleAccess: boolean;
readonly project: string;
readonly region: string;
/**
* An array of configurations for secondary IP ranges for
* VM instances contained in this subnetwork. Structure is documented below.
*/
readonly secondaryIpRanges: outputs.compute.GetSubnetworkSecondaryIpRange[];
readonly selfLink: string;
/**
* The stack type for the subnet. Possible values are: `IPV4_ONLY`, `IPV4_IPV6`, `IPV6_ONLY`.
*/
readonly stackType: string;
/**
* The numeric ID of the resource.
*/
readonly subnetworkId: number;
}
/**
* Get a subnetwork within GCE from its name and region.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const my_subnetwork = gcp.compute.getSubnetwork({
* name: "default-us-east1",
* region: "us-east1",
* });
* ```
*/
export declare function getSubnetworkOutput(args?: GetSubnetworkOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetSubnetworkResult>;
/**
* A collection of arguments for invoking getSubnetwork.
*/
export interface GetSubnetworkOutputArgs {
/**
* The name of the subnetwork. One of `name` or `selfLink`
* must be specified.
*/
name?: pulumi.Input<string | undefined>;
/**
* The ID of the project in which the resource belongs. If it
* is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* The region this subnetwork has been created in. If
* unspecified, this defaults to the region configured in the provider.
*/
region?: pulumi.Input<string | undefined>;
/**
* The self link of the subnetwork. If `selfLink` is
* specified, `name`, `project`, and `region` are ignored.
*/
selfLink?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=getSubnetwork.d.ts.map