Skip to content

Commit

Permalink
Merge pull request #87 from kitware-resonant/arn-reference
Browse files Browse the repository at this point in the history
Use a simpler variable, now that "aws_s3_bucket" resources are split
  • Loading branch information
brianhelba authored Nov 21, 2024
2 parents e5ca86e + dd3c93c commit 54daa53
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions modules/storage/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,8 @@ data "aws_iam_policy_document" "storage_bucket" {
identifiers = ["*"]
type = "*"
}
resources = [
# To prevent a circular reference, can't use "aws_s3_bucket.storage.arn" here
"arn:aws:s3:::${var.bucket_name}/*"
]
actions = ["s3:PutObject"]
resources = ["${aws_s3_bucket.storage.arn}/*"]
actions = ["s3:PutObject"]

# Both conditions must pass to trigger a deny
condition {
Expand Down

0 comments on commit 54daa53

Please sign in to comment.