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

Using this plugin can get expensive! #53

Closed lionello closed 10 months ago

lionello commented 10 months ago

What happened?

This plugin creates one Pulumi resource per file. For a big folder, this can create tens or hundreds of Pulumi resources in each stage. The way Pulumi cloud is billed, this will consume ~750 credits per file per month! At USD$0.0005, this is $0.375 per file per stack per month. For my project that meant USD$50 per month, just for one synced folder in three stages.

There must be a way to do the same thing with a single Pulumi resource. I consider this a bug and not a feature request, in the very least a doc bug. The cost should be mentioned alongside the managedObjects property.

Example

$ pulumi -C pulumi/corp stack -s lionello/prod
Current stack is lionello/prod:
    Owner: lionello
    Last updated: 1 month ago (2023-10-26 09:19:02.450717 -0700 PDT)
    Pulumi version used: v3.89.0
Current stack resources (66):
    TYPE                                                           NAME
    pulumi:pulumi:Stack                                            corp-prod
    ├─ aws:cloudfront/responseHeadersPolicy:ResponseHeadersPolicy  headers
    ├─ pulumi:pulumi:StackReference                                lionello/bootstrap/corp
    ├─ aws:s3/bucket:Bucket                                        bucket
    ├─ synced-folder:index:S3BucketFolder                          bucket-folder
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/Email-Sent-Icon.svg
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/favicon.png
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-401.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-contact.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/Lock-and-Key-Icon.svg
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-user-account.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-terms-conditions.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-css/normalize.css
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-css/2.webflow.css
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/MagnifyingGlass-Grey.svg
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-admin/instructions.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-update-password.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-admin/changelog.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-404.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-css/webflow.css
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-admin/style-guide.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/Memberbase-Logo-1.svg
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-detail_ebook.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-admin/licenses.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/Memberbase-White-Logo.svg
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-index.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-reset-password.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-access-denied.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-mages/609acc78e8f5d0…
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-log-in.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/download-5.svg
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/download-8.svg
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/Design-Resources-Home.svg
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/Membercase-Image.svg
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-mages/609acc78…
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-privacy-policy.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/Menu-Icon.svg
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-resources.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/609ac…
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/LOGO-1_4x-no-text-256.svg
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/slack_black_logo_icon_147081.png
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/Tick-Circle-Icon.svg
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-search.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/Page-Not-Found-Icon.svg
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/webclip.svg
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-sign-up.html
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/download-6.svg
    │  ├─ aws:s3/bucketObject:BucketObject                         bucket-folder-js/webflow.js
    │  └─ aws:s3/bucketObject:BucketObject                         bucket-folder-images/demo2.gif
    ├─ pulumi:providers:aws                                        default_5_42_0
    ├─ pulumi:providers:pulumi                                     default
    ├─ pulumi:providers:synced-folder                              default_0_10_2
    └─ pulumi:providers:aws                                        default_5_30_0

Output of pulumi about

CLI          
Version      3.89.0
Go Version   go1.21.1
Go Compiler  gc

Plugins
NAME    VERSION
nodejs  unknown

Host     
OS       darwin
Version  14.1.2
Arch     arm64

This project is written in nodejs: executable='/nix/store/h1h4xhz3dpg09kb6kjk3brc33mfp5kwm-nodejs-18.16.0/bin/node' version='v18.16.0'

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/lionello
User           lionello
Organizations  lionello
Token type     personal

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

scottslowe commented 10 months ago

@lionello Hi! Thanks for opening this issue. There was a statement in the README that using managed files may not be the best fit for all use cases, but we've expanded that to specifically mention that using managed files will increase your resources under management when using Pulumi Cloud. If you don't feel this properly resolves this issue, let us know. Thanks!