Hi, is there any trick to make a resource conditio...
# yaml
f
Hi, is there any trick to make a resource conditional in Pulumi YAML programs?
m
f
I know it's not supported, that's why I'm looking for a trick
The Command provider was what I went with in the end
m
There are tricks in the linked issue
f
Only one, using a
compiler
. And that should work, especially since it should be passing in PULUMI_STACK in the latest releases. But it doesn't
So there's no way to make inclusion of a resource depend on a config
Am I missing something?
Also do you know anything about why the compiler isn't getting those environment variables?
b
One option that might be useable with the
compiler
config and still use YAML syntax might be YAMLScript: https://yamlscript.org I have not tested this with Pulumi yet though.
f
That's an interesting project but it doesn't solve my issue at all
b
@flaky-morning-84929 perhaps YTT via the compiler setting can help here https://carvel.dev/ytt/#example:example-if
f
@big-architect-71258 if pulumi isn't passing the stack config how is one compiler better than another?