I posted this in the dotnet channel but it's also ...
# general
c
I posted this in the dotnet channel but it's also a more general question that I think applies to pulumi as a whole: https://pulumi-community.slack.com/archives/CQ2QFLNFL/p1756322646789759 The general version is: can you tie a resource and an immediate "get" on that resource together in such a way that the "get" isn't known (and thus isn't called) unless pulumi knows that the resource definitely exists? EDIT: This has been resolved, the issue was that the Endpoint itself was returning the wrong error code when the resource didn't exist. I was thrown off because the URL it was calling was identical to the GetSecret call I was attempting to (not) make.
In other words; I can create a k8s resource and then use Status outputs directly from that resource. Those Status outputs aren't known until the resource is created. So the provider is managing the create and populating the outputs as part of a single operation. But if my resource doesn't provide server-side outputs, I don't know how you can simulate it using the client libraries -- at least in the dotnet library. I've run into a bunch of edge cases where Pulumi resolves whatever key I'm using in the "get" even though the underlying resource doesn't exist, and chokes on it.
maybe the dynamic provider could assist? but that's not available in C# and even if it was idk if that would mean losing the ability to build off of existing resources.
Hm, this may be an implementation error on the plugin I'm using, rather than Pulumi itself. I think the plugin I'm using is returning a 400 for "Not Found" errors instead of a 404, which means the resource itself is causing the problem & not the subsequent get.
will update