We start by creating a Terraform EC2 key-pair and a Terraform IAM user as in previous chapters (do not forget to write down access/secret API keys). Then we grant permissions to the IAM user to perform actions with the EC2, IAM, S3 and CodeCommit services:
Note
Please refer to: https://github.com/PacktPublishing/Implementing-DevOps-on-AWS/blob/master/5585_04_CodeFiles/Terraform/iam_user_policy.json.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "NotAction": [ "codecommit:DeleteRepository" ], "Resource": "*" }, { "Effect": "Allow", "NotAction": [ "s3:DeleteBucket" ], "Resource": "*" }, { "Sid": "Stmt1461764665000", "Effect": "Allow", "Action": [ "ec2:AllocateAddress...