HashiCorp Nomad

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

getDeployments

Retrieve a list of deployments in Nomad.

Example Usage

using Pulumi;
using Nomad = Pulumi.Nomad;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Nomad.GetDeployments.InvokeAsync());
    }

}
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 {
		_, err := nomad.GetDeployments(ctx, nil, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_nomad as nomad

example = nomad.get_deployments()
import * as pulumi from "@pulumi/pulumi";
import * as nomad from "@pulumi/nomad";

const example = pulumi.output(nomad.getDeployments());

Using getDeployments

function getDeployments(opts?: InvokeOptions): Promise<GetDeploymentsResult>
def get_deployments(opts: Optional[InvokeOptions] = None) -> GetDeploymentsResult
func GetDeployments(ctx *Context, opts ...InvokeOption) (*GetDeploymentsResult, error)

> Note: This function is named GetDeployments in the Go SDK.

public static class GetDeployments 
{
    public static Task<GetDeploymentsResult> InvokeAsync(InvokeOptions? opts = null)
}

getDeployments Result

The following output properties are available:

Deployments List<ImmutableDictionary<string, object>>
Id string
The provider-assigned unique ID for this managed resource.
Deployments []map[string]interface{}
Id string
The provider-assigned unique ID for this managed resource.
deployments {[key: string]: any}[]
id string
The provider-assigned unique ID for this managed resource.
deployments Sequence[Mapping[str, Any]]
id str
The provider-assigned unique ID for this managed resource.

Package Details

Repository
https://github.com/pulumi/pulumi-nomad
License
Apache-2.0
Notes
This Pulumi package is based on the nomad Terraform Provider.