Hi guys, Is there a way to implement conditional r...
# kubernetes
b
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.
w
You can use if-then or for-loops based on the stack-specific config yaml (https://www.pulumi.com/docs/intro/concepts/config/) So for stack 1 you set a stack config property and then in the code use that property to drive the accordingly.