@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
234 lines (233 loc) • 8.93 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Subnet in a private cloud. A Private Cloud contains two types of subnets: `management` subnets (such as vMotion) that
* are read-only,and `userDefined`, which can also be updated. This resource should be used to read and update `userDefined`
* subnets. To read `management` subnets, please utilize the subnet data source.
*
* To get more information about Subnet, see:
*
* * [API documentation](https://cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.privateClouds.subnets)
*
* ## Example Usage
*
* ### Vmware Engine Subnet User Defined
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const subnet_nw = new gcp.vmwareengine.Network("subnet-nw", {
* name: "pc-nw",
* location: "global",
* type: "STANDARD",
* description: "PC network description.",
* });
* const subnet_pc = new gcp.vmwareengine.PrivateCloud("subnet-pc", {
* location: "us-west1-a",
* name: "sample-pc",
* description: "Sample test PC.",
* networkConfig: {
* managementCidr: "192.168.50.0/24",
* vmwareEngineNetwork: subnet_nw.id,
* },
* managementCluster: {
* clusterId: "sample-mgmt-cluster",
* nodeTypeConfigs: [{
* nodeTypeId: "standard-72",
* nodeCount: 3,
* }],
* },
* });
* const vmw_engine_subnet = new gcp.vmwareengine.Subnet("vmw-engine-subnet", {
* name: "service-1",
* parent: subnet_pc.id,
* ipCidrRange: "192.168.100.0/26",
* });
* ```
*
* ## Import
*
* Subnet can be imported using any of these accepted formats:
*
* * `{{parent}}/subnets/{{name}}`
*
* When using the `pulumi import` command, Subnet can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:vmwareengine/subnet:Subnet default {{parent}}/subnets/{{name}}
* ```
*/
export declare class Subnet extends pulumi.CustomResource {
/**
* Get an existing Subnet 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?: SubnetState, opts?: pulumi.CustomResourceOptions): Subnet;
/**
* Returns true if the given object is an instance of Subnet. 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 Subnet;
/**
* Creation time of this resource.
* A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and
* up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
*/
readonly createTime: pulumi.Output<string>;
/**
* DHCP address ranges.
* Structure is documented below.
*/
readonly dhcpAddressRanges: pulumi.Output<outputs.vmwareengine.SubnetDhcpAddressRange[]>;
/**
* The canonical identifier of the logical router that this subnet is attached to.
*/
readonly gatewayId: pulumi.Output<string>;
/**
* The IP address of the gateway of this subnet. Must fall within the IP prefix defined above.
*/
readonly gatewayIp: pulumi.Output<string>;
/**
* The IP address range of the subnet in CIDR format.
*/
readonly ipCidrRange: pulumi.Output<string>;
/**
* The ID of the subnet. For userDefined subnets, this name should be in the format of "service-n",
* where n ranges from 1 to 5.
*/
readonly name: pulumi.Output<string>;
/**
* The resource name of the private cloud to create a new subnet in.
* Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names.
* For example: projects/my-project/locations/us-west1-a/privateClouds/my-cloud
*/
readonly parent: pulumi.Output<string>;
/**
* Whether the NSX-T configuration in the backend follows the standard configuration supported by Google Cloud.
* If false, the subnet cannot be modified through Google Cloud, only through NSX-T directly.
*/
readonly standardConfig: pulumi.Output<boolean>;
/**
* State of the subnet.
*/
readonly state: pulumi.Output<string>;
/**
* The type of the subnet.
*/
readonly type: pulumi.Output<string>;
/**
* System-generated unique identifier for the resource.
*/
readonly uid: pulumi.Output<string>;
/**
* Last updated time of this resource.
* A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
* fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
*/
readonly updateTime: pulumi.Output<string>;
/**
* VLAN ID of the VLAN on which the subnet is configured.
*/
readonly vlanId: pulumi.Output<number>;
/**
* Create a Subnet 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: SubnetArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Subnet resources.
*/
export interface SubnetState {
/**
* Creation time of this resource.
* A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and
* up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
*/
createTime?: pulumi.Input<string>;
/**
* DHCP address ranges.
* Structure is documented below.
*/
dhcpAddressRanges?: pulumi.Input<pulumi.Input<inputs.vmwareengine.SubnetDhcpAddressRange>[]>;
/**
* The canonical identifier of the logical router that this subnet is attached to.
*/
gatewayId?: pulumi.Input<string>;
/**
* The IP address of the gateway of this subnet. Must fall within the IP prefix defined above.
*/
gatewayIp?: pulumi.Input<string>;
/**
* The IP address range of the subnet in CIDR format.
*/
ipCidrRange?: pulumi.Input<string>;
/**
* The ID of the subnet. For userDefined subnets, this name should be in the format of "service-n",
* where n ranges from 1 to 5.
*/
name?: pulumi.Input<string>;
/**
* The resource name of the private cloud to create a new subnet in.
* Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names.
* For example: projects/my-project/locations/us-west1-a/privateClouds/my-cloud
*/
parent?: pulumi.Input<string>;
/**
* Whether the NSX-T configuration in the backend follows the standard configuration supported by Google Cloud.
* If false, the subnet cannot be modified through Google Cloud, only through NSX-T directly.
*/
standardConfig?: pulumi.Input<boolean>;
/**
* State of the subnet.
*/
state?: pulumi.Input<string>;
/**
* The type of the subnet.
*/
type?: pulumi.Input<string>;
/**
* System-generated unique identifier for the resource.
*/
uid?: pulumi.Input<string>;
/**
* Last updated time of this resource.
* A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine
* fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
*/
updateTime?: pulumi.Input<string>;
/**
* VLAN ID of the VLAN on which the subnet is configured.
*/
vlanId?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a Subnet resource.
*/
export interface SubnetArgs {
/**
* The IP address range of the subnet in CIDR format.
*/
ipCidrRange: pulumi.Input<string>;
/**
* The ID of the subnet. For userDefined subnets, this name should be in the format of "service-n",
* where n ranges from 1 to 5.
*/
name?: pulumi.Input<string>;
/**
* The resource name of the private cloud to create a new subnet in.
* Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names.
* For example: projects/my-project/locations/us-west1-a/privateClouds/my-cloud
*/
parent: pulumi.Input<string>;
}