I have a number of existing Projects, most with mu...
# general
r
I have a number of existing Projects, most with multiple Stacks, that I would like to setup on the S3 state backend. So far, each project just has a
Pulumi.yaml
in it that controls all of the settings, and Stack specific config is determined by
pulumi.getStack()
in the code. If I wanted to make it so that in all cases, the state file would be written in S3 like:
<s3://some-bucket/${name-of-project}/${stack-name}>
, what is the easiest way to enforce that? Do I need a
Pulumi.<stack>.yaml
for each stack in each project? Or is there a centralized way I could do this in the code somehow, or in the single
Pulumi.yaml
file for each project? And would I run into any issues if multiple different projects use the same stack names, such as
dev
,
staging
, and
prod
?
p
I'm not sure about the first question, but the answer to the second one is emphatically yes, yes you will run into serious issues. From my experience every stack in your s3 backend needs to have a unique name.