Skip to content

Commit

Permalink
Merge pull request #174 from dandi/revert-169-embargoed-object-tags
Browse files Browse the repository at this point in the history
Revert "Add embargoed tags bucket policy"
  • Loading branch information
jjnesbitt authored Apr 3, 2024
2 parents 64eaf18 + 1072e88 commit 791ff4e
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions terraform/modules/dandiset_bucket/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -136,42 +136,6 @@ data "aws_iam_policy_document" "dandiset_bucket_owner" {
}
}

resource "aws_s3_bucket_policy" "dandiset_embargoed_objects" {
count = var.public ? 1 : 0
provider = aws
bucket = aws_s3_bucket.dandiset_bucket.id
policy = data.aws_iam_policy_document.dandiset_embargoed_objects[0].json
}

data "aws_iam_policy_document" "dandiset_embargoed_objects" {
count = var.public ? 1 : 0
version = "2008-10-17"

statement {
effect = "Deny"
principals {
identifiers = ["*"]
type = "*"
}
actions = [
"s3:*",
]
resources = [
"${aws_s3_bucket.dandiset_bucket.arn}/*",
]
condition {
test = "StringEquals"
variable = "s3:ExistingObjectTag/embargoed"
values = ["true"]
}
condition {
test = "ArnNotEquals"
variable = "aws:PrincipalArn"
values = [var.heroku_user.arn]
}
}
}

resource "aws_s3_bucket_policy" "dandiset_bucket_policy" {
provider = aws

Expand Down

0 comments on commit 791ff4e

Please sign in to comment.