Create, update, or delete a zone. This resource creates the zone and attaches it to the specified worker pool.

Example Usage

In the following example, you can create a zone:

resource "ibm_container_worker_pool" "test_pool" {
  worker_pool_name = "my_pool"
  machine_type     = "u2c.2x4"
  cluster          = "my_cluster"
  size_per_zone    = 2
  hardware         = "shared"
  disk_encryption  = "true"
  labels = {
    "test" = "test-pool"

    "test1" = "test-pool1"
resource "ibm_container_worker_pool_zone_attachment" "test_zone" {
  cluster         = "my_cluster"
  worker_pool     = "${element(split("/",,1)}"
  zone            = "dal12"
  private_vlan_id = "2320267"
  public_vlan_id  = "2320265"

  //User can increase timeouts
  timeouts {
      create = "90m"
      update = "3h"
      delete = "30m"


ibm_container_worker_pool_zone_attachment provides the following Timeouts configuration options:

  • create - (Default 90 minutes) Used for creating Instance.
  • update - (Default 90 minutes) Used for updating Instance.
  • delete - (Default 90 minutes) Used for deleting Instance.

Argument Reference

The following arguments are supported:

  • zone - (Required, string) The name of the zone. To list available zones, run ibmcloud ks zones
  • cluster - (Required, string) The name or id of the cluster.
  • worker_pool - (Required, string) The name or id of the worker pool.
  • private_vlan_id - (Optional, string) The private VLAN of the worker node. You can retrieve the value by running the ibmcloud ks vlans <zone> command in the IBM Cloud CLI.
  • public_vlan_id - (Optional, string) The public VLAN of the worker node. The public vlan id cannot be specified alone, it should be specified along with the private vlan id. You can retrieve the value by running the ibmcloud ks vlans <zone> command in the IBM Cloud CLI. Note: If you do not have a private or public VLAN in that zone, do not specify private_vlan_id and public_vlan_id. A private and a public VLAN are automatically created for you when you initially add a new zone to your worker pool.
  • region - (Deprecated, string) The region where the cluster is provisioned. If the region is not specified it will be defaulted to provider region(IC_REGION/IBMCLOUD_REGION). To get the list of supported regions please access this link and use the alias.
  • resource_group_id - (Optional, string) The ID of the resource group. You can retrieve the value from data source ibm_resource_group. If not provided defaults to default resource group.

Attribute Reference

The following attributes are exported:

  • id - The unique identifier of the worker pool zone attachment resource. The id is composed of <cluster_name_id>/< worker_pool_name_id>/<zone/>
  • worker_count - Number of workers attached to this zone.


ibm_container_worker_pool_zone_attachment can be imported using cluster_name_id, worker_pool_name_id and zone, eg

$ terraform import ibm_container_worker_pool_zone_attachment.example mycluster/5c4f4d06e0dc402084922dea70850e3b-7cafe35/dal10