hcp.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:
- Cluster
Id string The ID of the HCP Consul cluster.
- Cluster
Id string The ID of the HCP Consul cluster.
- cluster
Id String The ID of the HCP Consul cluster.
- cluster
Id string The ID of the HCP Consul cluster.
- cluster_
id str The ID of the HCP Consul cluster.
- cluster
Id String The ID of the HCP Consul cluster.
getConsulCluster Result
The following output properties are available:
- Auto
Hvn boolTo Hvn Peering Enables automatic HVN to HVN peering when creating a secondary cluster in a federation.
- Cloud
Provider string The provider where the HCP Consul cluster is located. Only 'aws' is available at this time.
- Cluster
Id string 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 boolUpgrades Denotes that automatic Consul upgrades are enabled.
- Consul
Ca stringFile The cluster CA file encoded as a Base64 string.
- Consul
Config stringFile The cluster config encoded as a Base64 string.
- Consul
Private stringEndpoint Url The private URL for the Consul UI.
- Consul
Public stringEndpoint Url The public URL for the Consul UI. This will be empty if
public_endpoint
isfalse
.- Consul
Snapshot stringInterval The Consul snapshot interval.
- Consul
Snapshot stringRetention The retention policy for Consul snapshots.
- Consul
Version 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
.- Hvn
Id string The ID of the HVN this HCP Consul cluster is associated to.
- Id string
The provider-assigned unique ID for this managed resource.
- Organization
Id string The ID of the organization the project for this HCP Consul cluster is located.
- Primary
Link 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.- Project
Id string 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 string
The region where the HCP Consul cluster is located.
- Scale int
The the number of Consul server nodes in the cluster.
- Self
Link 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
andplus
are available at this time.
- Auto
Hvn boolTo Hvn Peering Enables automatic HVN to HVN peering when creating a secondary cluster in a federation.
- Cloud
Provider string The provider where the HCP Consul cluster is located. Only 'aws' is available at this time.
- Cluster
Id string 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 boolUpgrades Denotes that automatic Consul upgrades are enabled.
- Consul
Ca stringFile The cluster CA file encoded as a Base64 string.
- Consul
Config stringFile The cluster config encoded as a Base64 string.
- Consul
Private stringEndpoint Url The private URL for the Consul UI.
- Consul
Public stringEndpoint Url The public URL for the Consul UI. This will be empty if
public_endpoint
isfalse
.- Consul
Snapshot stringInterval The Consul snapshot interval.
- Consul
Snapshot stringRetention The retention policy for Consul snapshots.
- Consul
Version 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
.- Hvn
Id string The ID of the HVN this HCP Consul cluster is associated to.
- Id string
The provider-assigned unique ID for this managed resource.
- Organization
Id string The ID of the organization the project for this HCP Consul cluster is located.
- Primary
Link 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.- Project
Id string 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 string
The region where the HCP Consul cluster is located.
- Scale int
The the number of Consul server nodes in the cluster.
- Self
Link 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
andplus
are available at this time.
- auto
Hvn BooleanTo Hvn Peering Enables automatic HVN to HVN peering when creating a secondary cluster in a federation.
- cloud
Provider String The provider where the HCP Consul cluster is located. Only 'aws' is available at this time.
- cluster
Id String The ID of the HCP Consul cluster.
- connect
Enabled Boolean Denotes the Consul connect feature should be enabled for this cluster. Default to true.
- consul
Automatic BooleanUpgrades Denotes that automatic Consul upgrades are enabled.
- consul
Ca StringFile The cluster CA file encoded as a Base64 string.
- consul
Config StringFile The cluster config encoded as a Base64 string.
- consul
Private StringEndpoint Url The private URL for the Consul UI.
- consul
Public StringEndpoint Url The public URL for the Consul UI. This will be empty if
public_endpoint
isfalse
.- consul
Snapshot StringInterval The Consul snapshot interval.
- consul
Snapshot StringRetention The retention policy for Consul snapshots.
- consul
Version 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
.- hvn
Id String The ID of the HVN this HCP Consul cluster is associated to.
- id String
The provider-assigned unique ID for this managed resource.
- organization
Id String The ID of the organization the project for this HCP Consul cluster is located.
- primary
Link 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.- project
Id String The ID of the project this HCP Consul cluster is located.
- public
Endpoint 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.
- self
Link 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
andplus
are available at this time.
- auto
Hvn booleanTo Hvn Peering Enables automatic HVN to HVN peering when creating a secondary cluster in a federation.
- cloud
Provider string The provider where the HCP Consul cluster is located. Only 'aws' is available at this time.
- cluster
Id string The ID of the HCP Consul cluster.
- connect
Enabled boolean Denotes the Consul connect feature should be enabled for this cluster. Default to true.
- consul
Automatic booleanUpgrades Denotes that automatic Consul upgrades are enabled.
- consul
Ca stringFile The cluster CA file encoded as a Base64 string.
- consul
Config stringFile The cluster config encoded as a Base64 string.
- consul
Private stringEndpoint Url The private URL for the Consul UI.
- consul
Public stringEndpoint Url The public URL for the Consul UI. This will be empty if
public_endpoint
isfalse
.- consul
Snapshot stringInterval The Consul snapshot interval.
- consul
Snapshot stringRetention The retention policy for Consul snapshots.
- consul
Version 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
.- hvn
Id string The ID of the HVN this HCP Consul cluster is associated to.
- id string
The provider-assigned unique ID for this managed resource.
- organization
Id string The ID of the organization the project for this HCP Consul cluster is located.
- primary
Link 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.- project
Id string The ID of the project this HCP Consul cluster is located.
- public
Endpoint 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.
- self
Link 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
andplus
are available at this time.
- auto_
hvn_ boolto_ hvn_ peering 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_ boolupgrades Denotes that automatic Consul upgrades are enabled.
- consul_
ca_ strfile The cluster CA file encoded as a Base64 string.
- consul_
config_ strfile The cluster config encoded as a Base64 string.
- consul_
private_ strendpoint_ url The private URL for the Consul UI.
- consul_
public_ strendpoint_ url The public URL for the Consul UI. This will be empty if
public_endpoint
isfalse
.- consul_
snapshot_ strinterval The Consul snapshot interval.
- consul_
snapshot_ strretention 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
andplus
are available at this time.
- auto
Hvn BooleanTo Hvn Peering Enables automatic HVN to HVN peering when creating a secondary cluster in a federation.
- cloud
Provider String The provider where the HCP Consul cluster is located. Only 'aws' is available at this time.
- cluster
Id String The ID of the HCP Consul cluster.
- connect
Enabled Boolean Denotes the Consul connect feature should be enabled for this cluster. Default to true.
- consul
Automatic BooleanUpgrades Denotes that automatic Consul upgrades are enabled.
- consul
Ca StringFile The cluster CA file encoded as a Base64 string.
- consul
Config StringFile The cluster config encoded as a Base64 string.
- consul
Private StringEndpoint Url The private URL for the Consul UI.
- consul
Public StringEndpoint Url The public URL for the Consul UI. This will be empty if
public_endpoint
isfalse
.- consul
Snapshot StringInterval The Consul snapshot interval.
- consul
Snapshot StringRetention The retention policy for Consul snapshots.
- consul
Version 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
.- hvn
Id String The ID of the HVN this HCP Consul cluster is associated to.
- id String
The provider-assigned unique ID for this managed resource.
- organization
Id String The ID of the organization the project for this HCP Consul cluster is located.
- primary
Link 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.- project
Id String The ID of the project this HCP Consul cluster is located.
- public
Endpoint 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.
- self
Link 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
andplus
are available at this time.
Package Details
- Repository
- hcp grapl-security/pulumi-hcp
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
hcp
Terraform Provider.