This message was deleted.
# general
s
This message was deleted.
c
async behaviour like that is what pulumi Outputs achieve.
r
If you have resources getting created before dependent objects are ready you could be missing the use of dependsOn fields. Also, since Pulumi is just a programming language, it’s reasonable to think you could create a timeout component if you really needed one using dependsOn and the language’s sleep function. Here’s an example of dependsOn in Go. I can’t create my IAM role until the service is created. Pulumi will automatically control this timing for me by defining dependencies.
q
thanks, dependsOn is fine, however my case is a bit trickier.. i create a kubernetes crd (gke multi cluster ingress), which gets created fine, then i need to wait till gke assign an ip address to the resource.. it’s nice terraform can wait for specific fields to be available..
in case of pulumi it looks then i need create a custom solution for this.
r
Does your crd object have an IP address field available? Usually Pulumi has these available in the form of StringOutput. Then you can attach an
.apply
block to it to indicate to Pulumi that you need that field for something before it can proceed. I’m thinking something like
Copy code
const ingressAddress = crd.publicIpAddress.apply(
  (address) => MyCustomIngressAddressResource(address)
);

const nextComponent = TheNextComponent(
  ...,
  {
    dependsOn: [ingressAddress]
  }
);
I said “object URIs” by mistake. I’m just saving the objects
q
ok, i will check this, thanks