google_vmwareengine_subnet

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:

Example Usage - Vmware Engine Subnet User Defined

resource "google_vmwareengine_network" "subnet-nw" {
  name        = "pc-nw"
  location    = "global"
  type        = "STANDARD"
  description = "PC network description."
}

resource "google_vmwareengine_private_cloud" "subnet-pc" {
  location    = "us-west1-a"
  name        = "sample-pc"
  description = "Sample test PC."
  network_config {
    management_cidr       = "192.168.50.0/24"
    vmware_engine_network = google_vmwareengine_network.subnet-nw.id
  }

  management_cluster {
    cluster_id = "sample-mgmt-cluster"
    node_type_configs {
      node_type_id = "standard-72"
      node_count   = 3
    }
  }
}

resource "google_vmwareengine_subnet" "vmw-engine-subnet" {
  name = "service-1"
  parent =  google_vmwareengine_private_cloud.subnet-pc.id
  ip_cidr_range = "192.168.100.0/26"
}

Argument Reference

The following arguments are supported:


Attributes Reference

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

The dhcp_address_ranges block contains:

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 = "{{parent}}/subnets/{{name}}"
  to = google_vmwareengine_subnet.default
}

When using the terraform import command, Subnet can be imported using one of the formats above. For example:

$ terraform import google_vmwareengine_subnet.default {{parent}}/subnets/{{name}}