getDynamicHostVolume

Get information on a dynamic host volume from Nomad.

Example Usage

Check for the existing of a host volume:

import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";
const example = nomad.getDynamicHostVolume({
namespace: "prod",
id: "d688ff7a-d299-11ef-ae3c-6f2400953c18",
});
import pulumi
import pulumi_nomad as nomad
example = nomad.get_dynamic_host_volume(namespace="prod",
id="d688ff7a-d299-11ef-ae3c-6f2400953c18")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nomad = Pulumi.Nomad;
return await Deployment.RunAsync(() =>
{
var example = Nomad.GetDynamicHostVolume.Invoke(new()
{
Namespace = "prod",
Id = "d688ff7a-d299-11ef-ae3c-6f2400953c18",
});
});
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.LookupDynamicHostVolume(ctx, &nomad.LookupDynamicHostVolumeArgs{
Namespace: pulumi.StringRef("prod"),
Id: "d688ff7a-d299-11ef-ae3c-6f2400953c18",
}, nil)
if err != nil {
return err
}
return nil
})
}
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.GetDynamicHostVolumeArgs;
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 example = NomadFunctions.getDynamicHostVolume(GetDynamicHostVolumeArgs.builder()
.namespace("prod")
.id("d688ff7a-d299-11ef-ae3c-6f2400953c18")
.build());
}
}
variables:
example:
fn::invoke:
function: nomad:getDynamicHostVolume
arguments:
namespace: prod
id: d688ff7a-d299-11ef-ae3c-6f2400953c18

This will check for a dynamic host volume with the ID d688ff7a-d299-11ef-ae3c-6f2400953c18.

Return

A collection of values returned by getDynamicHostVolume.

Parameters

argument

A collection of arguments for invoking getDynamicHostVolume.


suspend fun getDynamicHostVolume(id: String, namespace: String? = null): GetDynamicHostVolumeResult

Return

A collection of values returned by getDynamicHostVolume.

Parameters

id

(string) - the ID of the volume

namespace

(string) - the namespace of the volume. Defaults to "default"

See also


Return

A collection of values returned by getDynamicHostVolume.

Parameters

argument

Builder for com.pulumi.nomad.kotlin.inputs.GetDynamicHostVolumePlainArgs.

See also