Skip to content

Commit

Permalink
change IAM permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
kristianiliev1 committed Jun 28, 2024
1 parent abb2dfe commit b8bc7d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 55 deletions.
15 changes: 1 addition & 14 deletions modules/backup/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,7 @@ data "aws_iam_policy_document" "graphdb_s3_key_admin_role_permissions" {
"kms:EnableKeyRotation",
"kms:ListResourceTags",
"kms:ScheduleKeyDeletion",
"kms:DisableKeyRotation"
]

resources = [
"arn:aws:kms:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:key/*",
"arn:aws:kms:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:alias/*"
]
}

statement {
effect = "Allow"

actions = [
"kms:ListAliases",
"kms:DisableKeyRotation",
"tag:GetResources"
]

Expand Down
29 changes: 1 addition & 28 deletions modules/graphdb/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -395,20 +395,6 @@ data "aws_iam_policy_document" "graphdb_ebs_key_admin_role_permissions" {
"tag:GetResources"
]

resources = [
"arn:aws:kms:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:key/*",
"arn:aws:kms:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:alias/*"
]
}

statement {
effect = "Allow"

actions = [
"kms:ListAliases",
"tag:GetResources"
]

resources = [
"*"
]
Expand Down Expand Up @@ -484,20 +470,7 @@ data "aws_iam_policy_document" "graphdb_param_store_key_admin_role_permissions"
"kms:EnableKeyRotation",
"kms:ListResourceTags",
"kms:ScheduleKeyDeletion",
"kms:DisableKeyRotation"
]

resources = [
"arn:aws:kms:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:key/*",
"arn:aws:kms:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:alias/*"
]
}

statement {
effect = "Allow"

actions = [
"kms:ListAliases",
"kms:DisableKeyRotation",
"tag:GetResources"
]

Expand Down
14 changes: 1 addition & 13 deletions modules/monitoring/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,7 @@ data "aws_iam_policy_document" "graphdb_parameter_store_key_admin_role_permissio
"kms:EnableKeyRotation",
"kms:ListResourceTags",
"kms:ScheduleKeyDeletion",
"kms:DisableKeyRotation"
]

resources = [
"arn:aws:kms:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:key/*",
"arn:aws:kms:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:alias/*"
]
}
statement {
effect = "Allow"

actions = [
"kms:ListAliases",
"kms:DisableKeyRotation",
"tag:GetResources"
]

Expand Down

0 comments on commit b8bc7d5

Please sign in to comment.