sparse-intern-71089
08/17/2021, 1:40 AMlittle-cartoon-10569
08/17/2021, 1:52 AMlittle-cartoon-10569
08/17/2021, 1:52 AMworried-church-46455
08/17/2021, 2:16 AMThat won’t work well in per-user stack setup. Teams where everyone has their own stack.Ah good point! That sounds like a pretty common use case.
You want all stacks to be configured via a single file?Yes. For my use case though, there will only be 3 stacks at most: dev, staging, and prod. With 3 .yml files, it’s a bit hard to see what are the differences among those envs.
little-cartoon-10569
08/17/2021, 2:20 AMworried-church-46455
08/17/2021, 2:52 AMMaybe you could put it all in a new .yaml, and write a script that creates your Pulumi.yaml and all stack files from it?Yep! I think I might do that. It should worth the effort. Do you see any potentials for pulumi to: 1. pulumi itself supports different config formats 2. it accepts some plugin or some-sort to allow user customize their configurations?
little-cartoon-10569
08/17/2021, 3:15 AMbrave-planet-10645
08/17/2021, 7:38 AMexport const config = {
rdsInstance: {
engine: "mysql",
instanceType: {
dev: "db.t2.micro",
prod: "db.t2.xlarge"
}
}
};
You can also include some stack config in there too, so you can include secrets in it:
import * as pulumi from "@pulumi/pulumi";
const pulumiconfig = new pulumi.Config();
export const config = {
rdsInstance: {
engine: "mysql",
instanceType: {
dev: "db.t2.micro",
prod: "db.t2.xlarge"
},
username: "root",
password: pulumiconfig.getSecret("mysqlpassword")
}
};
worried-church-46455
08/18/2021, 12:25 AMNo matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by