1. Packages
  2. HashiCorp Consul
  3. API Docs
  4. AclToken
Consul v3.11.2 published on Thursday, Mar 21, 2024 by Pulumi

consul.AclToken

Explore with Pulumi AI

consul logo
Consul v3.11.2 published on Thursday, Mar 21, 2024 by Pulumi

    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", {rules: `node_prefix "" {
      policy = "read"
    }
    `});
    const testAclToken = new consul.AclToken("testAclToken", {
        description: "my test token",
        policies: [agent.name],
        local: true,
    });
    // Explicitly set the `accessor_id`
    const testRandomUuid = new random.RandomUuid("testRandomUuid", {});
    const testPredefinedId = new consul.AclToken("testPredefinedId", {
        accessorId: random_uuid.test_uuid.result,
        description: "my test uuid token",
        policies: [agent.name],
        local: true,
    });
    
    import pulumi
    import pulumi_consul as consul
    import pulumi_random as random
    
    # Basic usage
    agent = consul.AclPolicy("agent", rules="""node_prefix "" {
      policy = "read"
    }
    """)
    test_acl_token = consul.AclToken("testAclToken",
        description="my test token",
        policies=[agent.name],
        local=True)
    # Explicitly set the `accessor_id`
    test_random_uuid = random.RandomUuid("testRandomUuid")
    test_predefined_id = consul.AclToken("testPredefinedId",
        accessor_id=random_uuid["test_uuid"]["result"],
        description="my test uuid token",
        policies=[agent.name],
        local=True)
    
    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{
    			Rules: pulumi.String("node_prefix \"\" {\n  policy = \"read\"\n}\n"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = consul.NewAclToken(ctx, "testAclToken", &consul.AclTokenArgs{
    			Description: pulumi.String("my test token"),
    			Policies: pulumi.StringArray{
    				agent.Name,
    			},
    			Local: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = random.NewRandomUuid(ctx, "testRandomUuid", nil)
    		if err != nil {
    			return err
    		}
    		_, err = consul.NewAclToken(ctx, "testPredefinedId", &consul.AclTokenArgs{
    			AccessorId:  pulumi.Any(random_uuid.Test_uuid.Result),
    			Description: pulumi.String("my test uuid token"),
    			Policies: pulumi.StringArray{
    				agent.Name,
    			},
    			Local: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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()
        {
            Rules = @"node_prefix """" {
      policy = ""read""
    }
    ",
        });
    
        var testAclToken = new Consul.AclToken("testAclToken", new()
        {
            Description = "my test token",
            Policies = new[]
            {
                agent.Name,
            },
            Local = true,
        });
    
        // Explicitly set the `accessor_id`
        var testRandomUuid = new Random.RandomUuid("testRandomUuid");
    
        var testPredefinedId = new Consul.AclToken("testPredefinedId", new()
        {
            AccessorId = random_uuid.Test_uuid.Result,
            Description = "my test uuid token",
            Policies = new[]
            {
                agent.Name,
            },
            Local = true,
        });
    
    });
    
    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) {
            var agent = new AclPolicy("agent", AclPolicyArgs.builder()        
                .rules("""
    node_prefix "" {
      policy = "read"
    }
                """)
                .build());
    
            var testAclToken = new AclToken("testAclToken", AclTokenArgs.builder()        
                .description("my test token")
                .policies(agent.name())
                .local(true)
                .build());
    
            var testRandomUuid = new RandomUuid("testRandomUuid");
    
            var testPredefinedId = new AclToken("testPredefinedId", AclTokenArgs.builder()        
                .accessorId(random_uuid.test_uuid().result())
                .description("my test uuid token")
                .policies(agent.name())
                .local(true)
                .build());
    
        }
    }
    
    resources:
      # Basic usage
      agent:
        type: consul:AclPolicy
        properties:
          rules: |
            node_prefix "" {
              policy = "read"
            }        
      testAclToken: # Explicitly set the `accessor_id`
        type: consul:AclToken
        properties:
          description: my test token
          policies:
            - ${agent.name}
          local: true
      testRandomUuid:
        type: random:RandomUuid
      testPredefinedId:
        type: consul:AclToken
        properties:
          accessorId: ${random_uuid.test_uuid.result}
          description: my test uuid token
          policies:
            - ${agent.name}
          local: true
    

    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 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 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 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 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 String
    The unique name of the resource.
    args AclTokenArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    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",
                },
            },
        },
    });
    
    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"),
    			},
    		},
    	},
    })
    
    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());
    
    acl_token_resource = consul.AclToken("aclTokenResource",
        accessor_id="string",
        description="string",
        expiration_time="string",
        local=False,
        namespace="string",
        node_identities=[consul.AclTokenNodeIdentityArgs(
            datacenter="string",
            node_name="string",
        )],
        partition="string",
        policies=["string"],
        roles=["string"],
        service_identities=[consul.AclTokenServiceIdentityArgs(
            service_name="string",
            datacenters=["string"],
        )],
        templated_policies=[consul.AclTokenTemplatedPolicyArgs(
            template_name="string",
            datacenters=["string"],
            template_variables=consul.AclTokenTemplatedPolicyTemplateVariablesArgs(
                name="string",
            ),
        )])
    
    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",
            },
        }],
    });
    
    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
    

    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

    The AclToken resource accepts the following input properties:

    AccessorId string
    The uuid of the token. If omitted, Consul will generate a random uuid.
    Description string
    The description of the token.
    ExpirationTime string
    If set this represents the point after which a token should be considered revoked and is eligible for destruction.
    Local bool
    The flag to set the token local to the current datacenter.
    Namespace string
    The namespace to create the token within.
    NodeIdentities List<AclTokenNodeIdentity>
    The list of node identities that should be applied to the token.
    Partition 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 string
    The uuid of the token. If omitted, Consul will generate a random uuid.
    Description string
    The description of the token.
    ExpirationTime string
    If set this represents the point after which a token should be considered revoked and is eligible for destruction.
    Local bool
    The flag to set the token local to the current datacenter.
    Namespace string
    The namespace to create the token within.
    NodeIdentities []AclTokenNodeIdentityArgs
    The list of node identities that should be applied to the token.
    Partition 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 String
    The uuid of the token. If omitted, Consul will generate a random uuid.
    description String
    The description of the token.
    expirationTime String
    If set this represents the point after which a token should be considered revoked and is eligible for destruction.
    local Boolean
    The flag to set the token local to the current datacenter.
    namespace String
    The namespace to create the token within.
    nodeIdentities List<AclTokenNodeIdentity>
    The list of node identities that should be applied to the token.
    partition 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 string
    The uuid of the token. If omitted, Consul will generate a random uuid.
    description string
    The description of the token.
    expirationTime string
    If set this represents the point after which a token should be considered revoked and is eligible for destruction.
    local boolean
    The flag to set the token local to the current datacenter.
    namespace string
    The namespace to create the token within.
    nodeIdentities AclTokenNodeIdentity[]
    The list of node identities that should be applied to the token.
    partition 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 str
    The uuid of the token. If omitted, Consul will generate a random uuid.
    description str
    The description of the token.
    expiration_time str
    If set this represents the point after which a token should be considered revoked and is eligible for destruction.
    local bool
    The flag to set the token local to the current datacenter.
    namespace 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 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 String
    The uuid of the token. If omitted, Consul will generate a random uuid.
    description String
    The description of the token.
    expirationTime String
    If set this represents the point after which a token should be considered revoked and is eligible for destruction.
    local Boolean
    The flag to set the token local to the current datacenter.
    namespace 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 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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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 uuid of the token. If omitted, Consul will generate a random uuid.
    Description string
    The description of the token.
    ExpirationTime string
    If set this represents the point after which a token should be considered revoked and is eligible for destruction.
    Local bool
    The flag to set the token local to the current datacenter.
    Namespace string
    The namespace to create the token within.
    NodeIdentities List<AclTokenNodeIdentity>
    The list of node identities that should be applied to the token.
    Partition 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 string
    The uuid of the token. If omitted, Consul will generate a random uuid.
    Description string
    The description of the token.
    ExpirationTime string
    If set this represents the point after which a token should be considered revoked and is eligible for destruction.
    Local bool
    The flag to set the token local to the current datacenter.
    Namespace string
    The namespace to create the token within.
    NodeIdentities []AclTokenNodeIdentityArgs
    The list of node identities that should be applied to the token.
    Partition 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 String
    The uuid of the token. If omitted, Consul will generate a random uuid.
    description String
    The description of the token.
    expirationTime String
    If set this represents the point after which a token should be considered revoked and is eligible for destruction.
    local Boolean
    The flag to set the token local to the current datacenter.
    namespace String
    The namespace to create the token within.
    nodeIdentities List<AclTokenNodeIdentity>
    The list of node identities that should be applied to the token.
    partition 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 string
    The uuid of the token. If omitted, Consul will generate a random uuid.
    description string
    The description of the token.
    expirationTime string
    If set this represents the point after which a token should be considered revoked and is eligible for destruction.
    local boolean
    The flag to set the token local to the current datacenter.
    namespace string
    The namespace to create the token within.
    nodeIdentities AclTokenNodeIdentity[]
    The list of node identities that should be applied to the token.
    partition 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 str
    The uuid of the token. If omitted, Consul will generate a random uuid.
    description str
    The description of the token.
    expiration_time str
    If set this represents the point after which a token should be considered revoked and is eligible for destruction.
    local bool
    The flag to set the token local to the current datacenter.
    namespace 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 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 String
    The uuid of the token. If omitted, Consul will generate a random uuid.
    description String
    The description of the token.
    expirationTime String
    If set this represents the point after which a token should be considered revoked and is eligible for destruction.
    local Boolean
    The flag to set the token local to the current datacenter.
    namespace 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 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 string
    The datacenter of the node.
    NodeName string
    The name of the node.
    Datacenter string
    The datacenter of the node.
    NodeName string
    The name of the node.
    datacenter String
    The datacenter of the node.
    nodeName String
    The name of the node.
    datacenter string
    The datacenter of the node.
    nodeName string
    The name of the node.
    datacenter str
    The datacenter of the node.
    node_name str
    The name of the node.
    datacenter String
    The datacenter of the node.
    nodeName String
    The name of the node.

    AclTokenServiceIdentity, AclTokenServiceIdentityArgs

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

    AclTokenTemplatedPolicy, AclTokenTemplatedPolicyArgs

    TemplateName 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 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 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 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 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 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
    
    $ pulumi import consul:index/aclToken:AclToken master-token 624d94ca-bc5c-f960-4e83-0a609cf588be
    

    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.
    consul logo
    Consul v3.11.2 published on Thursday, Mar 21, 2024 by Pulumi