Skip to content

Commit

Permalink
removed unnecessary dynamic block in iam policy doc
Browse files Browse the repository at this point in the history
  • Loading branch information
moritzzimmer committed Apr 26, 2024
1 parent 37d4103 commit b40fcc4
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions fluentbit.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,25 +71,17 @@ data "aws_iam_policy_document" "fluent_bit_config_access" {
count = var.firelens.enabled && var.task_role_arn == "" && length(local.s3_init_file_arns) > 0 ? 1 : 0

// allow reading the init config files from S3
dynamic "statement" {
for_each = [true]

content {
effect = "Allow"
actions = ["s3:GetObject"]
resources = local.s3_init_file_arns
}
statement {
effect = "Allow"
actions = ["s3:GetObject"]
resources = local.s3_init_file_arns
}

// allow listing the S3 buckets containing the init config files
dynamic "statement" {
for_each = [true]

content {
effect = "Allow"
actions = ["s3:GetBucketLocation"]
resources = local.s3_init_bucket_arns
}
statement {
effect = "Allow"
actions = ["s3:GetBucketLocation"]
resources = local.s3_init_bucket_arns
}
}

Expand Down

0 comments on commit b40fcc4

Please sign in to comment.