google_edgenetwork_subnet

A Distributed Cloud Edge subnet, which provides L2 isolation within a network.

To get more information about Subnet, see:

Example Usage - Edgenetwork Subnet

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
}

Example Usage - Edgenetwork Subnet With Vlan Id

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
}

Argument Reference

The following arguments are supported:


Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

Subnet can be imported using any of these accepted formats:

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}}

User Project Overrides

This resource supports User Project Overrides.