This message was deleted.
# typescript
s
This message was deleted.
b
hey there, could you share your code?
also, are you aware of the bucket object resource? 😄
m
hey, thanks for looking into it! attaching the relevant code. the intention is to make atomic deploys possible with cloudfront + s3, so i can’t use the bucket object resource, bc that’ll delete the old files during deployment. the solution i came up with here is this custom dynamic resource that just uploads files to a prefix on s3 and i set the prefix as the origin path in cloudfront. it never deletes or updates files.
node version 16.9.1 btw
b
hmm I don't see anything at first glance I'm afraid, i'll try get someone smarter to have a look
m
thanks! i’ll be off for the weekend now — back on Tuesday
c
We have a library which does this https://github.com/sevenwestmedia-labs/pulumi-components/tree/main/libs/throw-files-in-s3 It works a bit differently but you can use it as a reference
m
Thanks @curved-pharmacist-41509 your code gave me an idea to work around the issue: turns out that replacing promisifed readdir with the sync version makes it run. @billowy-army-68599 I’ve added a reproducible bug report here: https://github.com/pulumi/pulumi/issues/8090