Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Nov 23, 2021
1 parent d51267b commit 6472786
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions cloudtrail-key/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,17 @@ data "aws_iam_policy_document" "key_orig" {
}

data "aws_iam_policy_document" "key_admin" {
statement {
sid = "BuiltinKMSAdminRoles"
effect = "Allow"
actions = ["kms:*"]
resources = ["*"]
principals {
type = "AWS"
identifiers = local.kms_admin_roles
dynamic "statement" {
for_each = length(local.kms_admin_roles) > 0 ? [1] : []
content {
sid = "BuiltinKMSAdminRoles"
effect = "Allow"
actions = ["kms:*"]
resources = ["*"]
principals {
type = "AWS"
identifiers = local.kms_admin_roles
}
}
}
}
Expand Down

0 comments on commit 6472786

Please sign in to comment.