MfaTotpArgs

data class MfaTotpArgs(val algorithm: Output<String>? = null, val digits: Output<Int>? = null, val issuer: Output<String>? = null, val keySize: Output<Int>? = null, val name: Output<String>? = null, val namespace: Output<String>? = null, val period: Output<Int>? = null, val qrSize: Output<Int>? = null, val skew: Output<Int>? = null) : ConvertibleToJava<MfaTotpArgs>

Provides a resource to manage TOTP MFA. Note this feature is available only with Vault Enterprise.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const myTotp = new vault.MfaTotp("my_totp", {
name: "my_totp",
issuer: "hashicorp",
period: 60,
algorithm: "SHA256",
digits: 8,
keySize: 20,
});
import pulumi
import pulumi_vault as vault
my_totp = vault.MfaTotp("my_totp",
name="my_totp",
issuer="hashicorp",
period=60,
algorithm="SHA256",
digits=8,
key_size=20)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vault = Pulumi.Vault;
return await Deployment.RunAsync(() =>
{
var myTotp = new Vault.MfaTotp("my_totp", new()
{
Name = "my_totp",
Issuer = "hashicorp",
Period = 60,
Algorithm = "SHA256",
Digits = 8,
KeySize = 20,
});
});
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v6/go/vault"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vault.NewMfaTotp(ctx, "my_totp", &vault.MfaTotpArgs{
Name: pulumi.String("my_totp"),
Issuer: pulumi.String("hashicorp"),
Period: pulumi.Int(60),
Algorithm: pulumi.String("SHA256"),
Digits: pulumi.Int(8),
KeySize: pulumi.Int(20),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vault.MfaTotp;
import com.pulumi.vault.MfaTotpArgs;
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 myTotp = new MfaTotp("myTotp", MfaTotpArgs.builder()
.name("my_totp")
.issuer("hashicorp")
.period(60)
.algorithm("SHA256")
.digits(8)
.keySize(20)
.build());
}
}
resources:
myTotp:
type: vault:MfaTotp
name: my_totp
properties:
name: my_totp
issuer: hashicorp
period: 60
algorithm: SHA256
digits: 8
keySize: 20

Import

Mounts can be imported using the path, e.g.

$ pulumi import vault:index/mfaTotp:MfaTotp my_totp my_totp

Constructors

Link copied to clipboard
constructor(algorithm: Output<String>? = null, digits: Output<Int>? = null, issuer: Output<String>? = null, keySize: Output<Int>? = null, name: Output<String>? = null, namespace: Output<String>? = null, period: Output<Int>? = null, qrSize: Output<Int>? = null, skew: Output<Int>? = null)

Properties

Link copied to clipboard
val algorithm: Output<String>? = null

(string) - Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256 and SHA512

Link copied to clipboard
val digits: Output<Int>? = null

(int) - The number of digits in the generated TOTP token. This value can either be 6 or 8.

Link copied to clipboard
val issuer: Output<String>? = null

(string: <required>) - The name of the key's issuing organization.

Link copied to clipboard
val keySize: Output<Int>? = null

(int) - Specifies the size in bytes of the generated key.

Link copied to clipboard
val name: Output<String>? = null

(string: <required>) – Name of the MFA method.

Link copied to clipboard
val namespace: Output<String>? = null

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.

Link copied to clipboard
val period: Output<Int>? = null

(int) - The length of time used to generate a counter for the TOTP token calculation.

Link copied to clipboard
val qrSize: Output<Int>? = null

(int) - The pixel size of the generated square QR code.

Link copied to clipboard
val skew: Output<Int>? = null

(int) - The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.

Functions

Link copied to clipboard
open override fun toJava(): MfaTotpArgs