Pulumi doesn't support aws MFA scenarios does it?
# general
p
Pulumi doesn't support aws MFA scenarios does it?
b
In what way? As in can it bypass the MFA or do you mean you're being asked to enter the MFA when you run
pulumi up
?
b
@powerful-continent-32307 it does, yes - but you need to authenticate with MFA and retrieve a session token I can walk you through it if needed
l
Confirm it works fine. My team uses MFA with Pulumi all the time.
b
@little-cartoon-10569 for my own posterity, what's your workflow?
1
l
Once a day, I grab my 6-digit MFA value from BitWarden and pass it to a bash alias I have,
aws2fa
.
For the next 24 hours, I can use Pulumi 🙂
The alias sets up an AWS profile with the temp creds, and a fixed name. The AWS profile that I use with Pulumi uses that profile as its source.
b
mind sharing that alias? I've recommended
aws-vault
for this before
l
The alias isn't very interesting, it just invokes an image that uses this script as an entrypoint. I think a colleague got the script from an AWS or Pulumi page...
3 profiles involved: identity is the user's profile with creds that need MFA; identity-mfa is a temp profile set up with the creds returned by _get-session-token_; and pulumi is the user's profile that refers to identity-mfa and sets up the assumed role.
(Code edited to remove hard-coded account IDs, untested in this version, you may need to edit to get it to work.)