HashiCorp Nomad

v0.3.0 published on Tuesday, Sep 27, 2022 by Pulumi

getDeployments

Retrieve a list of deployments in Nomad.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Nomad = Pulumi.Nomad;

return await Deployment.RunAsync(() => 
{
    var example = Nomad.GetDeployments.Invoke();

});
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
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nomad.NomadFunctions;
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.getDeployments();

    }
}
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());
variables:
  example:
    Fn::Invoke:
      Function: nomad:getDeployments
      Arguments: {}

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)
}
public static CompletableFuture<GetDeploymentsResult> getDeployments(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: nomad:index/getDeployments:getDeployments
  arguments:
    # arguments dictionary

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 List<Map<String,Object>>
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.

deployments List<Map<Any>>
id String

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.