You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: website/docs/r/iam_virtual_mfa_device.html.markdown
+7-1
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,10 @@ Provides an IAM Virtual MFA Device.
13
13
~> **Note:** All attributes will be stored in the raw state as plain-text.
14
14
[Read more about sensitive data in state](https://www.terraform.io/docs/state/sensitive-data.html).
15
15
16
+
~> **Note:** A virtual MFA device cannot be directly associated with an IAM User from Terraform.
17
+
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.
18
+
The authentication codes can then be used with the AWS CLI command [`aws iam enable-mfa-device`](https://docs.aws.amazon.com/cli/latest/reference/iam/enable-mfa-device.html) or the AWS API call [`EnableMFADevice`](https://docs.aws.amazon.com/IAM/latest/APIReference/API_EnableMFADevice.html).
19
+
16
20
## Example Usage
17
21
18
22
**Using certs on file:**
@@ -37,8 +41,10 @@ In addition to all arguments above, the following attributes are exported:
37
41
38
42
*`arn` - The Amazon Resource Name (ARN) specifying the virtual mfa device.
39
43
*`base_32_string_seed` - The base32 seed defined as specified in [RFC3548](https://tools.ietf.org/html/rfc3548.txt). The `base_32_string_seed` is base64-encoded.
40
-
*`qr_code_png` - 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 otherwise), and Base32String is the seed in base32 format.
44
+
*`enable_date` - The date and time when the virtual MFA device was enabled.
45
+
*`qr_code_png` - 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.
41
46
*`tags_all` - A map of tags assigned to the resource, including those inherited from the provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block).
47
+
*`user_name` - The associated IAM User name if the virtual MFA device is enabled.
0 commit comments