1

I have crossplane XRD where I want to create the same set of resources in multiple AWS regions

apiVersion: aws.example.com/v1alpha1
kind: XFoo
metadata: 
  name: green-foo
spec: 
  clusters: 
    regions: 
      - us-east-1
      - us-east-2
      - us-west-2

In the crossplane composition how do I create a resource for each of the regions in the clusters.regions array? Is there some way to iterate over the inputs and stamp out a resource for each item?

double-beep
  • 5,031
  • 17
  • 33
  • 41
ams
  • 60,316
  • 68
  • 200
  • 288
  • Hey, Do you get to solve this issue? I am also looking for same kind of solution. – Naresh Bharadwaj Jul 03 '23 at 06:54
  • 1
    functions is the only way to do this. but I have not gotten around to testing the function setup. I managed to redesign my xrd to avoid the array, given that that functions were alpha when I asked the question. see https://docs.crossplane.io/knowledge-base/guides/composition-functions/ – ams Jul 04 '23 at 19:37

0 Answers0