google_gkeonprem_vmware_node_pool

A Google Vmware Node Pool.

Example Usage - Gkeonprem Vmware Node Pool Basic

resource "google_gkeonprem_vmware_cluster" "default-basic" {
  name = "my-cluster"
  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"
  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"]
      }
      address_pools {
        pool = "lb-test-ip"
        manual_assign = "true"
        addresses = ["10.251.135.19"]
      }
    }
  }
}

resource "google_gkeonprem_vmware_node_pool" "nodepool-basic" {
  name = "my-nodepool"
  location = "us-west1"
  vmware_cluster = google_gkeonprem_vmware_cluster.default-basic.name
  config {
    replicas = 3
    image_type = "ubuntu_containerd"
    enable_load_balancer = true
  }
}

Example Usage - Gkeonprem Vmware Node Pool Full

resource "google_gkeonprem_vmware_cluster" "default-full" {
  name = "my-cluster"
  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"
  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"]
      }
      address_pools {
        pool = "lb-test-ip"
        manual_assign = "true"
        addresses = ["10.251.135.19"]
      }
    }
  }
}

resource "google_gkeonprem_vmware_node_pool" "nodepool-full" {
  name = "my-nodepool"
  location = "us-west1"
  vmware_cluster = google_gkeonprem_vmware_cluster.default-full.name
  annotations = {}
  config {
    cpus = 4
    memory_mb = 8196
    replicas = 3
    image_type = "ubuntu_containerd"
    image = "image"
    boot_disk_size_gb = 10
    taints {
        key = "key"
        value = "value"
    }
    taints {
        key = "key"
        value = "value"
        effect = "NO_SCHEDULE"
    }
    labels = {}
    vsphere_config {
      datastore = "test-datastore"
      tags {
        category = "test-category-1"
        tag = "tag-1"
      }
      tags {
        category = "test-category-2"
        tag = "tag-2"
      }
      host_groups = ["host1", "host2"]
    }
    enable_load_balancer = true
  }
  node_pool_autoscaling {
    min_replicas = 1
    max_replicas = 5
  }
}

Argument Reference

The following arguments are supported:

The config block supports:

The taints block supports:

The vsphere_config block supports:

The tags block supports:


The node_pool_autoscaling block supports:

Attributes Reference

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

The status block contains:

The conditions block contains:

Timeouts

This resource provides the following Timeouts configuration options:

Import

VmwareNodePool can be imported using any of these accepted formats:

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

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

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

$ terraform import google_gkeonprem_vmware_node_pool.default projects/{{project}}/locations/{{location}}/vmwareClusters/{{vmware_cluster}}/vmwareNodePools/{{name}}
$ terraform import google_gkeonprem_vmware_node_pool.default {{project}}/{{location}}/{{vmware_cluster}}/{{name}}
$ terraform import google_gkeonprem_vmware_node_pool.default {{location}}/{{vmware_cluster}}/{{name}}

User Project Overrides

This resource supports User Project Overrides.