upbound / platform-ref-azure

Upbound's reference platform for Microsoft Azure services with Crossplane
Apache License 2.0
16 stars 15 forks source link

Azure linux VM with jet provider #9

Closed vishnujanardhanan closed 1 year ago

vishnujanardhanan commented 2 years ago

Hi, I'm trying to create a Azure VM using terrajet and I'm facing issue while patching spec.forProvider.networkInterfaceIds.

I'm setting the network interface id into the XRD via the below patch

  - type: ToCompositeFieldPath
    fromFieldPath: status.atProvider.id
    toFieldPath: status.networkInterfaceId

and trying to retrieve it in the VM composition using the below patch

  patches:
  - type: FromCompositeFieldPath
    fromFieldPath: "status.networkInterfaceId"
    toFieldPath: "spec.forProvider.networkInterfaceIds[0]"

But i always end up with an error like this -> 20m Warning ComposeResources compositet0service/azt0services-8z4xb cannot render composed resource from resource template at index 4: cannot use dry-run create to name composed resource: LinuxVirtualMachine.compute.azure.jet.crossplane.io "azt0services-8z4xb-8dbgm" is invalid: spec.forProvider.networkInterfaceIds: Required value

I have the definition and composition in my git repo -> https://github.com/vishnujanardhanan/crossplane-composition-poc/blob/main/az-composition.yaml

Please help me

ytsarev commented 1 year ago

Hi @vishnujanardhanan please try out the newest version of this platform reference which is using Upbound Official provider-azure. I will close this issue, please open new one in case it does not work with a new setup, thanks!