1

How can I decrypt generated passwords from output like this:

passwords = {
    "user-1" = "encrypted_password_by_keybase"
    "user-2" = "encrypted_password_by_keybase"
    "user-2" = "encrypted_password_by_keybase"
    .... etc
}

I was trying to use

terraform output -json passwords | jq '.value[0]' |  base64 --decode | keybase pgp decrypt

but obviously i'm doing it wrong. Help please.

Edit: after command terraform output -json passwords I'm getting:

{
   "user_name_1":"string like XI/VTnmEJxRlOA1h79qZRbgXY+L",
   "user_name_2":"string like XI/VTnmEJxRlOA1h79qZRbgXY+L"
   ....etc
}
Maciej
  • 1,209
  • 4
  • 16
  • 26
  • 2
    What output are you expecting? And what does the JSON output look like when you run `terraform output -json passwords`? Do you get an error when you run the command in the question? If so can you edit your question to include it please? – ydaetskcoR Jun 23 '20 at 07:48
  • Edited question with output – Maciej Jun 23 '20 at 08:49

0 Answers0