MfaDuo
Provides a resource to manage Duo MFA.
Note this feature is available only with Vault Enterprise.
Example Usage
using Pulumi;
using Vault = Pulumi.Vault;
class MyStack : Stack
{
public MyStack()
{
var userpass = new Vault.AuthBackend("userpass", new Vault.AuthBackendArgs
{
Path = "userpass",
Type = "userpass",
});
var myDuo = new Vault.MfaDuo("myDuo", new Vault.MfaDuoArgs
{
ApiHostname = "api-2b5c39f5.duosecurity.com",
IntegrationKey = "BIACEUEAXI20BNWTEYXT",
MountAccessor = userpass.Accessor,
SecretKey = "8C7THtrIigh2rPZQMbguugt8IUftWhMRCOBzbuyz",
});
}
}
package main
import (
"github.com/pulumi/pulumi-vault/sdk/v3/go/vault"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
userpass, err := vault.NewAuthBackend(ctx, "userpass", &vault.AuthBackendArgs{
Path: pulumi.String("userpass"),
Type: pulumi.String("userpass"),
})
if err != nil {
return err
}
_, err = vault.NewMfaDuo(ctx, "myDuo", &vault.MfaDuoArgs{
ApiHostname: pulumi.String("api-2b5c39f5.duosecurity.com"),
IntegrationKey: pulumi.String("BIACEUEAXI20BNWTEYXT"),
MountAccessor: userpass.Accessor,
SecretKey: pulumi.String("8C7THtrIigh2rPZQMbguugt8IUftWhMRCOBzbuyz"),
})
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_vault as vault
userpass = vault.AuthBackend("userpass",
path="userpass",
type="userpass")
my_duo = vault.MfaDuo("myDuo",
api_hostname="api-2b5c39f5.duosecurity.com",
integration_key="BIACEUEAXI20BNWTEYXT",
mount_accessor=userpass.accessor,
secret_key="8C7THtrIigh2rPZQMbguugt8IUftWhMRCOBzbuyz")
import * as pulumi from "@pulumi/pulumi";
import * as vault from "@pulumi/vault";
const userpass = new vault.AuthBackend("userpass", {
path: "userpass",
type: "userpass",
});
const myDuo = new vault.MfaDuo("my_duo", {
apiHostname: "api-2b5c39f5.duosecurity.com",
integrationKey: "BIACEUEAXI20BNWTEYXT",
mountAccessor: userpass.accessor,
secretKey: "8C7THtrIigh2rPZQMbguugt8IUftWhMRCOBzbuyz",
});
Create a MfaDuo Resource
new MfaDuo(name: string, args: MfaDuoArgs, opts?: CustomResourceOptions);
def MfaDuo(resource_name: str, opts: Optional[ResourceOptions] = None, api_hostname: Optional[str] = None, integration_key: Optional[str] = None, mount_accessor: Optional[str] = None, name: Optional[str] = None, push_info: Optional[str] = None, secret_key: Optional[str] = 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)
- 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.
- opts ResourceOptions
- A bag of options that control this 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.
MfaDuo Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The MfaDuo resource accepts the following input properties:
- Api
Hostname string (string: <required>)
- API hostname for Duo.- Integration
Key string (string: <required>)
- Integration key for Duo.- Mount
Accessor string (string: <required>)
- The mount to tie this method to for use in automatic mappings. The mapping will use the Name field of Aliases associated with this mount as the username in the mapping.- Secret
Key string (string: <required>)
- Secret key for Duo.- Name string
(string: <required>)
– Name of the MFA method.- Push
Info string (string)
- Push information for Duo.- Username
Format string (string)
- A format string for mapping Identity names to MFA method names. Values to substitute should be placed in{{}}
. For example,"{{alias.name}}@example.com"
. If blank, the Alias’s Name field will be used as-is. Currently-supported mappings: - alias.name: The name returned by the mount configured via themount_accessor
parameter - entity.name: The name configured for the Entity - alias.metadata.<key>
: The value of the Alias’s metadata parameter - entity.metadata.<key>
: The value of the Entity’s metadata parameter
- Api
Hostname string (string: <required>)
- API hostname for Duo.- Integration
Key string (string: <required>)
- Integration key for Duo.- Mount
Accessor string (string: <required>)
- The mount to tie this method to for use in automatic mappings. The mapping will use the Name field of Aliases associated with this mount as the username in the mapping.- Secret
Key string (string: <required>)
- Secret key for Duo.- Name string
(string: <required>)
– Name of the MFA method.- Push
Info string (string)
- Push information for Duo.- Username
Format string (string)
- A format string for mapping Identity names to MFA method names. Values to substitute should be placed in{{}}
. For example,"{{alias.name}}@example.com"
. If blank, the Alias’s Name field will be used as-is. Currently-supported mappings: - alias.name: The name returned by the mount configured via themount_accessor
parameter - entity.name: The name configured for the Entity - alias.metadata.<key>
: The value of the Alias’s metadata parameter - entity.metadata.<key>
: The value of the Entity’s metadata parameter
- api
Hostname string (string: <required>)
- API hostname for Duo.- integration
Key string (string: <required>)
- Integration key for Duo.- mount
Accessor string (string: <required>)
- The mount to tie this method to for use in automatic mappings. The mapping will use the Name field of Aliases associated with this mount as the username in the mapping.- secret
Key string (string: <required>)
- Secret key for Duo.- name string
(string: <required>)
– Name of the MFA method.- push
Info string (string)
- Push information for Duo.- username
Format string (string)
- A format string for mapping Identity names to MFA method names. Values to substitute should be placed in{{}}
. For example,"{{alias.name}}@example.com"
. If blank, the Alias’s Name field will be used as-is. Currently-supported mappings: - alias.name: The name returned by the mount configured via themount_accessor
parameter - entity.name: The name configured for the Entity - alias.metadata.<key>
: The value of the Alias’s metadata parameter - entity.metadata.<key>
: The value of the Entity’s metadata parameter
- api_
hostname str (string: <required>)
- API hostname for Duo.- integration_
key str (string: <required>)
- Integration key for Duo.- mount_
accessor str (string: <required>)
- The mount to tie this method to for use in automatic mappings. The mapping will use the Name field of Aliases associated with this mount as the username in the mapping.- secret_
key str (string: <required>)
- Secret key for Duo.- name str
(string: <required>)
– Name of the MFA method.- push_
info str (string)
- Push information for Duo.- username_
format str (string)
- A format string for mapping Identity names to MFA method names. Values to substitute should be placed in{{}}
. For example,"{{alias.name}}@example.com"
. If blank, the Alias’s Name field will be used as-is. Currently-supported mappings: - alias.name: The name returned by the mount configured via themount_accessor
parameter - entity.name: The name configured for the Entity - alias.metadata.<key>
: The value of the Alias’s metadata parameter - entity.metadata.<key>
: The value of the Entity’s metadata parameter
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.
- 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.
Look up an 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, mount_accessor: Optional[str] = None, name: Optional[str] = None, push_info: Optional[str] = None, secret_key: Optional[str] = None, username_format: 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)
- 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.
The following state arguments are supported:
- Api
Hostname string (string: <required>)
- API hostname for Duo.- Integration
Key string (string: <required>)
- Integration key for Duo.- Mount
Accessor string (string: <required>)
- The mount to tie this method to for use in automatic mappings. The mapping will use the Name field of Aliases associated with this mount as the username in the mapping.- Name string
(string: <required>)
– Name of the MFA method.- Push
Info string (string)
- Push information for Duo.- Secret
Key string (string: <required>)
- Secret key for Duo.- Username
Format string (string)
- A format string for mapping Identity names to MFA method names. Values to substitute should be placed in{{}}
. For example,"{{alias.name}}@example.com"
. If blank, the Alias’s Name field will be used as-is. Currently-supported mappings: - alias.name: The name returned by the mount configured via themount_accessor
parameter - entity.name: The name configured for the Entity - alias.metadata.<key>
: The value of the Alias’s metadata parameter - entity.metadata.<key>
: The value of the Entity’s metadata parameter
- Api
Hostname string (string: <required>)
- API hostname for Duo.- Integration
Key string (string: <required>)
- Integration key for Duo.- Mount
Accessor string (string: <required>)
- The mount to tie this method to for use in automatic mappings. The mapping will use the Name field of Aliases associated with this mount as the username in the mapping.- Name string
(string: <required>)
– Name of the MFA method.- Push
Info string (string)
- Push information for Duo.- Secret
Key string (string: <required>)
- Secret key for Duo.- Username
Format string (string)
- A format string for mapping Identity names to MFA method names. Values to substitute should be placed in{{}}
. For example,"{{alias.name}}@example.com"
. If blank, the Alias’s Name field will be used as-is. Currently-supported mappings: - alias.name: The name returned by the mount configured via themount_accessor
parameter - entity.name: The name configured for the Entity - alias.metadata.<key>
: The value of the Alias’s metadata parameter - entity.metadata.<key>
: The value of the Entity’s metadata parameter
- api
Hostname string (string: <required>)
- API hostname for Duo.- integration
Key string (string: <required>)
- Integration key for Duo.- mount
Accessor string (string: <required>)
- The mount to tie this method to for use in automatic mappings. The mapping will use the Name field of Aliases associated with this mount as the username in the mapping.- name string
(string: <required>)
– Name of the MFA method.- push
Info string (string)
- Push information for Duo.- secret
Key string (string: <required>)
- Secret key for Duo.- username
Format string (string)
- A format string for mapping Identity names to MFA method names. Values to substitute should be placed in{{}}
. For example,"{{alias.name}}@example.com"
. If blank, the Alias’s Name field will be used as-is. Currently-supported mappings: - alias.name: The name returned by the mount configured via themount_accessor
parameter - entity.name: The name configured for the Entity - alias.metadata.<key>
: The value of the Alias’s metadata parameter - entity.metadata.<key>
: The value of the Entity’s metadata parameter
- api_
hostname str (string: <required>)
- API hostname for Duo.- integration_
key str (string: <required>)
- Integration key for Duo.- mount_
accessor str (string: <required>)
- The mount to tie this method to for use in automatic mappings. The mapping will use the Name field of Aliases associated with this mount as the username in the mapping.- name str
(string: <required>)
– Name of the MFA method.- push_
info str (string)
- Push information for Duo.- secret_
key str (string: <required>)
- Secret key for Duo.- username_
format str (string)
- A format string for mapping Identity names to MFA method names. Values to substitute should be placed in{{}}
. For example,"{{alias.name}}@example.com"
. If blank, the Alias’s Name field will be used as-is. Currently-supported mappings: - alias.name: The name returned by the mount configured via themount_accessor
parameter - entity.name: The name configured for the Entity - alias.metadata.<key>
: The value of the Alias’s metadata parameter - entity.metadata.<key>
: The value of the Entity’s metadata parameter
Import
Mounts can be imported using the path
, e.g.
$ pulumi import vault:index/mfaDuo:MfaDuo my_duo my_duo
Package Details
- Repository
- https://github.com/pulumi/pulumi-vault
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vault
Terraform Provider.