Is there a way to make a resource deployment condi...
# general
Is there a way to make a resource deployment conditional within the declaration? e.g. Instead of:
if (thing) { new resource({...}); }
declare within the "DSL":
new resource({...}, { condition: (resource) => resource.instanceQuantity == 1 });
Can I abuse a
for this?
If "thing" is a standard boolean condition you can just write an if statement. If "thing" is an
value then you can do an apply and write an if inside that, just be aware preview might not be able to show this. I've been prototyping some ideas to support this in a more first class way but its tricky ideas and that work is still a while off.
I specifically don't want to to use the general purpose programming language conditions if possible in this case.
Add a vote to, but we don't have first class support for conditions yet. Definitely something we want to do, just tricky and not clear how prioritised it needs to be.
Thank you, that sounds like what I'm enquiring about.