https://pulumi.com logo
#typescript
Title
# typescript
m

many-dress-88879

05/06/2020, 11:00 PM
Hey @here, how can i use pulumi to upload multiple files to a Google storage bucket? is this supported?
g

green-school-95910

05/06/2020, 11:02 PM
Yes, you can create multiple
gcp.storage.BucketObject
Loop over your files to create all of them
m

many-dress-88879

05/06/2020, 11:17 PM
thanks, will give it a try
any recommendation by the chance how to loop over files in multiple folders?
g

green-school-95910

05/06/2020, 11:19 PM
Local files?
You can use whatever the language you use provides you
Like the native
fs
module for Node
👍 1
m

many-dress-88879

05/06/2020, 11:20 PM
yup,gotcha
g

gentle-diamond-70147

05/06/2020, 11:49 PM
Here's an example of doing it for an S3 bucket and objects - https://github.com/pulumi/examples/blob/master/aws-ts-static-website/index.ts#L23-L72.
👍 1
12 Views