HCP

Community
Package contributed by a community member
v0.1.11 published on Monday, Jul 25, 2022 by Grapl Security

getConsulCluster

The cluster data source provides information about an existing HCP Consul cluster.

Example Usage

using Pulumi;
using Hcp = Pulumi.Hcp;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Hcp.GetConsulCluster.InvokeAsync(new Hcp.GetConsulClusterArgs
        {
            ClusterId = @var.Cluster_id,
        }));
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := hcp.LookupConsulCluster(ctx, &GetConsulClusterArgs{
			ClusterId: _var.Cluster_id,
		}, 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 com.pulumi.hcp.inputs.GetConsulClusterArgs;
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 = HcpFunctions.getConsulCluster(GetConsulClusterArgs.builder()
            .clusterId(var_.cluster_id())
            .build());

    }
}
import pulumi
import pulumi_hcp as hcp

example = hcp.get_consul_cluster(cluster_id=var["cluster_id"])
import * as pulumi from "@pulumi/pulumi";
import * as hcp from "@pulumi/hcp";

const example = hcp.getConsulCluster({
    clusterId: _var.cluster_id,
});
variables:
  example:
    Fn::Invoke:
      Function: hcp:getConsulCluster
      Arguments:
        clusterId: ${var.cluster_id}

Using getConsulCluster

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 getConsulCluster(args: GetConsulClusterArgs, opts?: InvokeOptions): Promise<GetConsulClusterResult>
function getConsulClusterOutput(args: GetConsulClusterOutputArgs, opts?: InvokeOptions): Output<GetConsulClusterResult>
def get_consul_cluster(cluster_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetConsulClusterResult
def get_consul_cluster_output(cluster_id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetConsulClusterResult]
func LookupConsulCluster(ctx *Context, args *LookupConsulClusterArgs, opts ...InvokeOption) (*LookupConsulClusterResult, error)
func LookupConsulClusterOutput(ctx *Context, args *LookupConsulClusterOutputArgs, opts ...InvokeOption) LookupConsulClusterResultOutput

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

public static class GetConsulCluster 
{
    public static Task<GetConsulClusterResult> InvokeAsync(GetConsulClusterArgs args, InvokeOptions? opts = null)
    public static Output<GetConsulClusterResult> Invoke(GetConsulClusterInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetConsulClusterResult> getConsulCluster(GetConsulClusterArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: hcp:index/getConsulCluster:getConsulCluster
  Arguments:
    # Arguments dictionary

The following arguments are supported:

ClusterId string
ClusterId string
clusterId String
clusterId string
clusterId String

getConsulCluster Result

The following output properties are available:

AutoHvnToHvnPeering bool
CloudProvider string
ClusterId string
ConnectEnabled bool
ConsulAutomaticUpgrades bool
ConsulCaFile string
ConsulConfigFile string
ConsulPrivateEndpointUrl string
ConsulPublicEndpointUrl string
ConsulSnapshotInterval string
ConsulSnapshotRetention string
ConsulVersion string
Datacenter string
HvnId string
Id string

The provider-assigned unique ID for this managed resource.

OrganizationId string
PrimaryLink string
ProjectId string
PublicEndpoint bool
Region string
Scale int
SelfLink string
Size string
State string
Tier string
AutoHvnToHvnPeering bool
CloudProvider string
ClusterId string
ConnectEnabled bool
ConsulAutomaticUpgrades bool
ConsulCaFile string
ConsulConfigFile string
ConsulPrivateEndpointUrl string
ConsulPublicEndpointUrl string
ConsulSnapshotInterval string
ConsulSnapshotRetention string
ConsulVersion string
Datacenter string
HvnId string
Id string

The provider-assigned unique ID for this managed resource.

OrganizationId string
PrimaryLink string
ProjectId string
PublicEndpoint bool
Region string
Scale int
SelfLink string
Size string
State string
Tier string
autoHvnToHvnPeering Boolean
cloudProvider String
clusterId String
connectEnabled Boolean
consulAutomaticUpgrades Boolean
consulCaFile String
consulConfigFile String
consulPrivateEndpointUrl String
consulPublicEndpointUrl String
consulSnapshotInterval String
consulSnapshotRetention String
consulVersion String
datacenter String
hvnId String
id String

The provider-assigned unique ID for this managed resource.

organizationId String
primaryLink String
projectId String
publicEndpoint Boolean
region String
scale Integer
selfLink String
size String
state String
tier String
autoHvnToHvnPeering boolean
cloudProvider string
clusterId string
connectEnabled boolean
consulAutomaticUpgrades boolean
consulCaFile string
consulConfigFile string
consulPrivateEndpointUrl string
consulPublicEndpointUrl string
consulSnapshotInterval string
consulSnapshotRetention string
consulVersion string
datacenter string
hvnId string
id string

The provider-assigned unique ID for this managed resource.

organizationId string
primaryLink string
projectId string
publicEndpoint boolean
region string
scale number
selfLink string
size string
state string
tier string
autoHvnToHvnPeering Boolean
cloudProvider String
clusterId String
connectEnabled Boolean
consulAutomaticUpgrades Boolean
consulCaFile String
consulConfigFile String
consulPrivateEndpointUrl String
consulPublicEndpointUrl String
consulSnapshotInterval String
consulSnapshotRetention String
consulVersion String
datacenter String
hvnId String
id String

The provider-assigned unique ID for this managed resource.

organizationId String
primaryLink String
projectId String
publicEndpoint Boolean
region String
scale Number
selfLink String
size String
state String
tier String

Package Details

Repository
https://github.com/grapl-security/pulumi-hcp
License
Apache-2.0
Notes

This Pulumi package is based on the hcp Terraform Provider.