This message was deleted.
# general
s
This message was deleted.
l
That should work. You'll need plenty of StackReferences but that's expected. What config hasn't been set?
g
Lemme try again from
project_root
l
Ah I didn't notice that the Pulumi.yaml and Pulumi.<stack>.yaml weren't in the same directories. That's your issue.
You need separate Projects, one for each component. They can refer to each other via StackReferences.
g
ah ok. that makes sense. thanks for the help
πŸ‘ 1
a
@gifted-city-99717 you can customize the location of the stack files, if you want. You don't have to go multi-project yet. See the
config
property here: https://www.pulumi.com/docs/intro/concepts/project/#pulumi-yaml
I don't want to see that explosion of stack files in my root dir either, so I put them all under a
.pulumi
dir.
You'll have to go multi-project if there's different infrastructure code to run for each of the components.
g
Ohhhh, 🀦 I thought I read that page backwards and forwards but totally missed that… So we could do this:
Copy code
project_root
β”œβ”€β”€ Pulumi.yaml
└── .pulumi/
    β”œβ”€β”€ Pulumi.s3sink-dev.yaml
    β”œβ”€β”€ Pulumi.s3sink-stage.yaml
    β”œβ”€β”€ Pulumi.s3sink-prod.yaml
    β”œβ”€β”€ Pulumi.<stack-component-2>-dev.yaml
    β”œβ”€β”€ Pulumi.<stack-component-2>-stage.yaml
    β”œβ”€β”€ Pulumi.<stack-component-2>-prod.yaml
    └── ...
β”œβ”€β”€ README.md
β”œβ”€β”€ go.mod
β”œβ”€β”€ go.sum
β”œβ”€β”€ main.go
β”œβ”€β”€ main_test.go
└── s3sink/
    β”œβ”€β”€ handler/
    β”œβ”€β”€ handler.zip
    β”œβ”€β”€ policies.go
    β”œβ”€β”€ sink_bucket.go
    └── sink_bucket_test.go
setting the config attr in the project config to
./.pulumi
, right? that’d be a much cleaner way to organize things
a
Yup, exactly.
But, I'm not sure what's the difference between s3sink and <stack-component-2> in your case. Not sure what those should represent.
I presume they're different applications and you want each of them to be deployed separately based on the selected stack. Is that right?