1. Packages
  2. Ibm Provider
  3. API Docs
  4. getContainerWorkerPool
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getContainerWorkerPool

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    ​ For more information, about container worker pool, see adding worker nodes and zones to clusters. ​

    Example Usage

    The following example shows how to import information about Kubernetes clusters.

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const testaccDsWorkerPool = ibm.getContainerWorkerPool({
        workerPoolName: ibm_container_worker_pool.test_pool.worker_pool_name,
        cluster: ibm_container_cluster.testacc_cluster.id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    testacc_ds_worker_pool = ibm.get_container_worker_pool(worker_pool_name=ibm_container_worker_pool["test_pool"]["worker_pool_name"],
        cluster=ibm_container_cluster["testacc_cluster"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.LookupContainerWorkerPool(ctx, &ibm.LookupContainerWorkerPoolArgs{
    			WorkerPoolName: ibm_container_worker_pool.Test_pool.Worker_pool_name,
    			Cluster:        ibm_container_cluster.Testacc_cluster.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var testaccDsWorkerPool = Ibm.GetContainerWorkerPool.Invoke(new()
        {
            WorkerPoolName = ibm_container_worker_pool.Test_pool.Worker_pool_name,
            Cluster = ibm_container_cluster.Testacc_cluster.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetContainerWorkerPoolArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var testaccDsWorkerPool = IbmFunctions.getContainerWorkerPool(GetContainerWorkerPoolArgs.builder()
                .workerPoolName(ibm_container_worker_pool.test_pool().worker_pool_name())
                .cluster(ibm_container_cluster.testacc_cluster().id())
                .build());
    
        }
    }
    
    variables:
      testaccDsWorkerPool:
        fn::invoke:
          function: ibm:getContainerWorkerPool
          arguments:
            workerPoolName: ${ibm_container_worker_pool.test_pool.worker_pool_name}
            cluster: ${ibm_container_cluster.testacc_cluster.id}
    

    Using getContainerWorkerPool

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getContainerWorkerPool(args: GetContainerWorkerPoolArgs, opts?: InvokeOptions): Promise<GetContainerWorkerPoolResult>
    function getContainerWorkerPoolOutput(args: GetContainerWorkerPoolOutputArgs, opts?: InvokeOptions): Output<GetContainerWorkerPoolResult>
    def get_container_worker_pool(cluster: Optional[str] = None,
                                  id: Optional[str] = None,
                                  worker_pool_name: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetContainerWorkerPoolResult
    def get_container_worker_pool_output(cluster: Optional[pulumi.Input[str]] = None,
                                  id: Optional[pulumi.Input[str]] = None,
                                  worker_pool_name: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetContainerWorkerPoolResult]
    func LookupContainerWorkerPool(ctx *Context, args *LookupContainerWorkerPoolArgs, opts ...InvokeOption) (*LookupContainerWorkerPoolResult, error)
    func LookupContainerWorkerPoolOutput(ctx *Context, args *LookupContainerWorkerPoolOutputArgs, opts ...InvokeOption) LookupContainerWorkerPoolResultOutput

    > Note: This function is named LookupContainerWorkerPool in the Go SDK.

    public static class GetContainerWorkerPool 
    {
        public static Task<GetContainerWorkerPoolResult> InvokeAsync(GetContainerWorkerPoolArgs args, InvokeOptions? opts = null)
        public static Output<GetContainerWorkerPoolResult> Invoke(GetContainerWorkerPoolInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetContainerWorkerPoolResult> getContainerWorkerPool(GetContainerWorkerPoolArgs args, InvokeOptions options)
    public static Output<GetContainerWorkerPoolResult> getContainerWorkerPool(GetContainerWorkerPoolArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getContainerWorkerPool:getContainerWorkerPool
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Cluster string
    The name or ID of the cluster.
    WorkerPoolName string
    The name of the worker pool that need to be retrieved.
    Id string
    (String) The unique identifier of the worker pool.
    Cluster string
    The name or ID of the cluster.
    WorkerPoolName string
    The name of the worker pool that need to be retrieved.
    Id string
    (String) The unique identifier of the worker pool.
    cluster String
    The name or ID of the cluster.
    workerPoolName String
    The name of the worker pool that need to be retrieved.
    id String
    (String) The unique identifier of the worker pool.
    cluster string
    The name or ID of the cluster.
    workerPoolName string
    The name of the worker pool that need to be retrieved.
    id string
    (String) The unique identifier of the worker pool.
    cluster str
    The name or ID of the cluster.
    worker_pool_name str
    The name of the worker pool that need to be retrieved.
    id str
    (String) The unique identifier of the worker pool.
    cluster String
    The name or ID of the cluster.
    workerPoolName String
    The name of the worker pool that need to be retrieved.
    id String
    (String) The unique identifier of the worker pool.

    getContainerWorkerPool Result

    The following output properties are available:

    AutoscaleEnabled bool
    (Bool) Autoscaling is enabled on the workerpool
    Cluster string
    DiskEncryption bool
    (String) Disk encryption on a worker.
    Hardware string
    (String) The level of hardware isolation for your worker node.
    Id string
    (String) The unique identifier of the worker pool.
    Labels Dictionary<string, string>
    (String) Labels on all the workers in the worker pool.
    MachineType string
    (String) The machine type of the worker node.
    OperatingSystem string
    (String) The operating system of the workers in the worker pool.
    ResourceGroupId string
    (String) The ID of the worker pool resource group.
    SizePerZone double
    (String) Number of workers per zone in this pool.
    State string
    (String) Worker pool state.
    WorkerPoolName string
    Zones List<GetContainerWorkerPoolZone>
    (String) List of zones attached to the worker_pool.
    AutoscaleEnabled bool
    (Bool) Autoscaling is enabled on the workerpool
    Cluster string
    DiskEncryption bool
    (String) Disk encryption on a worker.
    Hardware string
    (String) The level of hardware isolation for your worker node.
    Id string
    (String) The unique identifier of the worker pool.
    Labels map[string]string
    (String) Labels on all the workers in the worker pool.
    MachineType string
    (String) The machine type of the worker node.
    OperatingSystem string
    (String) The operating system of the workers in the worker pool.
    ResourceGroupId string
    (String) The ID of the worker pool resource group.
    SizePerZone float64
    (String) Number of workers per zone in this pool.
    State string
    (String) Worker pool state.
    WorkerPoolName string
    Zones []GetContainerWorkerPoolZone
    (String) List of zones attached to the worker_pool.
    autoscaleEnabled Boolean
    (Bool) Autoscaling is enabled on the workerpool
    cluster String
    diskEncryption Boolean
    (String) Disk encryption on a worker.
    hardware String
    (String) The level of hardware isolation for your worker node.
    id String
    (String) The unique identifier of the worker pool.
    labels Map<String,String>
    (String) Labels on all the workers in the worker pool.
    machineType String
    (String) The machine type of the worker node.
    operatingSystem String
    (String) The operating system of the workers in the worker pool.
    resourceGroupId String
    (String) The ID of the worker pool resource group.
    sizePerZone Double
    (String) Number of workers per zone in this pool.
    state String
    (String) Worker pool state.
    workerPoolName String
    zones List<GetContainerWorkerPoolZone>
    (String) List of zones attached to the worker_pool.
    autoscaleEnabled boolean
    (Bool) Autoscaling is enabled on the workerpool
    cluster string
    diskEncryption boolean
    (String) Disk encryption on a worker.
    hardware string
    (String) The level of hardware isolation for your worker node.
    id string
    (String) The unique identifier of the worker pool.
    labels {[key: string]: string}
    (String) Labels on all the workers in the worker pool.
    machineType string
    (String) The machine type of the worker node.
    operatingSystem string
    (String) The operating system of the workers in the worker pool.
    resourceGroupId string
    (String) The ID of the worker pool resource group.
    sizePerZone number
    (String) Number of workers per zone in this pool.
    state string
    (String) Worker pool state.
    workerPoolName string
    zones GetContainerWorkerPoolZone[]
    (String) List of zones attached to the worker_pool.
    autoscale_enabled bool
    (Bool) Autoscaling is enabled on the workerpool
    cluster str
    disk_encryption bool
    (String) Disk encryption on a worker.
    hardware str
    (String) The level of hardware isolation for your worker node.
    id str
    (String) The unique identifier of the worker pool.
    labels Mapping[str, str]
    (String) Labels on all the workers in the worker pool.
    machine_type str
    (String) The machine type of the worker node.
    operating_system str
    (String) The operating system of the workers in the worker pool.
    resource_group_id str
    (String) The ID of the worker pool resource group.
    size_per_zone float
    (String) Number of workers per zone in this pool.
    state str
    (String) Worker pool state.
    worker_pool_name str
    zones Sequence[GetContainerWorkerPoolZone]
    (String) List of zones attached to the worker_pool.
    autoscaleEnabled Boolean
    (Bool) Autoscaling is enabled on the workerpool
    cluster String
    diskEncryption Boolean
    (String) Disk encryption on a worker.
    hardware String
    (String) The level of hardware isolation for your worker node.
    id String
    (String) The unique identifier of the worker pool.
    labels Map<String>
    (String) Labels on all the workers in the worker pool.
    machineType String
    (String) The machine type of the worker node.
    operatingSystem String
    (String) The operating system of the workers in the worker pool.
    resourceGroupId String
    (String) The ID of the worker pool resource group.
    sizePerZone Number
    (String) Number of workers per zone in this pool.
    state String
    (String) Worker pool state.
    workerPoolName String
    zones List<Property Map>
    (String) List of zones attached to the worker_pool.

    Supporting Types

    GetContainerWorkerPoolZone

    PrivateVlan string
    (String) The ID of the private VLAN.
    PublicVlan string
    (String) The ID of the public VLAN.
    WorkerCount double
    (String) Number of workers attached to this zone.
    Zone string
    (String) Zone name.
    PrivateVlan string
    (String) The ID of the private VLAN.
    PublicVlan string
    (String) The ID of the public VLAN.
    WorkerCount float64
    (String) Number of workers attached to this zone.
    Zone string
    (String) Zone name.
    privateVlan String
    (String) The ID of the private VLAN.
    publicVlan String
    (String) The ID of the public VLAN.
    workerCount Double
    (String) Number of workers attached to this zone.
    zone String
    (String) Zone name.
    privateVlan string
    (String) The ID of the private VLAN.
    publicVlan string
    (String) The ID of the public VLAN.
    workerCount number
    (String) Number of workers attached to this zone.
    zone string
    (String) Zone name.
    private_vlan str
    (String) The ID of the private VLAN.
    public_vlan str
    (String) The ID of the public VLAN.
    worker_count float
    (String) Number of workers attached to this zone.
    zone str
    (String) Zone name.
    privateVlan String
    (String) The ID of the private VLAN.
    publicVlan String
    (String) The ID of the public VLAN.
    workerCount Number
    (String) Number of workers attached to this zone.
    zone String
    (String) Zone name.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud