-
Notifications
You must be signed in to change notification settings - Fork 1
/
ec2.tf
35 lines (34 loc) · 926 Bytes
/
ec2.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
data "aws_iam_policy_document" "ec2_subnet_fullaccess" {
statement {
actions = [
"ec2:CreateSubnet",
"ec2:DeleteSubnet",
"ec2:DisassociateSubnetCidrBlock",
"ec2:ModifySubnetAttribute",
"ec2:DescribeSubnets",
"ec2:AssociateSubnetCidrBlock",
"ec2:CreateDefaultSubnet",
]
resources = var.resources
}
}
data "aws_iam_policy_document" "ec2_securitygroup_fullaccess" {
statement {
sid = "SecurityGroupManagement"
principals {
identifiers = ["arn:aws:iam::${data.aws_caller_identity.current.account_id}:root"]
type = "AWS"
}
actions = [
"ec2:CreateSecurityGroup",
"ec2:DeleteSecurityGroup",
"ec2:AuthorizeSecurityGroup*",
"ec2:RevokeSecurityGroup*",
"ec2:UpdateSecurityGroupRuleDescriptions*",
"ec2:CreateTags",
"ec2:DeleteTags",
"ec2:Describe*",
]
resources = var.resources
}
}