Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #4 from MeteoGroup/hot_fix_s3_permission
Browse files Browse the repository at this point in the history
Hot fix s3 permission
  • Loading branch information
Peter Lohmann authored Apr 21, 2020
2 parents 73db4b1 + 3ebac7c commit 0fbda1e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ data "aws_iam_policy_document" "bucket_policy_read" {
type = "AWS"
identifiers = var.read_accounts
}
condition {
test = "StringLike"
variable = "s3:prefix"
values = ["${var.read_prefix}*"]
dynamic "condition" {
for_each = length(var.read_prefix) > 0 ? [var.read_prefix] : []
content {
test = "StringLike"
variable = "s3:prefix"
values = ["${var.read_prefix}*"]
}
}
}
statement {
Expand Down

0 comments on commit 0fbda1e

Please sign in to comment.