pulumi / pulumi-synced-folder

A Pulumi component that synchronizes a local folder to Amazon S3, Azure Blob Storage, or Google Cloud Storage.
Apache License 2.0
3 stars 3 forks source link

Ability to change the object names / object name prefixes #43

Open C0DK opened 1 year ago

C0DK commented 1 year ago

Hello!

Issue details

I am currently syncing a folder as per the static website guide, in a folder with a path like ../landingpage/dist/ - this makes both each bucket item a bit annoying, for a resource-name perspective (i.e landingpage-synced-folder-../landingpage/dist/index.html) - would have preferred an option to change these, i.e just a function mapping path -> ressource_name.

Furthermore, the actual bucket object names get a peculiar path: bucket/../landingpage/dist/index.html.

Wanted behavior

Could one either get the possibility (via a lambda) to manually set these names and/or simply a flag to set the name relative to the path? (which would result in landingpage-synced-folder-index.html).

antdking commented 11 months ago

The peculiar object name is likely caused by this line here, where the provider assumes the input path does not have a trailing slash