https://pulumi.com logo
s

straight-cartoon-24485

02/14/2021, 7:10 PM
Can the ambient configuration be disabled? I'm thinking, perhaps I can turn
pulumi config set kubernetes:context my-context
into a required variable(?) re: https://www.pulumi.com/docs/intro/cloud-providers/kubernetes/setup/#kubernetes-configuration My goal is to avoid running pulumi against the wrong cluster (I need to switch between two live clusters often...) Is there perhaps another defensible way to configure pulumi?
b

billowy-army-68599

02/14/2021, 7:15 PM
the way to handle this is to set a provider resource on your Kubernetes resources: https://www.pulumi.com/docs/reference/pkg/kubernetes/provider/ you can specify a specific context for each https://www.pulumi.com/docs/reference/pkg/kubernetes/provider/#context_nodejs
👍 1
l

lemon-monkey-228

02/15/2021, 8:22 AM
Didn’t know there was an ambient context for kubernetes
I’ve been manually adding a provider
Although, I like that approach because I can just swap providers out from rendering to yaml to deploying
Kinda in this vein, is there a way to disable persistence of config? I’d like to force certain values to be provided at the CLI every time
6 Views