better-shampoo-48884
04/10/2021, 11:14 AMcool-policeman-37867
04/12/2021, 7:34 AMi.e. dev.infra.happy-service and prod.infra.happy-service are two separate stacks on the same projectThanks for you reply. I have two projects for dev and prod and I don’t want to manage into one project.
if (pulumi.getStack() === "dev") {
dev configuration
}
Am I doing it correctly?witty-candle-66007
04/12/2021, 2:02 PMConfig()
in your code. See:
https://www.pulumi.com/docs/intro/concepts/config/
So for a given project, if you have a “dev” and a “prod” stack, you’ll have a Pulumi.dev.yaml
and a Pulumi.prod.yaml
that captures the configurations for the two different stacks.
Then in your code when you access pulumi.Config()
it will use the stack config that matches the stack you are doing the pulumi up
for.cool-policeman-37867
04/21/2021, 2:18 AMwitty-candle-66007
04/21/2021, 2:02 PM