Perhaps I'm approaching this the wrong way but in ...
# general
m
Perhaps I'm approaching this the wrong way but in my Pulumi code I use my languages' ssh lib to make ssh calls to VM's provisioned by Pulumi (from another stack, I pass the VM's details to another stack) to run some commands. When I run a
pulumi preview
, it seems to run these commands, how should I prevent this?
b
are you using a dynamic provider? how is it implemented?
m
No dynamic provisioner, literally just importing a ssh package, using
apply
to get the string value and calling that package
I assume a dynamic provisioner is what I should be doing?
b
dynamic provider, yep. That way it takes part in the pulumi lifecycle
note: dynamic providers are only supported in python and nodejs
m
cries in go
Better go learn Python then 😄
Thanks again @billowy-army-68599 for indulging my silly questions.
b
oh not silly at all! can you talk a little bit more about what you want to do in SSH? I wonder if there's a better way
m
Mainly to extract a kubeconfig from a node I'm turning into a k3s cluster. I could just bootstrap the install script in as cloud-init data but the kubeconfig issue presents an issue, as I want to use it to provision workloads.
Come to think of it I could just write a workload that mounts it and fires it off to a S3 bucket/Git repo
b
one note: Dynamic Providers are currently mostly broken in Python: https://github.com/pulumi/pulumi/issues/7453