Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- aws iam list-users --profile=${DEV_PROFILE} | grep UserName | awk '{ print substr($2, 2, length($2)-3) }' > iam_users.txt
- terraform init
- INPUT="./iam_users.txt"
- while IFS= read -r USER
- do
- terraform import aws_iam_user.${USER//\./_} "$USER"
- done < "${INPUT}"
- rm iam_users.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement