get Plugin
Lookup a plugin by ID. The aim of this datasource is to determine whether a particular plugin exists on the cluster, to find information on the health and availability of the plugin, and to optionally wait for the plugin before performing actions the require an available plugin controller. If a plugin with the specified ID does not exist and the datasource is not configured to wait, it will result in an error. For simple existence checks, use the nomad.getPlugins
listing datasource.
Example Usage
Check for the existence of a plugin:
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";
const ebs = nomad.getPlugin({
pluginId: "aws-ebs0",
waitForHealthy: true,
});
import pulumi
import pulumi_nomad as nomad
ebs = nomad.get_plugin(plugin_id="aws-ebs0",
wait_for_healthy=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nomad = Pulumi.Nomad;
return await Deployment.RunAsync(() =>
{
var ebs = Nomad.GetPlugin.Invoke(new()
{
PluginId = "aws-ebs0",
WaitForHealthy = true,
});
});
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.GetPlugin(ctx, &nomad.GetPluginArgs{
PluginId: "aws-ebs0",
WaitForHealthy: pulumi.BoolRef(true),
}, 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.GetPluginArgs;
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 ebs = NomadFunctions.getPlugin(GetPluginArgs.builder()
.pluginId("aws-ebs0")
.waitForHealthy(true)
.build());
}
}
variables:
ebs:
fn::invoke:
function: nomad:getPlugin
arguments:
pluginId: aws-ebs0
waitForHealthy: true
This will check for a plugin with the ID aws-ebs0
, waiting until the plugin is healthy before returning.
Return
A collection of values returned by getPlugin.
Parameters
A collection of arguments for invoking getPlugin.
Return
A collection of values returned by getPlugin.
Parameters
(string)
ID of the plugin.
(boolean)
retry until the plugin exists and all controllers are healthy
(boolean)
if the plugin doesn't exist, retry until it does
See also
Return
A collection of values returned by getPlugin.
Parameters
Builder for com.pulumi.nomad.kotlin.inputs.GetPluginPlainArgs.