nomad.getPlugin
Explore with Pulumi AI
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)
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
})
}
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 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.
Using getPlugin
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 getPlugin(args: GetPluginArgs, opts?: InvokeOptions): Promise<GetPluginResult>
function getPluginOutput(args: GetPluginOutputArgs, opts?: InvokeOptions): Output<GetPluginResult>
def get_plugin(plugin_id: Optional[str] = None,
wait_for_healthy: Optional[bool] = None,
wait_for_registration: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetPluginResult
def get_plugin_output(plugin_id: Optional[pulumi.Input[str]] = None,
wait_for_healthy: Optional[pulumi.Input[bool]] = None,
wait_for_registration: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPluginResult]
func GetPlugin(ctx *Context, args *GetPluginArgs, opts ...InvokeOption) (*GetPluginResult, error)
func GetPluginOutput(ctx *Context, args *GetPluginOutputArgs, opts ...InvokeOption) GetPluginResultOutput
> Note: This function is named GetPlugin
in the Go SDK.
public static class GetPlugin
{
public static Task<GetPluginResult> InvokeAsync(GetPluginArgs args, InvokeOptions? opts = null)
public static Output<GetPluginResult> Invoke(GetPluginInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPluginResult> getPlugin(GetPluginArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: nomad:index/getPlugin:getPlugin
arguments:
# arguments dictionary
The following arguments are supported:
- Plugin
Id string (string)
ID of the plugin.- Wait
For boolHealthy (boolean)
retry until the plugin exists and all controllers are healthy- Wait
For boolRegistration (boolean)
if the plugin doesn't exist, retry until it does
- Plugin
Id string (string)
ID of the plugin.- Wait
For boolHealthy (boolean)
retry until the plugin exists and all controllers are healthy- Wait
For boolRegistration (boolean)
if the plugin doesn't exist, retry until it does
- plugin
Id String (string)
ID of the plugin.- wait
For BooleanHealthy (boolean)
retry until the plugin exists and all controllers are healthy- wait
For BooleanRegistration (boolean)
if the plugin doesn't exist, retry until it does
- plugin
Id string (string)
ID of the plugin.- wait
For booleanHealthy (boolean)
retry until the plugin exists and all controllers are healthy- wait
For booleanRegistration (boolean)
if the plugin doesn't exist, retry until it does
- plugin_
id str (string)
ID of the plugin.- wait_
for_ boolhealthy (boolean)
retry until the plugin exists and all controllers are healthy- wait_
for_ boolregistration (boolean)
if the plugin doesn't exist, retry until it does
- plugin
Id String (string)
ID of the plugin.- wait
For BooleanHealthy (boolean)
retry until the plugin exists and all controllers are healthy- wait
For BooleanRegistration (boolean)
if the plugin doesn't exist, retry until it does
getPlugin Result
The following output properties are available:
- Controller
Required bool (boolean)
Whether a controller is required.- Controllers
Expected int (integer)
The number of registered controllers.- Controllers
Healthy int (integer)
The number of healthy controllers.- Id string
- The provider-assigned unique ID for this managed resource.
- Nodes
List<Get
Plugin Node> - Nodes
Expected int (integer)
The number of registered nodes.- Nodes
Healthy int (integer)
The number of healthy nodes.- Plugin
Id string (string)
ID of the plugin- Plugin
Provider string (string)
Plugin provider name- Plugin
Provider stringVersion (string)
Plugin provider version- Wait
For boolHealthy - Wait
For boolRegistration
- Controller
Required bool (boolean)
Whether a controller is required.- Controllers
Expected int (integer)
The number of registered controllers.- Controllers
Healthy int (integer)
The number of healthy controllers.- Id string
- The provider-assigned unique ID for this managed resource.
- Nodes
[]Get
Plugin Node - Nodes
Expected int (integer)
The number of registered nodes.- Nodes
Healthy int (integer)
The number of healthy nodes.- Plugin
Id string (string)
ID of the plugin- Plugin
Provider string (string)
Plugin provider name- Plugin
Provider stringVersion (string)
Plugin provider version- Wait
For boolHealthy - Wait
For boolRegistration
- controller
Required Boolean (boolean)
Whether a controller is required.- controllers
Expected Integer (integer)
The number of registered controllers.- controllers
Healthy Integer (integer)
The number of healthy controllers.- id String
- The provider-assigned unique ID for this managed resource.
- nodes
List<Get
Plugin Node> - nodes
Expected Integer (integer)
The number of registered nodes.- nodes
Healthy Integer (integer)
The number of healthy nodes.- plugin
Id String (string)
ID of the plugin- plugin
Provider String (string)
Plugin provider name- plugin
Provider StringVersion (string)
Plugin provider version- wait
For BooleanHealthy - wait
For BooleanRegistration
- controller
Required boolean (boolean)
Whether a controller is required.- controllers
Expected number (integer)
The number of registered controllers.- controllers
Healthy number (integer)
The number of healthy controllers.- id string
- The provider-assigned unique ID for this managed resource.
- nodes
Get
Plugin Node[] - nodes
Expected number (integer)
The number of registered nodes.- nodes
Healthy number (integer)
The number of healthy nodes.- plugin
Id string (string)
ID of the plugin- plugin
Provider string (string)
Plugin provider name- plugin
Provider stringVersion (string)
Plugin provider version- wait
For booleanHealthy - wait
For booleanRegistration
- controller_
required bool (boolean)
Whether a controller is required.- controllers_
expected int (integer)
The number of registered controllers.- controllers_
healthy int (integer)
The number of healthy controllers.- id str
- The provider-assigned unique ID for this managed resource.
- nodes
Sequence[Get
Plugin Node] - nodes_
expected int (integer)
The number of registered nodes.- nodes_
healthy int (integer)
The number of healthy nodes.- plugin_
id str (string)
ID of the plugin- plugin_
provider str (string)
Plugin provider name- plugin_
provider_ strversion (string)
Plugin provider version- wait_
for_ boolhealthy - wait_
for_ boolregistration
- controller
Required Boolean (boolean)
Whether a controller is required.- controllers
Expected Number (integer)
The number of registered controllers.- controllers
Healthy Number (integer)
The number of healthy controllers.- id String
- The provider-assigned unique ID for this managed resource.
- nodes List<Property Map>
- nodes
Expected Number (integer)
The number of registered nodes.- nodes
Healthy Number (integer)
The number of healthy nodes.- plugin
Id String (string)
ID of the plugin- plugin
Provider String (string)
Plugin provider name- plugin
Provider StringVersion (string)
Plugin provider version- wait
For BooleanHealthy - wait
For BooleanRegistration
Supporting Types
GetPluginNode
- Healthy bool
- Healthy
Description string - Name string
- Healthy bool
- Healthy
Description string - Name string
- healthy Boolean
- healthy
Description String - name String
- healthy boolean
- healthy
Description string - name string
- healthy bool
- healthy_
description str - name str
- healthy Boolean
- healthy
Description String - name String
Package Details
- Repository
- HashiCorp Nomad pulumi/pulumi-nomad
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nomad
Terraform Provider.