Closed mnapoli closed 2 years ago
Note: I get asked about this a lot (1/3 to 1/2 of discussions I have), we might need to consider prioritizing that during the public beta.
I personally like the option with nesting the inputs - it gives you clear visibility into what is passed to component and what is component-specific configuration.
I can experiment with both approaches
Nesting with the inputs
key gives us that with serverless-framework
:
subscriptions:
component: serverless-framework
inputs:
params:
foo: bar
That indeed looks quite verbose - let's maybe stick to the version without nesting and validate how much of a problem that is?
👍
Btw - should we change the parameters
to params
in syntax? We're still using parameters
at the moment in components
Oh good point, maybe we should 🤔 I don't like abbreviations personally, but we use params
absolutely everywhere else, so that would make sense to me.
I've pushed the changes for parameters
-> params
both in components and platform-core
repos
I'm opening this issue to track this idea/have a place for discussion.
I got a second person asking for defining dependencies explicitly:
Let's keep this idea in mind when designing everything else. I think implementing it shouldn't be too hard, it could for example be:
Then the graph can be built from variable references +
dependsOn
(shouldn't be a huge impact on the codebase).One downside with this approach is: it means
dependsOn
becomes a global reservedinput
across all components. This raises the point that Components v1 had:which left room for any general component option. It's still one extra sub-key, which I'd love to avoid. But let's keep all that in mind.
Since we are talking about this, here are some general reserved component options I could imagine in the very long term: