1. Packages
  2. Pulumi Vault Provider
  3. API Docs
  4. identity
  5. MfaDuo
HashiCorp Vault v6.4.0 published on Wednesday, Nov 20, 2024 by Pulumi

vault.identity.MfaDuo

Explore with Pulumi AI

vault logo
HashiCorp Vault v6.4.0 published on Wednesday, Nov 20, 2024 by Pulumi

    Resource for configuring the duo MFA method.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const example = new vault.identity.MfaDuo("example", {
        apiHostname: "api-xxxxxxxx.duosecurity.com",
        secretKey: "secret-key",
        integrationKey: "secret-int-key",
    });
    
    import pulumi
    import pulumi_vault as vault
    
    example = vault.identity.MfaDuo("example",
        api_hostname="api-xxxxxxxx.duosecurity.com",
        secret_key="secret-key",
        integration_key="secret-int-key")
    
    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.NewMfaDuo(ctx, "example", &identity.MfaDuoArgs{
    			ApiHostname:    pulumi.String("api-xxxxxxxx.duosecurity.com"),
    			SecretKey:      pulumi.String("secret-key"),
    			IntegrationKey: pulumi.String("secret-int-key"),
    		})
    		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.MfaDuo("example", new()
        {
            ApiHostname = "api-xxxxxxxx.duosecurity.com",
            SecretKey = "secret-key",
            IntegrationKey = "secret-int-key",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vault.identity.MfaDuo;
    import com.pulumi.vault.identity.MfaDuoArgs;
    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 MfaDuo("example", MfaDuoArgs.builder()
                .apiHostname("api-xxxxxxxx.duosecurity.com")
                .secretKey("secret-key")
                .integrationKey("secret-int-key")
                .build());
    
        }
    }
    
    resources:
      example:
        type: vault:identity:MfaDuo
        properties:
          apiHostname: api-xxxxxxxx.duosecurity.com
          secretKey: secret-key
          integrationKey: secret-int-key
    

    Create MfaDuo Resource

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

    Constructor syntax

    new MfaDuo(name: string, args: MfaDuoArgs, opts?: CustomResourceOptions);
    @overload
    def MfaDuo(resource_name: str,
               args: MfaDuoArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def MfaDuo(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               api_hostname: Optional[str] = None,
               integration_key: Optional[str] = None,
               secret_key: Optional[str] = None,
               namespace: Optional[str] = None,
               push_info: Optional[str] = None,
               use_passcode: Optional[bool] = None,
               username_format: Optional[str] = None)
    func NewMfaDuo(ctx *Context, name string, args MfaDuoArgs, opts ...ResourceOption) (*MfaDuo, error)
    public MfaDuo(string name, MfaDuoArgs args, CustomResourceOptions? opts = null)
    public MfaDuo(String name, MfaDuoArgs args)
    public MfaDuo(String name, MfaDuoArgs args, CustomResourceOptions options)
    
    type: vault:identity:MfaDuo
    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 MfaDuoArgs
    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 MfaDuoArgs
    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 MfaDuoArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MfaDuoArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MfaDuoArgs
    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 mfaDuoResource = new Vault.Identity.MfaDuo("mfaDuoResource", new()
    {
        ApiHostname = "string",
        IntegrationKey = "string",
        SecretKey = "string",
        Namespace = "string",
        PushInfo = "string",
        UsePasscode = false,
        UsernameFormat = "string",
    });
    
    example, err := identity.NewMfaDuo(ctx, "mfaDuoResource", &identity.MfaDuoArgs{
    	ApiHostname:    pulumi.String("string"),
    	IntegrationKey: pulumi.String("string"),
    	SecretKey:      pulumi.String("string"),
    	Namespace:      pulumi.String("string"),
    	PushInfo:       pulumi.String("string"),
    	UsePasscode:    pulumi.Bool(false),
    	UsernameFormat: pulumi.String("string"),
    })
    
    var mfaDuoResource = new MfaDuo("mfaDuoResource", MfaDuoArgs.builder()
        .apiHostname("string")
        .integrationKey("string")
        .secretKey("string")
        .namespace("string")
        .pushInfo("string")
        .usePasscode(false)
        .usernameFormat("string")
        .build());
    
    mfa_duo_resource = vault.identity.MfaDuo("mfaDuoResource",
        api_hostname="string",
        integration_key="string",
        secret_key="string",
        namespace="string",
        push_info="string",
        use_passcode=False,
        username_format="string")
    
    const mfaDuoResource = new vault.identity.MfaDuo("mfaDuoResource", {
        apiHostname: "string",
        integrationKey: "string",
        secretKey: "string",
        namespace: "string",
        pushInfo: "string",
        usePasscode: false,
        usernameFormat: "string",
    });
    
    type: vault:identity:MfaDuo
    properties:
        apiHostname: string
        integrationKey: string
        namespace: string
        pushInfo: string
        secretKey: string
        usePasscode: false
        usernameFormat: string
    

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

    ApiHostname string
    API hostname for Duo
    IntegrationKey string
    Integration key for Duo
    SecretKey string
    Secret key for Duo
    Namespace string
    Target namespace. (requires Enterprise)
    PushInfo string
    Push information for Duo.
    UsePasscode bool
    Require passcode upon MFA validation.
    UsernameFormat string
    A template string for mapping Identity names to MFA methods.
    ApiHostname string
    API hostname for Duo
    IntegrationKey string
    Integration key for Duo
    SecretKey string
    Secret key for Duo
    Namespace string
    Target namespace. (requires Enterprise)
    PushInfo string
    Push information for Duo.
    UsePasscode bool
    Require passcode upon MFA validation.
    UsernameFormat string
    A template string for mapping Identity names to MFA methods.
    apiHostname String
    API hostname for Duo
    integrationKey String
    Integration key for Duo
    secretKey String
    Secret key for Duo
    namespace String
    Target namespace. (requires Enterprise)
    pushInfo String
    Push information for Duo.
    usePasscode Boolean
    Require passcode upon MFA validation.
    usernameFormat String
    A template string for mapping Identity names to MFA methods.
    apiHostname string
    API hostname for Duo
    integrationKey string
    Integration key for Duo
    secretKey string
    Secret key for Duo
    namespace string
    Target namespace. (requires Enterprise)
    pushInfo string
    Push information for Duo.
    usePasscode boolean
    Require passcode upon MFA validation.
    usernameFormat string
    A template string for mapping Identity names to MFA methods.
    api_hostname str
    API hostname for Duo
    integration_key str
    Integration key for Duo
    secret_key str
    Secret key for Duo
    namespace str
    Target namespace. (requires Enterprise)
    push_info str
    Push information for Duo.
    use_passcode bool
    Require passcode upon MFA validation.
    username_format str
    A template string for mapping Identity names to MFA methods.
    apiHostname String
    API hostname for Duo
    integrationKey String
    Integration key for Duo
    secretKey String
    Secret key for Duo
    namespace String
    Target namespace. (requires Enterprise)
    pushInfo String
    Push information for Duo.
    usePasscode Boolean
    Require passcode upon MFA validation.
    usernameFormat String
    A template string for mapping Identity names to MFA methods.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MfaDuo 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 MfaDuo Resource

    Get an existing MfaDuo 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?: MfaDuoState, opts?: CustomResourceOptions): MfaDuo
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_hostname: Optional[str] = None,
            integration_key: Optional[str] = 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,
            push_info: Optional[str] = None,
            secret_key: Optional[str] = None,
            type: Optional[str] = None,
            use_passcode: Optional[bool] = None,
            username_format: Optional[str] = None,
            uuid: Optional[str] = None) -> MfaDuo
    func GetMfaDuo(ctx *Context, name string, id IDInput, state *MfaDuoState, opts ...ResourceOption) (*MfaDuo, error)
    public static MfaDuo Get(string name, Input<string> id, MfaDuoState? state, CustomResourceOptions? opts = null)
    public static MfaDuo get(String name, Output<String> id, MfaDuoState 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:
    ApiHostname string
    API hostname for Duo
    IntegrationKey string
    Integration key for Duo
    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.
    PushInfo string
    Push information for Duo.
    SecretKey string
    Secret key for Duo
    Type string
    MFA type.
    UsePasscode bool
    Require passcode upon MFA validation.
    UsernameFormat string
    A template string for mapping Identity names to MFA methods.
    Uuid string
    Resource UUID.
    ApiHostname string
    API hostname for Duo
    IntegrationKey string
    Integration key for Duo
    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.
    PushInfo string
    Push information for Duo.
    SecretKey string
    Secret key for Duo
    Type string
    MFA type.
    UsePasscode bool
    Require passcode upon MFA validation.
    UsernameFormat string
    A template string for mapping Identity names to MFA methods.
    Uuid string
    Resource UUID.
    apiHostname String
    API hostname for Duo
    integrationKey String
    Integration key for Duo
    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.
    pushInfo String
    Push information for Duo.
    secretKey String
    Secret key for Duo
    type String
    MFA type.
    usePasscode Boolean
    Require passcode upon MFA validation.
    usernameFormat String
    A template string for mapping Identity names to MFA methods.
    uuid String
    Resource UUID.
    apiHostname string
    API hostname for Duo
    integrationKey string
    Integration key for Duo
    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.
    pushInfo string
    Push information for Duo.
    secretKey string
    Secret key for Duo
    type string
    MFA type.
    usePasscode boolean
    Require passcode upon MFA validation.
    usernameFormat string
    A template string for mapping Identity names to MFA methods.
    uuid string
    Resource UUID.
    api_hostname str
    API hostname for Duo
    integration_key str
    Integration key for Duo
    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.
    push_info str
    Push information for Duo.
    secret_key str
    Secret key for Duo
    type str
    MFA type.
    use_passcode bool
    Require passcode upon MFA validation.
    username_format str
    A template string for mapping Identity names to MFA methods.
    uuid str
    Resource UUID.
    apiHostname String
    API hostname for Duo
    integrationKey String
    Integration key for Duo
    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.
    pushInfo String
    Push information for Duo.
    secretKey String
    Secret key for Duo
    type String
    MFA type.
    usePasscode Boolean
    Require passcode upon MFA validation.
    usernameFormat String
    A template string for mapping Identity names to MFA methods.
    uuid String
    Resource UUID.

    Import

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

    $ pulumi import vault:identity/mfaDuo:MfaDuo 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.4.0 published on Wednesday, Nov 20, 2024 by Pulumi