-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiam.tf
More file actions
33 lines (29 loc) · 813 Bytes
/
iam.tf
File metadata and controls
33 lines (29 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
resource "aws_iam_role" "bigdevbox-terraform" {
name = "bigdevbox-admin"
description = "Default Admin IAM Role for bigdevbox instances"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
EOF
tags = {
bigdevbox = "bigdevbox-admin"
}
}
resource "aws_iam_role_policy_attachment" "bigdevbox-terraform-admin-attachment" {
role = aws_iam_role.bigdevbox-terraform.name
policy_arn = "arn:aws:iam::aws:policy/AdministratorAccess"
}
resource "aws_iam_instance_profile" "bigdevbox-terraform-admin" {
name = "bigdevbox-admin"
role = aws_iam_role.bigdevbox-terraform.name
}