-
Notifications
You must be signed in to change notification settings - Fork 0
/
entry.tf
49 lines (44 loc) · 1.03 KB
/
entry.tf
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
locals {
entry_type = "school"
entry_name = "entry"
}
module "entry_account" {
source = "./modules/account"
name = local.entry_name
type = local.entry_type
}
resource "aws_iam_user_policy_attachment" "this" {
user = module.entry_account.iam_user_name
policy_arn = aws_iam_policy.this.arn
}
resource "aws_iam_policy" "this" {
policy = data.aws_iam_policy_document.this.json
name = "${local.entry_name}_additional_policy"
}
data "aws_iam_policy_document" "this" {
statement {
actions = [
"rds:*",
"ecr:*",
"elasticache:*",
"route53:*",
"acm:*",
"ecs:*",
"elasticloadbalancing:*",
"kafka:*",
"ec2:CreateVpc",
"iam:CreateRole",
"s3:CreateBucket",
"iam:PassRole",
"servicediscovery:*",
"iam:CreateServiceLinkedRole",
"ec2:DeleteNetworkAclEntry",
"ec2:RunInstances",
"ec2:CreateNetworkAclEntry",
"application-autoscaling:*",
"logs:FilterLogEvents"
]
resources = ["*"]
effect = "Allow"
}
}