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

glamorous-printer-66548

09/27/2018, 4:14 AM
Is it possible to set the active (maybe default?) stack in code instead of having each user to set and select an active stack in their environment? There are some pulumi programs where we will always just have 1 stack and it’s kind of annoying that each user still has to choose a stack in order to do any operation. Ideally it’d like to be able select a stack in a config file at the root of the pulumi program. With terragrunt (terraform wrapper) we use a repo layout like this https://github.com/gruntwork-io/terragrunt-infrastructure-live-example/tree/master/non-prod where account.tfvars and terraform.tfvars essentially determine the state location which translates to the stack URN in pulumi. So with terragrunt I would just
cd
into the
non-prod
directory and run things like
terragrunt plan
without having to choose a stack manually or similar. In other words the working directory determines the stack instead of an environment configuration. What about for example specifying the stack name in the Pulumi.yaml? I think in terraform the equivalent of what I want is called the
default
workspace (https://www.terraform.io/docs/state/workspaces.html).