Hi All, I have a micro-stack project that contain...
# general
m
Hi All, I have a micro-stack project that contains multiple stacks in a mono repo. My stacks are organized like so:
Copy code
iac/
├─ core/
├─ platformA/
│  ├─ core/
│  │  ├─ Pulumi.yaml
│  │  ├─ Pulumi.platformA-core.dev.yaml
│  │  ├─ Pulumi.platformA-core.prod.yaml
│  ├─ projectA/
│  │  ├─ Pulumi.yaml
│  │  ├─ Pulumi.platforma-projectA.dev.yaml
│  │  ├─ Pulumi.platforma-projectA.prod.yaml
│  ├─ projectB/
│  │  ├─ Pulumi.yaml
│  │  ├─ Pulumi.platformA-projectB.dev.yaml
│  │  ├─ Pulumi.platformA-projectB.prod.yaml
├─ platformB/
│  ├─ core/
│  │  ├─ Pulumi.yaml
│  │  ├─ Pulumi.platformB-core.dev.yaml
│  │  ├─ Pulumi.platformB-core.prod.yaml
│  ├─ projectC/
│  │  ├─ Pulumi.yaml
│  │  ├─ Pulumi.platformB-projectC.dev.yaml
│  │  ├─ Pulumi.platformB-projectC.prod.yaml
├─ shared/
I can select a stack from the root folder (iac). However, when I run
pulumi preview
or
pulumi up
I get an error
Please verify that the package.json has a valid "main" entry
I'm able to
cd
into each directory containing a pulumi file and run
pulumi up
without issue. However, I'd like to run pulumi up / preview from the root of the repo on the selected stack. Is there a combination of https://www.pulumi.com/docs/iac/concepts/projects/project-file/#options-options that I can utilize to make this work? I see
main
and
stackConfigDir
. I've tried a few combinations of these. One of the combinations, gets past the
valid "main"
error. However, stack referenced resources are being re-created (from core stack).