This message was deleted.
# general
s
This message was deleted.
a
You could try something like:
Copy code
$ pulumi --non-interactive --stack=foo stack
error: no stack named 'foo' found
What are you trying to do?
a
It's mostly explorations now, but I'm playing with a mono Git repo of Pulumi projects and when the CI/CD pipeline for the Git project is triggered I want to go through each Pulumi project and run
up
under a specific stack, but some projects don't have certain stacks, so I need to check for the stack presence. For example, I'd like to have one Pulumi project for setting up things in GitLab, but that project will only have a single env/stack: production. Maybe I'm taking this monorepo idea too far and should have a separate Git repo for the Pulumi project that handles GitLab updates.
But otherwise, thanks. The above command will be useful if I'm going down this path.
a
I asked a similar question a little while back. I wanted to create a stack dynamically in my pipeline. The answer was
pulumi stack select --create foo
a
The problem is that I'll have inter-project stack dependencies, which is why I'm trying to have a monorepo.
Yeah, I noticed your question. I'll have that too for feature branches, as part of the CI/CD process.
a
You have options. You're not tied to a monorepo if you don't want one. You can use Stack References.
a
Right, I can hold everything in a single bucket. That's true.
The other constraint I'm having is that we're using GitLab for CI/CD and everything outside a single Git repo gets harder.
I don't really want to manage Pulumi stack versions or something like that, across Git repos.
Again, maybe I'm all wrong. Still exploring and learning new stuff every day.
a
a
Hmm, I haven't come across this one. Thanks!
a
np