A Distributed Cloud Edge subnet, which provides L2 isolation within a network.
To get more information about Subnet, see:
resource "google_edgenetwork_subnet" "example_subnet" {
subnet_id = "example-subnet"
location = "us-west1"
zone = ""
description = "Example subnet."
network = google_edgenetwork_network.example_network.id
ipv4_cidr = ["4.4.4.1/24"]
labels = {
"environment" : "dev"
}
}
resource "google_edgenetwork_network" "example_network" {
network_id = "example-network"
location = "us-west1"
zone = ""
description = "Example network."
mtu = 9000
}
resource "google_edgenetwork_subnet" "example_subnet_with_vlan_id" {
subnet_id = "example-subnet-with-vlan-id"
location = "us-west1"
zone = ""
description = "Example subnet with VLAN ID."
network = google_edgenetwork_network.example_network.id
ipv6_cidr = ["4444:4444:4444:4444::1/64"]
vlan_id = 44
labels = {
"environment" : "dev"
}
}
resource "google_edgenetwork_network" "example_network" {
network_id = "example-network"
location = "us-west1"
zone = ""
description = "Example network."
mtu = 9000
}
The following arguments are supported:
network
-
(Required)
The ID of the network to which this router belongs.
Must be of the form: projects/{{project}}/locations/{{location}}/zones/{{zone}}/networks/{{network_id}}
location
-
(Required)
The Google Cloud region to which the target Distributed Cloud Edge zone belongs.
zone
-
(Required)
The name of the target Distributed Cloud Edge zone.
subnet_id
-
(Required)
A unique ID that identifies this subnet.
labels
-
(Optional)
Labels associated with this resource.
description
-
(Optional)
A free-text description of the resource. Max length 1024 characters.
ipv4_cidr
-
(Optional)
The ranges of ipv4 addresses that are owned by this subnetwork, in CIDR format.
ipv6_cidr
-
(Optional)
The ranges of ipv6 addresses that are owned by this subnetwork, in CIDR format.
vlan_id
-
(Optional)
VLAN ID for this subnetwork. If not specified, one is assigned automatically.
project
- (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format projects/{{project}}/locations/{{location}}/zones/{{zone}}/subnets/{{subnet_id}}
name
-
The canonical name of this resource, with format
projects/{{project}}/locations/{{location}}/zones/{{zone}}/subnets/{{subnet_id}}
create_time
-
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
.
update_time
-
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
.
state
-
Current stage of the resource to the device by config push.
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.delete
- Default is 30 minutes.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}}
In Terraform v1.5.0 and later, use an import
block to import Subnet using one of the formats above. For example:
import {
id = "projects/{{project}}/locations/{{location}}/zones/{{zone}}/subnets/{{subnet_id}}"
to = google_edgenetwork_subnet.default
}
When using the terraform import
command, Subnet can be imported using one of the formats above. For example:
$ terraform import google_edgenetwork_subnet.default projects/{{project}}/locations/{{location}}/zones/{{zone}}/subnets/{{subnet_id}}
$ terraform import google_edgenetwork_subnet.default {{project}}/{{location}}/{{zone}}/{{subnet_id}}
$ terraform import google_edgenetwork_subnet.default {{location}}/{{zone}}/{{subnet_id}}
$ terraform import google_edgenetwork_subnet.default {{location}}/{{subnet_id}}
$ terraform import google_edgenetwork_subnet.default {{name}}
This resource supports User Project Overrides.