Wait for reference to be ready
- Dominant language
- Go
- Stars
- 481
- Forks
- 131
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 11
Description
I'm not sure if Upjet specifically is the right location; the problem is with [provider-gcp](https://github.com/upbound/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.
Contributor guide
Assessment
This issue has not been assessed yet.