Not using the same provider. But if you're prepared to manage two stacks, you could create the k8s provider in a conditional guarded by the stack name.
little-cartoon-10569
02/03/2022, 11:29 PM
Copy code
var k8sProv;
if (Pulumi.getStack() === "k8sYaml") {
k8sProv = new k8s.Provider("k8s-yaml-renderer", {
renderYamlToDirectory: "yaml",
});
} else {
k8sProv = new k8s.Provider("k8s-yaml-renderer", {});
}
🙌 1
q
quiet-wolf-18467
02/03/2022, 11:52 PM
Why render it and apply as a ConfigFile instead of applying directly? If you're trying to change the Pulumi apply behaviour, it's better to apply the noAwait annotation than what you're describing.
c
curved-morning-41391
02/04/2022, 4:14 AM
This is more just informational, sometimes its nice to look at the YAML before it gets applied. I'm teaching folks Kubernetes at my company and this provides them a better understanding
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.