1. Packages
  2. Consul Provider
  3. API Docs
  4. AclToken
Consul v3.12.4 published on Wednesday, Feb 12, 2025 by Pulumi

consul.AclToken

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";
import * as random from "@pulumi/random";

// Basic usage
const agent = new consul.AclPolicy("agent", {
    name: "agent",
    rules: `node_prefix "" {
  policy = "read"
}
`,
});
const test = new consul.AclToken("test", {
    description: "my test token",
    policies: [agent.name],
    local: true,
});
// Explicitly set the `accessor_id`
const testRandomUuid = new random.RandomUuid("test", {});
const testPredefinedId = new consul.AclToken("test_predefined_id", {
    accessorId: testUuid.result,
    description: "my test uuid token",
    policies: [agent.name],
    local: true,
});
Copy
import pulumi
import pulumi_consul as consul
import pulumi_random as random

# Basic usage
agent = consul.AclPolicy("agent",
    name="agent",
    rules="""node_prefix "" {
  policy = "read"
}
""")
test = consul.AclToken("test",
    description="my test token",
    policies=[agent.name],
    local=True)
# Explicitly set the `accessor_id`
test_random_uuid = random.RandomUuid("test")
test_predefined_id = consul.AclToken("test_predefined_id",
    accessor_id=test_uuid["result"],
    description="my test uuid token",
    policies=[agent.name],
    local=True)
Copy
package main

import (
	"github.com/pulumi/pulumi-consul/sdk/v3/go/consul"
	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Basic usage
		agent, err := consul.NewAclPolicy(ctx, "agent", &consul.AclPolicyArgs{
			Name:  pulumi.String("agent"),
			Rules: pulumi.String("node_prefix \"\" {\n  policy = \"read\"\n}\n"),
		})
		if err != nil {
			return err
		}
		_, err = consul.NewAclToken(ctx, "test", &consul.AclTokenArgs{
			Description: pulumi.String("my test token"),
			Policies: pulumi.StringArray{
				agent.Name,
			},
			Local: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		// Explicitly set the `accessor_id`
		_, err = random.NewRandomUuid(ctx, "test", nil)
		if err != nil {
			return err
		}
		_, err = consul.NewAclToken(ctx, "test_predefined_id", &consul.AclTokenArgs{
			AccessorId:  pulumi.Any(testUuid.Result),
			Description: pulumi.String("my test uuid token"),
			Policies: pulumi.StringArray{
				agent.Name,
			},
			Local: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Consul = Pulumi.Consul;
using Random = Pulumi.Random;

return await Deployment.RunAsync(() => 
{
    // Basic usage
    var agent = new Consul.AclPolicy("agent", new()
    {
        Name = "agent",
        Rules = @"node_prefix """" {
  policy = ""read""
}
",
    });

    var test = new Consul.AclToken("test", new()
    {
        Description = "my test token",
        Policies = new[]
        {
            agent.Name,
        },
        Local = true,
    });

    // Explicitly set the `accessor_id`
    var testRandomUuid = new Random.RandomUuid("test");

    var testPredefinedId = new Consul.AclToken("test_predefined_id", new()
    {
        AccessorId = testUuid.Result,
        Description = "my test uuid token",
        Policies = new[]
        {
            agent.Name,
        },
        Local = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.consul.AclPolicy;
import com.pulumi.consul.AclPolicyArgs;
import com.pulumi.consul.AclToken;
import com.pulumi.consul.AclTokenArgs;
import com.pulumi.random.RandomUuid;
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) {
        // Basic usage
        var agent = new AclPolicy("agent", AclPolicyArgs.builder()
            .name("agent")
            .rules("""
node_prefix "" {
  policy = "read"
}
            """)
            .build());

        var test = new AclToken("test", AclTokenArgs.builder()
            .description("my test token")
            .policies(agent.name())
            .local(true)
            .build());

        // Explicitly set the `accessor_id`
        var testRandomUuid = new RandomUuid("testRandomUuid");

        var testPredefinedId = new AclToken("testPredefinedId", AclTokenArgs.builder()
            .accessorId(testUuid.result())
            .description("my test uuid token")
            .policies(agent.name())
            .local(true)
            .build());

    }
}
Copy
resources:
  # Basic usage
  agent:
    type: consul:AclPolicy
    properties:
      name: agent
      rules: |
        node_prefix "" {
          policy = "read"
        }        
  test:
    type: consul:AclToken
    properties:
      description: my test token
      policies:
        - ${agent.name}
      local: true
  # Explicitly set the `accessor_id`
  testRandomUuid:
    type: random:RandomUuid
    name: test
  testPredefinedId:
    type: consul:AclToken
    name: test_predefined_id
    properties:
      accessorId: ${testUuid.result}
      description: my test uuid token
      policies:
        - ${agent.name}
      local: true
Copy

Create AclToken Resource

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

Constructor syntax

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

@overload
def AclToken(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             accessor_id: Optional[str] = None,
             description: Optional[str] = None,
             expiration_time: Optional[str] = None,
             local: Optional[bool] = None,
             namespace: Optional[str] = None,
             node_identities: Optional[Sequence[AclTokenNodeIdentityArgs]] = None,
             partition: Optional[str] = None,
             policies: Optional[Sequence[str]] = None,
             roles: Optional[Sequence[str]] = None,
             service_identities: Optional[Sequence[AclTokenServiceIdentityArgs]] = None,
             templated_policies: Optional[Sequence[AclTokenTemplatedPolicyArgs]] = None)
func NewAclToken(ctx *Context, name string, args *AclTokenArgs, opts ...ResourceOption) (*AclToken, error)
public AclToken(string name, AclTokenArgs? args = null, CustomResourceOptions? opts = null)
public AclToken(String name, AclTokenArgs args)
public AclToken(String name, AclTokenArgs args, CustomResourceOptions options)
type: consul:AclToken
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 AclTokenArgs
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 AclTokenArgs
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 AclTokenArgs
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 AclTokenArgs
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. AclTokenArgs
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 aclTokenResource = new Consul.AclToken("aclTokenResource", new()
{
    AccessorId = "string",
    Description = "string",
    ExpirationTime = "string",
    Local = false,
    Namespace = "string",
    NodeIdentities = new[]
    {
        new Consul.Inputs.AclTokenNodeIdentityArgs
        {
            Datacenter = "string",
            NodeName = "string",
        },
    },
    Partition = "string",
    Policies = new[]
    {
        "string",
    },
    Roles = new[]
    {
        "string",
    },
    ServiceIdentities = new[]
    {
        new Consul.Inputs.AclTokenServiceIdentityArgs
        {
            ServiceName = "string",
            Datacenters = new[]
            {
                "string",
            },
        },
    },
    TemplatedPolicies = new[]
    {
        new Consul.Inputs.AclTokenTemplatedPolicyArgs
        {
            TemplateName = "string",
            Datacenters = new[]
            {
                "string",
            },
            TemplateVariables = new Consul.Inputs.AclTokenTemplatedPolicyTemplateVariablesArgs
            {
                Name = "string",
            },
        },
    },
});
Copy
example, err := consul.NewAclToken(ctx, "aclTokenResource", &consul.AclTokenArgs{
	AccessorId:     pulumi.String("string"),
	Description:    pulumi.String("string"),
	ExpirationTime: pulumi.String("string"),
	Local:          pulumi.Bool(false),
	Namespace:      pulumi.String("string"),
	NodeIdentities: consul.AclTokenNodeIdentityArray{
		&consul.AclTokenNodeIdentityArgs{
			Datacenter: pulumi.String("string"),
			NodeName:   pulumi.String("string"),
		},
	},
	Partition: pulumi.String("string"),
	Policies: pulumi.StringArray{
		pulumi.String("string"),
	},
	Roles: pulumi.StringArray{
		pulumi.String("string"),
	},
	ServiceIdentities: consul.AclTokenServiceIdentityArray{
		&consul.AclTokenServiceIdentityArgs{
			ServiceName: pulumi.String("string"),
			Datacenters: pulumi.StringArray{
				pulumi.String("string"),
			},
		},
	},
	TemplatedPolicies: consul.AclTokenTemplatedPolicyArray{
		&consul.AclTokenTemplatedPolicyArgs{
			TemplateName: pulumi.String("string"),
			Datacenters: pulumi.StringArray{
				pulumi.String("string"),
			},
			TemplateVariables: &consul.AclTokenTemplatedPolicyTemplateVariablesArgs{
				Name: pulumi.String("string"),
			},
		},
	},
})
Copy
var aclTokenResource = new AclToken("aclTokenResource", AclTokenArgs.builder()
    .accessorId("string")
    .description("string")
    .expirationTime("string")
    .local(false)
    .namespace("string")
    .nodeIdentities(AclTokenNodeIdentityArgs.builder()
        .datacenter("string")
        .nodeName("string")
        .build())
    .partition("string")
    .policies("string")
    .roles("string")
    .serviceIdentities(AclTokenServiceIdentityArgs.builder()
        .serviceName("string")
        .datacenters("string")
        .build())
    .templatedPolicies(AclTokenTemplatedPolicyArgs.builder()
        .templateName("string")
        .datacenters("string")
        .templateVariables(AclTokenTemplatedPolicyTemplateVariablesArgs.builder()
            .name("string")
            .build())
        .build())
    .build());
Copy
acl_token_resource = consul.AclToken("aclTokenResource",
    accessor_id="string",
    description="string",
    expiration_time="string",
    local=False,
    namespace="string",
    node_identities=[{
        "datacenter": "string",
        "node_name": "string",
    }],
    partition="string",
    policies=["string"],
    roles=["string"],
    service_identities=[{
        "service_name": "string",
        "datacenters": ["string"],
    }],
    templated_policies=[{
        "template_name": "string",
        "datacenters": ["string"],
        "template_variables": {
            "name": "string",
        },
    }])
Copy
const aclTokenResource = new consul.AclToken("aclTokenResource", {
    accessorId: "string",
    description: "string",
    expirationTime: "string",
    local: false,
    namespace: "string",
    nodeIdentities: [{
        datacenter: "string",
        nodeName: "string",
    }],
    partition: "string",
    policies: ["string"],
    roles: ["string"],
    serviceIdentities: [{
        serviceName: "string",
        datacenters: ["string"],
    }],
    templatedPolicies: [{
        templateName: "string",
        datacenters: ["string"],
        templateVariables: {
            name: "string",
        },
    }],
});
Copy
type: consul:AclToken
properties:
    accessorId: string
    description: string
    expirationTime: string
    local: false
    namespace: string
    nodeIdentities:
        - datacenter: string
          nodeName: string
    partition: string
    policies:
        - string
    roles:
        - string
    serviceIdentities:
        - datacenters:
            - string
          serviceName: string
    templatedPolicies:
        - datacenters:
            - string
          templateName: string
          templateVariables:
            name: string
Copy

AclToken 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 AclToken resource accepts the following input properties:

AccessorId Changes to this property will trigger replacement. string
The uuid of the token. If omitted, Consul will generate a random uuid.
Description string
The description of the token.
ExpirationTime Changes to this property will trigger replacement. string
If set this represents the point after which a token should be considered revoked and is eligible for destruction.
Local Changes to this property will trigger replacement. bool
The flag to set the token local to the current datacenter.
Namespace Changes to this property will trigger replacement. string
The namespace to create the token within.
NodeIdentities List<AclTokenNodeIdentity>
The list of node identities that should be applied to the token.
Partition Changes to this property will trigger replacement. string
The partition the ACL token is associated with.
Policies List<string>
The list of policies attached to the token.
Roles List<string>
The list of roles attached to the token.
ServiceIdentities List<AclTokenServiceIdentity>
The list of service identities that should be applied to the token.
TemplatedPolicies List<AclTokenTemplatedPolicy>
The list of templated policies that should be applied to the token.
AccessorId Changes to this property will trigger replacement. string
The uuid of the token. If omitted, Consul will generate a random uuid.
Description string
The description of the token.
ExpirationTime Changes to this property will trigger replacement. string
If set this represents the point after which a token should be considered revoked and is eligible for destruction.
Local Changes to this property will trigger replacement. bool
The flag to set the token local to the current datacenter.
Namespace Changes to this property will trigger replacement. string
The namespace to create the token within.
NodeIdentities []AclTokenNodeIdentityArgs
The list of node identities that should be applied to the token.
Partition Changes to this property will trigger replacement. string
The partition the ACL token is associated with.
Policies []string
The list of policies attached to the token.
Roles []string
The list of roles attached to the token.
ServiceIdentities []AclTokenServiceIdentityArgs
The list of service identities that should be applied to the token.
TemplatedPolicies []AclTokenTemplatedPolicyArgs
The list of templated policies that should be applied to the token.
accessorId Changes to this property will trigger replacement. String
The uuid of the token. If omitted, Consul will generate a random uuid.
description String
The description of the token.
expirationTime Changes to this property will trigger replacement. String
If set this represents the point after which a token should be considered revoked and is eligible for destruction.
local Changes to this property will trigger replacement. Boolean
The flag to set the token local to the current datacenter.
namespace Changes to this property will trigger replacement. String
The namespace to create the token within.
nodeIdentities List<AclTokenNodeIdentity>
The list of node identities that should be applied to the token.
partition Changes to this property will trigger replacement. String
The partition the ACL token is associated with.
policies List<String>
The list of policies attached to the token.
roles List<String>
The list of roles attached to the token.
serviceIdentities List<AclTokenServiceIdentity>
The list of service identities that should be applied to the token.
templatedPolicies List<AclTokenTemplatedPolicy>
The list of templated policies that should be applied to the token.
accessorId Changes to this property will trigger replacement. string
The uuid of the token. If omitted, Consul will generate a random uuid.
description string
The description of the token.
expirationTime Changes to this property will trigger replacement. string
If set this represents the point after which a token should be considered revoked and is eligible for destruction.
local Changes to this property will trigger replacement. boolean
The flag to set the token local to the current datacenter.
namespace Changes to this property will trigger replacement. string
The namespace to create the token within.
nodeIdentities AclTokenNodeIdentity[]
The list of node identities that should be applied to the token.
partition Changes to this property will trigger replacement. string
The partition the ACL token is associated with.
policies string[]
The list of policies attached to the token.
roles string[]
The list of roles attached to the token.
serviceIdentities AclTokenServiceIdentity[]
The list of service identities that should be applied to the token.
templatedPolicies AclTokenTemplatedPolicy[]
The list of templated policies that should be applied to the token.
accessor_id Changes to this property will trigger replacement. str
The uuid of the token. If omitted, Consul will generate a random uuid.
description str
The description of the token.
expiration_time Changes to this property will trigger replacement. str
If set this represents the point after which a token should be considered revoked and is eligible for destruction.
local Changes to this property will trigger replacement. bool
The flag to set the token local to the current datacenter.
namespace Changes to this property will trigger replacement. str
The namespace to create the token within.
node_identities Sequence[AclTokenNodeIdentityArgs]
The list of node identities that should be applied to the token.
partition Changes to this property will trigger replacement. str
The partition the ACL token is associated with.
policies Sequence[str]
The list of policies attached to the token.
roles Sequence[str]
The list of roles attached to the token.
service_identities Sequence[AclTokenServiceIdentityArgs]
The list of service identities that should be applied to the token.
templated_policies Sequence[AclTokenTemplatedPolicyArgs]
The list of templated policies that should be applied to the token.
accessorId Changes to this property will trigger replacement. String
The uuid of the token. If omitted, Consul will generate a random uuid.
description String
The description of the token.
expirationTime Changes to this property will trigger replacement. String
If set this represents the point after which a token should be considered revoked and is eligible for destruction.
local Changes to this property will trigger replacement. Boolean
The flag to set the token local to the current datacenter.
namespace Changes to this property will trigger replacement. String
The namespace to create the token within.
nodeIdentities List<Property Map>
The list of node identities that should be applied to the token.
partition Changes to this property will trigger replacement. String
The partition the ACL token is associated with.
policies List<String>
The list of policies attached to the token.
roles List<String>
The list of roles attached to the token.
serviceIdentities List<Property Map>
The list of service identities that should be applied to the token.
templatedPolicies List<Property Map>
The list of templated policies that should be applied to the token.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing AclToken Resource

Get an existing AclToken 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?: AclTokenState, opts?: CustomResourceOptions): AclToken
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        accessor_id: Optional[str] = None,
        description: Optional[str] = None,
        expiration_time: Optional[str] = None,
        local: Optional[bool] = None,
        namespace: Optional[str] = None,
        node_identities: Optional[Sequence[AclTokenNodeIdentityArgs]] = None,
        partition: Optional[str] = None,
        policies: Optional[Sequence[str]] = None,
        roles: Optional[Sequence[str]] = None,
        service_identities: Optional[Sequence[AclTokenServiceIdentityArgs]] = None,
        templated_policies: Optional[Sequence[AclTokenTemplatedPolicyArgs]] = None) -> AclToken
func GetAclToken(ctx *Context, name string, id IDInput, state *AclTokenState, opts ...ResourceOption) (*AclToken, error)
public static AclToken Get(string name, Input<string> id, AclTokenState? state, CustomResourceOptions? opts = null)
public static AclToken get(String name, Output<String> id, AclTokenState state, CustomResourceOptions options)
resources:  _:    type: consul:AclToken    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 Changes to this property will trigger replacement. string
The uuid of the token. If omitted, Consul will generate a random uuid.
Description string
The description of the token.
ExpirationTime Changes to this property will trigger replacement. string
If set this represents the point after which a token should be considered revoked and is eligible for destruction.
Local Changes to this property will trigger replacement. bool
The flag to set the token local to the current datacenter.
Namespace Changes to this property will trigger replacement. string
The namespace to create the token within.
NodeIdentities List<AclTokenNodeIdentity>
The list of node identities that should be applied to the token.
Partition Changes to this property will trigger replacement. string
The partition the ACL token is associated with.
Policies List<string>
The list of policies attached to the token.
Roles List<string>
The list of roles attached to the token.
ServiceIdentities List<AclTokenServiceIdentity>
The list of service identities that should be applied to the token.
TemplatedPolicies List<AclTokenTemplatedPolicy>
The list of templated policies that should be applied to the token.
AccessorId Changes to this property will trigger replacement. string
The uuid of the token. If omitted, Consul will generate a random uuid.
Description string
The description of the token.
ExpirationTime Changes to this property will trigger replacement. string
If set this represents the point after which a token should be considered revoked and is eligible for destruction.
Local Changes to this property will trigger replacement. bool
The flag to set the token local to the current datacenter.
Namespace Changes to this property will trigger replacement. string
The namespace to create the token within.
NodeIdentities []AclTokenNodeIdentityArgs
The list of node identities that should be applied to the token.
Partition Changes to this property will trigger replacement. string
The partition the ACL token is associated with.
Policies []string
The list of policies attached to the token.
Roles []string
The list of roles attached to the token.
ServiceIdentities []AclTokenServiceIdentityArgs
The list of service identities that should be applied to the token.
TemplatedPolicies []AclTokenTemplatedPolicyArgs
The list of templated policies that should be applied to the token.
accessorId Changes to this property will trigger replacement. String
The uuid of the token. If omitted, Consul will generate a random uuid.
description String
The description of the token.
expirationTime Changes to this property will trigger replacement. String
If set this represents the point after which a token should be considered revoked and is eligible for destruction.
local Changes to this property will trigger replacement. Boolean
The flag to set the token local to the current datacenter.
namespace Changes to this property will trigger replacement. String
The namespace to create the token within.
nodeIdentities List<AclTokenNodeIdentity>
The list of node identities that should be applied to the token.
partition Changes to this property will trigger replacement. String
The partition the ACL token is associated with.
policies List<String>
The list of policies attached to the token.
roles List<String>
The list of roles attached to the token.
serviceIdentities List<AclTokenServiceIdentity>
The list of service identities that should be applied to the token.
templatedPolicies List<AclTokenTemplatedPolicy>
The list of templated policies that should be applied to the token.
accessorId Changes to this property will trigger replacement. string
The uuid of the token. If omitted, Consul will generate a random uuid.
description string
The description of the token.
expirationTime Changes to this property will trigger replacement. string
If set this represents the point after which a token should be considered revoked and is eligible for destruction.
local Changes to this property will trigger replacement. boolean
The flag to set the token local to the current datacenter.
namespace Changes to this property will trigger replacement. string
The namespace to create the token within.
nodeIdentities AclTokenNodeIdentity[]
The list of node identities that should be applied to the token.
partition Changes to this property will trigger replacement. string
The partition the ACL token is associated with.
policies string[]
The list of policies attached to the token.
roles string[]
The list of roles attached to the token.
serviceIdentities AclTokenServiceIdentity[]
The list of service identities that should be applied to the token.
templatedPolicies AclTokenTemplatedPolicy[]
The list of templated policies that should be applied to the token.
accessor_id Changes to this property will trigger replacement. str
The uuid of the token. If omitted, Consul will generate a random uuid.
description str
The description of the token.
expiration_time Changes to this property will trigger replacement. str
If set this represents the point after which a token should be considered revoked and is eligible for destruction.
local Changes to this property will trigger replacement. bool
The flag to set the token local to the current datacenter.
namespace Changes to this property will trigger replacement. str
The namespace to create the token within.
node_identities Sequence[AclTokenNodeIdentityArgs]
The list of node identities that should be applied to the token.
partition Changes to this property will trigger replacement. str
The partition the ACL token is associated with.
policies Sequence[str]
The list of policies attached to the token.
roles Sequence[str]
The list of roles attached to the token.
service_identities Sequence[AclTokenServiceIdentityArgs]
The list of service identities that should be applied to the token.
templated_policies Sequence[AclTokenTemplatedPolicyArgs]
The list of templated policies that should be applied to the token.
accessorId Changes to this property will trigger replacement. String
The uuid of the token. If omitted, Consul will generate a random uuid.
description String
The description of the token.
expirationTime Changes to this property will trigger replacement. String
If set this represents the point after which a token should be considered revoked and is eligible for destruction.
local Changes to this property will trigger replacement. Boolean
The flag to set the token local to the current datacenter.
namespace Changes to this property will trigger replacement. String
The namespace to create the token within.
nodeIdentities List<Property Map>
The list of node identities that should be applied to the token.
partition Changes to this property will trigger replacement. String
The partition the ACL token is associated with.
policies List<String>
The list of policies attached to the token.
roles List<String>
The list of roles attached to the token.
serviceIdentities List<Property Map>
The list of service identities that should be applied to the token.
templatedPolicies List<Property Map>
The list of templated policies that should be applied to the token.

Supporting Types

AclTokenNodeIdentity
, AclTokenNodeIdentityArgs

Datacenter This property is required. string
The datacenter of the node.
NodeName This property is required. string
The name of the node.
Datacenter This property is required. string
The datacenter of the node.
NodeName This property is required. string
The name of the node.
datacenter This property is required. String
The datacenter of the node.
nodeName This property is required. String
The name of the node.
datacenter This property is required. string
The datacenter of the node.
nodeName This property is required. string
The name of the node.
datacenter This property is required. str
The datacenter of the node.
node_name This property is required. str
The name of the node.
datacenter This property is required. String
The datacenter of the node.
nodeName This property is required. String
The name of the node.

AclTokenServiceIdentity
, AclTokenServiceIdentityArgs

ServiceName This property is required. string
The name of the service.
Datacenters List<string>
Specifies the datacenters the effective policy is valid within.
ServiceName This property is required. string
The name of the service.
Datacenters []string
Specifies the datacenters the effective policy is valid within.
serviceName This property is required. String
The name of the service.
datacenters List<String>
Specifies the datacenters the effective policy is valid within.
serviceName This property is required. string
The name of the service.
datacenters string[]
Specifies the datacenters the effective policy is valid within.
service_name This property is required. str
The name of the service.
datacenters Sequence[str]
Specifies the datacenters the effective policy is valid within.
serviceName This property is required. String
The name of the service.
datacenters List<String>
Specifies the datacenters the effective policy is valid within.

AclTokenTemplatedPolicy
, AclTokenTemplatedPolicyArgs

TemplateName This property is required. string
The name of the templated policies.
Datacenters List<string>
Specifies the datacenters the effective policy is valid within.
TemplateVariables AclTokenTemplatedPolicyTemplateVariables
The templated policy variables.
TemplateName This property is required. string
The name of the templated policies.
Datacenters []string
Specifies the datacenters the effective policy is valid within.
TemplateVariables AclTokenTemplatedPolicyTemplateVariables
The templated policy variables.
templateName This property is required. String
The name of the templated policies.
datacenters List<String>
Specifies the datacenters the effective policy is valid within.
templateVariables AclTokenTemplatedPolicyTemplateVariables
The templated policy variables.
templateName This property is required. string
The name of the templated policies.
datacenters string[]
Specifies the datacenters the effective policy is valid within.
templateVariables AclTokenTemplatedPolicyTemplateVariables
The templated policy variables.
template_name This property is required. str
The name of the templated policies.
datacenters Sequence[str]
Specifies the datacenters the effective policy is valid within.
template_variables AclTokenTemplatedPolicyTemplateVariables
The templated policy variables.
templateName This property is required. String
The name of the templated policies.
datacenters List<String>
Specifies the datacenters the effective policy is valid within.
templateVariables Property Map
The templated policy variables.

AclTokenTemplatedPolicyTemplateVariables
, AclTokenTemplatedPolicyTemplateVariablesArgs

Name string
The name of node, workload identity or service.
Name string
The name of node, workload identity or service.
name String
The name of node, workload identity or service.
name string
The name of node, workload identity or service.
name str
The name of node, workload identity or service.
name String
The name of node, workload identity or service.

Import

$ pulumi import consul:index/aclToken:AclToken anonymous 00000000-0000-0000-0000-000000000002
Copy
$ pulumi import consul:index/aclToken:AclToken master-token 624d94ca-bc5c-f960-4e83-0a609cf588be
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
HashiCorp Consul pulumi/pulumi-consul
License
Apache-2.0
Notes
This Pulumi package is based on the consul Terraform Provider.