1. Registry
  2. Packages
  3. HashiCorp Vault Provider
  4. API Docs
  5. TpmAuthBackendRole
Viewing docs for HashiCorp Vault v7.14.0
published on Thursday, Oct 15, 2026 by Pulumi
vault logo vault logo
Viewing docs for HashiCorp Vault v7.14.0
published on Thursday, Oct 15, 2026 by Pulumi

    Manages a role in a TPM (Trusted Platform Module) auth backend. Roles define the mapping from TPM identities and TPM groups to Vault policies and token parameters.

    Important This resource requires Vault Enterprise 2.2.0 or later.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const tpm = new vault.AuthBackend("tpm", {
        type: "tpm",
        path: "tpm",
    });
    const example = new vault.TpmAuthBackendRole("example", {
        mount: tpm.path,
        name: "example-role",
        displayName: "Example TPM Role",
        certTtl: 2592000,
        tpmIds: [
            "abc123...",
            "def456...",
        ],
        tpmgroupIds: [
            "group-1",
            "group-2",
        ],
        tokenTtl: 3600,
        tokenMaxTtl: 7200,
        tokenPolicies: [
            "default",
            "tpm-policy",
        ],
        tokenBoundCidrs: ["10.0.0.0/8"],
    });
    
    import pulumi
    import pulumi_vault as vault
    
    tpm = vault.AuthBackend("tpm",
        type="tpm",
        path="tpm")
    example = vault.TpmAuthBackendRole("example",
        mount=tpm.path,
        name="example-role",
        display_name="Example TPM Role",
        cert_ttl=2592000,
        tpm_ids=[
            "abc123...",
            "def456...",
        ],
        tpmgroup_ids=[
            "group-1",
            "group-2",
        ],
        token_ttl=3600,
        token_max_ttl=7200,
        token_policies=[
            "default",
            "tpm-policy",
        ],
        token_bound_cidrs=["10.0.0.0/8"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v7/go/vault"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tpm, err := vault.NewAuthBackend(ctx, "tpm", &vault.AuthBackendArgs{
    			Type: pulumi.String("tpm"),
    			Path: pulumi.String("tpm"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vault.NewTpmAuthBackendRole(ctx, "example", &vault.TpmAuthBackendRoleArgs{
    			Mount:       tpm.Path,
    			Name:        pulumi.String("example-role"),
    			DisplayName: pulumi.String("Example TPM Role"),
    			CertTtl:     pulumi.Int(2592000),
    			TpmIds: pulumi.StringArray{
    				pulumi.String("abc123..."),
    				pulumi.String("def456..."),
    			},
    			TpmgroupIds: pulumi.StringArray{
    				pulumi.String("group-1"),
    				pulumi.String("group-2"),
    			},
    			TokenTtl:    pulumi.Int(3600),
    			TokenMaxTtl: pulumi.Int(7200),
    			TokenPolicies: pulumi.StringArray{
    				pulumi.String("default"),
    				pulumi.String("tpm-policy"),
    			},
    			TokenBoundCidrs: pulumi.StringArray{
    				pulumi.String("10.0.0.0/8"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var tpm = new Vault.AuthBackend("tpm", new()
        {
            Type = "tpm",
            Path = "tpm",
        });
    
        var example = new Vault.TpmAuthBackendRole("example", new()
        {
            Mount = tpm.Path,
            Name = "example-role",
            DisplayName = "Example TPM Role",
            CertTtl = 2592000,
            TpmIds = new[]
            {
                "abc123...",
                "def456...",
            },
            TpmgroupIds = new[]
            {
                "group-1",
                "group-2",
            },
            TokenTtl = 3600,
            TokenMaxTtl = 7200,
            TokenPolicies = new[]
            {
                "default",
                "tpm-policy",
            },
            TokenBoundCidrs = new[]
            {
                "10.0.0.0/8",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.AuthBackend;
    import com.pulumi.vault.AuthBackendArgs;
    import com.pulumi.vault.TpmAuthBackendRole;
    import com.pulumi.vault.TpmAuthBackendRoleArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 tpm = new AuthBackend("tpm", AuthBackendArgs.builder()
                .type("tpm")
                .path("tpm")
                .build());
    
            var example = new TpmAuthBackendRole("example", TpmAuthBackendRoleArgs.builder()
                .mount(tpm.path())
                .name("example-role")
                .displayName("Example TPM Role")
                .certTtl(2592000)
                .tpmIds(            
                    "abc123...",
                    "def456...")
                .tpmgroupIds(            
                    "group-1",
                    "group-2")
                .tokenTtl(3600)
                .tokenMaxTtl(7200)
                .tokenPolicies(            
                    "default",
                    "tpm-policy")
                .tokenBoundCidrs("10.0.0.0/8")
                .build());
    
        }
    }
    
    resources:
      tpm:
        type: vault:AuthBackend
        properties:
          type: tpm
          path: tpm
      example:
        type: vault:TpmAuthBackendRole
        properties:
          mount: ${tpm.path}
          name: example-role
          displayName: Example TPM Role
          certTtl: 2.592e+06
          tpmIds:
            - abc123...
            - def456...
          tpmgroupIds:
            - group-1
            - group-2
          tokenTtl: 3600
          tokenMaxTtl: 7200
          tokenPolicies:
            - default
            - tpm-policy
          tokenBoundCidrs:
            - 10.0.0.0/8
    
    terraform {
      required_providers {
        vault = {
          source = "pulumi/vault"
        }
      }
    }
    
    resource "vault_auth_backend" "tpm" {
      lifecycle {
        create_before_destroy = true
      }
      type = "tpm"
      path = "tpm"
    }
    resource "vault_tpm_auth_backend_role" "example" {
      lifecycle {
        create_before_destroy = true
      }
      mount             = vault_auth_backend.tpm.path
      name              = "example-role"
      display_name      = "Example TPM Role"
      cert_ttl          = 2592000
      tpm_ids           = ["abc123...", "def456..."]
      tpmgroup_ids      = ["group-1", "group-2"]
      token_ttl         = 3600
      token_max_ttl     = 7200
      token_policies    = ["default", "tpm-policy"]
      token_bound_cidrs = ["10.0.0.0/8"]
    }
    

    Create TpmAuthBackendRole Resource

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

    Constructor syntax

    new TpmAuthBackendRole(name: string, args: TpmAuthBackendRoleArgs, opts?: CustomResourceOptions);
    @overload
    def TpmAuthBackendRole(resource_name: str,
                           args: TpmAuthBackendRoleArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def TpmAuthBackendRole(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           mount: Optional[str] = None,
                           token_max_ttl: Optional[int] = None,
                           token_num_uses: Optional[int] = None,
                           cert_ttl: Optional[int] = None,
                           name: Optional[str] = None,
                           namespace: Optional[str] = None,
                           token_bound_cidrs: Optional[Sequence[str]] = None,
                           display_name: Optional[str] = None,
                           token_explicit_max_ttl: Optional[int] = None,
                           token_no_default_policy: Optional[bool] = None,
                           alias_metadata: Optional[Mapping[str, str]] = None,
                           token_period: Optional[int] = None,
                           token_policies: Optional[Sequence[str]] = None,
                           token_ttl: Optional[int] = None,
                           token_type: Optional[str] = None,
                           tpm_ids: Optional[Sequence[str]] = None,
                           tpmgroup_ids: Optional[Sequence[str]] = None)
    func NewTpmAuthBackendRole(ctx *Context, name string, args TpmAuthBackendRoleArgs, opts ...ResourceOption) (*TpmAuthBackendRole, error)
    public TpmAuthBackendRole(string name, TpmAuthBackendRoleArgs args, CustomResourceOptions? opts = null)
    public TpmAuthBackendRole(String name, TpmAuthBackendRoleArgs args)
    public TpmAuthBackendRole(String name, TpmAuthBackendRoleArgs args, CustomResourceOptions options)
    
    type: vault:TpmAuthBackendRole
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "vault_tpm_auth_backend_role" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args TpmAuthBackendRoleArgs
    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 TpmAuthBackendRoleArgs
    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 TpmAuthBackendRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TpmAuthBackendRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TpmAuthBackendRoleArgs
    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 tpmAuthBackendRoleResource = new Vault.TpmAuthBackendRole("tpmAuthBackendRoleResource", new()
    {
        Mount = "string",
        TokenMaxTtl = 0,
        TokenNumUses = 0,
        CertTtl = 0,
        Name = "string",
        Namespace = "string",
        TokenBoundCidrs = new[]
        {
            "string",
        },
        DisplayName = "string",
        TokenExplicitMaxTtl = 0,
        TokenNoDefaultPolicy = false,
        AliasMetadata = 
        {
            { "string", "string" },
        },
        TokenPeriod = 0,
        TokenPolicies = new[]
        {
            "string",
        },
        TokenTtl = 0,
        TokenType = "string",
        TpmIds = new[]
        {
            "string",
        },
        TpmgroupIds = new[]
        {
            "string",
        },
    });
    
    example, err := vault.NewTpmAuthBackendRole(ctx, "tpmAuthBackendRoleResource", &vault.TpmAuthBackendRoleArgs{
    	Mount:        pulumi.String("string"),
    	TokenMaxTtl:  pulumi.Int(0),
    	TokenNumUses: pulumi.Int(0),
    	CertTtl:      pulumi.Int(0),
    	Name:         pulumi.String("string"),
    	Namespace:    pulumi.String("string"),
    	TokenBoundCidrs: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	DisplayName:          pulumi.String("string"),
    	TokenExplicitMaxTtl:  pulumi.Int(0),
    	TokenNoDefaultPolicy: pulumi.Bool(false),
    	AliasMetadata: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TokenPeriod: pulumi.Int(0),
    	TokenPolicies: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TokenTtl:  pulumi.Int(0),
    	TokenType: pulumi.String("string"),
    	TpmIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TpmgroupIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    resource "vault_tpm_auth_backend_role" "tpmAuthBackendRoleResource" {
      lifecycle {
        create_before_destroy = true
      }
      mount                   = "string"
      token_max_ttl           = 0
      token_num_uses          = 0
      cert_ttl                = 0
      name                    = "string"
      namespace               = "string"
      token_bound_cidrs       = ["string"]
      display_name            = "string"
      token_explicit_max_ttl  = 0
      token_no_default_policy = false
      alias_metadata = {
        "string" = "string"
      }
      token_period   = 0
      token_policies = ["string"]
      token_ttl      = 0
      token_type     = "string"
      tpm_ids        = ["string"]
      tpmgroup_ids   = ["string"]
    }
    
    var tpmAuthBackendRoleResource = new TpmAuthBackendRole("tpmAuthBackendRoleResource", TpmAuthBackendRoleArgs.builder()
        .mount("string")
        .tokenMaxTtl(0)
        .tokenNumUses(0)
        .certTtl(0)
        .name("string")
        .namespace("string")
        .tokenBoundCidrs("string")
        .displayName("string")
        .tokenExplicitMaxTtl(0)
        .tokenNoDefaultPolicy(false)
        .aliasMetadata(Map.of("string", "string"))
        .tokenPeriod(0)
        .tokenPolicies("string")
        .tokenTtl(0)
        .tokenType("string")
        .tpmIds("string")
        .tpmgroupIds("string")
        .build());
    
    tpm_auth_backend_role_resource = vault.TpmAuthBackendRole("tpmAuthBackendRoleResource",
        mount="string",
        token_max_ttl=0,
        token_num_uses=0,
        cert_ttl=0,
        name="string",
        namespace="string",
        token_bound_cidrs=["string"],
        display_name="string",
        token_explicit_max_ttl=0,
        token_no_default_policy=False,
        alias_metadata={
            "string": "string",
        },
        token_period=0,
        token_policies=["string"],
        token_ttl=0,
        token_type="string",
        tpm_ids=["string"],
        tpmgroup_ids=["string"])
    
    const tpmAuthBackendRoleResource = new vault.TpmAuthBackendRole("tpmAuthBackendRoleResource", {
        mount: "string",
        tokenMaxTtl: 0,
        tokenNumUses: 0,
        certTtl: 0,
        name: "string",
        namespace: "string",
        tokenBoundCidrs: ["string"],
        displayName: "string",
        tokenExplicitMaxTtl: 0,
        tokenNoDefaultPolicy: false,
        aliasMetadata: {
            string: "string",
        },
        tokenPeriod: 0,
        tokenPolicies: ["string"],
        tokenTtl: 0,
        tokenType: "string",
        tpmIds: ["string"],
        tpmgroupIds: ["string"],
    });
    
    type: vault:TpmAuthBackendRole
    properties:
        aliasMetadata:
            string: string
        certTtl: 0
        displayName: string
        mount: string
        name: string
        namespace: string
        tokenBoundCidrs:
            - string
        tokenExplicitMaxTtl: 0
        tokenMaxTtl: 0
        tokenNoDefaultPolicy: false
        tokenNumUses: 0
        tokenPeriod: 0
        tokenPolicies:
            - string
        tokenTtl: 0
        tokenType: string
        tpmIds:
            - string
        tpmgroupIds:
            - string
    

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

    Mount string
    TPM auth backend mount path.
    AliasMetadata Dictionary<string, string>
    A map of string to string that will be set as metadata on the identity alias
    CertTtl int
    Certificate TTL for the TPM role, in seconds. If not specified, uses the backend's default.
    DisplayName string
    Display name for the role. Defaults to the role name.
    Name string
    Name of the TPM role.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace.
    TokenBoundCidrs List<string>
    Specifies the blocks of IP addresses which are allowed to use the generated token
    TokenExplicitMaxTtl int
    Generated Token's Explicit Maximum TTL in seconds
    TokenMaxTtl int
    The maximum lifetime of the generated token
    TokenNoDefaultPolicy bool
    If true, the 'default' policy will not automatically be added to generated tokens
    TokenNumUses int
    The maximum number of times a token may be used, a value of zero means unlimited
    TokenPeriod int
    Generated Token's Period
    TokenPolicies List<string>
    Generated Token's Policies
    TokenTtl int
    The initial ttl of the token to generate in seconds
    TokenType string
    The type of token to generate, service or batch
    TpmIds List<string>
    Set of TPM record IDs authorized to authenticate with this role. These are the unique IDs assigned by Vault to TPM records (SHA256 of the EK public key). At least one of tpmIds or tpmgroupIds must be specified.
    TpmgroupIds List<string>
    Set of TPM group IDs authorized to authenticate with this role. At least one of tpmIds or tpmgroupIds must be specified.
    Mount string
    TPM auth backend mount path.
    AliasMetadata map[string]string
    A map of string to string that will be set as metadata on the identity alias
    CertTtl int
    Certificate TTL for the TPM role, in seconds. If not specified, uses the backend's default.
    DisplayName string
    Display name for the role. Defaults to the role name.
    Name string
    Name of the TPM role.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace.
    TokenBoundCidrs []string
    Specifies the blocks of IP addresses which are allowed to use the generated token
    TokenExplicitMaxTtl int
    Generated Token's Explicit Maximum TTL in seconds
    TokenMaxTtl int
    The maximum lifetime of the generated token
    TokenNoDefaultPolicy bool
    If true, the 'default' policy will not automatically be added to generated tokens
    TokenNumUses int
    The maximum number of times a token may be used, a value of zero means unlimited
    TokenPeriod int
    Generated Token's Period
    TokenPolicies []string
    Generated Token's Policies
    TokenTtl int
    The initial ttl of the token to generate in seconds
    TokenType string
    The type of token to generate, service or batch
    TpmIds []string
    Set of TPM record IDs authorized to authenticate with this role. These are the unique IDs assigned by Vault to TPM records (SHA256 of the EK public key). At least one of tpmIds or tpmgroupIds must be specified.
    TpmgroupIds []string
    Set of TPM group IDs authorized to authenticate with this role. At least one of tpmIds or tpmgroupIds must be specified.
    mount string
    TPM auth backend mount path.
    alias_metadata map(string)
    A map of string to string that will be set as metadata on the identity alias
    cert_ttl number
    Certificate TTL for the TPM role, in seconds. If not specified, uses the backend's default.
    display_name string
    Display name for the role. Defaults to the role name.
    name string
    Name of the TPM role.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace.
    token_bound_cidrs list(string)
    Specifies the blocks of IP addresses which are allowed to use the generated token
    token_explicit_max_ttl number
    Generated Token's Explicit Maximum TTL in seconds
    token_max_ttl number
    The maximum lifetime of the generated token
    token_no_default_policy bool
    If true, the 'default' policy will not automatically be added to generated tokens
    token_num_uses number
    The maximum number of times a token may be used, a value of zero means unlimited
    token_period number
    Generated Token's Period
    token_policies list(string)
    Generated Token's Policies
    token_ttl number
    The initial ttl of the token to generate in seconds
    token_type string
    The type of token to generate, service or batch
    tpm_ids list(string)
    Set of TPM record IDs authorized to authenticate with this role. These are the unique IDs assigned by Vault to TPM records (SHA256 of the EK public key). At least one of tpmIds or tpmgroupIds must be specified.
    tpmgroup_ids list(string)
    Set of TPM group IDs authorized to authenticate with this role. At least one of tpmIds or tpmgroupIds must be specified.
    mount String
    TPM auth backend mount path.
    aliasMetadata Map<String,String>
    A map of string to string that will be set as metadata on the identity alias
    certTtl Integer
    Certificate TTL for the TPM role, in seconds. If not specified, uses the backend's default.
    displayName String
    Display name for the role. Defaults to the role name.
    name String
    Name of the TPM role.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace.
    tokenBoundCidrs List<String>
    Specifies the blocks of IP addresses which are allowed to use the generated token
    tokenExplicitMaxTtl Integer
    Generated Token's Explicit Maximum TTL in seconds
    tokenMaxTtl Integer
    The maximum lifetime of the generated token
    tokenNoDefaultPolicy Boolean
    If true, the 'default' policy will not automatically be added to generated tokens
    tokenNumUses Integer
    The maximum number of times a token may be used, a value of zero means unlimited
    tokenPeriod Integer
    Generated Token's Period
    tokenPolicies List<String>
    Generated Token's Policies
    tokenTtl Integer
    The initial ttl of the token to generate in seconds
    tokenType String
    The type of token to generate, service or batch
    tpmIds List<String>
    Set of TPM record IDs authorized to authenticate with this role. These are the unique IDs assigned by Vault to TPM records (SHA256 of the EK public key). At least one of tpmIds or tpmgroupIds must be specified.
    tpmgroupIds List<String>
    Set of TPM group IDs authorized to authenticate with this role. At least one of tpmIds or tpmgroupIds must be specified.
    mount string
    TPM auth backend mount path.
    aliasMetadata {[key: string]: string}
    A map of string to string that will be set as metadata on the identity alias
    certTtl number
    Certificate TTL for the TPM role, in seconds. If not specified, uses the backend's default.
    displayName string
    Display name for the role. Defaults to the role name.
    name string
    Name of the TPM role.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace.
    tokenBoundCidrs string[]
    Specifies the blocks of IP addresses which are allowed to use the generated token
    tokenExplicitMaxTtl number
    Generated Token's Explicit Maximum TTL in seconds
    tokenMaxTtl number
    The maximum lifetime of the generated token
    tokenNoDefaultPolicy boolean
    If true, the 'default' policy will not automatically be added to generated tokens
    tokenNumUses number
    The maximum number of times a token may be used, a value of zero means unlimited
    tokenPeriod number
    Generated Token's Period
    tokenPolicies string[]
    Generated Token's Policies
    tokenTtl number
    The initial ttl of the token to generate in seconds
    tokenType string
    The type of token to generate, service or batch
    tpmIds string[]
    Set of TPM record IDs authorized to authenticate with this role. These are the unique IDs assigned by Vault to TPM records (SHA256 of the EK public key). At least one of tpmIds or tpmgroupIds must be specified.
    tpmgroupIds string[]
    Set of TPM group IDs authorized to authenticate with this role. At least one of tpmIds or tpmgroupIds must be specified.
    mount str
    TPM auth backend mount path.
    alias_metadata Mapping[str, str]
    A map of string to string that will be set as metadata on the identity alias
    cert_ttl int
    Certificate TTL for the TPM role, in seconds. If not specified, uses the backend's default.
    display_name str
    Display name for the role. Defaults to the role name.
    name str
    Name of the TPM role.
    namespace str
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace.
    token_bound_cidrs Sequence[str]
    Specifies the blocks of IP addresses which are allowed to use the generated token
    token_explicit_max_ttl int
    Generated Token's Explicit Maximum TTL in seconds
    token_max_ttl int
    The maximum lifetime of the generated token
    token_no_default_policy bool
    If true, the 'default' policy will not automatically be added to generated tokens
    token_num_uses int
    The maximum number of times a token may be used, a value of zero means unlimited
    token_period int
    Generated Token's Period
    token_policies Sequence[str]
    Generated Token's Policies
    token_ttl int
    The initial ttl of the token to generate in seconds
    token_type str
    The type of token to generate, service or batch
    tpm_ids Sequence[str]
    Set of TPM record IDs authorized to authenticate with this role. These are the unique IDs assigned by Vault to TPM records (SHA256 of the EK public key). At least one of tpmIds or tpmgroupIds must be specified.
    tpmgroup_ids Sequence[str]
    Set of TPM group IDs authorized to authenticate with this role. At least one of tpmIds or tpmgroupIds must be specified.
    mount String
    TPM auth backend mount path.
    aliasMetadata Map<String>
    A map of string to string that will be set as metadata on the identity alias
    certTtl Number
    Certificate TTL for the TPM role, in seconds. If not specified, uses the backend's default.
    displayName String
    Display name for the role. Defaults to the role name.
    name String
    Name of the TPM role.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace.
    tokenBoundCidrs List<String>
    Specifies the blocks of IP addresses which are allowed to use the generated token
    tokenExplicitMaxTtl Number
    Generated Token's Explicit Maximum TTL in seconds
    tokenMaxTtl Number
    The maximum lifetime of the generated token
    tokenNoDefaultPolicy Boolean
    If true, the 'default' policy will not automatically be added to generated tokens
    tokenNumUses Number
    The maximum number of times a token may be used, a value of zero means unlimited
    tokenPeriod Number
    Generated Token's Period
    tokenPolicies List<String>
    Generated Token's Policies
    tokenTtl Number
    The initial ttl of the token to generate in seconds
    tokenType String
    The type of token to generate, service or batch
    tpmIds List<String>
    Set of TPM record IDs authorized to authenticate with this role. These are the unique IDs assigned by Vault to TPM records (SHA256 of the EK public key). At least one of tpmIds or tpmgroupIds must be specified.
    tpmgroupIds List<String>
    Set of TPM group IDs authorized to authenticate with this role. At least one of tpmIds or tpmgroupIds must be specified.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TpmAuthBackendRole 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 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 TpmAuthBackendRole Resource

    Get an existing TpmAuthBackendRole 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?: TpmAuthBackendRoleState, opts?: CustomResourceOptions): TpmAuthBackendRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alias_metadata: Optional[Mapping[str, str]] = None,
            cert_ttl: Optional[int] = None,
            display_name: Optional[str] = None,
            mount: Optional[str] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            token_bound_cidrs: Optional[Sequence[str]] = None,
            token_explicit_max_ttl: Optional[int] = None,
            token_max_ttl: Optional[int] = None,
            token_no_default_policy: Optional[bool] = None,
            token_num_uses: Optional[int] = None,
            token_period: Optional[int] = None,
            token_policies: Optional[Sequence[str]] = None,
            token_ttl: Optional[int] = None,
            token_type: Optional[str] = None,
            tpm_ids: Optional[Sequence[str]] = None,
            tpmgroup_ids: Optional[Sequence[str]] = None) -> TpmAuthBackendRole
    func GetTpmAuthBackendRole(ctx *Context, name string, id IDInput, state *TpmAuthBackendRoleState, opts ...ResourceOption) (*TpmAuthBackendRole, error)
    public static TpmAuthBackendRole Get(string name, Input<string> id, TpmAuthBackendRoleState? state, CustomResourceOptions? opts = null)
    public static TpmAuthBackendRole get(String name, Output<String> id, TpmAuthBackendRoleState state, CustomResourceOptions options)
    resources:  _:    type: vault:TpmAuthBackendRole    get:      id: ${id}
    import {
      to = vault_tpm_auth_backend_role.example
      id = "${id}"
    }
    
    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:
    AliasMetadata Dictionary<string, string>
    A map of string to string that will be set as metadata on the identity alias
    CertTtl int
    Certificate TTL for the TPM role, in seconds. If not specified, uses the backend's default.
    DisplayName string
    Display name for the role. Defaults to the role name.
    Mount string
    TPM auth backend mount path.
    Name string
    Name of the TPM role.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace.
    TokenBoundCidrs List<string>
    Specifies the blocks of IP addresses which are allowed to use the generated token
    TokenExplicitMaxTtl int
    Generated Token's Explicit Maximum TTL in seconds
    TokenMaxTtl int
    The maximum lifetime of the generated token
    TokenNoDefaultPolicy bool
    If true, the 'default' policy will not automatically be added to generated tokens
    TokenNumUses int
    The maximum number of times a token may be used, a value of zero means unlimited
    TokenPeriod int
    Generated Token's Period
    TokenPolicies List<string>
    Generated Token's Policies
    TokenTtl int
    The initial ttl of the token to generate in seconds
    TokenType string
    The type of token to generate, service or batch
    TpmIds List<string>
    Set of TPM record IDs authorized to authenticate with this role. These are the unique IDs assigned by Vault to TPM records (SHA256 of the EK public key). At least one of tpmIds or tpmgroupIds must be specified.
    TpmgroupIds List<string>
    Set of TPM group IDs authorized to authenticate with this role. At least one of tpmIds or tpmgroupIds must be specified.
    AliasMetadata map[string]string
    A map of string to string that will be set as metadata on the identity alias
    CertTtl int
    Certificate TTL for the TPM role, in seconds. If not specified, uses the backend's default.
    DisplayName string
    Display name for the role. Defaults to the role name.
    Mount string
    TPM auth backend mount path.
    Name string
    Name of the TPM role.
    Namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace.
    TokenBoundCidrs []string
    Specifies the blocks of IP addresses which are allowed to use the generated token
    TokenExplicitMaxTtl int
    Generated Token's Explicit Maximum TTL in seconds
    TokenMaxTtl int
    The maximum lifetime of the generated token
    TokenNoDefaultPolicy bool
    If true, the 'default' policy will not automatically be added to generated tokens
    TokenNumUses int
    The maximum number of times a token may be used, a value of zero means unlimited
    TokenPeriod int
    Generated Token's Period
    TokenPolicies []string
    Generated Token's Policies
    TokenTtl int
    The initial ttl of the token to generate in seconds
    TokenType string
    The type of token to generate, service or batch
    TpmIds []string
    Set of TPM record IDs authorized to authenticate with this role. These are the unique IDs assigned by Vault to TPM records (SHA256 of the EK public key). At least one of tpmIds or tpmgroupIds must be specified.
    TpmgroupIds []string
    Set of TPM group IDs authorized to authenticate with this role. At least one of tpmIds or tpmgroupIds must be specified.
    alias_metadata map(string)
    A map of string to string that will be set as metadata on the identity alias
    cert_ttl number
    Certificate TTL for the TPM role, in seconds. If not specified, uses the backend's default.
    display_name string
    Display name for the role. Defaults to the role name.
    mount string
    TPM auth backend mount path.
    name string
    Name of the TPM role.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace.
    token_bound_cidrs list(string)
    Specifies the blocks of IP addresses which are allowed to use the generated token
    token_explicit_max_ttl number
    Generated Token's Explicit Maximum TTL in seconds
    token_max_ttl number
    The maximum lifetime of the generated token
    token_no_default_policy bool
    If true, the 'default' policy will not automatically be added to generated tokens
    token_num_uses number
    The maximum number of times a token may be used, a value of zero means unlimited
    token_period number
    Generated Token's Period
    token_policies list(string)
    Generated Token's Policies
    token_ttl number
    The initial ttl of the token to generate in seconds
    token_type string
    The type of token to generate, service or batch
    tpm_ids list(string)
    Set of TPM record IDs authorized to authenticate with this role. These are the unique IDs assigned by Vault to TPM records (SHA256 of the EK public key). At least one of tpmIds or tpmgroupIds must be specified.
    tpmgroup_ids list(string)
    Set of TPM group IDs authorized to authenticate with this role. At least one of tpmIds or tpmgroupIds must be specified.
    aliasMetadata Map<String,String>
    A map of string to string that will be set as metadata on the identity alias
    certTtl Integer
    Certificate TTL for the TPM role, in seconds. If not specified, uses the backend's default.
    displayName String
    Display name for the role. Defaults to the role name.
    mount String
    TPM auth backend mount path.
    name String
    Name of the TPM role.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace.
    tokenBoundCidrs List<String>
    Specifies the blocks of IP addresses which are allowed to use the generated token
    tokenExplicitMaxTtl Integer
    Generated Token's Explicit Maximum TTL in seconds
    tokenMaxTtl Integer
    The maximum lifetime of the generated token
    tokenNoDefaultPolicy Boolean
    If true, the 'default' policy will not automatically be added to generated tokens
    tokenNumUses Integer
    The maximum number of times a token may be used, a value of zero means unlimited
    tokenPeriod Integer
    Generated Token's Period
    tokenPolicies List<String>
    Generated Token's Policies
    tokenTtl Integer
    The initial ttl of the token to generate in seconds
    tokenType String
    The type of token to generate, service or batch
    tpmIds List<String>
    Set of TPM record IDs authorized to authenticate with this role. These are the unique IDs assigned by Vault to TPM records (SHA256 of the EK public key). At least one of tpmIds or tpmgroupIds must be specified.
    tpmgroupIds List<String>
    Set of TPM group IDs authorized to authenticate with this role. At least one of tpmIds or tpmgroupIds must be specified.
    aliasMetadata {[key: string]: string}
    A map of string to string that will be set as metadata on the identity alias
    certTtl number
    Certificate TTL for the TPM role, in seconds. If not specified, uses the backend's default.
    displayName string
    Display name for the role. Defaults to the role name.
    mount string
    TPM auth backend mount path.
    name string
    Name of the TPM role.
    namespace string
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace.
    tokenBoundCidrs string[]
    Specifies the blocks of IP addresses which are allowed to use the generated token
    tokenExplicitMaxTtl number
    Generated Token's Explicit Maximum TTL in seconds
    tokenMaxTtl number
    The maximum lifetime of the generated token
    tokenNoDefaultPolicy boolean
    If true, the 'default' policy will not automatically be added to generated tokens
    tokenNumUses number
    The maximum number of times a token may be used, a value of zero means unlimited
    tokenPeriod number
    Generated Token's Period
    tokenPolicies string[]
    Generated Token's Policies
    tokenTtl number
    The initial ttl of the token to generate in seconds
    tokenType string
    The type of token to generate, service or batch
    tpmIds string[]
    Set of TPM record IDs authorized to authenticate with this role. These are the unique IDs assigned by Vault to TPM records (SHA256 of the EK public key). At least one of tpmIds or tpmgroupIds must be specified.
    tpmgroupIds string[]
    Set of TPM group IDs authorized to authenticate with this role. At least one of tpmIds or tpmgroupIds must be specified.
    alias_metadata Mapping[str, str]
    A map of string to string that will be set as metadata on the identity alias
    cert_ttl int
    Certificate TTL for the TPM role, in seconds. If not specified, uses the backend's default.
    display_name str
    Display name for the role. Defaults to the role name.
    mount str
    TPM auth backend mount path.
    name str
    Name of the TPM role.
    namespace str
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace.
    token_bound_cidrs Sequence[str]
    Specifies the blocks of IP addresses which are allowed to use the generated token
    token_explicit_max_ttl int
    Generated Token's Explicit Maximum TTL in seconds
    token_max_ttl int
    The maximum lifetime of the generated token
    token_no_default_policy bool
    If true, the 'default' policy will not automatically be added to generated tokens
    token_num_uses int
    The maximum number of times a token may be used, a value of zero means unlimited
    token_period int
    Generated Token's Period
    token_policies Sequence[str]
    Generated Token's Policies
    token_ttl int
    The initial ttl of the token to generate in seconds
    token_type str
    The type of token to generate, service or batch
    tpm_ids Sequence[str]
    Set of TPM record IDs authorized to authenticate with this role. These are the unique IDs assigned by Vault to TPM records (SHA256 of the EK public key). At least one of tpmIds or tpmgroupIds must be specified.
    tpmgroup_ids Sequence[str]
    Set of TPM group IDs authorized to authenticate with this role. At least one of tpmIds or tpmgroupIds must be specified.
    aliasMetadata Map<String>
    A map of string to string that will be set as metadata on the identity alias
    certTtl Number
    Certificate TTL for the TPM role, in seconds. If not specified, uses the backend's default.
    displayName String
    Display name for the role. Defaults to the role name.
    mount String
    TPM auth backend mount path.
    name String
    Name of the TPM role.
    namespace String
    The namespace to provision the resource in. The value should not contain leading or trailing forward slashes. The namespace is always relative to the provider's configured namespace.
    tokenBoundCidrs List<String>
    Specifies the blocks of IP addresses which are allowed to use the generated token
    tokenExplicitMaxTtl Number
    Generated Token's Explicit Maximum TTL in seconds
    tokenMaxTtl Number
    The maximum lifetime of the generated token
    tokenNoDefaultPolicy Boolean
    If true, the 'default' policy will not automatically be added to generated tokens
    tokenNumUses Number
    The maximum number of times a token may be used, a value of zero means unlimited
    tokenPeriod Number
    Generated Token's Period
    tokenPolicies List<String>
    Generated Token's Policies
    tokenTtl Number
    The initial ttl of the token to generate in seconds
    tokenType String
    The type of token to generate, service or batch
    tpmIds List<String>
    Set of TPM record IDs authorized to authenticate with this role. These are the unique IDs assigned by Vault to TPM records (SHA256 of the EK public key). At least one of tpmIds or tpmgroupIds must be specified.
    tpmgroupIds List<String>
    Set of TPM group IDs authorized to authenticate with this role. At least one of tpmIds or tpmgroupIds must be specified.

    Import

    TPM auth backend roles can be imported using the resource’s id. In the case of the example above the id would be auth/tpm/role/example-role, where the tpm component is the resource’s mount, e.g.

    $ pulumi import vault:index/tpmAuthBackendRole:TpmAuthBackendRole example auth/tpm/role/example-role
    

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

    Package Details

    Repository
    Vault pulumi/pulumi-vault
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vault Terraform Provider.
    vault logo vault logo
    Viewing docs for HashiCorp Vault v7.14.0
    published on Thursday, Oct 15, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial