More of an approach question than anything - My pu...
# general
More of an approach question than anything - My pulumi stack creates a bunch of resources with the end result of generating a url endpoint - not something that is statically set. I'd like
pulumi up
to finish once this resource is up (which can be determined by making a HTTP GET to it and reading the response. In Terraform I'd probably use something like local exec with curl, in go, i'd probably use the http package and put that in a loop. I'd also like to log when it's attempted, I assume putting this in a loop and writing to fmt.println would be appropriate, unless there's something better with the pulumi context object
you can use
is the pulumi context
If your cloud provider isn't creating the endpoint (e.g., if AWS is creating an EC2 instance and you're starting nginx inside that), then you need more. In a vanilla Pulumi program, you can't wait until a resource is finished post-creation "boot" or anything like that. Pulumi does the waiting, and it may choose to finish when the cloud provider says the resource is ready, rather than when you think the resource is ready (which may be a long time after). To work around this, you need to call your Pulumi program from another program or script, and have that program/script do the waiting. There is automation-api which does this, but if you're checking a single HTTP endpoint, then automation-api is over the top. A single wait-curl-loop will do.