generated from cloudposse/terraform-example-module
-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathiam-policies.yaml
53 lines (50 loc) · 1.1 KB
/
iam-policies.yaml
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
50
51
52
53
- sid: "DenyIAMCreatingUsers"
effect: "Deny"
actions:
- "iam:CreateUser"
- "iam:CreateAccessKey"
resources:
- "*"
- sid: "DenyIAMRolesChanges"
effect: "Deny"
actions:
- "iam:AttachRolePolicy"
- "iam:DeleteRole"
- "iam:DeleteRolePermissionsBoundary"
- "iam:DeleteRolePolicy"
- "iam:DetachRolePolicy"
- "iam:PutRolePermissionsBoundary"
- "iam:PutRolePolicy"
- "iam:UpdateAssumeRolePolicy"
- "iam:UpdateRole"
- "iam:UpdateRoleDescription"
resources:
- "*"
- sid: "DenyIAMNoMFA"
effect: "Deny"
not_actions:
- "iam:CreateVirtualMFADevice"
- "iam:EnableMFADevice"
- "iam:GetUser"
- "iam:ListMFADevices"
- "iam:ListVirtualMFADevices"
- "iam:ResyncMFADevice"
- "sts:GetSessionToken"
condition:
- test: "BoolIfExists"
variable: "aws:MultiFactorAuthPresent"
values:
- false
resources:
- "*"
- sid: "DenyIAMRootAccount"
effect: "Deny"
actions:
- "*"
condition:
- test: "StringLike"
variable: "aws:PrincipalArn"
values:
- "arn:aws:iam::*:root"
resources:
- "*"