Requirments:
- terraform 0.13 ( tested on 0.13.2)
https://github.com/tfutils/tfenv
- aws subscription
- aws credentials
To run this example you need to execute:
$ terraform init
$ terraform plan
$ terraform apply
Or the same with using of Makefile
make all - will validate and apply default configuration
make destroy - destroy all resources and cleanup output files
-
Which resources will you use, and how will they interact?
- The resources used are;
- AWS Organizations
- Consolidates and centrally manages multiple AWS accounts.
- We will create four accounts within the organization.
- users account only for user management
- IAM
- Create IAM groups, roles, and policies for controlling access to the AWS accounts and their respective resources
-
terraform apply
will create-
users and groups
Eugene, Milo, Abigail, Aidan
asDevelopers
Santiago, Felix, Morgan
asOps
-
assign users to the groups
-
creates assumable roles for each group with permissions for example
developers
andops
-
Small useful tricks
Clean .terraform of huge files
- git rm --cached --ignore-unmatch .terraform/