1. Packages
  2. HashiCorp Nomad
  3. API Docs
  4. AclToken
Nomad v2.1.0 published on Wednesday, Jan 31, 2024 by Pulumi

nomad.AclToken

Explore with Pulumi AI

nomad logo
Nomad v2.1.0 published on Wednesday, Jan 31, 2024 by Pulumi

    Example Usage

    Creating a token with limited policies

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nomad = Pulumi.Nomad;
    
    return await Deployment.RunAsync(() => 
    {
        var dakota = new Nomad.AclToken("dakota", new()
        {
            Policies = new[]
            {
                "dev",
                "qa",
            },
            Type = "client",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-nomad/sdk/v2/go/nomad"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nomad.NewAclToken(ctx, "dakota", &nomad.AclTokenArgs{
    			Policies: pulumi.StringArray{
    				pulumi.String("dev"),
    				pulumi.String("qa"),
    			},
    			Type: pulumi.String("client"),
    		})
    		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.nomad.AclToken;
    import com.pulumi.nomad.AclTokenArgs;
    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 dakota = new AclToken("dakota", AclTokenArgs.builder()        
                .policies(            
                    "dev",
                    "qa")
                .type("client")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_nomad as nomad
    
    dakota = nomad.AclToken("dakota",
        policies=[
            "dev",
            "qa",
        ],
        type="client")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as nomad from "@pulumi/nomad";
    
    const dakota = new nomad.AclToken("dakota", {
        policies: [
            "dev",
            "qa",
        ],
        type: "client",
    });
    
    resources:
      dakota:
        type: nomad:AclToken
        properties:
          policies:
            - dev
            - qa
          type: client
    

    Creating a global token that will be replicated to all regions

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nomad = Pulumi.Nomad;
    
    return await Deployment.RunAsync(() => 
    {
        var dakota = new Nomad.AclToken("dakota", new()
        {
            Global = true,
            Policies = new[]
            {
                "dev",
                "qa",
            },
            Type = "client",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-nomad/sdk/v2/go/nomad"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nomad.NewAclToken(ctx, "dakota", &nomad.AclTokenArgs{
    			Global: pulumi.Bool(true),
    			Policies: pulumi.StringArray{
    				pulumi.String("dev"),
    				pulumi.String("qa"),
    			},
    			Type: pulumi.String("client"),
    		})
    		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.nomad.AclToken;
    import com.pulumi.nomad.AclTokenArgs;
    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 dakota = new AclToken("dakota", AclTokenArgs.builder()        
                .global(true)
                .policies(            
                    "dev",
                    "qa")
                .type("client")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_nomad as nomad
    
    dakota = nomad.AclToken("dakota",
        global_=True,
        policies=[
            "dev",
            "qa",
        ],
        type="client")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as nomad from "@pulumi/nomad";
    
    const dakota = new nomad.AclToken("dakota", {
        global: true,
        policies: [
            "dev",
            "qa",
        ],
        type: "client",
    });
    
    resources:
      dakota:
        type: nomad:AclToken
        properties:
          global: true
          policies:
            - dev
            - qa
          type: client
    

    Creating a token with full access to the cluster

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nomad = Pulumi.Nomad;
    
    return await Deployment.RunAsync(() => 
    {
        var iman = new Nomad.AclToken("iman", new()
        {
            Type = "management",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-nomad/sdk/v2/go/nomad"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nomad.NewAclToken(ctx, "iman", &nomad.AclTokenArgs{
    			Type: pulumi.String("management"),
    		})
    		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.nomad.AclToken;
    import com.pulumi.nomad.AclTokenArgs;
    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 iman = new AclToken("iman", AclTokenArgs.builder()        
                .type("management")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_nomad as nomad
    
    iman = nomad.AclToken("iman", type="management")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as nomad from "@pulumi/nomad";
    
    const iman = new nomad.AclToken("iman", {type: "management"});
    
    resources:
      iman:
        type: nomad:AclToken
        properties:
          type: management
    

    Accessing the token

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nomad = Pulumi.Nomad;
    
    return await Deployment.RunAsync(() => 
    {
        var token = new Nomad.AclToken("token", new()
        {
            Type = "client",
            Policies = new[]
            {
                "dev",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["nomadToken"] = token.SecretId,
        };
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-nomad/sdk/v2/go/nomad"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		token, err := nomad.NewAclToken(ctx, "token", &nomad.AclTokenArgs{
    			Type: pulumi.String("client"),
    			Policies: pulumi.StringArray{
    				pulumi.String("dev"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("nomadToken", token.SecretId)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nomad.AclToken;
    import com.pulumi.nomad.AclTokenArgs;
    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 token = new AclToken("token", AclTokenArgs.builder()        
                .type("client")
                .policies("dev")
                .build());
    
            ctx.export("nomadToken", token.secretId());
        }
    }
    
    import pulumi
    import pulumi_nomad as nomad
    
    token = nomad.AclToken("token",
        type="client",
        policies=["dev"])
    pulumi.export("nomadToken", token.secret_id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as nomad from "@pulumi/nomad";
    
    const token = new nomad.AclToken("token", {
        type: "client",
        policies: ["dev"],
    });
    export const nomadToken = token.secretId;
    
    resources:
      token:
        type: nomad:AclToken
        properties:
          type: client
          policies:
            - dev
    outputs:
      nomadToken: ${token.secretId}
    

    Create AclToken Resource

    new AclToken(name: string, args: AclTokenArgs, opts?: CustomResourceOptions);
    @overload
    def AclToken(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 expiration_ttl: Optional[str] = None,
                 global_: Optional[bool] = None,
                 name: Optional[str] = None,
                 policies: Optional[Sequence[str]] = None,
                 roles: Optional[Sequence[AclTokenRoleArgs]] = None,
                 type: Optional[str] = None)
    @overload
    def AclToken(resource_name: str,
                 args: AclTokenArgs,
                 opts: Optional[ResourceOptions] = None)
    func NewAclToken(ctx *Context, name string, args AclTokenArgs, opts ...ResourceOption) (*AclToken, error)
    public AclToken(string name, AclTokenArgs args, CustomResourceOptions? opts = null)
    public AclToken(String name, AclTokenArgs args)
    public AclToken(String name, AclTokenArgs args, CustomResourceOptions options)
    
    type: nomad:AclToken
    properties: # The arguments to resource properties.
    options: # 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.
    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.

    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:

    Type string
    (string: <required>) - The type of token this is. Use client for tokens that will have policies associated with them. Use management for tokens that can perform any action.
    ExpirationTtl string

    (string: "") - Provides a TTL for the token in the form of a time duration such as "5m" or "1h".

    In addition to the above arguments, the following attributes are exported and can be referenced:

    Global bool
    (bool: false) - Whether the token should be replicated to all regions, or if it will only be used in the region it was created in.
    Name string
    (string: "") - A human-friendly name for this token.
    Policies List<string>
    (set: []) - A set of policy names to associate with this token. Must be set on client-type tokens, must not be set on management-type tokens. Policies do not need to exist before being used here.
    Roles List<AclTokenRole>
    (set: []) - The list of roles attached to the token. Each entry has name and id attributes. It may be used multiple times.
    Type string
    (string: <required>) - The type of token this is. Use client for tokens that will have policies associated with them. Use management for tokens that can perform any action.
    ExpirationTtl string

    (string: "") - Provides a TTL for the token in the form of a time duration such as "5m" or "1h".

    In addition to the above arguments, the following attributes are exported and can be referenced:

    Global bool
    (bool: false) - Whether the token should be replicated to all regions, or if it will only be used in the region it was created in.
    Name string
    (string: "") - A human-friendly name for this token.
    Policies []string
    (set: []) - A set of policy names to associate with this token. Must be set on client-type tokens, must not be set on management-type tokens. Policies do not need to exist before being used here.
    Roles []AclTokenRoleArgs
    (set: []) - The list of roles attached to the token. Each entry has name and id attributes. It may be used multiple times.
    type String
    (string: <required>) - The type of token this is. Use client for tokens that will have policies associated with them. Use management for tokens that can perform any action.
    expirationTtl String

    (string: "") - Provides a TTL for the token in the form of a time duration such as "5m" or "1h".

    In addition to the above arguments, the following attributes are exported and can be referenced:

    global Boolean
    (bool: false) - Whether the token should be replicated to all regions, or if it will only be used in the region it was created in.
    name String
    (string: "") - A human-friendly name for this token.
    policies List<String>
    (set: []) - A set of policy names to associate with this token. Must be set on client-type tokens, must not be set on management-type tokens. Policies do not need to exist before being used here.
    roles List<AclTokenRole>
    (set: []) - The list of roles attached to the token. Each entry has name and id attributes. It may be used multiple times.
    type string
    (string: <required>) - The type of token this is. Use client for tokens that will have policies associated with them. Use management for tokens that can perform any action.
    expirationTtl string

    (string: "") - Provides a TTL for the token in the form of a time duration such as "5m" or "1h".

    In addition to the above arguments, the following attributes are exported and can be referenced:

    global boolean
    (bool: false) - Whether the token should be replicated to all regions, or if it will only be used in the region it was created in.
    name string
    (string: "") - A human-friendly name for this token.
    policies string[]
    (set: []) - A set of policy names to associate with this token. Must be set on client-type tokens, must not be set on management-type tokens. Policies do not need to exist before being used here.
    roles AclTokenRole[]
    (set: []) - The list of roles attached to the token. Each entry has name and id attributes. It may be used multiple times.
    type str
    (string: <required>) - The type of token this is. Use client for tokens that will have policies associated with them. Use management for tokens that can perform any action.
    expiration_ttl str

    (string: "") - Provides a TTL for the token in the form of a time duration such as "5m" or "1h".

    In addition to the above arguments, the following attributes are exported and can be referenced:

    global_ bool
    (bool: false) - Whether the token should be replicated to all regions, or if it will only be used in the region it was created in.
    name str
    (string: "") - A human-friendly name for this token.
    policies Sequence[str]
    (set: []) - A set of policy names to associate with this token. Must be set on client-type tokens, must not be set on management-type tokens. Policies do not need to exist before being used here.
    roles Sequence[AclTokenRoleArgs]
    (set: []) - The list of roles attached to the token. Each entry has name and id attributes. It may be used multiple times.
    type String
    (string: <required>) - The type of token this is. Use client for tokens that will have policies associated with them. Use management for tokens that can perform any action.
    expirationTtl String

    (string: "") - Provides a TTL for the token in the form of a time duration such as "5m" or "1h".

    In addition to the above arguments, the following attributes are exported and can be referenced:

    global Boolean
    (bool: false) - Whether the token should be replicated to all regions, or if it will only be used in the region it was created in.
    name String
    (string: "") - A human-friendly name for this token.
    policies List<String>
    (set: []) - A set of policy names to associate with this token. Must be set on client-type tokens, must not be set on management-type tokens. Policies do not need to exist before being used here.
    roles List<Property Map>
    (set: []) - The list of roles attached to the token. Each entry has name and id attributes. It may be used multiple times.

    Outputs

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

    AccessorId string
    (string) - A non-sensitive identifier for this token that can be logged and shared safely without granting any access to the cluster.
    CreateTime string
    (string) - The timestamp the token was created.
    ExpirationTime string
    (string) - The timestamp after which the token is considered expired and eligible for destruction.
    Id string
    The provider-assigned unique ID for this managed resource.
    SecretId string
    (string) - The token value itself, which is presented for access to the cluster.
    AccessorId string
    (string) - A non-sensitive identifier for this token that can be logged and shared safely without granting any access to the cluster.
    CreateTime string
    (string) - The timestamp the token was created.
    ExpirationTime string
    (string) - The timestamp after which the token is considered expired and eligible for destruction.
    Id string
    The provider-assigned unique ID for this managed resource.
    SecretId string
    (string) - The token value itself, which is presented for access to the cluster.
    accessorId String
    (string) - A non-sensitive identifier for this token that can be logged and shared safely without granting any access to the cluster.
    createTime String
    (string) - The timestamp the token was created.
    expirationTime String
    (string) - The timestamp after which the token is considered expired and eligible for destruction.
    id String
    The provider-assigned unique ID for this managed resource.
    secretId String
    (string) - The token value itself, which is presented for access to the cluster.
    accessorId string
    (string) - A non-sensitive identifier for this token that can be logged and shared safely without granting any access to the cluster.
    createTime string
    (string) - The timestamp the token was created.
    expirationTime string
    (string) - The timestamp after which the token is considered expired and eligible for destruction.
    id string
    The provider-assigned unique ID for this managed resource.
    secretId string
    (string) - The token value itself, which is presented for access to the cluster.
    accessor_id str
    (string) - A non-sensitive identifier for this token that can be logged and shared safely without granting any access to the cluster.
    create_time str
    (string) - The timestamp the token was created.
    expiration_time str
    (string) - The timestamp after which the token is considered expired and eligible for destruction.
    id str
    The provider-assigned unique ID for this managed resource.
    secret_id str
    (string) - The token value itself, which is presented for access to the cluster.
    accessorId String
    (string) - A non-sensitive identifier for this token that can be logged and shared safely without granting any access to the cluster.
    createTime String
    (string) - The timestamp the token was created.
    expirationTime String
    (string) - The timestamp after which the token is considered expired and eligible for destruction.
    id String
    The provider-assigned unique ID for this managed resource.
    secretId String
    (string) - The token value itself, which is presented for access to the cluster.

    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,
            create_time: Optional[str] = None,
            expiration_time: Optional[str] = None,
            expiration_ttl: Optional[str] = None,
            global_: Optional[bool] = None,
            name: Optional[str] = None,
            policies: Optional[Sequence[str]] = None,
            roles: Optional[Sequence[AclTokenRoleArgs]] = None,
            secret_id: Optional[str] = None,
            type: Optional[str] = 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
    (string) - A non-sensitive identifier for this token that can be logged and shared safely without granting any access to the cluster.
    CreateTime string
    (string) - The timestamp the token was created.
    ExpirationTime string
    (string) - The timestamp after which the token is considered expired and eligible for destruction.
    ExpirationTtl string

    (string: "") - Provides a TTL for the token in the form of a time duration such as "5m" or "1h".

    In addition to the above arguments, the following attributes are exported and can be referenced:

    Global bool
    (bool: false) - Whether the token should be replicated to all regions, or if it will only be used in the region it was created in.
    Name string
    (string: "") - A human-friendly name for this token.
    Policies List<string>
    (set: []) - A set of policy names to associate with this token. Must be set on client-type tokens, must not be set on management-type tokens. Policies do not need to exist before being used here.
    Roles List<AclTokenRole>
    (set: []) - The list of roles attached to the token. Each entry has name and id attributes. It may be used multiple times.
    SecretId string
    (string) - The token value itself, which is presented for access to the cluster.
    Type string
    (string: <required>) - The type of token this is. Use client for tokens that will have policies associated with them. Use management for tokens that can perform any action.
    AccessorId string
    (string) - A non-sensitive identifier for this token that can be logged and shared safely without granting any access to the cluster.
    CreateTime string
    (string) - The timestamp the token was created.
    ExpirationTime string
    (string) - The timestamp after which the token is considered expired and eligible for destruction.
    ExpirationTtl string

    (string: "") - Provides a TTL for the token in the form of a time duration such as "5m" or "1h".

    In addition to the above arguments, the following attributes are exported and can be referenced:

    Global bool
    (bool: false) - Whether the token should be replicated to all regions, or if it will only be used in the region it was created in.
    Name string
    (string: "") - A human-friendly name for this token.
    Policies []string
    (set: []) - A set of policy names to associate with this token. Must be set on client-type tokens, must not be set on management-type tokens. Policies do not need to exist before being used here.
    Roles []AclTokenRoleArgs
    (set: []) - The list of roles attached to the token. Each entry has name and id attributes. It may be used multiple times.
    SecretId string
    (string) - The token value itself, which is presented for access to the cluster.
    Type string
    (string: <required>) - The type of token this is. Use client for tokens that will have policies associated with them. Use management for tokens that can perform any action.
    accessorId String
    (string) - A non-sensitive identifier for this token that can be logged and shared safely without granting any access to the cluster.
    createTime String
    (string) - The timestamp the token was created.
    expirationTime String
    (string) - The timestamp after which the token is considered expired and eligible for destruction.
    expirationTtl String

    (string: "") - Provides a TTL for the token in the form of a time duration such as "5m" or "1h".

    In addition to the above arguments, the following attributes are exported and can be referenced:

    global Boolean
    (bool: false) - Whether the token should be replicated to all regions, or if it will only be used in the region it was created in.
    name String
    (string: "") - A human-friendly name for this token.
    policies List<String>
    (set: []) - A set of policy names to associate with this token. Must be set on client-type tokens, must not be set on management-type tokens. Policies do not need to exist before being used here.
    roles List<AclTokenRole>
    (set: []) - The list of roles attached to the token. Each entry has name and id attributes. It may be used multiple times.
    secretId String
    (string) - The token value itself, which is presented for access to the cluster.
    type String
    (string: <required>) - The type of token this is. Use client for tokens that will have policies associated with them. Use management for tokens that can perform any action.
    accessorId string
    (string) - A non-sensitive identifier for this token that can be logged and shared safely without granting any access to the cluster.
    createTime string
    (string) - The timestamp the token was created.
    expirationTime string
    (string) - The timestamp after which the token is considered expired and eligible for destruction.
    expirationTtl string

    (string: "") - Provides a TTL for the token in the form of a time duration such as "5m" or "1h".

    In addition to the above arguments, the following attributes are exported and can be referenced:

    global boolean
    (bool: false) - Whether the token should be replicated to all regions, or if it will only be used in the region it was created in.
    name string
    (string: "") - A human-friendly name for this token.
    policies string[]
    (set: []) - A set of policy names to associate with this token. Must be set on client-type tokens, must not be set on management-type tokens. Policies do not need to exist before being used here.
    roles AclTokenRole[]
    (set: []) - The list of roles attached to the token. Each entry has name and id attributes. It may be used multiple times.
    secretId string
    (string) - The token value itself, which is presented for access to the cluster.
    type string
    (string: <required>) - The type of token this is. Use client for tokens that will have policies associated with them. Use management for tokens that can perform any action.
    accessor_id str
    (string) - A non-sensitive identifier for this token that can be logged and shared safely without granting any access to the cluster.
    create_time str
    (string) - The timestamp the token was created.
    expiration_time str
    (string) - The timestamp after which the token is considered expired and eligible for destruction.
    expiration_ttl str

    (string: "") - Provides a TTL for the token in the form of a time duration such as "5m" or "1h".

    In addition to the above arguments, the following attributes are exported and can be referenced:

    global_ bool
    (bool: false) - Whether the token should be replicated to all regions, or if it will only be used in the region it was created in.
    name str
    (string: "") - A human-friendly name for this token.
    policies Sequence[str]
    (set: []) - A set of policy names to associate with this token. Must be set on client-type tokens, must not be set on management-type tokens. Policies do not need to exist before being used here.
    roles Sequence[AclTokenRoleArgs]
    (set: []) - The list of roles attached to the token. Each entry has name and id attributes. It may be used multiple times.
    secret_id str
    (string) - The token value itself, which is presented for access to the cluster.
    type str
    (string: <required>) - The type of token this is. Use client for tokens that will have policies associated with them. Use management for tokens that can perform any action.
    accessorId String
    (string) - A non-sensitive identifier for this token that can be logged and shared safely without granting any access to the cluster.
    createTime String
    (string) - The timestamp the token was created.
    expirationTime String
    (string) - The timestamp after which the token is considered expired and eligible for destruction.
    expirationTtl String

    (string: "") - Provides a TTL for the token in the form of a time duration such as "5m" or "1h".

    In addition to the above arguments, the following attributes are exported and can be referenced:

    global Boolean
    (bool: false) - Whether the token should be replicated to all regions, or if it will only be used in the region it was created in.
    name String
    (string: "") - A human-friendly name for this token.
    policies List<String>
    (set: []) - A set of policy names to associate with this token. Must be set on client-type tokens, must not be set on management-type tokens. Policies do not need to exist before being used here.
    roles List<Property Map>
    (set: []) - The list of roles attached to the token. Each entry has name and id attributes. It may be used multiple times.
    secretId String
    (string) - The token value itself, which is presented for access to the cluster.
    type String
    (string: <required>) - The type of token this is. Use client for tokens that will have policies associated with them. Use management for tokens that can perform any action.

    Supporting Types

    AclTokenRole, AclTokenRoleArgs

    Id string
    Name string
    (string: "") - A human-friendly name for this token.
    Id string
    Name string
    (string: "") - A human-friendly name for this token.
    id String
    name String
    (string: "") - A human-friendly name for this token.
    id string
    name string
    (string: "") - A human-friendly name for this token.
    id str
    name str
    (string: "") - A human-friendly name for this token.
    id String
    name String
    (string: "") - A human-friendly name for this token.

    Package Details

    Repository
    HashiCorp Nomad pulumi/pulumi-nomad
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nomad Terraform Provider.
    nomad logo
    Nomad v2.1.0 published on Wednesday, Jan 31, 2024 by Pulumi