https://pulumi.com logo
Title
r

rhythmic-branch-12845

11/23/2022, 12:00 PM
qn for folks using micro-stacks here: • do you use one common venv? • do you check in your venv into source control?
b

billowy-army-68599

11/23/2022, 4:07 PM
no, just ensure before each stack
up
you do
pip install -r requirements.txt
r

rhythmic-branch-12845

11/23/2022, 9:52 PM
thank you, @billowy-army-68599. I assume this is in reply to the second question? (“do you check in your venv into source control?“)
b

billowy-army-68599

11/23/2022, 9:53 PM
Yep sorry
f

fierce-ability-58936

11/24/2022, 7:24 AM
I'm not sure if it's right but I have this in my
__main__.py
"""Dynamic stack loader"""

import pulumi

name = pulumi.get_stack()

if name.startswith("common-"):
    import stacks.common
# environment-specific module, same for each environment
else:
    import stacks.environment
The environment stacks refer to one common environment (set in the config).
r

rhythmic-branch-12845

11/24/2022, 7:45 AM
oh I’m referring to the virtualenv used by the Pulumi project, and not Python code