|
1 | 1 | # Automating AWS with Terraform
|
2 | 2 |
|
3 |
| -## Prerequisites Setup |
| 3 | +## Pre-requisite Setup |
4 | 4 |
|
5 | 5 | #### AWS Account - Free Tier
|
6 |
| - |
7 | 6 | - [Sign up](https://aws.amazon.com/free) for AWS Free Tier account if you do not already have one
|
8 | 7 |
|
9 | 8 | #### Create an IAM user
|
10 |
| - |
11 |
| -- |
12 |
| - |
13 |
| -#### AWS CLI installation and configuration |
14 |
| - |
15 |
| -- |
16 |
| - |
| 9 | + 1. Log into your root AWS account |
| 10 | + 2. Select Services > IAM |
| 11 | + 3. On the left nav bar select 'Users' |
| 12 | + 4. Select 'Add user' |
| 13 | + 5. Create a username 'terraform-admin' |
| 14 | + 6. Select AWS access type as Programmatic access (and AWS management console access to view resources on the dashboard) |
| 15 | + 7. Select Next: Permissions |
| 16 | + 8. Select Create group |
| 17 | + 9. Add a group name 'admins' |
| 18 | + 10. Check AdministratorsAccess and Create group, check group |
| 19 | + 11. Select Next: Tags |
| 20 | + 12. Select Next: Review |
| 21 | + 13. Select Create User |
| 22 | + 14. You will need the generated access key Id, and the secret access key (Download the csv provided or store these values) |
| 23 | + |
| 24 | + |
| 25 | +#### AWS CLI installation |
| 26 | + 1. mac: `brew install awscli` | `aws --version` |
| 27 | + 2. windows: [instructions](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-windows.html) |
| 28 | + 3. linux: [instructions](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html) |
| 29 | + |
| 30 | +#### AWS CLI configuration |
| 31 | + 1. aws basic configuration |
| 32 | +``` |
| 33 | + aws configure |
| 34 | + AWS Access Key ID [None]: <access key> |
| 35 | + AWS Secret Access Key [None]: <secret key> |
| 36 | + Default region name [None]: us-east-1 |
| 37 | + Default output format [None]: json |
| 38 | +``` |
| 39 | + |
| 40 | + |
17 | 41 | #### Terraform installation
|
18 |
| - |
19 |
| -- |
| 42 | + 1. mac: `brew install terraform` | `terraform -help` |
| 43 | + 2. windows: `choco install terraform` | `terraform -help` |
| 44 | + 3. linux: [download](https://www.terraform.io/downloads.html) | `echo $PATH` | ` mv ~/Downloads/terraform /usr/local/bin/` | `terraform -help` |
0 commit comments