1. Packages
  2. Packages
  3. HashiCorp Vault Provider
  4. API Docs
  5. spiffe
  6. AuthBackendRole
Viewing docs for HashiCorp Vault v7.11.0
published on Wednesday, Jul 22, 2026 by Pulumi
vault logo vault logo
Viewing docs for HashiCorp Vault v7.11.0
published on Wednesday, Jul 22, 2026 by Pulumi

    Manage a named role within a SPIFFE auth backend. The role defines a mapping from SPIFFE IDs to Vault policies along with other parameters that influence the token that gets created upon successful authentication.

    Important All data provided in the resource configuration will be written in cleartext to state and plan files generated by Terraform, and will appear in the console output when Terraform runs. Protect these artifacts accordingly. See the main provider documentation for more details.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const spiffeMount = new vault.AuthBackend("spiffe_mount", {
        type: "spiffe",
        path: "spiffe",
        tune: {
            passthroughRequestHeaders: ["Authorization"],
        },
    });
    const spiffeRole = new vault.spiffe.AuthBackendRole("spiffe_role", {
        mount: spiffeMount.path,
        name: "example-role",
        workloadIdPatterns: [
            "/env/+/svc/web",
            "/env/+/svc/db",
        ],
        tokenTtl: 3600,
        tokenMaxTtl: 7200,
        tokenPolicies: ["example"],
        tokenBoundCidrs: ["127.0.0.1"],
        tokenExplicitMaxTtl: 10800,
        tokenNoDefaultPolicy: true,
        tokenNumUses: 1,
        tokenPeriod: 60,
        tokenType: "service",
        aliasMetadata: {
            "metadata-key": "metadata-value",
        },
    });
    
    import pulumi
    import pulumi_vault as vault
    
    spiffe_mount = vault.AuthBackend("spiffe_mount",
        type="spiffe",
        path="spiffe",
        tune={
            "passthrough_request_headers": ["Authorization"],
        })
    spiffe_role = vault.spiffe.AuthBackendRole("spiffe_role",
        mount=spiffe_mount.path,
        name="example-role",
        workload_id_patterns=[
            "/env/+/svc/web",
            "/env/+/svc/db",
        ],
        token_ttl=3600,
        token_max_ttl=7200,
        token_policies=["example"],
        token_bound_cidrs=["127.0.0.1"],
        token_explicit_max_ttl=10800,
        token_no_default_policy=True,
        token_num_uses=1,
        token_period=60,
        token_type="service",
        alias_metadata={
            "metadata-key": "metadata-value",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v7/go/vault"
    	"github.com/pulumi/pulumi-vault/sdk/v7/go/vault/spiffe"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		spiffeMount, err := vault.NewAuthBackend(ctx, "spiffe_mount", &vault.AuthBackendArgs{
    			Type: pulumi.String("spiffe"),
    			Path: pulumi.String("spiffe"),
    			Tune: &vault.AuthBackendTuneArgs{
    				PassthroughRequestHeaders: pulumi.StringArray{
    					pulumi.String("Authorization"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = spiffe.NewAuthBackendRole(ctx, "spiffe_role", &spiffe.AuthBackendRoleArgs{
    			Mount: spiffeMount.Path,
    			Name:  pulumi.String("example-role"),
    			WorkloadIdPatterns: pulumi.StringArray{
    				pulumi.String("/env/+/svc/web"),
    				pulumi.String("/env/+/svc/db"),
    			},
    			TokenTtl:    pulumi.Int(3600),
    			TokenMaxTtl: pulumi.Int(7200),
    			TokenPolicies: pulumi.StringArray{
    				pulumi.String("example"),
    			},
    			TokenBoundCidrs: pulumi.StringArray{
    				pulumi.String("127.0.0.1"),
    			},
    			TokenExplicitMaxTtl:  pulumi.Int(10800),
    			TokenNoDefaultPolicy: pulumi.Bool(true),
    			TokenNumUses:         pulumi.Int(1),
    			TokenPeriod:          pulumi.Int(60),
    			TokenType:            pulumi.String("service"),
    			AliasMetadata: pulumi.StringMap{
    				"metadata-key": pulumi.String("metadata-value"),
    			},
    		})
    		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 spiffeMount = new Vault.AuthBackend("spiffe_mount", new()
        {
            Type = "spiffe",
            Path = "spiffe",
            Tune = new Vault.Inputs.AuthBackendTuneArgs
            {
                PassthroughRequestHeaders = new[]
                {
                    "Authorization",
                },
            },
        });
    
        var spiffeRole = new Vault.Spiffe.AuthBackendRole("spiffe_role", new()
        {
            Mount = spiffeMount.Path,
            Name = "example-role",
            WorkloadIdPatterns = new[]
            {
                "/env/+/svc/web",
                "/env/+/svc/db",
            },
            TokenTtl = 3600,
            TokenMaxTtl = 7200,
            TokenPolicies = new[]
            {
                "example",
            },
            TokenBoundCidrs = new[]
            {
                "127.0.0.1",
            },
            TokenExplicitMaxTtl = 10800,
            TokenNoDefaultPolicy = true,
            TokenNumUses = 1,
            TokenPeriod = 60,
            TokenType = "service",
            AliasMetadata = 
            {
                { "metadata-key", "metadata-value" },
            },
        });
    
    });
    
    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.inputs.AuthBackendTuneArgs;
    import com.pulumi.vault.spiffe.AuthBackendRole;
    import com.pulumi.vault.spiffe.AuthBackendRoleArgs;
    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 spiffeMount = new AuthBackend("spiffeMount", AuthBackendArgs.builder()
                .type("spiffe")
                .path("spiffe")
                .tune(AuthBackendTuneArgs.builder()
                    .passthroughRequestHeaders("Authorization")
                    .build())
                .build());
    
            var spiffeRole = new AuthBackendRole("spiffeRole", AuthBackendRoleArgs.builder()
                .mount(spiffeMount.path())
                .name("example-role")
                .workloadIdPatterns(            
                    "/env/+/svc/web",
                    "/env/+/svc/db")
                .tokenTtl(3600)
                .tokenMaxTtl(7200)
                .tokenPolicies("example")
                .tokenBoundCidrs("127.0.0.1")
                .tokenExplicitMaxTtl(10800)
                .tokenNoDefaultPolicy(true)
                .tokenNumUses(1)
                .tokenPeriod(60)
                .tokenType("service")
                .aliasMetadata(Map.of("metadata-key", "metadata-value"))
                .build());
    
        }
    }
    
    resources:
      spiffeMount:
        type: vault:AuthBackend
        name: spiffe_mount
        properties:
          type: spiffe
          path: spiffe
          tune:
            passthroughRequestHeaders:
              - Authorization
      spiffeRole:
        type: vault:spiffe:AuthBackendRole
        name: spiffe_role
        properties:
          mount: ${spiffeMount.path}
          name: example-role
          workloadIdPatterns:
            - /env/+/svc/web
            - /env/+/svc/db
          tokenTtl: 3600
          tokenMaxTtl: 7200
          tokenPolicies:
            - example
          tokenBoundCidrs:
            - 127.0.0.1
          tokenExplicitMaxTtl: 10800
          tokenNoDefaultPolicy: true
          tokenNumUses: 1
          tokenPeriod: 60
          tokenType: service
          aliasMetadata:
            metadata-key: metadata-value
    
    pulumi {
      required_providers {
        vault = {
          source = "pulumi/vault"
        }
      }
    }
    
    resource "vault_authbackend" "spiffe_mount" {
      type = "spiffe"
      path = "spiffe"
      tune = {
        passthrough_request_headers = ["Authorization"]
      }
    }
    resource "vault_spiffe_authbackendrole" "spiffe_role" {
      mount                   = vault_authbackend.spiffe_mount.path
      name                    = "example-role"
      workload_id_patterns    = ["/env/+/svc/web", "/env/+/svc/db"]
      token_ttl               = 3600
      token_max_ttl           = 7200
      token_policies          = ["example"]
      token_bound_cidrs       = ["127.0.0.1"]
      token_explicit_max_ttl  = 10800
      token_no_default_policy = true
      token_num_uses          = 1
      token_period            = 60
      token_type              = "service"
      alias_metadata = {
        "metadata-key" = "metadata-value"
      }
    }
    

    Create AuthBackendRole Resource

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

    Constructor syntax

    new AuthBackendRole(name: string, args: AuthBackendRoleArgs, opts?: CustomResourceOptions);
    @overload
    def AuthBackendRole(resource_name: str,
                        args: AuthBackendRoleArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def AuthBackendRole(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        mount: Optional[str] = None,
                        token_explicit_max_ttl: Optional[int] = None,
                        token_no_default_policy: Optional[bool] = None,
                        name: Optional[str] = None,
                        namespace: Optional[str] = None,
                        token_bound_cidrs: Optional[Sequence[str]] = None,
                        alias_metadata: Optional[Mapping[str, str]] = None,
                        token_max_ttl: Optional[int] = None,
                        display_name: Optional[str] = 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,
                        workload_id_patterns: Optional[Sequence[str]] = None)
    func NewAuthBackendRole(ctx *Context, name string, args AuthBackendRoleArgs, opts ...ResourceOption) (*AuthBackendRole, error)
    public AuthBackendRole(string name, AuthBackendRoleArgs args, CustomResourceOptions? opts = null)
    public AuthBackendRole(String name, AuthBackendRoleArgs args)
    public AuthBackendRole(String name, AuthBackendRoleArgs args, CustomResourceOptions options)
    
    type: vault:spiffe:AuthBackendRole
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "vault_spiffe_auth_backend_role" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args AuthBackendRoleArgs
    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 AuthBackendRoleArgs
    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 AuthBackendRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AuthBackendRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AuthBackendRoleArgs
    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 exampleauthBackendRoleResourceResourceFromSpiffeauthBackendRole = new Vault.Spiffe.AuthBackendRole("exampleauthBackendRoleResourceResourceFromSpiffeauthBackendRole", new()
    {
        Mount = "string",
        TokenExplicitMaxTtl = 0,
        TokenNoDefaultPolicy = false,
        Name = "string",
        Namespace = "string",
        TokenBoundCidrs = new[]
        {
            "string",
        },
        AliasMetadata = 
        {
            { "string", "string" },
        },
        TokenMaxTtl = 0,
        DisplayName = "string",
        TokenNumUses = 0,
        TokenPeriod = 0,
        TokenPolicies = new[]
        {
            "string",
        },
        TokenTtl = 0,
        TokenType = "string",
        WorkloadIdPatterns = new[]
        {
            "string",
        },
    });
    
    example, err := spiffe.NewAuthBackendRole(ctx, "exampleauthBackendRoleResourceResourceFromSpiffeauthBackendRole", &spiffe.AuthBackendRoleArgs{
    	Mount:                pulumi.String("string"),
    	TokenExplicitMaxTtl:  pulumi.Int(0),
    	TokenNoDefaultPolicy: pulumi.Bool(false),
    	Name:                 pulumi.String("string"),
    	Namespace:            pulumi.String("string"),
    	TokenBoundCidrs: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	AliasMetadata: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TokenMaxTtl:  pulumi.Int(0),
    	DisplayName:  pulumi.String("string"),
    	TokenNumUses: pulumi.Int(0),
    	TokenPeriod:  pulumi.Int(0),
    	TokenPolicies: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TokenTtl:  pulumi.Int(0),
    	TokenType: pulumi.String("string"),
    	WorkloadIdPatterns: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    resource "vault_spiffe_auth_backend_role" "exampleauthBackendRoleResourceResourceFromSpiffeauthBackendRole" {
      lifecycle {
        create_before_destroy = true
      }
      mount                   = "string"
      token_explicit_max_ttl  = 0
      token_no_default_policy = false
      name                    = "string"
      namespace               = "string"
      token_bound_cidrs       = ["string"]
      alias_metadata = {
        "string" = "string"
      }
      token_max_ttl        = 0
      display_name         = "string"
      token_num_uses       = 0
      token_period         = 0
      token_policies       = ["string"]
      token_ttl            = 0
      token_type           = "string"
      workload_id_patterns = ["string"]
    }
    
    var exampleauthBackendRoleResourceResourceFromSpiffeauthBackendRole = new com.pulumi.vault.spiffe.AuthBackendRole("exampleauthBackendRoleResourceResourceFromSpiffeauthBackendRole", com.pulumi.vault.spiffe.AuthBackendRoleArgs.builder()
        .mount("string")
        .tokenExplicitMaxTtl(0)
        .tokenNoDefaultPolicy(false)
        .name("string")
        .namespace("string")
        .tokenBoundCidrs("string")
        .aliasMetadata(Map.of("string", "string"))
        .tokenMaxTtl(0)
        .displayName("string")
        .tokenNumUses(0)
        .tokenPeriod(0)
        .tokenPolicies("string")
        .tokenTtl(0)
        .tokenType("string")
        .workloadIdPatterns("string")
        .build());
    
    exampleauth_backend_role_resource_resource_from_spiffeauth_backend_role = vault.spiffe.AuthBackendRole("exampleauthBackendRoleResourceResourceFromSpiffeauthBackendRole",
        mount="string",
        token_explicit_max_ttl=0,
        token_no_default_policy=False,
        name="string",
        namespace="string",
        token_bound_cidrs=["string"],
        alias_metadata={
            "string": "string",
        },
        token_max_ttl=0,
        display_name="string",
        token_num_uses=0,
        token_period=0,
        token_policies=["string"],
        token_ttl=0,
        token_type="string",
        workload_id_patterns=["string"])
    
    const exampleauthBackendRoleResourceResourceFromSpiffeauthBackendRole = new vault.spiffe.AuthBackendRole("exampleauthBackendRoleResourceResourceFromSpiffeauthBackendRole", {
        mount: "string",
        tokenExplicitMaxTtl: 0,
        tokenNoDefaultPolicy: false,
        name: "string",
        namespace: "string",
        tokenBoundCidrs: ["string"],
        aliasMetadata: {
            string: "string",
        },
        tokenMaxTtl: 0,
        displayName: "string",
        tokenNumUses: 0,
        tokenPeriod: 0,
        tokenPolicies: ["string"],
        tokenTtl: 0,
        tokenType: "string",
        workloadIdPatterns: ["string"],
    });
    
    type: vault:spiffe:AuthBackendRole
    properties:
        aliasMetadata:
            string: string
        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
        workloadIdPatterns:
            - string
    

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

    Mount string
    The PKI secret backend the resource belongs to.
    AliasMetadata Dictionary<string, string>
    A map of string to string that will be set as metadata on the identity alias
    DisplayName string
    The human-readable name for tokens issued when authenticating against the role. Defaults to the value provided for mount.
    Name string
    Name of the SPIFFE auth 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. Available only for Vault Enterprise.
    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
    WorkloadIdPatterns List<string>
    A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.
    Mount string
    The PKI secret backend the resource belongs to.
    AliasMetadata map[string]string
    A map of string to string that will be set as metadata on the identity alias
    DisplayName string
    The human-readable name for tokens issued when authenticating against the role. Defaults to the value provided for mount.
    Name string
    Name of the SPIFFE auth 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. Available only for Vault Enterprise.
    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
    WorkloadIdPatterns []string
    A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.
    mount string
    The PKI secret backend the resource belongs to.
    alias_metadata map(string)
    A map of string to string that will be set as metadata on the identity alias
    display_name string
    The human-readable name for tokens issued when authenticating against the role. Defaults to the value provided for mount.
    name string
    Name of the SPIFFE auth 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. Available only for Vault Enterprise.
    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
    workload_id_patterns list(string)
    A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.
    mount String
    The PKI secret backend the resource belongs to.
    aliasMetadata Map<String,String>
    A map of string to string that will be set as metadata on the identity alias
    displayName String
    The human-readable name for tokens issued when authenticating against the role. Defaults to the value provided for mount.
    name String
    Name of the SPIFFE auth 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. Available only for Vault Enterprise.
    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
    workloadIdPatterns List<String>
    A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.
    mount string
    The PKI secret backend the resource belongs to.
    aliasMetadata {[key: string]: string}
    A map of string to string that will be set as metadata on the identity alias
    displayName string
    The human-readable name for tokens issued when authenticating against the role. Defaults to the value provided for mount.
    name string
    Name of the SPIFFE auth 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. Available only for Vault Enterprise.
    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
    workloadIdPatterns string[]
    A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.
    mount str
    The PKI secret backend the resource belongs to.
    alias_metadata Mapping[str, str]
    A map of string to string that will be set as metadata on the identity alias
    display_name str
    The human-readable name for tokens issued when authenticating against the role. Defaults to the value provided for mount.
    name str
    Name of the SPIFFE auth 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. Available only for Vault Enterprise.
    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
    workload_id_patterns Sequence[str]
    A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.
    mount String
    The PKI secret backend the resource belongs to.
    aliasMetadata Map<String>
    A map of string to string that will be set as metadata on the identity alias
    displayName String
    The human-readable name for tokens issued when authenticating against the role. Defaults to the value provided for mount.
    name String
    Name of the SPIFFE auth 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. Available only for Vault Enterprise.
    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
    workloadIdPatterns List<String>
    A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.

    Outputs

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

    Get an existing AuthBackendRole 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?: AuthBackendRoleState, opts?: CustomResourceOptions): AuthBackendRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alias_metadata: Optional[Mapping[str, str]] = 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,
            workload_id_patterns: Optional[Sequence[str]] = None) -> AuthBackendRole
    func GetAuthBackendRole(ctx *Context, name string, id IDInput, state *AuthBackendRoleState, opts ...ResourceOption) (*AuthBackendRole, error)
    public static AuthBackendRole Get(string name, Input<string> id, AuthBackendRoleState? state, CustomResourceOptions? opts = null)
    public static AuthBackendRole get(String name, Output<String> id, AuthBackendRoleState state, CustomResourceOptions options)
    resources:  _:    type: vault:spiffe:AuthBackendRole    get:      id: ${id}
    import {
      to = vault_spiffe_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
    DisplayName string
    The human-readable name for tokens issued when authenticating against the role. Defaults to the value provided for mount.
    Mount string
    The PKI secret backend the resource belongs to.
    Name string
    Name of the SPIFFE auth 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. Available only for Vault Enterprise.
    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
    WorkloadIdPatterns List<string>
    A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.
    AliasMetadata map[string]string
    A map of string to string that will be set as metadata on the identity alias
    DisplayName string
    The human-readable name for tokens issued when authenticating against the role. Defaults to the value provided for mount.
    Mount string
    The PKI secret backend the resource belongs to.
    Name string
    Name of the SPIFFE auth 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. Available only for Vault Enterprise.
    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
    WorkloadIdPatterns []string
    A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.
    alias_metadata map(string)
    A map of string to string that will be set as metadata on the identity alias
    display_name string
    The human-readable name for tokens issued when authenticating against the role. Defaults to the value provided for mount.
    mount string
    The PKI secret backend the resource belongs to.
    name string
    Name of the SPIFFE auth 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. Available only for Vault Enterprise.
    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
    workload_id_patterns list(string)
    A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.
    aliasMetadata Map<String,String>
    A map of string to string that will be set as metadata on the identity alias
    displayName String
    The human-readable name for tokens issued when authenticating against the role. Defaults to the value provided for mount.
    mount String
    The PKI secret backend the resource belongs to.
    name String
    Name of the SPIFFE auth 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. Available only for Vault Enterprise.
    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
    workloadIdPatterns List<String>
    A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.
    aliasMetadata {[key: string]: string}
    A map of string to string that will be set as metadata on the identity alias
    displayName string
    The human-readable name for tokens issued when authenticating against the role. Defaults to the value provided for mount.
    mount string
    The PKI secret backend the resource belongs to.
    name string
    Name of the SPIFFE auth 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. Available only for Vault Enterprise.
    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
    workloadIdPatterns string[]
    A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.
    alias_metadata Mapping[str, str]
    A map of string to string that will be set as metadata on the identity alias
    display_name str
    The human-readable name for tokens issued when authenticating against the role. Defaults to the value provided for mount.
    mount str
    The PKI secret backend the resource belongs to.
    name str
    Name of the SPIFFE auth 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. Available only for Vault Enterprise.
    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
    workload_id_patterns Sequence[str]
    A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.
    aliasMetadata Map<String>
    A map of string to string that will be set as metadata on the identity alias
    displayName String
    The human-readable name for tokens issued when authenticating against the role. Defaults to the value provided for mount.
    mount String
    The PKI secret backend the resource belongs to.
    name String
    Name of the SPIFFE auth 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. Available only for Vault Enterprise.
    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
    workloadIdPatterns List<String>
    A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.

    Import

    The SPIFFE role can be imported using the resource’s id. In the case of the example above the id would be auth/spiffe/role/example-role, where the spiffe component is the resource’s mount, e.g.

    $ pulumi import vault:spiffe/authBackendRole:AuthBackendRole spiffe_role auth/spiffe/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.11.0
    published on Wednesday, Jul 22, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial