1. Packages
  2. HCP
  3. API Docs
  4. ConsulClusterRootToken
HashiCorp Cloud Platform (HCP) v0.1.14 published on Friday, Dec 2, 2022 by Grapl Security

hcp.ConsulClusterRootToken

Explore with Pulumi AI

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var example = new Hcp.ConsulClusterRootToken("example", new()
    {
        ClusterId = "consul-cluster",
    });

});
Copy
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.NewConsulClusterRootToken(ctx, "example", &hcp.ConsulClusterRootTokenArgs{
			ClusterId: pulumi.String("consul-cluster"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hcp.ConsulClusterRootToken;
import com.pulumi.hcp.ConsulClusterRootTokenArgs;
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) {
        var example = new ConsulClusterRootToken("example", ConsulClusterRootTokenArgs.builder()        
            .clusterId("consul-cluster")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as hcp from "@pulumi/hcp";

const example = new hcp.ConsulClusterRootToken("example", {
    clusterId: "consul-cluster",
});
Copy
import pulumi
import pulumi_hcp as hcp

example = hcp.ConsulClusterRootToken("example", cluster_id="consul-cluster")
Copy
resources:
  example:
    type: hcp:ConsulClusterRootToken
    properties:
      clusterId: consul-cluster
Copy

Create ConsulClusterRootToken Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ConsulClusterRootToken(name: string, args: ConsulClusterRootTokenArgs, opts?: CustomResourceOptions);
@overload
def ConsulClusterRootToken(resource_name: str,
                           args: ConsulClusterRootTokenArgs,
                           opts: Optional[ResourceOptions] = None)

@overload
def ConsulClusterRootToken(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           cluster_id: Optional[str] = None)
func NewConsulClusterRootToken(ctx *Context, name string, args ConsulClusterRootTokenArgs, opts ...ResourceOption) (*ConsulClusterRootToken, error)
public ConsulClusterRootToken(string name, ConsulClusterRootTokenArgs args, CustomResourceOptions? opts = null)
public ConsulClusterRootToken(String name, ConsulClusterRootTokenArgs args)
public ConsulClusterRootToken(String name, ConsulClusterRootTokenArgs args, CustomResourceOptions options)
type: hcp:ConsulClusterRootToken
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ConsulClusterRootTokenArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ConsulClusterRootTokenArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ConsulClusterRootTokenArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ConsulClusterRootTokenArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ConsulClusterRootTokenArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var consulClusterRootTokenResource = new Hcp.ConsulClusterRootToken("consulClusterRootTokenResource", new()
{
    ClusterId = "string",
});
Copy
example, err := hcp.NewConsulClusterRootToken(ctx, "consulClusterRootTokenResource", &hcp.ConsulClusterRootTokenArgs{
	ClusterId: pulumi.String("string"),
})
Copy
var consulClusterRootTokenResource = new ConsulClusterRootToken("consulClusterRootTokenResource", ConsulClusterRootTokenArgs.builder()
    .clusterId("string")
    .build());
Copy
consul_cluster_root_token_resource = hcp.ConsulClusterRootToken("consulClusterRootTokenResource", cluster_id="string")
Copy
const consulClusterRootTokenResource = new hcp.ConsulClusterRootToken("consulClusterRootTokenResource", {clusterId: "string"});
Copy
type: hcp:ConsulClusterRootToken
properties:
    clusterId: string
Copy

ConsulClusterRootToken Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ConsulClusterRootToken resource accepts the following input properties:

ClusterId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the HCP Consul cluster.
ClusterId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the HCP Consul cluster.
clusterId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the HCP Consul cluster.
clusterId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the HCP Consul cluster.
cluster_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the HCP Consul cluster.
clusterId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the HCP Consul cluster.

Outputs

All input properties are implicitly available as output properties. Additionally, the ConsulClusterRootToken resource produces the following output properties:

AccessorId string
The accessor ID of the root ACL token.
Id string
The provider-assigned unique ID for this managed resource.
KubernetesSecret string
The root ACL token Base64 encoded in a Kubernetes secret.
SecretId string
The secret ID of the root ACL token.
AccessorId string
The accessor ID of the root ACL token.
Id string
The provider-assigned unique ID for this managed resource.
KubernetesSecret string
The root ACL token Base64 encoded in a Kubernetes secret.
SecretId string
The secret ID of the root ACL token.
accessorId String
The accessor ID of the root ACL token.
id String
The provider-assigned unique ID for this managed resource.
kubernetesSecret String
The root ACL token Base64 encoded in a Kubernetes secret.
secretId String
The secret ID of the root ACL token.
accessorId string
The accessor ID of the root ACL token.
id string
The provider-assigned unique ID for this managed resource.
kubernetesSecret string
The root ACL token Base64 encoded in a Kubernetes secret.
secretId string
The secret ID of the root ACL token.
accessor_id str
The accessor ID of the root ACL token.
id str
The provider-assigned unique ID for this managed resource.
kubernetes_secret str
The root ACL token Base64 encoded in a Kubernetes secret.
secret_id str
The secret ID of the root ACL token.
accessorId String
The accessor ID of the root ACL token.
id String
The provider-assigned unique ID for this managed resource.
kubernetesSecret String
The root ACL token Base64 encoded in a Kubernetes secret.
secretId String
The secret ID of the root ACL token.

Look up Existing ConsulClusterRootToken Resource

Get an existing ConsulClusterRootToken resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ConsulClusterRootTokenState, opts?: CustomResourceOptions): ConsulClusterRootToken
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        accessor_id: Optional[str] = None,
        cluster_id: Optional[str] = None,
        kubernetes_secret: Optional[str] = None,
        secret_id: Optional[str] = None) -> ConsulClusterRootToken
func GetConsulClusterRootToken(ctx *Context, name string, id IDInput, state *ConsulClusterRootTokenState, opts ...ResourceOption) (*ConsulClusterRootToken, error)
public static ConsulClusterRootToken Get(string name, Input<string> id, ConsulClusterRootTokenState? state, CustomResourceOptions? opts = null)
public static ConsulClusterRootToken get(String name, Output<String> id, ConsulClusterRootTokenState state, CustomResourceOptions options)
resources:  _:    type: hcp:ConsulClusterRootToken    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccessorId string
The accessor ID of the root ACL token.
ClusterId Changes to this property will trigger replacement. string
The ID of the HCP Consul cluster.
KubernetesSecret string
The root ACL token Base64 encoded in a Kubernetes secret.
SecretId string
The secret ID of the root ACL token.
AccessorId string
The accessor ID of the root ACL token.
ClusterId Changes to this property will trigger replacement. string
The ID of the HCP Consul cluster.
KubernetesSecret string
The root ACL token Base64 encoded in a Kubernetes secret.
SecretId string
The secret ID of the root ACL token.
accessorId String
The accessor ID of the root ACL token.
clusterId Changes to this property will trigger replacement. String
The ID of the HCP Consul cluster.
kubernetesSecret String
The root ACL token Base64 encoded in a Kubernetes secret.
secretId String
The secret ID of the root ACL token.
accessorId string
The accessor ID of the root ACL token.
clusterId Changes to this property will trigger replacement. string
The ID of the HCP Consul cluster.
kubernetesSecret string
The root ACL token Base64 encoded in a Kubernetes secret.
secretId string
The secret ID of the root ACL token.
accessor_id str
The accessor ID of the root ACL token.
cluster_id Changes to this property will trigger replacement. str
The ID of the HCP Consul cluster.
kubernetes_secret str
The root ACL token Base64 encoded in a Kubernetes secret.
secret_id str
The secret ID of the root ACL token.
accessorId String
The accessor ID of the root ACL token.
clusterId Changes to this property will trigger replacement. String
The ID of the HCP Consul cluster.
kubernetesSecret String
The root ACL token Base64 encoded in a Kubernetes secret.
secretId String
The secret ID of the root ACL token.

Package Details

Repository
hcp grapl-security/pulumi-hcp
License
Apache-2.0
Notes
This Pulumi package is based on the hcp Terraform Provider.