hcp logo
HashiCorp Cloud Platform (HCP) v0.1.14, Dec 2 22

hcp.getConsulVersions

The Consul versions data source provides the Consul versions supported by HCP.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var @default = Hcp.GetConsulVersions.Invoke();

});
package main

import (
	"github.com/grapl-security/pulumi-hcp/sdk/go/hcp"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := hcp.GetConsulVersions(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.hcp.HcpFunctions;
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 default = HcpFunctions.getConsulVersions();

    }
}
import pulumi
import pulumi_hcp as hcp

default = hcp.get_consul_versions()
import * as pulumi from "@pulumi/pulumi";
import * as hcp from "@pulumi/hcp";

const defaultConsulVersions = pulumi.output(hcp.getConsulVersions());
variables:
  default:
    Fn::Invoke:
      Function: hcp:getConsulVersions
      Arguments: {}

Using getConsulVersions

function getConsulVersions(opts?: InvokeOptions): Promise<GetConsulVersionsResult>
def get_consul_versions(opts: Optional[InvokeOptions] = None) -> GetConsulVersionsResult
func GetConsulVersions(ctx *Context, opts ...InvokeOption) (*GetConsulVersionsResult, error)

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

public static class GetConsulVersions 
{
    public static Task<GetConsulVersionsResult> InvokeAsync(InvokeOptions? opts = null)
}
public static CompletableFuture<GetConsulVersionsResult> getConsulVersions(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: hcp:index/getConsulVersions:getConsulVersions
  arguments:
    # arguments dictionary

getConsulVersions Result

The following output properties are available:

Availables List<string>

The Consul versions available on HCP.

Id string

The provider-assigned unique ID for this managed resource.

Previews List<string>

The preview versions of Consul available on HCP.

Recommended string

The recommended Consul version for HCP clusters.

Availables []string

The Consul versions available on HCP.

Id string

The provider-assigned unique ID for this managed resource.

Previews []string

The preview versions of Consul available on HCP.

Recommended string

The recommended Consul version for HCP clusters.

availables List<String>

The Consul versions available on HCP.

id String

The provider-assigned unique ID for this managed resource.

previews List<String>

The preview versions of Consul available on HCP.

recommended String

The recommended Consul version for HCP clusters.

availables string[]

The Consul versions available on HCP.

id string

The provider-assigned unique ID for this managed resource.

previews string[]

The preview versions of Consul available on HCP.

recommended string

The recommended Consul version for HCP clusters.

availables Sequence[str]

The Consul versions available on HCP.

id str

The provider-assigned unique ID for this managed resource.

previews Sequence[str]

The preview versions of Consul available on HCP.

recommended str

The recommended Consul version for HCP clusters.

availables List<String>

The Consul versions available on HCP.

id String

The provider-assigned unique ID for this managed resource.

previews List<String>

The preview versions of Consul available on HCP.

recommended String

The recommended Consul version for HCP clusters.

Package Details

Repository
hcp grapl-security/pulumi-hcp
License
Apache-2.0
Notes

This Pulumi package is based on the hcp Terraform Provider.