upjet icon indicating copy to clipboard operation
upjet copied to clipboard

Wait for reference to be ready

Open dzoeteman opened this issue 1 year ago • 0 comments

I'm not sure if Upjet specifically is the right location; the problem is with provider-gcp but I assume the problem is more on the generator.

What problem are you facing?

When specifying a reference, the resource does not wait for the resolved reference resource to be ready before it tries to apply. As an example with provider-gcp:

  • I have a pubsub Topic and a Subscription manifest that I deploy simultaneously.
  • The Subscription manifest references the Topic with the topicRef property.
  • It takes a while for the Topic to be provisioned and ready, but the Subscription still tries to apply too and gets an error back from GCP that the topic does not exist.

This causes unnecessary calls to GCP/other platform APIs and extra CPU cycles for the providers trying to run TF apply.

How could Upjet help solve your problem?

It would be nice if resolved references are checked first to have the Ready condition to be True, and/or add this as an option to the ref: fields.

dzoeteman avatar Nov 06 '23 09:11 dzoeteman