google_gkeonprem_vmware_cluster

A Google VMware User Cluster.

Example Usage - Gkeonprem Vmware Cluster Basic

resource "google_gkeonprem_vmware_cluster" "cluster-basic" {
  name = "cluster-basic"
  location = "us-west1"
  admin_cluster_membership = "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test"
  description = "test cluster"
  on_prem_version = "1.13.1-gke.35"
  annotations = {}
  network_config {
    service_address_cidr_blocks = ["10.96.0.0/12"]
    pod_address_cidr_blocks = ["192.168.0.0/16"]
    dhcp_ip_config {
      enabled = true
    }
  }
  control_plane_node {
     cpus = 4
     memory = 8192
     replicas = 1
  }
  load_balancer {
    vip_config {
      control_plane_vip = "10.251.133.5"
      ingress_vip = "10.251.135.19"
    }
    metal_lb_config {
      address_pools {
        pool = "ingress-ip"
        manual_assign = "true"
        addresses = ["10.251.135.19"]
        avoid_buggy_ips = true
      }
      address_pools {
        pool = "lb-test-ip"
        manual_assign = "true"
        addresses = ["10.251.135.19"]
        avoid_buggy_ips = true
      }
    }
  }
}

Example Usage - Gkeonprem Vmware Cluster F5lb

resource "google_gkeonprem_vmware_cluster" "cluster-f5lb" {
  name = "cluster-f5lb"
  location = "us-west1"
  admin_cluster_membership = "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test"
  description = "test cluster"
  on_prem_version = "1.13.1-gke.35"
  annotations = {}
  network_config {
    service_address_cidr_blocks = ["10.96.0.0/12"]
    pod_address_cidr_blocks = ["192.168.0.0/16"]
    dhcp_ip_config {
      enabled = true
    }
    control_plane_v2_config {
      control_plane_ip_block {
        ips {
          hostname = "test-hostname"
          ip = "10.0.0.1"
        }
        netmask="10.0.0.1/32"
        gateway="test-gateway"
      }
    }
    vcenter_network = "test-vcenter-network"
  }
  control_plane_node {
     cpus = 4
     memory = 8192
     replicas = 1
     auto_resize_config {
      enabled = true
     }
  }
  load_balancer {
    vip_config {
      control_plane_vip = "10.251.133.5"
      ingress_vip = "10.251.135.19"
    }
    f5_config {
        address = "10.0.0.1"
        partition = "test-partition"
        snat_pool = "test-snap-pool"
    }
  }
  dataplane_v2 {
    dataplane_v2_enabled = true
    windows_dataplane_v2_enabled = true
    advanced_networking = true
  }
  vm_tracking_enabled = true
  enable_control_plane_v2 = true
  disable_bundled_ingress = true
  authorization {
    admin_users {
      username = "testuser@gmail.com"
    }
  }
  anti_affinity_groups {
    aag_config_disabled = true
  }
  auto_repair_config {
    enabled = true
  }
  storage {
    vsphere_csi_disabled = true
  }
}

Example Usage - Gkeonprem Vmware Cluster Manuallb

resource "google_gkeonprem_vmware_cluster" "cluster-manuallb" {
  name = "cluster-manuallb"
  location = "us-west1"
  admin_cluster_membership = "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test"
  description = "test cluster"
  on_prem_version = "1.13.1-gke.35"
  annotations = {}
  network_config {
    service_address_cidr_blocks = ["10.96.0.0/12"]
    pod_address_cidr_blocks = ["192.168.0.0/16"]
    host_config {
      dns_servers = ["10.254.41.1"]
      ntp_servers = ["216.239.35.8"]
      dns_search_domains = ["test-domain"]
    }

    static_ip_config {
      ip_blocks {
        netmask = "255.255.252.0"
        gateway = "10.251.31.254"
        ips {
          ip = "10.251.30.153"
          hostname = "test-hostname1"
        }
        ips {
          ip = "10.251.31.206"
          hostname = "test-hostname2"
        }
        ips {
          ip = "10.251.31.193"
          hostname = "test-hostname3"
        }
        ips { 
          ip = "10.251.30.230"
          hostname = "test-hostname4"
        }
      }
    }
  }
  control_plane_node {
     cpus = 4
     memory = 8192
     replicas = 1
     auto_resize_config {
      enabled = true
     }
  }
  load_balancer {
    vip_config {
      control_plane_vip = "10.251.133.5"
      ingress_vip = "10.251.135.19"
    }
    manual_lb_config {
      ingress_http_node_port = 30005
      ingress_https_node_port = 30006
      control_plane_node_port = 30007
      konnectivity_server_node_port = 30008
    }
  }
  vcenter {
    resource_pool = "test-resource-pool"
    datastore = "test-datastore"
    datacenter = "test-datacenter"
    cluster = "test-cluster"
    folder = "test-folder"
    ca_cert_data = "test-ca-cert-data"
    storage_policy_name = "test-storage-policy-name"
  }
  dataplane_v2 {
    dataplane_v2_enabled = true
    windows_dataplane_v2_enabled = true
    advanced_networking = true
  }
  vm_tracking_enabled = true
  enable_control_plane_v2 = true
  upgrade_policy {
    control_plane_only = true
  }
  authorization {
    admin_users {
      username = "testuser@gmail.com"
    }
  }
  anti_affinity_groups {
    aag_config_disabled = true
  }
  auto_repair_config {
    enabled = true
  }
}

Argument Reference

The following arguments are supported:

The control_plane_node block supports:

The auto_resize_config block supports:

The vsphere_config block contains:


The anti_affinity_groups block supports:

The storage block supports:

The network_config block supports:

The static_ip_config block supports:

The ip_blocks block supports:

The ips block supports:

The dhcp_ip_config block supports:

The host_config block supports:

The control_plane_v2_config block supports:

The control_plane_ip_block block supports:

The ips block supports:

The load_balancer block supports:

The vip_config block supports:

The f5_config block supports:

The manual_lb_config block supports:

The metal_lb_config block supports:

The address_pools block supports:

The dataplane_v2 block supports:

The auto_repair_config block supports:

The authorization block supports:

The admin_users block supports:

The upgrade_policy block supports:

The vcenter block supports:

Attributes Reference

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

The validation_check block contains:

The status block contains:

The result block contains:

The fleet block contains:

The status block contains:

The conditions block contains:

Timeouts

This resource provides the following Timeouts configuration options:

Import

VmwareCluster can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import VmwareCluster using one of the formats above. For example:

import {
  id = "projects/{{project}}/locations/{{location}}/vmwareClusters/{{name}}"
  to = google_gkeonprem_vmware_cluster.default
}

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

$ terraform import google_gkeonprem_vmware_cluster.default projects/{{project}}/locations/{{location}}/vmwareClusters/{{name}}
$ terraform import google_gkeonprem_vmware_cluster.default {{project}}/{{location}}/{{name}}
$ terraform import google_gkeonprem_vmware_cluster.default {{location}}/{{name}}

User Project Overrides

This resource supports User Project Overrides.