Skip to content

Instantly share code, notes, and snippets.

@knishioka
Created July 27, 2019 14:40
Show Gist options
  • Save knishioka/45201e3f1ac5f1f3fdd8fff277579133 to your computer and use it in GitHub Desktop.
Save knishioka/45201e3f1ac5f1f3fdd8fff277579133 to your computer and use it in GitHub Desktop.
terraformでiamのパスがリストで返ってくるときに複合するための手順
for encrypted_pass in $(terraform output -json | jq -r '.aws_iam_user_admin_password.value[]'); do
pass=$(echo $encrypted_pass | tr -d '\n' | base64 -D | gpg -dr $keyname)
echo $pass
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment