Skip to content

Commit

Permalink
refactor: Use lambda to get arn
Browse files Browse the repository at this point in the history
and ListBucket. Ya know, the important stuff...
  • Loading branch information
edmundmiller committed Aug 6, 2024
1 parent 08ea406 commit 79288e1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pulumi/test_datasets/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@
{
"Effect": "Allow",
"Principal": "*", # Allow access to anyone
"Action": ["s3:GetObject"],
"Action": [
"s3:GetObject",
"s3:ListBucket",
],
"Resource": [
f"arn:aws:s3:::{test_datasets_bucket.id}/*"
test_datasets_bucket.arn.apply(lambda arn: f"{arn}/*"),
], # Access all objects in the bucket
}
],
Expand Down

0 comments on commit 79288e1

Please sign in to comment.