Nested and multi-resource XRs
Every software product depends on more than one infrastructure resource. It is essential to build single infrastructure recipes in order for the product teams to consume with a unified experience. The orchestration of infrastructure dependencies should remain abstracted. Such recipes require multiple resources to be composed into a single XR. In all the examples hitherto, we have always composed a single GCP resource inside an XR. Let’s look at an XR sample where multiple GCP resources are composed into a single XR API. The following figure represents the resources and XR APIs that we are going to work with in the example:
In addition to multiple resource provisioning in a single XR, we also have a nested XR pattern in Figure 5.8. We are composing three resources within two XRs. The first XR composes two resources, and the second XR composes the first XR and a database resource...