-
Notifications
You must be signed in to change notification settings - Fork 1
/
policies.hcl
55 lines (55 loc) · 1.17 KB
/
policies.hcl
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
54
55
locals {
statements = {
keys_account_root = jsonencode(
{
"Sid" : "Allow keys account to manage the KMS key.",
"Effect" : "Allow",
"Principal" : {
"AWS" : "arn:aws:iam::YOUR_KEYS_ACCOUNT_ID:root"
},
"Action" : "kms:*",
"Resource" : "*"
}
)
}
actions = {
key_usage = jsonencode([
"kms:Encrypt",
"kms:Decrypt",
"kms:ReEncrypt*",
"kms:GenerateDataKey*",
"kms:DescribeKey"
])
key_decrypt = jsonencode([
"kms:Decrypt",
"kms:GenerateDataKey*",
"kms:DescribeKey"
])
key_encrypt = jsonencode([
"kms:Encrypt",
"kms:GenerateDataKey*",
"kms:DescribeKey"
])
key_admin = jsonencode([
"kms:Create*",
"kms:Describe*",
"kms:Enable*",
"kms:List*",
"kms:Put*",
"kms:Update*",
"kms:Revoke*",
"kms:Disable*",
"kms:Get*",
"kms:Delete*",
"kms:TagResource",
"kms:UntagResource",
"kms:ScheduleKeyDeletion",
"kms:CancelKeyDeletion"
])
key_manage_grants = jsonencode([
"kms:CreateGrant",
"kms:ListGrants",
"kms:RevokeGrant"
])
}
}