https://pulumi.com logo
#general
Title
# general
d

dry-autumn-28966

09/20/2021, 8:20 PM
Hi all, I have started experimenting with Pulumi automation API for a project and it is pretty great! Unfortunately, I have been having a major issue when using the Kubernetes provider. The tool I am trying to create is responsible for creating some infrastructure (Bucket / DB) on various clouds and deploy an application on existing Kubernetes clusters using Helm. I currently have an
infra
stack that outputs a kubeconfig file with temporary token. The kubeconfig is then used from a different
app
stack using pulumi.NewStackReference(). Everything works fine until the temporary token expire… Running refresh>up against
infra
update the kubeconfig file but then the
app
refresh still uses the old one and fail. Is there any workaround?
b

bored-oyster-3147

09/20/2021, 8:26 PM
you need to also redeploy
app
after updating the kubeconfig from
infra
. Stack reference consumers currently need to be redeployed to propagate changes from their dependencies
d

dry-autumn-28966

09/20/2021, 8:28 PM
Hum… so there is no way I can refresh the state of
app
before redeploying? I guess I could up > refresh > up
b

bored-oyster-3147

09/20/2021, 8:42 PM
I don't think it's a bad idea to refresh before an up but I don't think it looks at or affects stacks that are referenced, for some reason. I do know for sure though that consuming stacks must be redeployed to propagate changes from referenced stacks. See here: https://github.com/pulumi/pulumi/issues/2309