Skip to content

Commit 62a9dbf

Browse files
author
Chris Gilmer
committed
Add logging for mfa creation, which helps in debugging
1 parent 1f0e88e commit 62a9dbf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmd/setup.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ func (sc *SetupConfig) CreateVirtualMFADevice() error {
277277
}
278278

279279
sc.MFASerial = *mfaDeviceOutput.VirtualMFADevice.SerialNumber
280+
sc.Logger.Printf("Generated new virtual MFA device: %q\n", sc.MFASerial)
280281

281282
// For the QR code, create a string that encodes:
282283
// otpauth://totp/$virtualMFADeviceName@$AccountName?secret=$Base32String
@@ -320,6 +321,7 @@ func (sc *SetupConfig) EnableVirtualMFADevice() error {
320321
SerialNumber: aws.String(sc.MFASerial),
321322
UserName: aws.String(sc.IAMUser),
322323
}
324+
sc.Logger.Printf("Enabled virtual MFA device: %q\n", sc.MFASerial)
323325

324326
_, err = svc.EnableMFADevice(enableMFADeviceInput)
325327
if err != nil {

0 commit comments

Comments
 (0)