11/24/2021, 5:09 PM
Hi guys, Is there a way to implement conditional resource creation in a stack. If we write ts for multiple resources inside stack, I want only 4 out of 6 resources to be created in 1 cluster and all 6 in another cluster, but if i provide stack name and stack path while running pulumi up it is creating all 6 in 2 kubernetes clusters. Please let me know if there is a way to implement this.


11/24/2021, 6:57 PM
You can use if-then or for-loops based on the stack-specific config yaml ( So for stack 1 you set a stack config property and then in the code use that property to drive the accordingly.