Managing IAM users manually in AWS is fine… until it’s not. Once your team grows, clicking around the console becomes pain + chaos.
So, I built a Terraform-Based IAM User management system where:
Users come from a CSV file
Groups and memberships are auto assigned
Everything is reproducible, version-controlled, and scalable
Overview
This demo shows how to manage:
IAM Users
IAM Groups
Group Memberships using Terraform with a CSV file as the single source of truth. Instead of manually creating users, you just update a CSV -> run terraform apply -> done.
first_name,last_name,department,job_title Michael,Scott,Education,Regional Manager Dwight,Schrute,Sales,Assistant to the Regional Manager Jim,Halpert,Sales,Sales Representative Pam,Beesly,Reception,Receptionist Ryan,Howard,Temps,Temp Andy,Bernard,Sales,Sales Representative Robert,California,Corporate,CEO Stanley,Hudson,Sales,Sales Representative Kevin,Malone,Accounting,Accountant Angela,Martin,Accounting,Accountant Oscar,Martinez,Accounting,Accountant Phyllis,Vance,Sales,Sales Representative Toby,Flenderson,HR,HR Representative Kelly,Kapoor,Customer Service,Customer Service Representative Darryl,Philbin,Warehouse,Warehouse Foreman Creed,Bratton,Quality Assurance,Quality Assurance Meredith,Palmer,Supplier Relations,Supplier Relations Erin,Hannon,Reception,Receptionist Gabe,Lewis,Corporate,Coordinating Director of Emerging Regions Jan,Levinson,Corporate,Vice President of Northeast Sales David,Wallace,Corporate,CFO Holly,Flax,HR,HR Representative Charles,Miner,Corporate,Vice President of the Northeast Region Jo,Bennett,Corporate,CEO of Sabre Clark,Green,Sales,Sales Representative Pete,Miller,Customer Service,Customer Service Representative
Enter fullscreen mode
Exit fullscreen mode
Cleanup
To remove all created resources:
terraform destroy
Enter fullscreen mode
Exit fullscreen mode
Warning: This will delete all users, groups, and memberships.
Troubleshooting:
Error: Backend Access Denied Check your AWS credentials:
aws sts get-caller-identity
Enter fullscreen mode
Exit fullscreen mode
Error: User Already Exists Import existing user into state:
Залишити відповідь