Skip to content

Commit

Permalink
Merge pull request #49 from Almenon/permission-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vara-bonthu authored Apr 19, 2024
2 parents 9807bd8 + 5c4ffd3 commit 9337294
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ data "aws_iam_policy_document" "mwaa" {
statement {
effect = "Allow"
actions = [
"s3:*"
"s3:GetObject*",
"s3:GetBucket*",
"s3:List*"
]
resources = [
local.source_bucket_arn,
Expand Down Expand Up @@ -84,9 +86,7 @@ data "aws_iam_policy_document" "mwaa" {
actions = [
"logs:DescribeLogGroups",
"cloudwatch:PutMetricData",
"batch:DescribeJobs",
"batch:ListJobs",
"eks:*"
"s3:GetAccountPublicAccessBlock"
]
resources = [
"*"
Expand All @@ -108,6 +108,10 @@ data "aws_iam_policy_document" "mwaa" {
]
}

# See note in https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html
# if MWAA is using a AWS managed KMS key, we have to give permission to the key in ?? account
# We don't know what account AWS puts their key in so we use not_resources to grant access to all
# accounts except for ours
dynamic "statement" {
for_each = var.kms_key != null ? [] : [1]
content {
Expand Down

0 comments on commit 9337294

Please sign in to comment.