-
Notifications
You must be signed in to change notification settings - Fork 4
/
iam.tf
51 lines (40 loc) · 987 Bytes
/
iam.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
50
51
data "aws_caller_identity" "this" {}
data "aws_iam_policy_document" "ksk" {
policy_id = "dnssec-policy"
statement {
sid = "Enable IAM User Permissions"
actions = ["kms:*"]
resources = ["*"]
principals {
type = "AWS"
identifiers = ["arn:aws:iam::${data.aws_caller_identity.this.account_id}:root"]
}
}
statement {
sid = "Allow Route 53 DNSSEC Service"
actions = [
"kms:DescribeKey",
"kms:GetPublicKey",
"kms:Sign",
]
resources = ["*"]
principals {
type = "Service"
identifiers = ["dnssec-route53.amazonaws.com"]
}
}
statement {
sid = "Allow Route 53 DNSSEC to CreateGrant"
actions = ["kms:CreateGrant"]
resources = ["*"]
principals {
type = "Service"
identifiers = ["dnssec-route53.amazonaws.com"]
}
condition {
test = "Bool"
variable = "kms:GrantIsForAWSResource"
values = ["true"]
}
}
}