Node Pool Args
data class NodePoolArgs(val description: Output<String>? = null, val meta: Output<Map<String, String>>? = null, val name: Output<String>? = null, val schedulerConfig: Output<NodePoolSchedulerConfigArgs>? = null) : ConvertibleToJava<NodePoolArgs>
Provisions a node pool within a Nomad cluster.
Example Usage
Registering a node pool:
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";
const dev = new nomad.NodePool("dev", {
name: "dev",
description: "Nodes for the development environment.",
meta: {
department: "Engineering",
env: "dev",
},
});
Content copied to clipboard
import pulumi
import pulumi_nomad as nomad
dev = nomad.NodePool("dev",
name="dev",
description="Nodes for the development environment.",
meta={
"department": "Engineering",
"env": "dev",
})
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nomad = Pulumi.Nomad;
return await Deployment.RunAsync(() =>
{
var dev = new Nomad.NodePool("dev", new()
{
Name = "dev",
Description = "Nodes for the development environment.",
Meta =
{
{ "department", "Engineering" },
{ "env", "dev" },
},
});
});
Content copied to clipboard
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.NewNodePool(ctx, "dev", &nomad.NodePoolArgs{
Name: pulumi.String("dev"),
Description: pulumi.String("Nodes for the development environment."),
Meta: pulumi.StringMap{
"department": pulumi.String("Engineering"),
"env": pulumi.String("dev"),
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nomad.NodePool;
import com.pulumi.nomad.NodePoolArgs;
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) {
var dev = new NodePool("dev", NodePoolArgs.builder()
.name("dev")
.description("Nodes for the development environment.")
.meta(Map.ofEntries(
Map.entry("department", "Engineering"),
Map.entry("env", "dev")
))
.build());
}
}
Content copied to clipboard
resources:
dev:
type: nomad:NodePool
properties:
name: dev
description: Nodes for the development environment.
meta:
department: Engineering
env: dev
Content copied to clipboard