Yo folks, a quick question: Is it possible to cre...
# general
m
Yo folks, a quick question: Is it possible to create a folder inside an existing S3 bucket that isn't managed by pulumi? Or, alternatively: can I put objects inside an existing S3 bucket not managed by pulumi, and put said objects in a sub-directory?
b
yes, you just need the bucket id, which you can retrieve using ’getBucket`
m
to which of the 2 question? 1st or 2nd ?
b
Is it possible to create a folder inside an existing S3 bucket that isn’t managed by pulumi?
yes, you just need the bucket id, which you can retrieve using ’getBucket`
can I put objects inside an existing S3 bucket not managed by pulumi, and put said objects in a sub-directory?
yes, just prefix the object name with the subdirectory
m
Ah, that's simpler than I expected. When I googled "Pulumi s3 Folder" I found this not so trivial tutorial 🤔 . I'm not exactly sure how I'm supposed to create an empty directory inside a bucket. Is it achieved using the
s3.BucketObject
resource?
b
no i don’t think you can create an empty directory
m
Ah ok, got it. Well i guess it won't be a problem anyway if I can prefix an object with the path
b
actually, try setting the object to
/dev/null
m
interesting, i'll try that
thanks for the help!
b
or try
contentType: "application/x-directory"
m
👍