https://pulumi.com logo
#general
Title
# general
w

white-ghost-79509

03/21/2019, 3:54 PM
With this example, how do we handle subdirectories ? https://pulumi.io/quickstart/aws/tutorial-s3-website.html Currently getting an error when bumping into a sub directory
2 UNKNOWN: failed to compute asset hash: asset path '../../build/images' is a directory; try using an archive
w

white-balloon-205

03/21/2019, 3:59 PM
You would need to write a little recursive function in Node to walk the filesystem. Should be only a few more lines of code - but we left that out of the simple example here. There are also some libraries in NPM that can do this for you automatically.
👍 1
w

white-ghost-79509

03/21/2019, 3:59 PM
Thanks Luke, i was already starting to write the loop, was checking if there was a specific way.
Hey @white-balloon-205 I'm guessing we can't actually create folders with https://github.com/pulumi/pulumi-aws/blob/master/sdk/nodejs/s3/bucketObject.ts ?
w

white-balloon-205

03/21/2019, 8:57 PM
You don’t need to create folders in s3 - just include
/
in the
key
.
🙏 1
8 Views