sparse-intern-71089
03/05/2021, 8:10 PMbroad-dog-22463
03/05/2021, 8:25 PMbroad-dog-22463
03/05/2021, 8:25 PMbroad-dog-22463
03/05/2021, 8:25 PMclever-cartoon-41433
03/05/2021, 8:25 PMbroad-dog-22463
03/05/2021, 8:26 PMclever-cartoon-41433
03/05/2021, 8:30 PMclever-cartoon-41433
03/05/2021, 8:31 PMbroad-dog-22463
03/05/2021, 8:36 PMbroad-dog-22463
03/05/2021, 8:37 PMbroad-dog-22463
03/05/2021, 8:37 PMbroad-dog-22463
03/05/2021, 8:38 PMbroad-dog-22463
03/05/2021, 8:38 PMbroad-dog-22463
03/05/2021, 8:38 PMclever-cartoon-41433
03/05/2021, 8:39 PMbroad-dog-22463
03/05/2021, 8:40 PMclever-cartoon-41433
03/05/2021, 8:56 PMreturn new k8s.Provider("stackKube", {
kubeconfig: virKube.metadata.name.apply(vKN => {
return "";
}),
})
@broad-dog-22463 Is there a way to make sure this apply only runs after the virKube resource has been provisioned?
All I need in terms of data is the name, but I still need the output to depend on the availability of the virKube resource. I don't know how to do that. You're probably right but this is the part I'm struggling with coding.broad-dog-22463
03/05/2021, 9:00 PMclever-cartoon-41433
03/05/2021, 9:01 PMclever-cartoon-41433
03/05/2021, 9:02 PMbroad-dog-22463
03/05/2021, 9:09 PMclever-cartoon-41433
03/05/2021, 9:09 PMbroad-dog-22463
03/05/2021, 9:11 PMclever-cartoon-41433
03/06/2021, 8:41 PMreturn new k8s.Provider("stackKube", {
kubeconfig: pulumi.all([virKube.metadata.name, ns.metadata.name]).apply(([vKn, nsN, _]) => {
execSync("loft use vcluster " + vKn + " --print --space " + nsN + " --cluster loft-cluster --silent > /tmp/cluster.yaml")
return "/tmp/cluster.yaml"
}),
}, {dependsOn: virKube})
When we spoke earlier, I somehow got the impression that the dependsOn component of the provider ended up preventing the pulumi.all(...).apply() from running until virKube was up. That is not the case, and including this in my code causes an error if the virKube has not already been created, because the output is generated during the preview automatically. How do I inject a dependency into this output so that the apply runs after it has, assuming that there are no properties of the virKube I can just grab onto to get pulumi to infer that?billowy-army-68599
clever-cartoon-41433
03/06/2021, 9:16 PMclever-cartoon-41433
03/06/2021, 9:37 PM