Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

getNodePool

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

Example Usage

using Pulumi;
using Rancher2 = Pulumi.Rancher2;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = Output.Create(Rancher2.GetNodePool.InvokeAsync(new Rancher2.GetNodePoolArgs
        {
            ClusterId = rancher2_cluster.Foo_custom.Id,
            Name = "foo",
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-rancher2/sdk/v2/go/rancher2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := rancher2.LookupNodePool(ctx, &rancher2.LookupNodePoolArgs{
            ClusterId: rancher2_cluster.Foo - custom.Id,
            Name:      "foo",
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_rancher2 as rancher2

foo = rancher2.get_node_pool(cluster_id=rancher2_cluster["foo-custom"]["id"],
    name="foo")
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";

const foo = rancher2.getNodePool({
    clusterId: rancher2_cluster["foo-custom"].id,
    name: "foo",
});

Using getNodePool

function getNodePool(args: GetNodePoolArgs, opts?: InvokeOptions): Promise<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
func LookupNodePool(ctx *Context, args *LookupNodePoolArgs, opts ...InvokeOption) (*LookupNodePoolResult, error)

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

public static class GetNodePool {
    public static Task<GetNodePoolResult> InvokeAsync(GetNodePoolArgs args, InvokeOptions? opts = null)
}

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)

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)

getNodePool Result

The following output properties are available:

Annotations Dictionary<string, object>

(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, object>

(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]interface{}

(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]interface{}

(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 {[key: string]: any}

(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]: any}

(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, Any]

(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, Any]

(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)

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 str
time_added str
value str
effect str

Package Details

Repository
https://github.com/pulumi/pulumi-rancher2
License
Apache-2.0
Notes
This Pulumi package is based on the rancher2 Terraform Provider.