HCP

v0.1.12 published on Wednesday, Sep 28, 2022 by Grapl Security

getConsulCluster

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

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var example = Hcp.GetConsulCluster.Invoke(new()
    {
        ClusterId = @var.Cluster_id,
    });

});
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.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

The ID of the HCP Consul cluster.

ClusterId string

The ID of the HCP Consul cluster.

clusterId String

The ID of the HCP Consul cluster.

clusterId string

The ID of the HCP Consul cluster.

cluster_id str

The ID of the HCP Consul cluster.

clusterId String

The ID of the HCP Consul cluster.

getConsulCluster Result

The following output properties are available:

AutoHvnToHvnPeering bool

Enables automatic HVN to HVN peering when creating a secondary cluster in a federation.

CloudProvider string

The provider where the HCP Consul cluster is located. Only 'aws' is available at this time.

ClusterId string

The ID of the HCP Consul cluster.

ConnectEnabled bool

Denotes the Consul connect feature should be enabled for this cluster. Default to true.

ConsulAutomaticUpgrades bool

Denotes that automatic Consul upgrades are enabled.

ConsulCaFile string

The cluster CA file encoded as a Base64 string.

ConsulConfigFile string

The cluster config encoded as a Base64 string.

ConsulPrivateEndpointUrl string

The private URL for the Consul UI.

ConsulPublicEndpointUrl string

The public URL for the Consul UI. This will be empty if public_endpoint is false.

ConsulSnapshotInterval string

The Consul snapshot interval.

ConsulSnapshotRetention string

The retention policy for Consul snapshots.

ConsulVersion string

The Consul version of the cluster.

Datacenter string

The Consul data center name of the cluster. If not specified, it is defaulted to the value of cluster_id.

HvnId string

The ID of the HVN this HCP Consul cluster is associated to.

Id string

The provider-assigned unique ID for this managed resource.

OrganizationId string

The ID of the organization the project for this HCP Consul cluster is located.

PrimaryLink string

The self_link of the HCP Consul cluster which is the primary in the federation setup with this HCP Consul cluster. If not specified, it is a standalone cluster.

ProjectId string

The ID of the project this HCP Consul cluster is located.

PublicEndpoint bool

Denotes that the cluster has a public endpoint for the Consul UI. Defaults to false.

Region string

The region where the HCP Consul cluster is located.

Scale int

The the number of Consul server nodes in the cluster.

SelfLink string

A unique URL identifying the HCP Consul cluster.

Size string

The t-shirt size representation of each server VM that this Consul cluster is provisioned with. Valid option for development tier - x_small. Valid options for other tiers - small, medium, large. For more details - https://cloud.hashicorp.com/pricing/consul

State string

The state of the HCP Consul cluster.

Tier string

The tier that the HCP Consul cluster will be provisioned as. Only development, standard and plus are available at this time.

AutoHvnToHvnPeering bool

Enables automatic HVN to HVN peering when creating a secondary cluster in a federation.

CloudProvider string

The provider where the HCP Consul cluster is located. Only 'aws' is available at this time.

ClusterId string

The ID of the HCP Consul cluster.

ConnectEnabled bool

Denotes the Consul connect feature should be enabled for this cluster. Default to true.

ConsulAutomaticUpgrades bool

Denotes that automatic Consul upgrades are enabled.

ConsulCaFile string

The cluster CA file encoded as a Base64 string.

ConsulConfigFile string

The cluster config encoded as a Base64 string.

ConsulPrivateEndpointUrl string

The private URL for the Consul UI.

ConsulPublicEndpointUrl string

The public URL for the Consul UI. This will be empty if public_endpoint is false.

ConsulSnapshotInterval string

The Consul snapshot interval.

ConsulSnapshotRetention string

The retention policy for Consul snapshots.

ConsulVersion string

The Consul version of the cluster.

Datacenter string

The Consul data center name of the cluster. If not specified, it is defaulted to the value of cluster_id.

HvnId string

The ID of the HVN this HCP Consul cluster is associated to.

Id string

The provider-assigned unique ID for this managed resource.

OrganizationId string

The ID of the organization the project for this HCP Consul cluster is located.

PrimaryLink string

The self_link of the HCP Consul cluster which is the primary in the federation setup with this HCP Consul cluster. If not specified, it is a standalone cluster.

ProjectId string

The ID of the project this HCP Consul cluster is located.

PublicEndpoint bool

Denotes that the cluster has a public endpoint for the Consul UI. Defaults to false.

Region string

The region where the HCP Consul cluster is located.

Scale int

The the number of Consul server nodes in the cluster.

SelfLink string

A unique URL identifying the HCP Consul cluster.

Size string

The t-shirt size representation of each server VM that this Consul cluster is provisioned with. Valid option for development tier - x_small. Valid options for other tiers - small, medium, large. For more details - https://cloud.hashicorp.com/pricing/consul

State string

The state of the HCP Consul cluster.

Tier string

The tier that the HCP Consul cluster will be provisioned as. Only development, standard and plus are available at this time.

autoHvnToHvnPeering Boolean

Enables automatic HVN to HVN peering when creating a secondary cluster in a federation.

cloudProvider String

The provider where the HCP Consul cluster is located. Only 'aws' is available at this time.

clusterId String

The ID of the HCP Consul cluster.

connectEnabled Boolean

Denotes the Consul connect feature should be enabled for this cluster. Default to true.

consulAutomaticUpgrades Boolean

Denotes that automatic Consul upgrades are enabled.

consulCaFile String

The cluster CA file encoded as a Base64 string.

consulConfigFile String

The cluster config encoded as a Base64 string.

consulPrivateEndpointUrl String

The private URL for the Consul UI.

consulPublicEndpointUrl String

The public URL for the Consul UI. This will be empty if public_endpoint is false.

consulSnapshotInterval String

The Consul snapshot interval.

consulSnapshotRetention String

The retention policy for Consul snapshots.

consulVersion String

The Consul version of the cluster.

datacenter String

The Consul data center name of the cluster. If not specified, it is defaulted to the value of cluster_id.

hvnId String

The ID of the HVN this HCP Consul cluster is associated to.

id String

The provider-assigned unique ID for this managed resource.

organizationId String

The ID of the organization the project for this HCP Consul cluster is located.

primaryLink String

The self_link of the HCP Consul cluster which is the primary in the federation setup with this HCP Consul cluster. If not specified, it is a standalone cluster.

projectId String

The ID of the project this HCP Consul cluster is located.

publicEndpoint Boolean

Denotes that the cluster has a public endpoint for the Consul UI. Defaults to false.

region String

The region where the HCP Consul cluster is located.

scale Integer

The the number of Consul server nodes in the cluster.

selfLink String

A unique URL identifying the HCP Consul cluster.

size String

The t-shirt size representation of each server VM that this Consul cluster is provisioned with. Valid option for development tier - x_small. Valid options for other tiers - small, medium, large. For more details - https://cloud.hashicorp.com/pricing/consul

state String

The state of the HCP Consul cluster.

tier String

The tier that the HCP Consul cluster will be provisioned as. Only development, standard and plus are available at this time.

autoHvnToHvnPeering boolean

Enables automatic HVN to HVN peering when creating a secondary cluster in a federation.

cloudProvider string

The provider where the HCP Consul cluster is located. Only 'aws' is available at this time.

clusterId string

The ID of the HCP Consul cluster.

connectEnabled boolean

Denotes the Consul connect feature should be enabled for this cluster. Default to true.

consulAutomaticUpgrades boolean

Denotes that automatic Consul upgrades are enabled.

consulCaFile string

The cluster CA file encoded as a Base64 string.

consulConfigFile string

The cluster config encoded as a Base64 string.

consulPrivateEndpointUrl string

The private URL for the Consul UI.

consulPublicEndpointUrl string

The public URL for the Consul UI. This will be empty if public_endpoint is false.

consulSnapshotInterval string

The Consul snapshot interval.

consulSnapshotRetention string

The retention policy for Consul snapshots.

consulVersion string

The Consul version of the cluster.

datacenter string

The Consul data center name of the cluster. If not specified, it is defaulted to the value of cluster_id.

hvnId string

The ID of the HVN this HCP Consul cluster is associated to.

id string

The provider-assigned unique ID for this managed resource.

organizationId string

The ID of the organization the project for this HCP Consul cluster is located.

primaryLink string

The self_link of the HCP Consul cluster which is the primary in the federation setup with this HCP Consul cluster. If not specified, it is a standalone cluster.

projectId string

The ID of the project this HCP Consul cluster is located.

publicEndpoint boolean

Denotes that the cluster has a public endpoint for the Consul UI. Defaults to false.

region string

The region where the HCP Consul cluster is located.

scale number

The the number of Consul server nodes in the cluster.

selfLink string

A unique URL identifying the HCP Consul cluster.

size string

The t-shirt size representation of each server VM that this Consul cluster is provisioned with. Valid option for development tier - x_small. Valid options for other tiers - small, medium, large. For more details - https://cloud.hashicorp.com/pricing/consul

state string

The state of the HCP Consul cluster.

tier string

The tier that the HCP Consul cluster will be provisioned as. Only development, standard and plus are available at this time.

auto_hvn_to_hvn_peering bool

Enables automatic HVN to HVN peering when creating a secondary cluster in a federation.

cloud_provider str

The provider where the HCP Consul cluster is located. Only 'aws' is available at this time.

cluster_id str

The ID of the HCP Consul cluster.

connect_enabled bool

Denotes the Consul connect feature should be enabled for this cluster. Default to true.

consul_automatic_upgrades bool

Denotes that automatic Consul upgrades are enabled.

consul_ca_file str

The cluster CA file encoded as a Base64 string.

consul_config_file str

The cluster config encoded as a Base64 string.

consul_private_endpoint_url str

The private URL for the Consul UI.

consul_public_endpoint_url str

The public URL for the Consul UI. This will be empty if public_endpoint is false.

consul_snapshot_interval str

The Consul snapshot interval.

consul_snapshot_retention str

The retention policy for Consul snapshots.

consul_version str

The Consul version of the cluster.

datacenter str

The Consul data center name of the cluster. If not specified, it is defaulted to the value of cluster_id.

hvn_id str

The ID of the HVN this HCP Consul cluster is associated to.

id str

The provider-assigned unique ID for this managed resource.

organization_id str

The ID of the organization the project for this HCP Consul cluster is located.

primary_link str

The self_link of the HCP Consul cluster which is the primary in the federation setup with this HCP Consul cluster. If not specified, it is a standalone cluster.

project_id str

The ID of the project this HCP Consul cluster is located.

public_endpoint bool

Denotes that the cluster has a public endpoint for the Consul UI. Defaults to false.

region str

The region where the HCP Consul cluster is located.

scale int

The the number of Consul server nodes in the cluster.

self_link str

A unique URL identifying the HCP Consul cluster.

size str

The t-shirt size representation of each server VM that this Consul cluster is provisioned with. Valid option for development tier - x_small. Valid options for other tiers - small, medium, large. For more details - https://cloud.hashicorp.com/pricing/consul

state str

The state of the HCP Consul cluster.

tier str

The tier that the HCP Consul cluster will be provisioned as. Only development, standard and plus are available at this time.

autoHvnToHvnPeering Boolean

Enables automatic HVN to HVN peering when creating a secondary cluster in a federation.

cloudProvider String

The provider where the HCP Consul cluster is located. Only 'aws' is available at this time.

clusterId String

The ID of the HCP Consul cluster.

connectEnabled Boolean

Denotes the Consul connect feature should be enabled for this cluster. Default to true.

consulAutomaticUpgrades Boolean

Denotes that automatic Consul upgrades are enabled.

consulCaFile String

The cluster CA file encoded as a Base64 string.

consulConfigFile String

The cluster config encoded as a Base64 string.

consulPrivateEndpointUrl String

The private URL for the Consul UI.

consulPublicEndpointUrl String

The public URL for the Consul UI. This will be empty if public_endpoint is false.

consulSnapshotInterval String

The Consul snapshot interval.

consulSnapshotRetention String

The retention policy for Consul snapshots.

consulVersion String

The Consul version of the cluster.

datacenter String

The Consul data center name of the cluster. If not specified, it is defaulted to the value of cluster_id.

hvnId String

The ID of the HVN this HCP Consul cluster is associated to.

id String

The provider-assigned unique ID for this managed resource.

organizationId String

The ID of the organization the project for this HCP Consul cluster is located.

primaryLink String

The self_link of the HCP Consul cluster which is the primary in the federation setup with this HCP Consul cluster. If not specified, it is a standalone cluster.

projectId String

The ID of the project this HCP Consul cluster is located.

publicEndpoint Boolean

Denotes that the cluster has a public endpoint for the Consul UI. Defaults to false.

region String

The region where the HCP Consul cluster is located.

scale Number

The the number of Consul server nodes in the cluster.

selfLink String

A unique URL identifying the HCP Consul cluster.

size String

The t-shirt size representation of each server VM that this Consul cluster is provisioned with. Valid option for development tier - x_small. Valid options for other tiers - small, medium, large. For more details - https://cloud.hashicorp.com/pricing/consul

state String

The state of the HCP Consul cluster.

tier String

The tier that the HCP Consul cluster will be provisioned as. Only development, standard and plus are available at this time.

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.