import * as pulumi from "@pulumi/pulumi"; /** * A Distributed Cloud Edge subnet, which provides L2 isolation within a network. * * To get more information about Subnet, see: * * * [API documentation](https://cloud.google.com/distributed-cloud/edge/latest/docs/reference/network/rest/v1/projects.locations.zones.subnets) * * How-to Guides * * [Create and manage subnetworks](https://cloud.google.com/distributed-cloud/edge/latest/docs/subnetworks#api) * * ## Example Usage * * ### Edgenetwork Subnet * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const exampleNetwork = new gcp.edgenetwork.Network("example_network", { * networkId: "example-network", * location: "us-west1", * zone: "", * description: "Example network.", * mtu: 9000, * }); * const exampleSubnet = new gcp.edgenetwork.Subnet("example_subnet", { * subnetId: "example-subnet", * location: "us-west1", * zone: "", * description: "Example subnet.", * network: exampleNetwork.id, * ipv4Cidrs: ["4.4.4.1/24"], * labels: { * environment: "dev", * }, * }); * ``` * ### Edgenetwork Subnet With Vlan Id * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const exampleNetwork = new gcp.edgenetwork.Network("example_network", { * networkId: "example-network", * location: "us-west1", * zone: "", * description: "Example network.", * mtu: 9000, * }); * const exampleSubnetWithVlanId = new gcp.edgenetwork.Subnet("example_subnet_with_vlan_id", { * subnetId: "example-subnet-with-vlan-id", * location: "us-west1", * zone: "", * description: "Example subnet with VLAN ID.", * network: exampleNetwork.id, * ipv6Cidrs: ["4444:4444:4444:4444::1/64"], * vlanId: 44, * labels: { * environment: "dev", * }, * }); * ``` * * ## Import * * Subnet can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/zones/{{zone}}/subnets/{{subnet_id}}` * * * `{{project}}/{{location}}/{{zone}}/{{subnet_id}}` * * * `{{location}}/{{zone}}/{{subnet_id}}` * * * `{{location}}/{{subnet_id}}` * * * `{{name}}` * * When using the `pulumi import` command, Subnet can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:edgenetwork/subnet:Subnet default projects/{{project}}/locations/{{location}}/zones/{{zone}}/subnets/{{subnet_id}} * ``` * * ```sh * $ pulumi import gcp:edgenetwork/subnet:Subnet default {{project}}/{{location}}/{{zone}}/{{subnet_id}} * ``` * * ```sh * $ pulumi import gcp:edgenetwork/subnet:Subnet default {{location}}/{{zone}}/{{subnet_id}} * ``` * * ```sh * $ pulumi import gcp:edgenetwork/subnet:Subnet default {{location}}/{{subnet_id}} * ``` * * ```sh * $ pulumi import gcp:edgenetwork/subnet:Subnet default {{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, 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; /** * The time when the subnet was created. * 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; /** * A free-text description of the resource. Max length 1024 characters. */ readonly description: pulumi.Output; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ readonly effectiveLabels: pulumi.Output<{ [key: string]: string; }>; /** * The ranges of ipv4 addresses that are owned by this subnetwork, in CIDR format. */ readonly ipv4Cidrs: pulumi.Output; /** * The ranges of ipv6 addresses that are owned by this subnetwork, in CIDR format. */ readonly ipv6Cidrs: pulumi.Output; /** * Labels associated with this resource. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The Google Cloud region to which the target Distributed Cloud Edge zone belongs. */ readonly location: pulumi.Output; /** * The canonical name of this resource, with format * `projects/{{project}}/locations/{{location}}/zones/{{zone}}/subnets/{{subnet_id}}` */ readonly name: pulumi.Output; /** * The ID of the network to which this router belongs. * Must be of the form: `projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}` */ readonly network: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * Current stage of the resource to the device by config push. */ readonly state: pulumi.Output; /** * A unique ID that identifies this subnet. */ readonly subnetId: pulumi.Output; /** * The time when the subnet was last updated. * 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; /** * VLAN ID for this subnetwork. If not specified, one is assigned automatically. */ readonly vlanId: pulumi.Output; /** * The name of the target Distributed Cloud Edge zone. */ readonly zone: pulumi.Output; /** * 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 { /** * The time when the subnet was created. * 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; /** * A free-text description of the resource. Max length 1024 characters. */ description?: pulumi.Input; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The ranges of ipv4 addresses that are owned by this subnetwork, in CIDR format. */ ipv4Cidrs?: pulumi.Input[]>; /** * The ranges of ipv6 addresses that are owned by this subnetwork, in CIDR format. */ ipv6Cidrs?: pulumi.Input[]>; /** * Labels associated with this resource. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The Google Cloud region to which the target Distributed Cloud Edge zone belongs. */ location?: pulumi.Input; /** * The canonical name of this resource, with format * `projects/{{project}}/locations/{{location}}/zones/{{zone}}/subnets/{{subnet_id}}` */ name?: pulumi.Input; /** * The ID of the network to which this router belongs. * Must be of the form: `projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}` */ network?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Current stage of the resource to the device by config push. */ state?: pulumi.Input; /** * A unique ID that identifies this subnet. */ subnetId?: pulumi.Input; /** * The time when the subnet was last updated. * 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; /** * VLAN ID for this subnetwork. If not specified, one is assigned automatically. */ vlanId?: pulumi.Input; /** * The name of the target Distributed Cloud Edge zone. */ zone?: pulumi.Input; } /** * The set of arguments for constructing a Subnet resource. */ export interface SubnetArgs { /** * A free-text description of the resource. Max length 1024 characters. */ description?: pulumi.Input; /** * The ranges of ipv4 addresses that are owned by this subnetwork, in CIDR format. */ ipv4Cidrs?: pulumi.Input[]>; /** * The ranges of ipv6 addresses that are owned by this subnetwork, in CIDR format. */ ipv6Cidrs?: pulumi.Input[]>; /** * Labels associated with this resource. * * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The Google Cloud region to which the target Distributed Cloud Edge zone belongs. */ location: pulumi.Input; /** * The ID of the network to which this router belongs. * Must be of the form: `projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}` */ network: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * A unique ID that identifies this subnet. */ subnetId: pulumi.Input; /** * VLAN ID for this subnetwork. If not specified, one is assigned automatically. */ vlanId?: pulumi.Input; /** * The name of the target Distributed Cloud Edge zone. */ zone: pulumi.Input; }