https://pulumi.com logo
Title
s

square-painter-3449

03/08/2022, 10:53 AM
Hey guys! Is it possible to configure base directory for the pulumi program, per-stack? We would like to use self-managed GCS for our state, the setup we would like to roll with is the following:
$ pulumi stack ls
NAME                          LAST UPDATE  RESOURCE COUNT
1_base                        n/a          n/a
2_organization_envs.dev*      n/a          n/a
2_organization_envs.pre-prod  n/a          n/a
2_organization_envs.prod      n/a          n/a
$ ls -la
total 56
drwxr-xr-x  13 robin.opletal  1380609156  416  8 Mar 11:46 .
drwxr-xr-x  19 robin.opletal  1380609156  608  7 Mar 12:33 ..
-rw-r--r--   1 robin.opletal  1380609156   12  8 Mar 11:12 .gitignore
drwxr-xr-x   2 robin.opletal  1380609156   64  8 Mar 11:35 1_base
drwxr-xr-x   3 robin.opletal  1380609156   96  8 Mar 11:46 2_organization_envs
-rw-r--r--   1 robin.opletal  1380609156   85  8 Mar 11:14 Pulumi.1_base.yaml
-rw-r--r--   1 robin.opletal  1380609156  112  8 Mar 11:45 Pulumi.2_organization_envs.dev.yaml
-rw-r--r--   1 robin.opletal  1380609156  123  8 Mar 11:38 Pulumi.2_organization_envs.pre-prod.yaml
-rw-r--r--   1 robin.opletal  1380609156  122  8 Mar 11:43 Pulumi.2_organization_envs.prod.yaml
-rw-r--r--   1 robin.opletal  1380609156  126  8 Mar 11:12 Pulumi.yaml
drwxr-xr-x   3 robin.opletal  1380609156   96  8 Mar 11:46 __pycache__
-rw-r--r--   1 robin.opletal  1380609156   46  8 Mar 11:12 requirements.txt
drwxr-xr-x   6 robin.opletal  1380609156  192  8 Mar 11:12 venv
I have tried adding:
main: 2_organization_envs/
to the stack config yaml file, but that hasn’t resulted in any changes Thanks! P.S. The goal is to have all the code for all
2_organization_envs
stacks in
2_organization_envs/
, for example
$ ls 2_organization_envs/
__main__.py
n

numerous-state-84361

03/21/2022, 3:45 PM
Hi, are you trying to completely change the code base based upon stack deployment? Or add code to the setup when a certain stack is called?