crossplane-contrib / function-patch-and-transform

A patch & transform composition function
https://crossplane.io
Apache License 2.0
23 stars 24 forks source link

add required to resources.patches.transforms.string.type #131

Closed jaymiracola closed 1 month ago

jaymiracola commented 2 months ago

Adding required to schema resources.patches.transforms.string.type . If not specified an error is returned i.e. "patch-and-transform" returned a fatal result: invalid Function input: resources[1].patches[2].transforms[0].string.type: Required value: string transform type is required

      resources:
        - base:
            apiVersion: aws.k8s.starter.org/v1alpha1
            kind: XEKS
          connectionDetails:
            - fromConnectionSecretKey: kubeconfig
              type: FromConnectionSecretKey
              name: kubeconfig
          name: compositeClusterEKS
          patches:
            - fromFieldPath: spec.id
              toFieldPath: spec.id
            - fromFieldPath: spec.id
              toFieldPath: metadata.annotations[crossplane.io/external-name]
            - fromFieldPath: metadata.uid
              toFieldPath: spec.writeConnectionSecretToRef.name
              transforms:
              - type: string
                string:
                  fmt: "%s-eks"
                  type: Format <-- this line
negz commented 2 months ago

@jaymiracola You'll need to sign your commits to get DCO to pass before I can merge.