@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
356 lines • 14.2 kB
TypeScript
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}}
* $ pulumi import gcp:edgenetwork/subnet:Subnet default {{project}}/{{location}}/{{zone}}/{{subnet_id}}
* $ pulumi import gcp:edgenetwork/subnet:Subnet default {{location}}/{{zone}}/{{subnet_id}}
* $ pulumi import gcp:edgenetwork/subnet:Subnet default {{location}}/{{subnet_id}}
* $ 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<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;
/**
* 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<string>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
readonly deletionPolicy: pulumi.Output<string>;
/**
* A free-text description of the resource. Max length 1024 characters.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* 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<string[] | undefined>;
/**
* The ranges of ipv6 addresses that are owned by this subnetwork, in CIDR format.
*/
readonly ipv6Cidrs: pulumi.Output<string[] | undefined>;
/**
* 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<string>;
/**
* The canonical name of this resource, with format
* `projects/{{project}}/locations/{{location}}/zones/{{zone}}/subnets/{{subnet_id}}`
*/
readonly name: pulumi.Output<string>;
/**
* 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<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* 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<string>;
/**
* A unique ID that identifies this subnet.
*/
readonly subnetId: pulumi.Output<string>;
/**
* 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<string>;
/**
* VLAN ID for this subnetwork. If not specified, one is assigned automatically.
*/
readonly vlanId: pulumi.Output<number>;
/**
* The name of the target Distributed Cloud Edge zone.
*/
readonly zone: pulumi.Output<string>;
/**
* 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<string | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* A free-text description of the resource. Max length 1024 characters.
*/
description?: pulumi.Input<string | undefined>;
/**
* 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<string>;
} | undefined>;
/**
* The ranges of ipv4 addresses that are owned by this subnetwork, in CIDR format.
*/
ipv4Cidrs?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* The ranges of ipv6 addresses that are owned by this subnetwork, in CIDR format.
*/
ipv6Cidrs?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* 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<string>;
} | undefined>;
/**
* The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
*/
location?: pulumi.Input<string | undefined>;
/**
* The canonical name of this resource, with format
* `projects/{{project}}/locations/{{location}}/zones/{{zone}}/subnets/{{subnet_id}}`
*/
name?: pulumi.Input<string | undefined>;
/**
* 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<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 combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* Current stage of the resource to the device by config push.
*/
state?: pulumi.Input<string | undefined>;
/**
* A unique ID that identifies this subnet.
*/
subnetId?: pulumi.Input<string | undefined>;
/**
* 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<string | undefined>;
/**
* VLAN ID for this subnetwork. If not specified, one is assigned automatically.
*/
vlanId?: pulumi.Input<number | undefined>;
/**
* The name of the target Distributed Cloud Edge zone.
*/
zone?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a Subnet resource.
*/
export interface SubnetArgs {
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* A free-text description of the resource. Max length 1024 characters.
*/
description?: pulumi.Input<string | undefined>;
/**
* The ranges of ipv4 addresses that are owned by this subnetwork, in CIDR format.
*/
ipv4Cidrs?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* The ranges of ipv6 addresses that are owned by this subnetwork, in CIDR format.
*/
ipv6Cidrs?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* 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<string>;
} | undefined>;
/**
* The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
*/
location: pulumi.Input<string>;
/**
* 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<string>;
/**
* 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>;
/**
* A unique ID that identifies this subnet.
*/
subnetId: pulumi.Input<string>;
/**
* VLAN ID for this subnetwork. If not specified, one is assigned automatically.
*/
vlanId?: pulumi.Input<number | undefined>;
/**
* The name of the target Distributed Cloud Edge zone.
*/
zone: pulumi.Input<string>;
}
//# sourceMappingURL=subnet.d.ts.map