Hi guys. I'm working with the `.NET SDK` and I wou...
# general
n
Hi guys. I'm working with the
.NET SDK
and I would like to know, if there is a way to access the current stack name (selected via
pulumi cli
) before running the deployment. I found in the source code a property
Deployment.Stack
but it throws an exception if I try to access it before running the deployment. I need to do that in order to run deployment of 2 stacks in one azure dev ops pipeline through one project (we use monolithic approach to project/stacks structure). So I would like to access the currently selected stack and based on that run deployment of specific stack from code. (I know I can access it via
PULUMI_STACK
environment variable but I don't want to rely on some deep internal implementation details but rather use some top level api to access the stack name).