https://pulumi.com logo
#general
Title
# general
p

purple-plastic-64657

06/14/2022, 7:26 PM
Is it possible to conditionally create resources?
Copy code
if <condition>: 
    my_lambda = aws.lambda_.Function(...)
When I tried this, the if statements seem to be ignored. I'm trying to create or ignore resources based on the current pulumi stack
b

busy-journalist-6936

06/14/2022, 7:30 PM
Super duper basic example, but here is where I use typescript to run a config variable if conditional on creating a helm release resource.
😍 2
p

purple-plastic-64657

06/14/2022, 9:08 PM
I must have been brain dead on the day I tried this before. Thanks
b

busy-journalist-6936

06/14/2022, 9:09 PM
No worries! Glad it helps 🙂
14 Views