published on Thursday, Oct 15, 2026 by Pulumi
published on Thursday, Oct 15, 2026 by Pulumi
Manages the configuration for a TPM (Trusted Platform Module) auth backend in Vault. The TPM auth method allows machines with TPM 2.0 hardware to authenticate to Vault using their TPM Endorsement Key (EK).
Important This resource requires Vault Enterprise 2.2.0 or later.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const tpm = new vault.AuthBackend("tpm", {
type: "tpm",
path: "tpm",
});
const tpmConfig = new vault.TpmAuthBackendConfig("tpm_config", {
mount: tpm.path,
caLifetime: 315360000,
caSoftExpiry: 31536000,
defaultCertTtl: 2592000,
});
import pulumi
import pulumi_vault as vault
tpm = vault.AuthBackend("tpm",
type="tpm",
path="tpm")
tpm_config = vault.TpmAuthBackendConfig("tpm_config",
mount=tpm.path,
ca_lifetime=315360000,
ca_soft_expiry=31536000,
default_cert_ttl=2592000)
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v7/go/vault"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tpm, err := vault.NewAuthBackend(ctx, "tpm", &vault.AuthBackendArgs{
Type: pulumi.String("tpm"),
Path: pulumi.String("tpm"),
})
if err != nil {
return err
}
_, err = vault.NewTpmAuthBackendConfig(ctx, "tpm_config", &vault.TpmAuthBackendConfigArgs{
Mount: tpm.Path,
CaLifetime: pulumi.Int(315360000),
CaSoftExpiry: pulumi.Int(31536000),
DefaultCertTtl: pulumi.Int(2592000),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var tpm = new Vault.AuthBackend("tpm", new()
{
Type = "tpm",
Path = "tpm",
});
var tpmConfig = new Vault.TpmAuthBackendConfig("tpm_config", new()
{
Mount = tpm.Path,
CaLifetime = 315360000,
CaSoftExpiry = 31536000,
DefaultCertTtl = 2592000,
});
});
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.TpmAuthBackendConfig;
import com.pulumi.vault.TpmAuthBackendConfigArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var tpm = new AuthBackend("tpm", AuthBackendArgs.builder()
.type("tpm")
.path("tpm")
.build());
var tpmConfig = new TpmAuthBackendConfig("tpmConfig", TpmAuthBackendConfigArgs.builder()
.mount(tpm.path())
.caLifetime(315360000)
.caSoftExpiry(31536000)
.defaultCertTtl(2592000)
.build());
}
}
resources:
tpm:
type: vault:AuthBackend
properties:
type: tpm
path: tpm
tpmConfig:
type: vault:TpmAuthBackendConfig
name: tpm_config
properties:
mount: ${tpm.path}
caLifetime: 3.1536e+08 # 10 years
caSoftExpiry: 3.1536e+07 # 1 year before hard expiry
defaultCertTtl: 2.592e+06 # 30 days
terraform {
required_providers {
vault = {
source = "pulumi/vault"
}
}
}
resource "vault_auth_backend" "tpm" {
lifecycle {
create_before_destroy = true
}
type = "tpm"
path = "tpm"
}
resource "vault_tpm_auth_backend_config" "tpm_config" {
lifecycle {
create_before_destroy = true
}
mount = vault_auth_backend.tpm.path
ca_lifetime = 315360000 # 10 years
ca_soft_expiry = 31536000 # 1 year before hard expiry
default_cert_ttl = 2592000 # 30 days
}
Create TpmAuthBackendConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TpmAuthBackendConfig(name: string, args: TpmAuthBackendConfigArgs, opts?: CustomResourceOptions);@overload
def TpmAuthBackendConfig(resource_name: str,
args: TpmAuthBackendConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TpmAuthBackendConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
mount: Optional[str] = None,
ca_lifetime: Optional[int] = None,
ca_soft_expiry: Optional[int] = None,
default_cert_ttl: Optional[int] = None,
namespace: Optional[str] = None)func NewTpmAuthBackendConfig(ctx *Context, name string, args TpmAuthBackendConfigArgs, opts ...ResourceOption) (*TpmAuthBackendConfig, error)public TpmAuthBackendConfig(string name, TpmAuthBackendConfigArgs args, CustomResourceOptions? opts = null)
public TpmAuthBackendConfig(String name, TpmAuthBackendConfigArgs args)
public TpmAuthBackendConfig(String name, TpmAuthBackendConfigArgs args, CustomResourceOptions options)
type: vault:TpmAuthBackendConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "vault_tpm_auth_backend_config" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args TpmAuthBackendConfigArgs
- 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 TpmAuthBackendConfigArgs
- 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 TpmAuthBackendConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TpmAuthBackendConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TpmAuthBackendConfigArgs
- 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 tpmAuthBackendConfigResource = new Vault.TpmAuthBackendConfig("tpmAuthBackendConfigResource", new()
{
Mount = "string",
CaLifetime = 0,
CaSoftExpiry = 0,
DefaultCertTtl = 0,
Namespace = "string",
});
example, err := vault.NewTpmAuthBackendConfig(ctx, "tpmAuthBackendConfigResource", &vault.TpmAuthBackendConfigArgs{
Mount: pulumi.String("string"),
CaLifetime: pulumi.Int(0),
CaSoftExpiry: pulumi.Int(0),
DefaultCertTtl: pulumi.Int(0),
Namespace: pulumi.String("string"),
})
resource "vault_tpm_auth_backend_config" "tpmAuthBackendConfigResource" {
lifecycle {
create_before_destroy = true
}
mount = "string"
ca_lifetime = 0
ca_soft_expiry = 0
default_cert_ttl = 0
namespace = "string"
}
var tpmAuthBackendConfigResource = new TpmAuthBackendConfig("tpmAuthBackendConfigResource", TpmAuthBackendConfigArgs.builder()
.mount("string")
.caLifetime(0)
.caSoftExpiry(0)
.defaultCertTtl(0)
.namespace("string")
.build());
tpm_auth_backend_config_resource = vault.TpmAuthBackendConfig("tpmAuthBackendConfigResource",
mount="string",
ca_lifetime=0,
ca_soft_expiry=0,
default_cert_ttl=0,
namespace="string")
const tpmAuthBackendConfigResource = new vault.TpmAuthBackendConfig("tpmAuthBackendConfigResource", {
mount: "string",
caLifetime: 0,
caSoftExpiry: 0,
defaultCertTtl: 0,
namespace: "string",
});
type: vault:TpmAuthBackendConfig
properties:
caLifetime: 0
caSoftExpiry: 0
defaultCertTtl: 0
mount: string
namespace: string
TpmAuthBackendConfig 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 TpmAuthBackendConfig resource accepts the following input properties:
- Mount string
- Path of the enabled TPM auth backend mount to configure.
- Ca
Lifetime int - How long each CA is valid once it becomes active, in seconds. If not specified, uses Vault's default.
- Ca
Soft intExpiry - How long before hard expiry the active CA stops signing new certificates, in seconds. If not specified, uses Vault's default.
- Default
Cert intTtl - Default lifetime for issued client certificates, in seconds. If not specified, uses Vault's default.
- 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.
- Mount string
- Path of the enabled TPM auth backend mount to configure.
- Ca
Lifetime int - How long each CA is valid once it becomes active, in seconds. If not specified, uses Vault's default.
- Ca
Soft intExpiry - How long before hard expiry the active CA stops signing new certificates, in seconds. If not specified, uses Vault's default.
- Default
Cert intTtl - Default lifetime for issued client certificates, in seconds. If not specified, uses Vault's default.
- 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.
- mount string
- Path of the enabled TPM auth backend mount to configure.
- ca_
lifetime number - How long each CA is valid once it becomes active, in seconds. If not specified, uses Vault's default.
- ca_
soft_ numberexpiry - How long before hard expiry the active CA stops signing new certificates, in seconds. If not specified, uses Vault's default.
- default_
cert_ numberttl - Default lifetime for issued client certificates, in seconds. If not specified, uses Vault's default.
- 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.
- mount String
- Path of the enabled TPM auth backend mount to configure.
- ca
Lifetime Integer - How long each CA is valid once it becomes active, in seconds. If not specified, uses Vault's default.
- ca
Soft IntegerExpiry - How long before hard expiry the active CA stops signing new certificates, in seconds. If not specified, uses Vault's default.
- default
Cert IntegerTtl - Default lifetime for issued client certificates, in seconds. If not specified, uses Vault's default.
- 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.
- mount string
- Path of the enabled TPM auth backend mount to configure.
- ca
Lifetime number - How long each CA is valid once it becomes active, in seconds. If not specified, uses Vault's default.
- ca
Soft numberExpiry - How long before hard expiry the active CA stops signing new certificates, in seconds. If not specified, uses Vault's default.
- default
Cert numberTtl - Default lifetime for issued client certificates, in seconds. If not specified, uses Vault's default.
- 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.
- mount str
- Path of the enabled TPM auth backend mount to configure.
- ca_
lifetime int - How long each CA is valid once it becomes active, in seconds. If not specified, uses Vault's default.
- ca_
soft_ intexpiry - How long before hard expiry the active CA stops signing new certificates, in seconds. If not specified, uses Vault's default.
- default_
cert_ intttl - Default lifetime for issued client certificates, in seconds. If not specified, uses Vault's default.
- 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.
- mount String
- Path of the enabled TPM auth backend mount to configure.
- ca
Lifetime Number - How long each CA is valid once it becomes active, in seconds. If not specified, uses Vault's default.
- ca
Soft NumberExpiry - How long before hard expiry the active CA stops signing new certificates, in seconds. If not specified, uses Vault's default.
- default
Cert NumberTtl - Default lifetime for issued client certificates, in seconds. If not specified, uses Vault's default.
- 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the TpmAuthBackendConfig 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 TpmAuthBackendConfig Resource
Get an existing TpmAuthBackendConfig 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?: TpmAuthBackendConfigState, opts?: CustomResourceOptions): TpmAuthBackendConfig@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
ca_lifetime: Optional[int] = None,
ca_soft_expiry: Optional[int] = None,
default_cert_ttl: Optional[int] = None,
mount: Optional[str] = None,
namespace: Optional[str] = None) -> TpmAuthBackendConfigfunc GetTpmAuthBackendConfig(ctx *Context, name string, id IDInput, state *TpmAuthBackendConfigState, opts ...ResourceOption) (*TpmAuthBackendConfig, error)public static TpmAuthBackendConfig Get(string name, Input<string> id, TpmAuthBackendConfigState? state, CustomResourceOptions? opts = null)public static TpmAuthBackendConfig get(String name, Output<String> id, TpmAuthBackendConfigState state, CustomResourceOptions options)resources: _: type: vault:TpmAuthBackendConfig get: id: ${id}import {
to = vault_tpm_auth_backend_config.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.
- Ca
Lifetime int - How long each CA is valid once it becomes active, in seconds. If not specified, uses Vault's default.
- Ca
Soft intExpiry - How long before hard expiry the active CA stops signing new certificates, in seconds. If not specified, uses Vault's default.
- Default
Cert intTtl - Default lifetime for issued client certificates, in seconds. If not specified, uses Vault's default.
- Mount string
- Path of the enabled TPM auth backend mount to configure.
- 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.
- Ca
Lifetime int - How long each CA is valid once it becomes active, in seconds. If not specified, uses Vault's default.
- Ca
Soft intExpiry - How long before hard expiry the active CA stops signing new certificates, in seconds. If not specified, uses Vault's default.
- Default
Cert intTtl - Default lifetime for issued client certificates, in seconds. If not specified, uses Vault's default.
- Mount string
- Path of the enabled TPM auth backend mount to configure.
- 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.
- ca_
lifetime number - How long each CA is valid once it becomes active, in seconds. If not specified, uses Vault's default.
- ca_
soft_ numberexpiry - How long before hard expiry the active CA stops signing new certificates, in seconds. If not specified, uses Vault's default.
- default_
cert_ numberttl - Default lifetime for issued client certificates, in seconds. If not specified, uses Vault's default.
- mount string
- Path of the enabled TPM auth backend mount to configure.
- 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.
- ca
Lifetime Integer - How long each CA is valid once it becomes active, in seconds. If not specified, uses Vault's default.
- ca
Soft IntegerExpiry - How long before hard expiry the active CA stops signing new certificates, in seconds. If not specified, uses Vault's default.
- default
Cert IntegerTtl - Default lifetime for issued client certificates, in seconds. If not specified, uses Vault's default.
- mount String
- Path of the enabled TPM auth backend mount to configure.
- 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.
- ca
Lifetime number - How long each CA is valid once it becomes active, in seconds. If not specified, uses Vault's default.
- ca
Soft numberExpiry - How long before hard expiry the active CA stops signing new certificates, in seconds. If not specified, uses Vault's default.
- default
Cert numberTtl - Default lifetime for issued client certificates, in seconds. If not specified, uses Vault's default.
- mount string
- Path of the enabled TPM auth backend mount to configure.
- 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.
- ca_
lifetime int - How long each CA is valid once it becomes active, in seconds. If not specified, uses Vault's default.
- ca_
soft_ intexpiry - How long before hard expiry the active CA stops signing new certificates, in seconds. If not specified, uses Vault's default.
- default_
cert_ intttl - Default lifetime for issued client certificates, in seconds. If not specified, uses Vault's default.
- mount str
- Path of the enabled TPM auth backend mount to configure.
- 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.
- ca
Lifetime Number - How long each CA is valid once it becomes active, in seconds. If not specified, uses Vault's default.
- ca
Soft NumberExpiry - How long before hard expiry the active CA stops signing new certificates, in seconds. If not specified, uses Vault's default.
- default
Cert NumberTtl - Default lifetime for issued client certificates, in seconds. If not specified, uses Vault's default.
- mount String
- Path of the enabled TPM auth backend mount to configure.
- 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.
Import
TPM auth backend configuration can be imported using the resource’s id.
In the case of the example above the id would be auth/tpm/config,
where the tpm component is the resource’s mount, e.g.
$ pulumi import vault:index/tpmAuthBackendConfig:TpmAuthBackendConfig tpm_config auth/tpm/config
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 Thursday, Oct 15, 2026 by Pulumi