HashiCorp Nomad

Pulumi Official
Package maintained by Pulumi
v0.2.1 published on Tuesday, Dec 7, 2021 by Pulumi

getPlugin

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

using Pulumi;
using Nomad = Pulumi.Nomad;

class MyStack : Stack
{
    public MyStack()
    {
        var ebs = Output.Create(Nomad.GetPlugin.InvokeAsync(new Nomad.GetPluginArgs
        {
            PluginId = "aws-ebs0",
            WaitForHealthy = true,
        }));
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := true
		_, err := nomad.GetPlugin(ctx, &GetPluginArgs{
			PluginId:       "aws-ebs0",
			WaitForHealthy: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_nomad as nomad

ebs = nomad.get_plugin(plugin_id="aws-ebs0",
    wait_for_healthy=True)
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";

const ebs = pulumi.output(nomad.getPlugin({
    pluginId: "aws-ebs0",
    waitForHealthy: true,
}));

Coming soon!

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:

getPlugin Result

The following output properties are available:

controllerRequired Boolean
controllersExpected Integer
controllersHealthy Integer
id String

The provider-assigned unique ID for this managed resource.

nodes List<GetPluginNode>
nodesExpected Integer
nodesHealthy Integer
pluginId String
pluginProvider String
pluginProviderVersion String
waitForHealthy Boolean
waitForRegistration Boolean
controllerRequired boolean
controllersExpected number
controllersHealthy number
id string

The provider-assigned unique ID for this managed resource.

nodes GetPluginNode[]
nodesExpected number
nodesHealthy number
pluginId string
pluginProvider string
pluginProviderVersion string
waitForHealthy boolean
waitForRegistration boolean
controllerRequired Boolean
controllersExpected Number
controllersHealthy Number
id String

The provider-assigned unique ID for this managed resource.

nodes List<Property Map>
nodesExpected Number
nodesHealthy Number
pluginId String
pluginProvider String
pluginProviderVersion String
waitForHealthy Boolean
waitForRegistration Boolean

Supporting Types

GetPluginNode

healthy Boolean
healthyDescription String
name String
healthy boolean
healthyDescription string
name string
healthy Boolean
healthyDescription String
name String

Package Details

Repository
https://github.com/pulumi/pulumi-nomad
License
Apache-2.0
Notes

This Pulumi package is based on the nomad Terraform Provider.