1. Packages
  2. HashiCorp Vault
  3. API Docs
  4. identity
  5. MfaLoginEnforcement
HashiCorp Vault v5.15.0 published on Friday, Sep 8, 2023 by Pulumi

vault.identity.MfaLoginEnforcement

Explore with Pulumi AI

vault logo
HashiCorp Vault v5.15.0 published on Friday, Sep 8, 2023 by Pulumi

    Resource for configuring MFA login-enforcement

    Example Usage

    using System.Collections.Generic;
    using Pulumi;
    using Vault = Pulumi.Vault;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleMfaDuo = new Vault.Identity.MfaDuo("exampleMfaDuo", new()
        {
            SecretKey = "secret-key",
            IntegrationKey = "int-key",
            ApiHostname = "foo.baz",
            PushInfo = "push-info",
        });
    
        var exampleMfaLoginEnforcement = new Vault.Identity.MfaLoginEnforcement("exampleMfaLoginEnforcement", new()
        {
            MfaMethodIds = new[]
            {
                exampleMfaDuo.MethodId,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-vault/sdk/v5/go/vault/identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleMfaDuo, err := identity.NewMfaDuo(ctx, "exampleMfaDuo", &identity.MfaDuoArgs{
    			SecretKey:      pulumi.String("secret-key"),
    			IntegrationKey: pulumi.String("int-key"),
    			ApiHostname:    pulumi.String("foo.baz"),
    			PushInfo:       pulumi.String("push-info"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = identity.NewMfaLoginEnforcement(ctx, "exampleMfaLoginEnforcement", &identity.MfaLoginEnforcementArgs{
    			MfaMethodIds: pulumi.StringArray{
    				exampleMfaDuo.MethodId,
    			},
    		})
    		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.identity.MfaDuo;
    import com.pulumi.vault.identity.MfaDuoArgs;
    import com.pulumi.vault.identity.MfaLoginEnforcement;
    import com.pulumi.vault.identity.MfaLoginEnforcementArgs;
    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 exampleMfaDuo = new MfaDuo("exampleMfaDuo", MfaDuoArgs.builder()        
                .secretKey("secret-key")
                .integrationKey("int-key")
                .apiHostname("foo.baz")
                .pushInfo("push-info")
                .build());
    
            var exampleMfaLoginEnforcement = new MfaLoginEnforcement("exampleMfaLoginEnforcement", MfaLoginEnforcementArgs.builder()        
                .mfaMethodIds(exampleMfaDuo.methodId())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_vault as vault
    
    example_mfa_duo = vault.identity.MfaDuo("exampleMfaDuo",
        secret_key="secret-key",
        integration_key="int-key",
        api_hostname="foo.baz",
        push_info="push-info")
    example_mfa_login_enforcement = vault.identity.MfaLoginEnforcement("exampleMfaLoginEnforcement", mfa_method_ids=[example_mfa_duo.method_id])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as vault from "@pulumi/vault";
    
    const exampleMfaDuo = new vault.identity.MfaDuo("exampleMfaDuo", {
        secretKey: "secret-key",
        integrationKey: "int-key",
        apiHostname: "foo.baz",
        pushInfo: "push-info",
    });
    const exampleMfaLoginEnforcement = new vault.identity.MfaLoginEnforcement("exampleMfaLoginEnforcement", {mfaMethodIds: [exampleMfaDuo.methodId]});
    
    resources:
      exampleMfaDuo:
        type: vault:identity:MfaDuo
        properties:
          secretKey: secret-key
          integrationKey: int-key
          apiHostname: foo.baz
          pushInfo: push-info
      exampleMfaLoginEnforcement:
        type: vault:identity:MfaLoginEnforcement
        properties:
          mfaMethodIds:
            - ${exampleMfaDuo.methodId}
    

    Create MfaLoginEnforcement Resource

    new MfaLoginEnforcement(name: string, args: MfaLoginEnforcementArgs, opts?: CustomResourceOptions);
    @overload
    def MfaLoginEnforcement(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            auth_method_accessors: Optional[Sequence[str]] = None,
                            auth_method_types: Optional[Sequence[str]] = None,
                            identity_entity_ids: Optional[Sequence[str]] = None,
                            identity_group_ids: Optional[Sequence[str]] = None,
                            mfa_method_ids: Optional[Sequence[str]] = None,
                            name: Optional[str] = None,
                            namespace: Optional[str] = None)
    @overload
    def MfaLoginEnforcement(resource_name: str,
                            args: MfaLoginEnforcementArgs,
                            opts: Optional[ResourceOptions] = None)
    func NewMfaLoginEnforcement(ctx *Context, name string, args MfaLoginEnforcementArgs, opts ...ResourceOption) (*MfaLoginEnforcement, error)
    public MfaLoginEnforcement(string name, MfaLoginEnforcementArgs args, CustomResourceOptions? opts = null)
    public MfaLoginEnforcement(String name, MfaLoginEnforcementArgs args)
    public MfaLoginEnforcement(String name, MfaLoginEnforcementArgs args, CustomResourceOptions options)
    
    type: vault:identity:MfaLoginEnforcement
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args MfaLoginEnforcementArgs
    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 MfaLoginEnforcementArgs
    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 MfaLoginEnforcementArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MfaLoginEnforcementArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MfaLoginEnforcementArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    MfaMethodIds List<string>

    Set of MFA method UUIDs.

    AuthMethodAccessors List<string>

    Set of auth method accessor IDs.

    AuthMethodTypes List<string>

    Set of auth method types.

    IdentityEntityIds List<string>

    Set of identity entity IDs.

    IdentityGroupIds List<string>

    Set of identity group IDs.

    Name string

    Login enforcement name.

    Namespace string

    Target namespace. (requires Enterprise)

    MfaMethodIds []string

    Set of MFA method UUIDs.

    AuthMethodAccessors []string

    Set of auth method accessor IDs.

    AuthMethodTypes []string

    Set of auth method types.

    IdentityEntityIds []string

    Set of identity entity IDs.

    IdentityGroupIds []string

    Set of identity group IDs.

    Name string

    Login enforcement name.

    Namespace string

    Target namespace. (requires Enterprise)

    mfaMethodIds List<String>

    Set of MFA method UUIDs.

    authMethodAccessors List<String>

    Set of auth method accessor IDs.

    authMethodTypes List<String>

    Set of auth method types.

    identityEntityIds List<String>

    Set of identity entity IDs.

    identityGroupIds List<String>

    Set of identity group IDs.

    name String

    Login enforcement name.

    namespace String

    Target namespace. (requires Enterprise)

    mfaMethodIds string[]

    Set of MFA method UUIDs.

    authMethodAccessors string[]

    Set of auth method accessor IDs.

    authMethodTypes string[]

    Set of auth method types.

    identityEntityIds string[]

    Set of identity entity IDs.

    identityGroupIds string[]

    Set of identity group IDs.

    name string

    Login enforcement name.

    namespace string

    Target namespace. (requires Enterprise)

    mfa_method_ids Sequence[str]

    Set of MFA method UUIDs.

    auth_method_accessors Sequence[str]

    Set of auth method accessor IDs.

    auth_method_types Sequence[str]

    Set of auth method types.

    identity_entity_ids Sequence[str]

    Set of identity entity IDs.

    identity_group_ids Sequence[str]

    Set of identity group IDs.

    name str

    Login enforcement name.

    namespace str

    Target namespace. (requires Enterprise)

    mfaMethodIds List<String>

    Set of MFA method UUIDs.

    authMethodAccessors List<String>

    Set of auth method accessor IDs.

    authMethodTypes List<String>

    Set of auth method types.

    identityEntityIds List<String>

    Set of identity entity IDs.

    identityGroupIds List<String>

    Set of identity group IDs.

    name String

    Login enforcement name.

    namespace String

    Target namespace. (requires Enterprise)

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    NamespaceId string

    Method's namespace ID.

    NamespacePath string

    Method's namespace path.

    Uuid string

    Resource UUID.

    Id string

    The provider-assigned unique ID for this managed resource.

    NamespaceId string

    Method's namespace ID.

    NamespacePath string

    Method's namespace path.

    Uuid string

    Resource UUID.

    id String

    The provider-assigned unique ID for this managed resource.

    namespaceId String

    Method's namespace ID.

    namespacePath String

    Method's namespace path.

    uuid String

    Resource UUID.

    id string

    The provider-assigned unique ID for this managed resource.

    namespaceId string

    Method's namespace ID.

    namespacePath string

    Method's namespace path.

    uuid string

    Resource UUID.

    id str

    The provider-assigned unique ID for this managed resource.

    namespace_id str

    Method's namespace ID.

    namespace_path str

    Method's namespace path.

    uuid str

    Resource UUID.

    id String

    The provider-assigned unique ID for this managed resource.

    namespaceId String

    Method's namespace ID.

    namespacePath String

    Method's namespace path.

    uuid String

    Resource UUID.

    Look up Existing MfaLoginEnforcement Resource

    Get an existing MfaLoginEnforcement 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?: MfaLoginEnforcementState, opts?: CustomResourceOptions): MfaLoginEnforcement
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auth_method_accessors: Optional[Sequence[str]] = None,
            auth_method_types: Optional[Sequence[str]] = None,
            identity_entity_ids: Optional[Sequence[str]] = None,
            identity_group_ids: Optional[Sequence[str]] = None,
            mfa_method_ids: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            namespace: Optional[str] = None,
            namespace_id: Optional[str] = None,
            namespace_path: Optional[str] = None,
            uuid: Optional[str] = None) -> MfaLoginEnforcement
    func GetMfaLoginEnforcement(ctx *Context, name string, id IDInput, state *MfaLoginEnforcementState, opts ...ResourceOption) (*MfaLoginEnforcement, error)
    public static MfaLoginEnforcement Get(string name, Input<string> id, MfaLoginEnforcementState? state, CustomResourceOptions? opts = null)
    public static MfaLoginEnforcement get(String name, Output<String> id, MfaLoginEnforcementState 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:
    AuthMethodAccessors List<string>

    Set of auth method accessor IDs.

    AuthMethodTypes List<string>

    Set of auth method types.

    IdentityEntityIds List<string>

    Set of identity entity IDs.

    IdentityGroupIds List<string>

    Set of identity group IDs.

    MfaMethodIds List<string>

    Set of MFA method UUIDs.

    Name string

    Login enforcement name.

    Namespace string

    Target namespace. (requires Enterprise)

    NamespaceId string

    Method's namespace ID.

    NamespacePath string

    Method's namespace path.

    Uuid string

    Resource UUID.

    AuthMethodAccessors []string

    Set of auth method accessor IDs.

    AuthMethodTypes []string

    Set of auth method types.

    IdentityEntityIds []string

    Set of identity entity IDs.

    IdentityGroupIds []string

    Set of identity group IDs.

    MfaMethodIds []string

    Set of MFA method UUIDs.

    Name string

    Login enforcement name.

    Namespace string

    Target namespace. (requires Enterprise)

    NamespaceId string

    Method's namespace ID.

    NamespacePath string

    Method's namespace path.

    Uuid string

    Resource UUID.

    authMethodAccessors List<String>

    Set of auth method accessor IDs.

    authMethodTypes List<String>

    Set of auth method types.

    identityEntityIds List<String>

    Set of identity entity IDs.

    identityGroupIds List<String>

    Set of identity group IDs.

    mfaMethodIds List<String>

    Set of MFA method UUIDs.

    name String

    Login enforcement name.

    namespace String

    Target namespace. (requires Enterprise)

    namespaceId String

    Method's namespace ID.

    namespacePath String

    Method's namespace path.

    uuid String

    Resource UUID.

    authMethodAccessors string[]

    Set of auth method accessor IDs.

    authMethodTypes string[]

    Set of auth method types.

    identityEntityIds string[]

    Set of identity entity IDs.

    identityGroupIds string[]

    Set of identity group IDs.

    mfaMethodIds string[]

    Set of MFA method UUIDs.

    name string

    Login enforcement name.

    namespace string

    Target namespace. (requires Enterprise)

    namespaceId string

    Method's namespace ID.

    namespacePath string

    Method's namespace path.

    uuid string

    Resource UUID.

    auth_method_accessors Sequence[str]

    Set of auth method accessor IDs.

    auth_method_types Sequence[str]

    Set of auth method types.

    identity_entity_ids Sequence[str]

    Set of identity entity IDs.

    identity_group_ids Sequence[str]

    Set of identity group IDs.

    mfa_method_ids Sequence[str]

    Set of MFA method UUIDs.

    name str

    Login enforcement name.

    namespace str

    Target namespace. (requires Enterprise)

    namespace_id str

    Method's namespace ID.

    namespace_path str

    Method's namespace path.

    uuid str

    Resource UUID.

    authMethodAccessors List<String>

    Set of auth method accessor IDs.

    authMethodTypes List<String>

    Set of auth method types.

    identityEntityIds List<String>

    Set of identity entity IDs.

    identityGroupIds List<String>

    Set of identity group IDs.

    mfaMethodIds List<String>

    Set of MFA method UUIDs.

    name String

    Login enforcement name.

    namespace String

    Target namespace. (requires Enterprise)

    namespaceId String

    Method's namespace ID.

    namespacePath String

    Method's namespace path.

    uuid String

    Resource UUID.

    Import

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

     $ pulumi import vault:identity/mfaLoginEnforcement:MfaLoginEnforcement example default
    

    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 v5.15.0 published on Friday, Sep 8, 2023 by Pulumi