1. Packages
  2. Rancher2 Provider
  3. API Docs
  4. getNodePool
Rancher 2 v7.1.1 published on Monday, Oct 7, 2024 by Pulumi

rancher2.getNodePool

Explore with Pulumi AI

rancher2 logo
Rancher 2 v7.1.1 published on Monday, Oct 7, 2024 by Pulumi

    Use this data source to retrieve information about a Rancher v2 Node Pool resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as rancher2 from "@pulumi/rancher2";
    
    const foo = rancher2.getNodePool({
        clusterId: foo_custom.id,
        name: "foo",
    });
    
    import pulumi
    import pulumi_rancher2 as rancher2
    
    foo = rancher2.get_node_pool(cluster_id=foo_custom["id"],
        name="foo")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-rancher2/sdk/v7/go/rancher2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := rancher2.LookupNodePool(ctx, &rancher2.LookupNodePoolArgs{
    			ClusterId: foo_custom.Id,
    			Name:      "foo",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Rancher2 = Pulumi.Rancher2;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = Rancher2.GetNodePool.Invoke(new()
        {
            ClusterId = foo_custom.Id,
            Name = "foo",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.rancher2.Rancher2Functions;
    import com.pulumi.rancher2.inputs.GetNodePoolArgs;
    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 foo = Rancher2Functions.getNodePool(GetNodePoolArgs.builder()
                .clusterId(foo_custom.id())
                .name("foo")
                .build());
    
        }
    }
    
    variables:
      foo:
        fn::invoke:
          Function: rancher2:getNodePool
          Arguments:
            clusterId: ${["foo-custom"].id}
            name: foo
    

    Using getNodePool

    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 getNodePool(args: GetNodePoolArgs, opts?: InvokeOptions): Promise<GetNodePoolResult>
    function getNodePoolOutput(args: GetNodePoolOutputArgs, opts?: InvokeOptions): Output<GetNodePoolResult>
    def get_node_pool(cluster_id: Optional[str] = None,
                      name: Optional[str] = None,
                      node_template_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetNodePoolResult
    def get_node_pool_output(cluster_id: Optional[pulumi.Input[str]] = None,
                      name: Optional[pulumi.Input[str]] = None,
                      node_template_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetNodePoolResult]
    func LookupNodePool(ctx *Context, args *LookupNodePoolArgs, opts ...InvokeOption) (*LookupNodePoolResult, error)
    func LookupNodePoolOutput(ctx *Context, args *LookupNodePoolOutputArgs, opts ...InvokeOption) LookupNodePoolResultOutput

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

    public static class GetNodePool 
    {
        public static Task<GetNodePoolResult> InvokeAsync(GetNodePoolArgs args, InvokeOptions? opts = null)
        public static Output<GetNodePoolResult> Invoke(GetNodePoolInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNodePoolResult> getNodePool(GetNodePoolArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: rancher2:index/getNodePool:getNodePool
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterId string
    The RKE cluster id to use Node Pool (string)
    Name string
    The name of the Node Pool (string)
    NodeTemplateId string
    The Node Template ID to use for node creation (string)
    ClusterId string
    The RKE cluster id to use Node Pool (string)
    Name string
    The name of the Node Pool (string)
    NodeTemplateId string
    The Node Template ID to use for node creation (string)
    clusterId String
    The RKE cluster id to use Node Pool (string)
    name String
    The name of the Node Pool (string)
    nodeTemplateId String
    The Node Template ID to use for node creation (string)
    clusterId string
    The RKE cluster id to use Node Pool (string)
    name string
    The name of the Node Pool (string)
    nodeTemplateId string
    The Node Template ID to use for node creation (string)
    cluster_id str
    The RKE cluster id to use Node Pool (string)
    name str
    The name of the Node Pool (string)
    node_template_id str
    The Node Template ID to use for node creation (string)
    clusterId String
    The RKE cluster id to use Node Pool (string)
    name String
    The name of the Node Pool (string)
    nodeTemplateId String
    The Node Template ID to use for node creation (string)

    getNodePool Result

    The following output properties are available:

    Annotations Dictionary<string, string>
    (Computed) Annotations for Node Pool object (map)
    ClusterId string
    ControlPlane bool
    (Computed) RKE control plane role for created nodes (bool)
    DeleteNotReadyAfterSecs int
    (Computed) Delete not ready node after secs. Default 0 (int)
    Etcd bool
    (Computed) RKE etcd role for created nodes (bool)
    HostnamePrefix string
    (Computed) The prefix for created nodes of the Node Pool (string)
    Id string
    The provider-assigned unique ID for this managed resource.
    Labels Dictionary<string, string>
    (Computed) Labels for Node Pool object (map)
    Name string
    NodeTaints List<GetNodePoolNodeTaint>
    (Computed) Node taints (List)
    NodeTemplateId string
    Quantity int
    (Computed) The number of nodes to create on Node Pool (int)
    Worker bool
    (Computed) RKE role role for created nodes (bool)
    Annotations map[string]string
    (Computed) Annotations for Node Pool object (map)
    ClusterId string
    ControlPlane bool
    (Computed) RKE control plane role for created nodes (bool)
    DeleteNotReadyAfterSecs int
    (Computed) Delete not ready node after secs. Default 0 (int)
    Etcd bool
    (Computed) RKE etcd role for created nodes (bool)
    HostnamePrefix string
    (Computed) The prefix for created nodes of the Node Pool (string)
    Id string
    The provider-assigned unique ID for this managed resource.
    Labels map[string]string
    (Computed) Labels for Node Pool object (map)
    Name string
    NodeTaints []GetNodePoolNodeTaint
    (Computed) Node taints (List)
    NodeTemplateId string
    Quantity int
    (Computed) The number of nodes to create on Node Pool (int)
    Worker bool
    (Computed) RKE role role for created nodes (bool)
    annotations Map<String,String>
    (Computed) Annotations for Node Pool object (map)
    clusterId String
    controlPlane Boolean
    (Computed) RKE control plane role for created nodes (bool)
    deleteNotReadyAfterSecs Integer
    (Computed) Delete not ready node after secs. Default 0 (int)
    etcd Boolean
    (Computed) RKE etcd role for created nodes (bool)
    hostnamePrefix String
    (Computed) The prefix for created nodes of the Node Pool (string)
    id String
    The provider-assigned unique ID for this managed resource.
    labels Map<String,String>
    (Computed) Labels for Node Pool object (map)
    name String
    nodeTaints List<GetNodePoolNodeTaint>
    (Computed) Node taints (List)
    nodeTemplateId String
    quantity Integer
    (Computed) The number of nodes to create on Node Pool (int)
    worker Boolean
    (Computed) RKE role role for created nodes (bool)
    annotations {[key: string]: string}
    (Computed) Annotations for Node Pool object (map)
    clusterId string
    controlPlane boolean
    (Computed) RKE control plane role for created nodes (bool)
    deleteNotReadyAfterSecs number
    (Computed) Delete not ready node after secs. Default 0 (int)
    etcd boolean
    (Computed) RKE etcd role for created nodes (bool)
    hostnamePrefix string
    (Computed) The prefix for created nodes of the Node Pool (string)
    id string
    The provider-assigned unique ID for this managed resource.
    labels {[key: string]: string}
    (Computed) Labels for Node Pool object (map)
    name string
    nodeTaints GetNodePoolNodeTaint[]
    (Computed) Node taints (List)
    nodeTemplateId string
    quantity number
    (Computed) The number of nodes to create on Node Pool (int)
    worker boolean
    (Computed) RKE role role for created nodes (bool)
    annotations Mapping[str, str]
    (Computed) Annotations for Node Pool object (map)
    cluster_id str
    control_plane bool
    (Computed) RKE control plane role for created nodes (bool)
    delete_not_ready_after_secs int
    (Computed) Delete not ready node after secs. Default 0 (int)
    etcd bool
    (Computed) RKE etcd role for created nodes (bool)
    hostname_prefix str
    (Computed) The prefix for created nodes of the Node Pool (string)
    id str
    The provider-assigned unique ID for this managed resource.
    labels Mapping[str, str]
    (Computed) Labels for Node Pool object (map)
    name str
    node_taints Sequence[GetNodePoolNodeTaint]
    (Computed) Node taints (List)
    node_template_id str
    quantity int
    (Computed) The number of nodes to create on Node Pool (int)
    worker bool
    (Computed) RKE role role for created nodes (bool)
    annotations Map<String>
    (Computed) Annotations for Node Pool object (map)
    clusterId String
    controlPlane Boolean
    (Computed) RKE control plane role for created nodes (bool)
    deleteNotReadyAfterSecs Number
    (Computed) Delete not ready node after secs. Default 0 (int)
    etcd Boolean
    (Computed) RKE etcd role for created nodes (bool)
    hostnamePrefix String
    (Computed) The prefix for created nodes of the Node Pool (string)
    id String
    The provider-assigned unique ID for this managed resource.
    labels Map<String>
    (Computed) Labels for Node Pool object (map)
    name String
    nodeTaints List<Property Map>
    (Computed) Node taints (List)
    nodeTemplateId String
    quantity Number
    (Computed) The number of nodes to create on Node Pool (int)
    worker Boolean
    (Computed) RKE role role for created nodes (bool)

    Supporting Types

    GetNodePoolNodeTaint

    Key string
    TimeAdded string
    Value string
    Effect string
    Key string
    TimeAdded string
    Value string
    Effect string
    key String
    timeAdded String
    value String
    effect String
    key string
    timeAdded string
    value string
    effect string
    key str
    time_added str
    value str
    effect str
    key String
    timeAdded String
    value String
    effect String

    Package Details

    Repository
    Rancher2 pulumi/pulumi-rancher2
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the rancher2 Terraform Provider.
    rancher2 logo
    Rancher 2 v7.1.1 published on Monday, Oct 7, 2024 by Pulumi