1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. identity
  5. MfaTotp
HashiCorp Vault v6.1.0 published on Thursday, Apr 4, 2024 by Pulumi

vault.identity.MfaTotp

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.1.0 published on Thursday, Apr 4, 2024 by Pulumi

    Resource for configuring the totp MFA method.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const example = new vault.identity.MfaTotp("example", {issuer: "issuer1"});
    
    import pulumi
    import pulumi_vault as vault
    
    example = vault.identity.MfaTotp("example", issuer="issuer1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v6/go/vault/identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := identity.NewMfaTotp(ctx, "example", &identity.MfaTotpArgs{
    			Issuer: pulumi.String("issuer1"),
    		})
    		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 example = new Vault.Identity.MfaTotp("example", new()
        {
            Issuer = "issuer1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.identity.MfaTotp;
    import com.pulumi.vault.identity.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 example = new MfaTotp("example", MfaTotpArgs.builder()        
                .issuer("issuer1")
                .build());
    
        }
    }
    
    resources:
      example:
        type: vault:identity:MfaTotp
        properties:
          issuer: issuer1
    

    Create MfaTotp Resource

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

    Constructor syntax

    new MfaTotp(name: string, args: MfaTotpArgs, opts?: CustomResourceOptions);
    @overload
    def MfaTotp(resource_name: str,
                args: MfaTotpArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def MfaTotp(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                issuer: Optional[str] = None,
                algorithm: Optional[str] = None,
                digits: Optional[int] = None,
                key_size: Optional[int] = None,
                max_validation_attempts: Optional[int] = None,
                namespace: Optional[str] = None,
                period: Optional[int] = None,
                qr_size: Optional[int] = None,
                skew: Optional[int] = None)
    func NewMfaTotp(ctx *Context, name string, args MfaTotpArgs, opts ...ResourceOption) (*MfaTotp, error)
    public MfaTotp(string name, MfaTotpArgs args, CustomResourceOptions? opts = null)
    public MfaTotp(String name, MfaTotpArgs args)
    public MfaTotp(String name, MfaTotpArgs args, CustomResourceOptions options)
    
    type: vault:identity:MfaTotp
    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 MfaTotpArgs
    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 MfaTotpArgs
    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 MfaTotpArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MfaTotpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MfaTotpArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var mfaTotpResource = new Vault.Identity.MfaTotp("mfaTotpResource", new()
    {
        Issuer = "string",
        Algorithm = "string",
        Digits = 0,
        KeySize = 0,
        MaxValidationAttempts = 0,
        Namespace = "string",
        Period = 0,
        QrSize = 0,
        Skew = 0,
    });
    
    example, err := identity.NewMfaTotp(ctx, "mfaTotpResource", &identity.MfaTotpArgs{
    	Issuer:                pulumi.String("string"),
    	Algorithm:             pulumi.String("string"),
    	Digits:                pulumi.Int(0),
    	KeySize:               pulumi.Int(0),
    	MaxValidationAttempts: pulumi.Int(0),
    	Namespace:             pulumi.String("string"),
    	Period:                pulumi.Int(0),
    	QrSize:                pulumi.Int(0),
    	Skew:                  pulumi.Int(0),
    })
    
    var mfaTotpResource = new MfaTotp("mfaTotpResource", MfaTotpArgs.builder()        
        .issuer("string")
        .algorithm("string")
        .digits(0)
        .keySize(0)
        .maxValidationAttempts(0)
        .namespace("string")
        .period(0)
        .qrSize(0)
        .skew(0)
        .build());
    
    mfa_totp_resource = vault.identity.MfaTotp("mfaTotpResource",
        issuer="string",
        algorithm="string",
        digits=0,
        key_size=0,
        max_validation_attempts=0,
        namespace="string",
        period=0,
        qr_size=0,
        skew=0)
    
    const mfaTotpResource = new vault.identity.MfaTotp("mfaTotpResource", {
        issuer: "string",
        algorithm: "string",
        digits: 0,
        keySize: 0,
        maxValidationAttempts: 0,
        namespace: "string",
        period: 0,
        qrSize: 0,
        skew: 0,
    });
    
    type: vault:identity:MfaTotp
    properties:
        algorithm: string
        digits: 0
        issuer: string
        keySize: 0
        maxValidationAttempts: 0
        namespace: string
        period: 0
        qrSize: 0
        skew: 0
    

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

    Issuer string
    The name of the key's issuing organization.
    Algorithm string
    Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256, SHA512.
    Digits int
    The number of digits in the generated TOTP token. This value can either be 6 or 8
    KeySize int
    Specifies the size in bytes of the generated key.
    MaxValidationAttempts int
    The maximum number of consecutive failed validation attempts allowed.
    Namespace string
    Target namespace. (requires Enterprise)
    Period int
    The length of time in seconds used to generate a counter for the TOTP token calculation.
    QrSize int
    The pixel size of the generated square QR code.
    Skew int
    The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.
    Issuer string
    The name of the key's issuing organization.
    Algorithm string
    Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256, SHA512.
    Digits int
    The number of digits in the generated TOTP token. This value can either be 6 or 8
    KeySize int
    Specifies the size in bytes of the generated key.
    MaxValidationAttempts int
    The maximum number of consecutive failed validation attempts allowed.
    Namespace string
    Target namespace. (requires Enterprise)
    Period int
    The length of time in seconds used to generate a counter for the TOTP token calculation.
    QrSize int
    The pixel size of the generated square QR code.
    Skew int
    The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.
    issuer String
    The name of the key's issuing organization.
    algorithm String
    Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256, SHA512.
    digits Integer
    The number of digits in the generated TOTP token. This value can either be 6 or 8
    keySize Integer
    Specifies the size in bytes of the generated key.
    maxValidationAttempts Integer
    The maximum number of consecutive failed validation attempts allowed.
    namespace String
    Target namespace. (requires Enterprise)
    period Integer
    The length of time in seconds used to generate a counter for the TOTP token calculation.
    qrSize Integer
    The pixel size of the generated square QR code.
    skew Integer
    The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.
    issuer string
    The name of the key's issuing organization.
    algorithm string
    Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256, SHA512.
    digits number
    The number of digits in the generated TOTP token. This value can either be 6 or 8
    keySize number
    Specifies the size in bytes of the generated key.
    maxValidationAttempts number
    The maximum number of consecutive failed validation attempts allowed.
    namespace string
    Target namespace. (requires Enterprise)
    period number
    The length of time in seconds used to generate a counter for the TOTP token calculation.
    qrSize number
    The pixel size of the generated square QR code.
    skew number
    The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.
    issuer str
    The name of the key's issuing organization.
    algorithm str
    Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256, SHA512.
    digits int
    The number of digits in the generated TOTP token. This value can either be 6 or 8
    key_size int
    Specifies the size in bytes of the generated key.
    max_validation_attempts int
    The maximum number of consecutive failed validation attempts allowed.
    namespace str
    Target namespace. (requires Enterprise)
    period int
    The length of time in seconds used to generate a counter for the TOTP token calculation.
    qr_size int
    The pixel size of the generated square QR code.
    skew int
    The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.
    issuer String
    The name of the key's issuing organization.
    algorithm String
    Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256, SHA512.
    digits Number
    The number of digits in the generated TOTP token. This value can either be 6 or 8
    keySize Number
    Specifies the size in bytes of the generated key.
    maxValidationAttempts Number
    The maximum number of consecutive failed validation attempts allowed.
    namespace String
    Target namespace. (requires Enterprise)
    period Number
    The length of time in seconds used to generate a counter for the TOTP token calculation.
    qrSize Number
    The pixel size of the generated square QR code.
    skew Number
    The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MfaTotp resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    MethodId string
    Method ID.
    MountAccessor string
    Mount accessor.
    Name string
    Method name.
    NamespaceId string
    Method's namespace ID.
    NamespacePath string
    Method's namespace path.
    Type string
    MFA type.
    Uuid string
    Resource UUID.
    Id string
    The provider-assigned unique ID for this managed resource.
    MethodId string
    Method ID.
    MountAccessor string
    Mount accessor.
    Name string
    Method name.
    NamespaceId string
    Method's namespace ID.
    NamespacePath string
    Method's namespace path.
    Type string
    MFA type.
    Uuid string
    Resource UUID.
    id String
    The provider-assigned unique ID for this managed resource.
    methodId String
    Method ID.
    mountAccessor String
    Mount accessor.
    name String
    Method name.
    namespaceId String
    Method's namespace ID.
    namespacePath String
    Method's namespace path.
    type String
    MFA type.
    uuid String
    Resource UUID.
    id string
    The provider-assigned unique ID for this managed resource.
    methodId string
    Method ID.
    mountAccessor string
    Mount accessor.
    name string
    Method name.
    namespaceId string
    Method's namespace ID.
    namespacePath string
    Method's namespace path.
    type string
    MFA type.
    uuid string
    Resource UUID.
    id str
    The provider-assigned unique ID for this managed resource.
    method_id str
    Method ID.
    mount_accessor str
    Mount accessor.
    name str
    Method name.
    namespace_id str
    Method's namespace ID.
    namespace_path str
    Method's namespace path.
    type str
    MFA type.
    uuid str
    Resource UUID.
    id String
    The provider-assigned unique ID for this managed resource.
    methodId String
    Method ID.
    mountAccessor String
    Mount accessor.
    name String
    Method name.
    namespaceId String
    Method's namespace ID.
    namespacePath String
    Method's namespace path.
    type String
    MFA type.
    uuid String
    Resource UUID.

    Look up Existing MfaTotp Resource

    Get an existing MfaTotp 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?: MfaTotpState, opts?: CustomResourceOptions): MfaTotp
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            algorithm: Optional[str] = None,
            digits: Optional[int] = None,
            issuer: Optional[str] = None,
            key_size: Optional[int] = None,
            max_validation_attempts: Optional[int] = None,
            method_id: Optional[str] = None,
            mount_accessor: Optional[str] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            namespace_id: Optional[str] = None,
            namespace_path: Optional[str] = None,
            period: Optional[int] = None,
            qr_size: Optional[int] = None,
            skew: Optional[int] = None,
            type: Optional[str] = None,
            uuid: Optional[str] = None) -> MfaTotp
    func GetMfaTotp(ctx *Context, name string, id IDInput, state *MfaTotpState, opts ...ResourceOption) (*MfaTotp, error)
    public static MfaTotp Get(string name, Input<string> id, MfaTotpState? state, CustomResourceOptions? opts = null)
    public static MfaTotp get(String name, Output<String> id, MfaTotpState 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:
    Algorithm string
    Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256, SHA512.
    Digits int
    The number of digits in the generated TOTP token. This value can either be 6 or 8
    Issuer string
    The name of the key's issuing organization.
    KeySize int
    Specifies the size in bytes of the generated key.
    MaxValidationAttempts int
    The maximum number of consecutive failed validation attempts allowed.
    MethodId string
    Method ID.
    MountAccessor string
    Mount accessor.
    Name string
    Method name.
    Namespace string
    Target namespace. (requires Enterprise)
    NamespaceId string
    Method's namespace ID.
    NamespacePath string
    Method's namespace path.
    Period int
    The length of time in seconds used to generate a counter for the TOTP token calculation.
    QrSize int
    The pixel size of the generated square QR code.
    Skew int
    The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.
    Type string
    MFA type.
    Uuid string
    Resource UUID.
    Algorithm string
    Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256, SHA512.
    Digits int
    The number of digits in the generated TOTP token. This value can either be 6 or 8
    Issuer string
    The name of the key's issuing organization.
    KeySize int
    Specifies the size in bytes of the generated key.
    MaxValidationAttempts int
    The maximum number of consecutive failed validation attempts allowed.
    MethodId string
    Method ID.
    MountAccessor string
    Mount accessor.
    Name string
    Method name.
    Namespace string
    Target namespace. (requires Enterprise)
    NamespaceId string
    Method's namespace ID.
    NamespacePath string
    Method's namespace path.
    Period int
    The length of time in seconds used to generate a counter for the TOTP token calculation.
    QrSize int
    The pixel size of the generated square QR code.
    Skew int
    The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.
    Type string
    MFA type.
    Uuid string
    Resource UUID.
    algorithm String
    Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256, SHA512.
    digits Integer
    The number of digits in the generated TOTP token. This value can either be 6 or 8
    issuer String
    The name of the key's issuing organization.
    keySize Integer
    Specifies the size in bytes of the generated key.
    maxValidationAttempts Integer
    The maximum number of consecutive failed validation attempts allowed.
    methodId String
    Method ID.
    mountAccessor String
    Mount accessor.
    name String
    Method name.
    namespace String
    Target namespace. (requires Enterprise)
    namespaceId String
    Method's namespace ID.
    namespacePath String
    Method's namespace path.
    period Integer
    The length of time in seconds used to generate a counter for the TOTP token calculation.
    qrSize Integer
    The pixel size of the generated square QR code.
    skew Integer
    The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.
    type String
    MFA type.
    uuid String
    Resource UUID.
    algorithm string
    Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256, SHA512.
    digits number
    The number of digits in the generated TOTP token. This value can either be 6 or 8
    issuer string
    The name of the key's issuing organization.
    keySize number
    Specifies the size in bytes of the generated key.
    maxValidationAttempts number
    The maximum number of consecutive failed validation attempts allowed.
    methodId string
    Method ID.
    mountAccessor string
    Mount accessor.
    name string
    Method name.
    namespace string
    Target namespace. (requires Enterprise)
    namespaceId string
    Method's namespace ID.
    namespacePath string
    Method's namespace path.
    period number
    The length of time in seconds used to generate a counter for the TOTP token calculation.
    qrSize number
    The pixel size of the generated square QR code.
    skew number
    The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.
    type string
    MFA type.
    uuid string
    Resource UUID.
    algorithm str
    Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256, SHA512.
    digits int
    The number of digits in the generated TOTP token. This value can either be 6 or 8
    issuer str
    The name of the key's issuing organization.
    key_size int
    Specifies the size in bytes of the generated key.
    max_validation_attempts int
    The maximum number of consecutive failed validation attempts allowed.
    method_id str
    Method ID.
    mount_accessor str
    Mount accessor.
    name str
    Method name.
    namespace str
    Target namespace. (requires Enterprise)
    namespace_id str
    Method's namespace ID.
    namespace_path str
    Method's namespace path.
    period int
    The length of time in seconds used to generate a counter for the TOTP token calculation.
    qr_size int
    The pixel size of the generated square QR code.
    skew int
    The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.
    type str
    MFA type.
    uuid str
    Resource UUID.
    algorithm String
    Specifies the hashing algorithm used to generate the TOTP code. Options include SHA1, SHA256, SHA512.
    digits Number
    The number of digits in the generated TOTP token. This value can either be 6 or 8
    issuer String
    The name of the key's issuing organization.
    keySize Number
    Specifies the size in bytes of the generated key.
    maxValidationAttempts Number
    The maximum number of consecutive failed validation attempts allowed.
    methodId String
    Method ID.
    mountAccessor String
    Mount accessor.
    name String
    Method name.
    namespace String
    Target namespace. (requires Enterprise)
    namespaceId String
    Method's namespace ID.
    namespacePath String
    Method's namespace path.
    period Number
    The length of time in seconds used to generate a counter for the TOTP token calculation.
    qrSize Number
    The pixel size of the generated square QR code.
    skew Number
    The number of delay periods that are allowed when validating a TOTP token. This value can either be 0 or 1.
    type String
    MFA type.
    uuid String
    Resource UUID.

    Import

    Resource can be imported using its uuid field, e.g.

    $ pulumi import vault:identity/mfaTotp:MfaTotp example 0d89c36a-4ff5-4d70-8749-bb6a5598aeec
    

    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.1.0 published on Thursday, Apr 4, 2024 by Pulumi