https://pulumi.com logo
Title
e

early-truck-24471

05/13/2021, 11:43 AM
Hi, Is there a way to separate environment using different sub-folder keep the main file in the root folder and the for example project structure:
└── project
    ├── __main__.py
    ├── Pulumi.yaml
    └── environments
        └──PROD
            ├── Pulumi.prod1.yaml
            ├── Pulumi.prod2.yaml
        └──STG
            ├── Pulumi.stg1.yaml
            ├── Pulumi.stg2.yaml
b

brave-planet-10645

05/13/2021, 12:12 PM
You can't keep the
pulumi.*.yaml
files more than one level down, but you can certainly put them in the environments folder. Take a look at the project configuration reference page and look for the config setting
e

early-truck-24471

05/13/2021, 1:44 PM
thanks @brave-planet-10645 i looked at the link and didn't fine an documentation regarding environment folder
b

brave-planet-10645

05/13/2021, 1:46 PM
So you'd have it as
config: environments
e

early-truck-24471

05/13/2021, 1:54 PM
not sure how this option can help me can i use the
config
to keep different environments stack's in different folders?
b

brave-planet-10645

05/13/2021, 2:00 PM
What using the config property will give you is like this:
└── project
    ├── __main__.py
    ├── Pulumi.yaml
    └── environments
        └── Pulumi.prod1.yaml
        ├── Pulumi.prod2.yaml
        ├── Pulumi.stg1.yaml
        └── Pulumi.stg2.yaml
e

early-truck-24471

05/13/2021, 2:22 PM
cool!
but in this case how can i separate the prod stack's and the STG stacks into different folders?
f

fast-vegetable-68654

05/13/2021, 5:37 PM
Is there a way to use the
main:
property in the config to have a different starting point per stack?
b

brave-planet-10645

05/13/2021, 5:38 PM
Both of those have an answer of "I don't think you can"
But if you'd like to raise them as feature requests here: https://github.com/pulumi/pulumi
Then we can look at it
👍 1
e

early-truck-24471

05/13/2021, 8:34 PM