Join Slack
Powered by
Is there a way to get the current stack in code? I...
# general
p
purple-train-14007
01/27/2023, 2:45 AM
Is there a way to get the current stack in code? I want to make an if statement that basically If (stack.name == dev) { new ec2.(blah)} else {pass}
m
miniature-musician-31262
01/27/2023, 3:56 AM
getStack() should do the trick:
https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/pulumi/runtime/#getStack
p
purple-train-14007
01/27/2023, 4:10 AM
Thanks!
2
Views
Open in Slack
Previous
Next