VirtualMfaDevice

class VirtualMfaDevice : KotlinCustomResource

Provides an IAM Virtual MFA Device.

Note: All attributes will be stored in the raw state as plain-text. Note: A virtual MFA device cannot be directly associated with an IAM User from the provider. To associate the virtual MFA device with a user and enable it, use the code returned in either base_32_string_seed or qr_code_png to generate TOTP authentication codes. The authentication codes can then be used with the AWS CLI command aws iam enable-mfa-device or the AWS API call EnableMFADevice.

Example Usage

Using certs on file:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.iam.VirtualMfaDevice("example", {virtualMfaDeviceName: "example"});
import pulumi
import pulumi_aws as aws
example = aws.iam.VirtualMfaDevice("example", virtual_mfa_device_name="example")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Iam.VirtualMfaDevice("example", new()
{
VirtualMfaDeviceName = "example",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := iam.NewVirtualMfaDevice(ctx, "example", &iam.VirtualMfaDeviceArgs{
VirtualMfaDeviceName: pulumi.String("example"),
})
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.aws.iam.VirtualMfaDevice;
import com.pulumi.aws.iam.VirtualMfaDeviceArgs;
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 VirtualMfaDevice("example", VirtualMfaDeviceArgs.builder()
.virtualMfaDeviceName("example")
.build());
}
}
resources:
example:
type: aws:iam:VirtualMfaDevice
properties:
virtualMfaDeviceName: example

Import

Using pulumi import, import IAM Virtual MFA Devices using the arn. For example:

$ pulumi import aws:iam/virtualMfaDevice:VirtualMfaDevice example arn:aws:iam::123456789012:mfa/example

Properties

Link copied to clipboard
val arn: Output<String>

The Amazon Resource Name (ARN) specifying the virtual mfa device.

Link copied to clipboard

The base32 seed defined as specified in RFC3548. The base_32_string_seed is base64-encoded.

Link copied to clipboard
val enableDate: Output<String>

The date and time when the virtual MFA device was enabled.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val path: Output<String>?

The path for the virtual MFA device.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val qrCodePng: Output<String>

A QR code PNG image that encodes otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String where $virtualMFADeviceName is one of the create call arguments. AccountName is the user name if set (otherwise, the account ID), and Base32String is the seed in base32 format.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Map of resource tags for the virtual mfa device. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val userName: Output<String>

The associated IAM User name if the virtual MFA device is enabled.

Link copied to clipboard

The name of the virtual MFA device. Use with path to uniquely identify a virtual MFA device.