Skip to content

Commit 8d68ae1

Browse files
author
Chris Gilmer
committed
Re-add the mfa device to the base profile. This is needed for several actions that use the base credentials for provisioning AWS.
1 parent 67a0f96 commit 8d68ae1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cmd/setup.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,9 @@ func (sc *SetupConfig) UpdateAWSConfigFile() error {
415415
}
416416

417417
sc.BaseProfile = &vault.ProfileSection{
418-
Name: sc.BaseProfileName,
419-
Region: sc.Region,
418+
Name: sc.BaseProfileName,
419+
Region: sc.Region,
420+
MfaSerial: sc.MFASerial,
420421
}
421422

422423
// Add the base profile

cmd/setup_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ output=json
9191

9292
testBaseSection, ok := config.ProfileSection("test-id-base")
9393
suite.True(ok)
94-
suite.Equal(len(testBaseSection.MfaSerial), 0)
94+
suite.Equal(testBaseSection.MfaSerial, mfaSerial)
9595
suite.Equal(testBaseSection.Region, "us-west-2")
9696
// suite.Equal(testBaseSection.Output, "json")
9797

0 commit comments

Comments
 (0)