Do yall know how to copy a folder into a bucket wi...
# getting-started
Do yall know how to copy a folder into a bucket with Pulumi? I somewhat assumed if I had code like this:
Copy code
// Create an archive resource for the latest web build.
let remoteArchive = new pulumi.asset.RemoteArchive("<>");

const bucketObject = new"web", {
    contentType: "text/html",
    source: remoteArchive,
There would be an
option where it then unzips the archive and creates a folder called
The AWS provider is a pretty thin wrapper around the AWS API. For now though, I think you could use the Pulumi Command provider to run this on your "web" dir. This should be close to a working example:
Copy code
import { local } from "@pulumi/command";

const bucket = // your bucket declaration

const webUpload = new local.Command("web", {
  create: pulumi.interpolate`
wget <> | unzip -d /tmp/web
aws s3 sync /tmp/web s3://${bucket.bucket}/web
  // you may want to examine what "s3 sync" args you want, such as:
  // --delete (delete files that don't exist in the remote dir)
  // --acl public-read if you want files to be internet accessible
  // etc.

  triggers: [] // will run every time.
Okay I’ll take the Command provider for a spin, thanks. Unfortunate it isn’t provided directly, I feel this must be a common use case.