published on Wednesday, Jul 22, 2026 by Pulumi
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.
- Alias
Metadata Dictionary<string, 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
namespaceis always relative to the provider's configured namespace. Available only for Vault Enterprise. - Token
Bound List<string>Cidrs - Specifies the blocks of IP addresses which are allowed to use the generated token
- Token
Explicit intMax Ttl - Generated Token's Explicit Maximum TTL in seconds
- Token
Max intTtl - The maximum lifetime of the generated token
- Token
No boolDefault Policy - If true, the 'default' policy will not automatically be added to generated tokens
- Token
Num intUses - 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 List<string> - Generated Token's Policies
- Token
Ttl int - The initial ttl of the token to generate in seconds
- Token
Type string - The type of token to generate, service or batch
- Workload
Id List<string>Patterns - 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]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
namespaceis always relative to the provider's configured namespace. Available only for Vault Enterprise. - Token
Bound []stringCidrs - Specifies the blocks of IP addresses which are allowed to use the generated token
- Token
Explicit intMax Ttl - Generated Token's Explicit Maximum TTL in seconds
- Token
Max intTtl - The maximum lifetime of the generated token
- Token
No boolDefault Policy - If true, the 'default' policy will not automatically be added to generated tokens
- Token
Num intUses - 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 []string - Generated Token's Policies
- Token
Ttl int - The initial ttl of the token to generate in seconds
- Token
Type string - The type of token to generate, service or batch
- Workload
Id []stringPatterns - 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
namespaceis always relative to the provider's configured namespace. Available only for Vault Enterprise. - token_
bound_ list(string)cidrs - Specifies the blocks of IP addresses which are allowed to use the generated token
- token_
explicit_ numbermax_ ttl - Generated Token's Explicit Maximum TTL in seconds
- token_
max_ numberttl - The maximum lifetime of the generated token
- token_
no_ booldefault_ policy - If true, the 'default' policy will not automatically be added to generated tokens
- token_
num_ numberuses - 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_ list(string)patterns - 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,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
namespaceis always relative to the provider's configured namespace. Available only for Vault Enterprise. - token
Bound List<String>Cidrs - Specifies the blocks of IP addresses which are allowed to use the generated token
- token
Explicit IntegerMax Ttl - Generated Token's Explicit Maximum TTL in seconds
- token
Max IntegerTtl - The maximum lifetime of the generated token
- token
No BooleanDefault Policy - If true, the 'default' policy will not automatically be added to generated tokens
- token
Num IntegerUses - The maximum number of times a token may be used, a value of zero means unlimited
- token
Period Integer - Generated Token's Period
- token
Policies List<String> - Generated Token's Policies
- token
Ttl Integer - The initial ttl of the token to generate in seconds
- token
Type String - The type of token to generate, service or batch
- workload
Id List<String>Patterns - 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 {[key: string]: 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
namespaceis always relative to the provider's configured namespace. Available only for Vault Enterprise. - token
Bound string[]Cidrs - Specifies the blocks of IP addresses which are allowed to use the generated token
- token
Explicit numberMax Ttl - Generated Token's Explicit Maximum TTL in seconds
- token
Max numberTtl - The maximum lifetime of the generated token
- token
No booleanDefault Policy - If true, the 'default' policy will not automatically be added to generated tokens
- token
Num numberUses - 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 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 string[]Patterns - 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
namespaceis always relative to the provider's configured namespace. Available only for Vault Enterprise. - token_
bound_ Sequence[str]cidrs - Specifies the blocks of IP addresses which are allowed to use the generated token
- token_
explicit_ intmax_ ttl - Generated Token's Explicit Maximum TTL in seconds
- token_
max_ intttl - The maximum lifetime of the generated token
- token_
no_ booldefault_ policy - If true, the 'default' policy will not automatically be added to generated tokens
- token_
num_ intuses - 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_ Sequence[str]patterns - 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
namespaceis always relative to the provider's configured namespace. Available only for Vault Enterprise. - token
Bound List<String>Cidrs - Specifies the blocks of IP addresses which are allowed to use the generated token
- token
Explicit NumberMax Ttl - Generated Token's Explicit Maximum TTL in seconds
- token
Max NumberTtl - The maximum lifetime of the generated token
- token
No BooleanDefault Policy - If true, the 'default' policy will not automatically be added to generated tokens
- token
Num NumberUses - 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 List<String>Patterns - 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) -> AuthBackendRolefunc 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.
- Alias
Metadata Dictionary<string, 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
namespaceis always relative to the provider's configured namespace. Available only for Vault Enterprise. - Token
Bound List<string>Cidrs - Specifies the blocks of IP addresses which are allowed to use the generated token
- Token
Explicit intMax Ttl - Generated Token's Explicit Maximum TTL in seconds
- Token
Max intTtl - The maximum lifetime of the generated token
- Token
No boolDefault Policy - If true, the 'default' policy will not automatically be added to generated tokens
- Token
Num intUses - 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 List<string> - Generated Token's Policies
- Token
Ttl int - The initial ttl of the token to generate in seconds
- Token
Type string - The type of token to generate, service or batch
- Workload
Id List<string>Patterns - A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.
- Alias
Metadata map[string]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
namespaceis always relative to the provider's configured namespace. Available only for Vault Enterprise. - Token
Bound []stringCidrs - Specifies the blocks of IP addresses which are allowed to use the generated token
- Token
Explicit intMax Ttl - Generated Token's Explicit Maximum TTL in seconds
- Token
Max intTtl - The maximum lifetime of the generated token
- Token
No boolDefault Policy - If true, the 'default' policy will not automatically be added to generated tokens
- Token
Num intUses - 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 []string - Generated Token's Policies
- Token
Ttl int - The initial ttl of the token to generate in seconds
- Token
Type string - The type of token to generate, service or batch
- Workload
Id []stringPatterns - 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
namespaceis always relative to the provider's configured namespace. Available only for Vault Enterprise. - token_
bound_ list(string)cidrs - Specifies the blocks of IP addresses which are allowed to use the generated token
- token_
explicit_ numbermax_ ttl - Generated Token's Explicit Maximum TTL in seconds
- token_
max_ numberttl - The maximum lifetime of the generated token
- token_
no_ booldefault_ policy - If true, the 'default' policy will not automatically be added to generated tokens
- token_
num_ numberuses - 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_ list(string)patterns - A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.
- alias
Metadata Map<String,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
namespaceis always relative to the provider's configured namespace. Available only for Vault Enterprise. - token
Bound List<String>Cidrs - Specifies the blocks of IP addresses which are allowed to use the generated token
- token
Explicit IntegerMax Ttl - Generated Token's Explicit Maximum TTL in seconds
- token
Max IntegerTtl - The maximum lifetime of the generated token
- token
No BooleanDefault Policy - If true, the 'default' policy will not automatically be added to generated tokens
- token
Num IntegerUses - The maximum number of times a token may be used, a value of zero means unlimited
- token
Period Integer - Generated Token's Period
- token
Policies List<String> - Generated Token's Policies
- token
Ttl Integer - The initial ttl of the token to generate in seconds
- token
Type String - The type of token to generate, service or batch
- workload
Id List<String>Patterns - A comma separated list of patterns that match an incoming workload ID within the SVID document presented by the client.
- alias
Metadata {[key: string]: 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
namespaceis always relative to the provider's configured namespace. Available only for Vault Enterprise. - token
Bound string[]Cidrs - Specifies the blocks of IP addresses which are allowed to use the generated token
- token
Explicit numberMax Ttl - Generated Token's Explicit Maximum TTL in seconds
- token
Max numberTtl - The maximum lifetime of the generated token
- token
No booleanDefault Policy - If true, the 'default' policy will not automatically be added to generated tokens
- token
Num numberUses - 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 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 string[]Patterns - 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
namespaceis always relative to the provider's configured namespace. Available only for Vault Enterprise. - token_
bound_ Sequence[str]cidrs - Specifies the blocks of IP addresses which are allowed to use the generated token
- token_
explicit_ intmax_ ttl - Generated Token's Explicit Maximum TTL in seconds
- token_
max_ intttl - The maximum lifetime of the generated token
- token_
no_ booldefault_ policy - If true, the 'default' policy will not automatically be added to generated tokens
- token_
num_ intuses - 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_ Sequence[str]patterns - 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
namespaceis always relative to the provider's configured namespace. Available only for Vault Enterprise. - token
Bound List<String>Cidrs - Specifies the blocks of IP addresses which are allowed to use the generated token
- token
Explicit NumberMax Ttl - Generated Token's Explicit Maximum TTL in seconds
- token
Max NumberTtl - The maximum lifetime of the generated token
- token
No BooleanDefault Policy - If true, the 'default' policy will not automatically be added to generated tokens
- token
Num NumberUses - 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 List<String>Patterns - 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
vaultTerraform Provider.
published on Wednesday, Jul 22, 2026 by Pulumi