1. Packages
  2. Nomad Provider
  3. API Docs
  4. getNodePool
Nomad v2.4.3 published on Saturday, Mar 15, 2025 by Pulumi

nomad.getNodePool

Explore with Pulumi AI

Nomad v2.4.3 published on Saturday, Mar 15, 2025 by Pulumi

Get information about a node pool in Nomad.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";

const dev = nomad.getNodePool({
    name: "dev",
});
Copy
import pulumi
import pulumi_nomad as nomad

dev = nomad.get_node_pool(name="dev")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := nomad.LookupNodePool(ctx, &nomad.LookupNodePoolArgs{
			Name: "dev",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nomad = Pulumi.Nomad;

return await Deployment.RunAsync(() => 
{
    var dev = Nomad.GetNodePool.Invoke(new()
    {
        Name = "dev",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nomad.NomadFunctions;
import com.pulumi.nomad.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 dev = NomadFunctions.getNodePool(GetNodePoolArgs.builder()
            .name("dev")
            .build());

    }
}
Copy
variables:
  dev:
    fn::invoke:
      function: nomad:getNodePool
      arguments:
        name: dev
Copy

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

> 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)
}
Copy
public static CompletableFuture<GetNodePoolResult> getNodePool(GetNodePoolArgs args, InvokeOptions options)
public static Output<GetNodePoolResult> getNodePool(GetNodePoolArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: nomad:index/getNodePool:getNodePool
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
(string) - The name of the node pool to fetch.
Name This property is required. string
(string) - The name of the node pool to fetch.
name This property is required. String
(string) - The name of the node pool to fetch.
name This property is required. string
(string) - The name of the node pool to fetch.
name This property is required. str
(string) - The name of the node pool to fetch.
name This property is required. String
(string) - The name of the node pool to fetch.

getNodePool Result

The following output properties are available:

Description string
(string) - The description of the node pool.
Id string
The provider-assigned unique ID for this managed resource.
Meta Dictionary<string, string>
(map[string]string) - Arbitrary KV metadata associated with the node pool.
Name string
SchedulerConfigs List<GetNodePoolSchedulerConfig>
(block) - Scheduler configuration for the node pool.
Description string
(string) - The description of the node pool.
Id string
The provider-assigned unique ID for this managed resource.
Meta map[string]string
(map[string]string) - Arbitrary KV metadata associated with the node pool.
Name string
SchedulerConfigs []GetNodePoolSchedulerConfig
(block) - Scheduler configuration for the node pool.
description String
(string) - The description of the node pool.
id String
The provider-assigned unique ID for this managed resource.
meta Map<String,String>
(map[string]string) - Arbitrary KV metadata associated with the node pool.
name String
schedulerConfigs List<GetNodePoolSchedulerConfig>
(block) - Scheduler configuration for the node pool.
description string
(string) - The description of the node pool.
id string
The provider-assigned unique ID for this managed resource.
meta {[key: string]: string}
(map[string]string) - Arbitrary KV metadata associated with the node pool.
name string
schedulerConfigs GetNodePoolSchedulerConfig[]
(block) - Scheduler configuration for the node pool.
description str
(string) - The description of the node pool.
id str
The provider-assigned unique ID for this managed resource.
meta Mapping[str, str]
(map[string]string) - Arbitrary KV metadata associated with the node pool.
name str
scheduler_configs Sequence[GetNodePoolSchedulerConfig]
(block) - Scheduler configuration for the node pool.
description String
(string) - The description of the node pool.
id String
The provider-assigned unique ID for this managed resource.
meta Map<String>
(map[string]string) - Arbitrary KV metadata associated with the node pool.
name String
schedulerConfigs List<Property Map>
(block) - Scheduler configuration for the node pool.

Supporting Types

GetNodePoolSchedulerConfig

MemoryOversubscription This property is required. string
(string) - Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.
SchedulerAlgorithm This property is required. string
(string) - The scheduler algorithm used in the node pool. If empty or not defined the global cluster configuration is used.
MemoryOversubscription This property is required. string
(string) - Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.
SchedulerAlgorithm This property is required. string
(string) - The scheduler algorithm used in the node pool. If empty or not defined the global cluster configuration is used.
memoryOversubscription This property is required. String
(string) - Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.
schedulerAlgorithm This property is required. String
(string) - The scheduler algorithm used in the node pool. If empty or not defined the global cluster configuration is used.
memoryOversubscription This property is required. string
(string) - Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.
schedulerAlgorithm This property is required. string
(string) - The scheduler algorithm used in the node pool. If empty or not defined the global cluster configuration is used.
memory_oversubscription This property is required. str
(string) - Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.
scheduler_algorithm This property is required. str
(string) - The scheduler algorithm used in the node pool. If empty or not defined the global cluster configuration is used.
memoryOversubscription This property is required. String
(string) - Whether or not memory oversubscription is enabled in the node pool. If empty or not defined the global cluster configuration is used.
schedulerAlgorithm This property is required. String
(string) - The scheduler algorithm used in the node pool. If empty or not defined the global cluster configuration is used.

Package Details

Repository
HashiCorp Nomad pulumi/pulumi-nomad
License
Apache-2.0
Notes
This Pulumi package is based on the nomad Terraform Provider.
Nomad v2.4.3 published on Saturday, Mar 15, 2025 by Pulumi