hi all, bit of a strange one not sure how to solve this. i deploy a resource (k8s service type=ExternalName) and after it is deployed the tailscale operator in my k8s cluster will make some changes, but I need the value of that change (
.spec.externalName
) as an input to the next set of resources to deploy. something that might work is this, but i feel like there could be an easier solution / resource option I'm missing?
I've had a similar use-case in the past. I haven't found a more elegant solution in my scenario other than waiting a determinate amount of time. One minor optimisation could be to use the pulumi-time provider as you can add a "stateful" sleep to only run if a resource is first created or changed - Ref, rather than every run.
i
icy-controller-6092
03/15/2025, 11:49 PM
thanks Jason 🙂 i guess this is the way to do it!
just fyi,
local.Command
will also not re-run if the create command doesn't change, ie. it would only sleep again if you change how long to sleep for
I have one case of this too. I was able to refactor the resource into a base project. Exporting the relevant property and using it via a stack reference has side-stepped the problem in my case.
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.