feat: updated cmk policies with regards to key grants
This commit is contained in:
@@ -236,6 +236,26 @@ data "aws_iam_policy_document" "storage" {
|
|||||||
]
|
]
|
||||||
resources = ["*"]
|
resources = ["*"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
statement {
|
||||||
|
sid = "AllowAttachmentOfPersistentResources"
|
||||||
|
effect = "Allow"
|
||||||
|
principals {
|
||||||
|
identifiers = ["arn:aws:iam::${data.aws_caller_identity.current.account_id}:root"]
|
||||||
|
type = "AWS"
|
||||||
|
}
|
||||||
|
actions = [
|
||||||
|
"kms:CreateGrant",
|
||||||
|
"kms:ListGrants",
|
||||||
|
"kms:RevokeGrant"
|
||||||
|
]
|
||||||
|
resources = ["*"]
|
||||||
|
condition {
|
||||||
|
test = "Bool"
|
||||||
|
values = ["true"]
|
||||||
|
variable = "kms:GrantIsForAWSResource"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data "aws_iam_policy_document" "rds" {
|
data "aws_iam_policy_document" "rds" {
|
||||||
@@ -265,6 +285,26 @@ data "aws_iam_policy_document" "rds" {
|
|||||||
variable = "kms:ViaService"
|
variable = "kms:ViaService"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
statement {
|
||||||
|
sid = "AllowAttachmentOfPersistentResources"
|
||||||
|
effect = "Allow"
|
||||||
|
principals {
|
||||||
|
identifiers = ["arn:aws:iam::${data.aws_caller_identity.current.account_id}:root"]
|
||||||
|
type = "AWS"
|
||||||
|
}
|
||||||
|
actions = [
|
||||||
|
"kms:CreateGrant",
|
||||||
|
"kms:ListGrants",
|
||||||
|
"kms:RevokeGrant"
|
||||||
|
]
|
||||||
|
resources = ["*"]
|
||||||
|
condition {
|
||||||
|
test = "Bool"
|
||||||
|
values = ["true"]
|
||||||
|
variable = "kms:GrantIsForAWSResource"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data "aws_iam_role" "asg-service-linked-role" {
|
data "aws_iam_role" "asg-service-linked-role" {
|
||||||
|
|||||||
Reference in New Issue
Block a user