1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. kubernetes
  5. AuthBackendRole
HashiCorp Vault v6.2.0 published on Friday, Jun 21, 2024 by Pulumi

vault.kubernetes.AuthBackendRole

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.2.0 published on Friday, Jun 21, 2024 by Pulumi

    Manages an Kubernetes auth backend role in a Vault server. See the Vault documentation for more information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const kubernetes = new vault.AuthBackend("kubernetes", {type: "kubernetes"});
    const example = new vault.kubernetes.AuthBackendRole("example", {
        backend: kubernetes.path,
        roleName: "example-role",
        boundServiceAccountNames: ["example"],
        boundServiceAccountNamespaces: ["example"],
        tokenTtl: 3600,
        tokenPolicies: [
            "default",
            "dev",
            "prod",
        ],
        audience: "vault",
    });
    
    import pulumi
    import pulumi_vault as vault
    
    kubernetes = vault.AuthBackend("kubernetes", type="kubernetes")
    example = vault.kubernetes.AuthBackendRole("example",
        backend=kubernetes.path,
        role_name="example-role",
        bound_service_account_names=["example"],
        bound_service_account_namespaces=["example"],
        token_ttl=3600,
        token_policies=[
            "default",
            "dev",
            "prod",
        ],
        audience="vault")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
    	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/kubernetes"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		kubernetes, err := vault.NewAuthBackend(ctx, "kubernetes", &vault.AuthBackendArgs{
    			Type: pulumi.String("kubernetes"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = kubernetes.NewAuthBackendRole(ctx, "example", &kubernetes.AuthBackendRoleArgs{
    			Backend:  kubernetes.Path,
    			RoleName: pulumi.String("example-role"),
    			BoundServiceAccountNames: pulumi.StringArray{
    				pulumi.String("example"),
    			},
    			BoundServiceAccountNamespaces: pulumi.StringArray{
    				pulumi.String("example"),
    			},
    			TokenTtl: pulumi.Int(3600),
    			TokenPolicies: pulumi.StringArray{
    				pulumi.String("default"),
    				pulumi.String("dev"),
    				pulumi.String("prod"),
    			},
    			Audience: pulumi.String("vault"),
    		})
    		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 kubernetes = new Vault.AuthBackend("kubernetes", new()
        {
            Type = "kubernetes",
        });
    
        var example = new Vault.Kubernetes.AuthBackendRole("example", new()
        {
            Backend = kubernetes.Path,
            RoleName = "example-role",
            BoundServiceAccountNames = new[]
            {
                "example",
            },
            BoundServiceAccountNamespaces = new[]
            {
                "example",
            },
            TokenTtl = 3600,
            TokenPolicies = new[]
            {
                "default",
                "dev",
                "prod",
            },
            Audience = "vault",
        });
    
    });
    
    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.kubernetes.AuthBackendRole;
    import com.pulumi.vault.kubernetes.AuthBackendRoleArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var kubernetes = new AuthBackend("kubernetes", AuthBackendArgs.builder()
                .type("kubernetes")
                .build());
    
            var example = new AuthBackendRole("example", AuthBackendRoleArgs.builder()
                .backend(kubernetes.path())
                .roleName("example-role")
                .boundServiceAccountNames("example")
                .boundServiceAccountNamespaces("example")
                .tokenTtl(3600)
                .tokenPolicies(            
                    "default",
                    "dev",
                    "prod")
                .audience("vault")
                .build());
    
        }
    }
    
    resources:
      kubernetes:
        type: vault:AuthBackend
        properties:
          type: kubernetes
      example:
        type: vault:kubernetes:AuthBackendRole
        properties:
          backend: ${kubernetes.path}
          roleName: example-role
          boundServiceAccountNames:
            - example
          boundServiceAccountNamespaces:
            - example
          tokenTtl: 3600
          tokenPolicies:
            - default
            - dev
            - prod
          audience: vault
    

    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,
                        bound_service_account_names: Optional[Sequence[str]] = None,
                        role_name: Optional[str] = None,
                        bound_service_account_namespaces: Optional[Sequence[str]] = None,
                        token_explicit_max_ttl: Optional[int] = None,
                        backend: Optional[str] = None,
                        namespace: Optional[str] = None,
                        audience: Optional[str] = None,
                        token_bound_cidrs: Optional[Sequence[str]] = None,
                        alias_name_source: Optional[str] = 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)
    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:kubernetes:AuthBackendRole
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args 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 exampleauthBackendRoleResourceResourceFromKubernetesauthBackendRole = new Vault.Kubernetes.AuthBackendRole("exampleauthBackendRoleResourceResourceFromKubernetesauthBackendRole", new()
    {
        BoundServiceAccountNames = new[]
        {
            "string",
        },
        RoleName = "string",
        BoundServiceAccountNamespaces = new[]
        {
            "string",
        },
        TokenExplicitMaxTtl = 0,
        Backend = "string",
        Namespace = "string",
        Audience = "string",
        TokenBoundCidrs = new[]
        {
            "string",
        },
        AliasNameSource = "string",
        TokenMaxTtl = 0,
        TokenNoDefaultPolicy = false,
        TokenNumUses = 0,
        TokenPeriod = 0,
        TokenPolicies = new[]
        {
            "string",
        },
        TokenTtl = 0,
        TokenType = "string",
    });
    
    example, err := kubernetes.NewAuthBackendRole(ctx, "exampleauthBackendRoleResourceResourceFromKubernetesauthBackendRole", &kubernetes.AuthBackendRoleArgs{
    	BoundServiceAccountNames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	RoleName: pulumi.String("string"),
    	BoundServiceAccountNamespaces: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TokenExplicitMaxTtl: pulumi.Int(0),
    	Backend:             pulumi.String("string"),
    	Namespace:           pulumi.String("string"),
    	Audience:            pulumi.String("string"),
    	TokenBoundCidrs: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	AliasNameSource:      pulumi.String("string"),
    	TokenMaxTtl:          pulumi.Int(0),
    	TokenNoDefaultPolicy: pulumi.Bool(false),
    	TokenNumUses:         pulumi.Int(0),
    	TokenPeriod:          pulumi.Int(0),
    	TokenPolicies: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TokenTtl:  pulumi.Int(0),
    	TokenType: pulumi.String("string"),
    })
    
    var exampleauthBackendRoleResourceResourceFromKubernetesauthBackendRole = new AuthBackendRole("exampleauthBackendRoleResourceResourceFromKubernetesauthBackendRole", AuthBackendRoleArgs.builder()
        .boundServiceAccountNames("string")
        .roleName("string")
        .boundServiceAccountNamespaces("string")
        .tokenExplicitMaxTtl(0)
        .backend("string")
        .namespace("string")
        .audience("string")
        .tokenBoundCidrs("string")
        .aliasNameSource("string")
        .tokenMaxTtl(0)
        .tokenNoDefaultPolicy(false)
        .tokenNumUses(0)
        .tokenPeriod(0)
        .tokenPolicies("string")
        .tokenTtl(0)
        .tokenType("string")
        .build());
    
    exampleauth_backend_role_resource_resource_from_kubernetesauth_backend_role = vault.kubernetes.AuthBackendRole("exampleauthBackendRoleResourceResourceFromKubernetesauthBackendRole",
        bound_service_account_names=["string"],
        role_name="string",
        bound_service_account_namespaces=["string"],
        token_explicit_max_ttl=0,
        backend="string",
        namespace="string",
        audience="string",
        token_bound_cidrs=["string"],
        alias_name_source="string",
        token_max_ttl=0,
        token_no_default_policy=False,
        token_num_uses=0,
        token_period=0,
        token_policies=["string"],
        token_ttl=0,
        token_type="string")
    
    const exampleauthBackendRoleResourceResourceFromKubernetesauthBackendRole = new vault.kubernetes.AuthBackendRole("exampleauthBackendRoleResourceResourceFromKubernetesauthBackendRole", {
        boundServiceAccountNames: ["string"],
        roleName: "string",
        boundServiceAccountNamespaces: ["string"],
        tokenExplicitMaxTtl: 0,
        backend: "string",
        namespace: "string",
        audience: "string",
        tokenBoundCidrs: ["string"],
        aliasNameSource: "string",
        tokenMaxTtl: 0,
        tokenNoDefaultPolicy: false,
        tokenNumUses: 0,
        tokenPeriod: 0,
        tokenPolicies: ["string"],
        tokenTtl: 0,
        tokenType: "string",
    });
    
    type: vault:kubernetes:AuthBackendRole
    properties:
        aliasNameSource: string
        audience: string
        backend: string
        boundServiceAccountNames:
            - string
        boundServiceAccountNamespaces:
            - string
        namespace: string
        roleName: string
        tokenBoundCidrs:
            - string
        tokenExplicitMaxTtl: 0
        tokenMaxTtl: 0
        tokenNoDefaultPolicy: false
        tokenNumUses: 0
        tokenPeriod: 0
        tokenPolicies:
            - string
        tokenTtl: 0
        tokenType: 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

    The AuthBackendRole resource accepts the following input properties:

    BoundServiceAccountNames List<string>
    List of service account names able to access this role. If set to ["*"] all names are allowed, both this and bound_service_account_namespaces can not be "*".
    BoundServiceAccountNamespaces List<string>
    List of namespaces allowed to access this role. If set to ["*"] all namespaces are allowed, both this and bound_service_account_names can not be set to "*".
    RoleName string
    Name of the role.
    AliasNameSource string
    Configures how identity aliases are generated. Valid choices are: serviceaccount_uid, serviceaccount_name. (vault-1.9+)
    Audience string

    Audience claim to verify in the JWT.

    Please see alias_name_source before setting this to something other its default value. There are important security implications to be aware of.

    Backend string
    Unique name of the kubernetes backend to configure.
    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
    BoundServiceAccountNames []string
    List of service account names able to access this role. If set to ["*"] all names are allowed, both this and bound_service_account_namespaces can not be "*".
    BoundServiceAccountNamespaces []string
    List of namespaces allowed to access this role. If set to ["*"] all namespaces are allowed, both this and bound_service_account_names can not be set to "*".
    RoleName string
    Name of the role.
    AliasNameSource string
    Configures how identity aliases are generated. Valid choices are: serviceaccount_uid, serviceaccount_name. (vault-1.9+)
    Audience string

    Audience claim to verify in the JWT.

    Please see alias_name_source before setting this to something other its default value. There are important security implications to be aware of.

    Backend string
    Unique name of the kubernetes backend to configure.
    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
    boundServiceAccountNames List<String>
    List of service account names able to access this role. If set to ["*"] all names are allowed, both this and bound_service_account_namespaces can not be "*".
    boundServiceAccountNamespaces List<String>
    List of namespaces allowed to access this role. If set to ["*"] all namespaces are allowed, both this and bound_service_account_names can not be set to "*".
    roleName String
    Name of the role.
    aliasNameSource String
    Configures how identity aliases are generated. Valid choices are: serviceaccount_uid, serviceaccount_name. (vault-1.9+)
    audience String

    Audience claim to verify in the JWT.

    Please see alias_name_source before setting this to something other its default value. There are important security implications to be aware of.

    backend String
    Unique name of the kubernetes backend to configure.
    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
    boundServiceAccountNames string[]
    List of service account names able to access this role. If set to ["*"] all names are allowed, both this and bound_service_account_namespaces can not be "*".
    boundServiceAccountNamespaces string[]
    List of namespaces allowed to access this role. If set to ["*"] all namespaces are allowed, both this and bound_service_account_names can not be set to "*".
    roleName string
    Name of the role.
    aliasNameSource string
    Configures how identity aliases are generated. Valid choices are: serviceaccount_uid, serviceaccount_name. (vault-1.9+)
    audience string

    Audience claim to verify in the JWT.

    Please see alias_name_source before setting this to something other its default value. There are important security implications to be aware of.

    backend string
    Unique name of the kubernetes backend to configure.
    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
    bound_service_account_names Sequence[str]
    List of service account names able to access this role. If set to ["*"] all names are allowed, both this and bound_service_account_namespaces can not be "*".
    bound_service_account_namespaces Sequence[str]
    List of namespaces allowed to access this role. If set to ["*"] all namespaces are allowed, both this and bound_service_account_names can not be set to "*".
    role_name str
    Name of the role.
    alias_name_source str
    Configures how identity aliases are generated. Valid choices are: serviceaccount_uid, serviceaccount_name. (vault-1.9+)
    audience str

    Audience claim to verify in the JWT.

    Please see alias_name_source before setting this to something other its default value. There are important security implications to be aware of.

    backend str
    Unique name of the kubernetes backend to configure.
    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
    boundServiceAccountNames List<String>
    List of service account names able to access this role. If set to ["*"] all names are allowed, both this and bound_service_account_namespaces can not be "*".
    boundServiceAccountNamespaces List<String>
    List of namespaces allowed to access this role. If set to ["*"] all namespaces are allowed, both this and bound_service_account_names can not be set to "*".
    roleName String
    Name of the role.
    aliasNameSource String
    Configures how identity aliases are generated. Valid choices are: serviceaccount_uid, serviceaccount_name. (vault-1.9+)
    audience String

    Audience claim to verify in the JWT.

    Please see alias_name_source before setting this to something other its default value. There are important security implications to be aware of.

    backend String
    Unique name of the kubernetes backend to configure.
    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

    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 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_name_source: Optional[str] = None,
            audience: Optional[str] = None,
            backend: Optional[str] = None,
            bound_service_account_names: Optional[Sequence[str]] = None,
            bound_service_account_namespaces: Optional[Sequence[str]] = None,
            namespace: Optional[str] = None,
            role_name: 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) -> 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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AliasNameSource string
    Configures how identity aliases are generated. Valid choices are: serviceaccount_uid, serviceaccount_name. (vault-1.9+)
    Audience string

    Audience claim to verify in the JWT.

    Please see alias_name_source before setting this to something other its default value. There are important security implications to be aware of.

    Backend string
    Unique name of the kubernetes backend to configure.
    BoundServiceAccountNames List<string>
    List of service account names able to access this role. If set to ["*"] all names are allowed, both this and bound_service_account_namespaces can not be "*".
    BoundServiceAccountNamespaces List<string>
    List of namespaces allowed to access this role. If set to ["*"] all namespaces are allowed, both this and bound_service_account_names can not be set to "*".
    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.
    RoleName string
    Name of the role.
    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
    AliasNameSource string
    Configures how identity aliases are generated. Valid choices are: serviceaccount_uid, serviceaccount_name. (vault-1.9+)
    Audience string

    Audience claim to verify in the JWT.

    Please see alias_name_source before setting this to something other its default value. There are important security implications to be aware of.

    Backend string
    Unique name of the kubernetes backend to configure.
    BoundServiceAccountNames []string
    List of service account names able to access this role. If set to ["*"] all names are allowed, both this and bound_service_account_namespaces can not be "*".
    BoundServiceAccountNamespaces []string
    List of namespaces allowed to access this role. If set to ["*"] all namespaces are allowed, both this and bound_service_account_names can not be set to "*".
    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.
    RoleName string
    Name of the role.
    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
    aliasNameSource String
    Configures how identity aliases are generated. Valid choices are: serviceaccount_uid, serviceaccount_name. (vault-1.9+)
    audience String

    Audience claim to verify in the JWT.

    Please see alias_name_source before setting this to something other its default value. There are important security implications to be aware of.

    backend String
    Unique name of the kubernetes backend to configure.
    boundServiceAccountNames List<String>
    List of service account names able to access this role. If set to ["*"] all names are allowed, both this and bound_service_account_namespaces can not be "*".
    boundServiceAccountNamespaces List<String>
    List of namespaces allowed to access this role. If set to ["*"] all namespaces are allowed, both this and bound_service_account_names can not be set to "*".
    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.
    roleName String
    Name of the role.
    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
    aliasNameSource string
    Configures how identity aliases are generated. Valid choices are: serviceaccount_uid, serviceaccount_name. (vault-1.9+)
    audience string

    Audience claim to verify in the JWT.

    Please see alias_name_source before setting this to something other its default value. There are important security implications to be aware of.

    backend string
    Unique name of the kubernetes backend to configure.
    boundServiceAccountNames string[]
    List of service account names able to access this role. If set to ["*"] all names are allowed, both this and bound_service_account_namespaces can not be "*".
    boundServiceAccountNamespaces string[]
    List of namespaces allowed to access this role. If set to ["*"] all namespaces are allowed, both this and bound_service_account_names can not be set to "*".
    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.
    roleName string
    Name of the role.
    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
    alias_name_source str
    Configures how identity aliases are generated. Valid choices are: serviceaccount_uid, serviceaccount_name. (vault-1.9+)
    audience str

    Audience claim to verify in the JWT.

    Please see alias_name_source before setting this to something other its default value. There are important security implications to be aware of.

    backend str
    Unique name of the kubernetes backend to configure.
    bound_service_account_names Sequence[str]
    List of service account names able to access this role. If set to ["*"] all names are allowed, both this and bound_service_account_namespaces can not be "*".
    bound_service_account_namespaces Sequence[str]
    List of namespaces allowed to access this role. If set to ["*"] all namespaces are allowed, both this and bound_service_account_names can not be set to "*".
    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.
    role_name str
    Name of the role.
    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
    aliasNameSource String
    Configures how identity aliases are generated. Valid choices are: serviceaccount_uid, serviceaccount_name. (vault-1.9+)
    audience String

    Audience claim to verify in the JWT.

    Please see alias_name_source before setting this to something other its default value. There are important security implications to be aware of.

    backend String
    Unique name of the kubernetes backend to configure.
    boundServiceAccountNames List<String>
    List of service account names able to access this role. If set to ["*"] all names are allowed, both this and bound_service_account_namespaces can not be "*".
    boundServiceAccountNamespaces List<String>
    List of namespaces allowed to access this role. If set to ["*"] all namespaces are allowed, both this and bound_service_account_names can not be set to "*".
    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.
    roleName String
    Name of the role.
    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

    Import

    Kubernetes auth backend role can be imported using the path, e.g.

    $ pulumi import vault:kubernetes/authBackendRole:AuthBackendRole foo auth/kubernetes/role/foo
    

    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
    HashiCorp Vault v6.2.0 published on Friday, Jun 21, 2024 by Pulumi