Git Product home page Git Product logo

Comments (8)

joshwils82 avatar joshwils82 commented on August 17, 2024 3

This would also allow a workaround for #617

from ion.

dror-weiss avatar dror-weiss commented on August 17, 2024 2

@jayair , since there is a transform options for Pulumi args you could (breaking) change to transformArgs and transformOpts. This will solve the case for multiple resources inside a component and be much clearer (in my opinion).

from ion.

jayair avatar jayair commented on August 17, 2024

Hmm interesting. We'll need to consider the case when there are multiple resources inside a component.

from ion.

fwang avatar fwang commented on August 17, 2024

@remembell-root Which opts field are you looking to pass to child resources?

so, aws.sns.Topic only gets { parent } as opts.

Pulumi passes a subset of opts to child resources by default, ie. retainOnDelete

from ion.

fwang avatar fwang commented on August 17, 2024

In the latest version of SST, u can transform opts like this

new sst.aws.Bucket("MyBucket", {
  transform: {
    bucket: (args, opts) => {
      opts.retainOnDelete = true;
    },
  },
});

from ion.

dror-weiss avatar dror-weiss commented on August 17, 2024

@fwang, thanks for implementing this.

I'm sorry, I don't understand why use function transform and not pass the entire opts from the constructor (as suggested).

from ion.

jayair avatar jayair commented on August 17, 2024

Cos the bucket component has multiple resources in it

from ion.

dror-weiss avatar dror-weiss commented on August 17, 2024

@jayair , could you please make notes for next major release to discuss the api change I suggested? It will make my code much cleaner and simpler to understand.

from ion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.