This message was deleted.
# general
s
This message was deleted.
f
I would build a component resource 🙂
you can then create one or many stacks for each… if you go the many route, it would probably make sense to create pulumi config values for each distinctive difference between clusters..
l
We have an integration testing framework written in go that allows doing a deployment programmatically including the specification of config: https://github.com/pulumi/examples/blob/master/testing-integration/examples_test.go#L29-L31
a
@future-barista-68134 Thank you for getting back to me. I'm not sure how that helps in this situation. I still need to store some sort of list of configs. Where do I store all these different config options? A more straight forward example is I have 20 unique and 10 common NSG rules for each envrionemnt dev, stage, qa etc... whats the best practice to store these values?
f
though it’s not clear in the docs, you can manually setup config in the
Pulumi.stackname.yaml
file.. which generally should be checked in to source code.. in your case it looks like structured config setup might be useful.. see: https://www.pulumi.com/docs/intro/concepts/config/#structured-configuration
a
If I delete a stack won't that also be deleted? We did have that orignally but removed it
Thank you for providing support on this. its much appreciated
f
Correct.. and you can setup the config variables to be either required or optional in the code so that you know you have to set them. See: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/pulumi/#Config-get and https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/pulumi/#Config-require.
a
Are there any big examples out there for the use of this? Concerned with the deletion part for each stack as we have large configurations.
f
If it’s tracked in source, it shouldn’t be hard to go back to and also you could also create a “default” config file that you could copy when creating a new stack to simplify the process
a
That's a very valid point. You can type check as well ?
f
Also I’d recommend a stack per k8s cluster to help reduce the huge config if possible.. for type checking that’s a good question.. there are type checking config calls you could make like https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/pulumi/#Config-requireNumber and https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/pulumi/#Config-requireBoolean