crossplane-contrib / provider-upjet-azure

Azure Provider for Crossplane.
https://marketplace.upbound.io/providers/upbound/provider-family-azure/
Apache License 2.0
61 stars 75 forks source link

FederatedIdentityCredential fails to process patched parentId value correctly: parsing error #418

Open lorsal opened 1 year ago

lorsal commented 1 year ago

What happened?

Creation of a FederatedIdentityCredential resource as part of a composition fails initially due to an error related to patching the spec.forProvider.parentId field (or processing the patched value, at least). However, after manually deleting the non-ready FederatedIdentityCredential object on the crossplane instance, the object is recreated and then successfully processes the patchedparentId value.

Error: observe failed: cannot run refresh: refresh failed: parsing "parentId/federatedIdentityCredentials/test1-fic": expected 10 segments within the Resource ID but got 3 for "parentId/federatedIdentityCredentials/test1-fic": parsing "parentId/federatedIdentityCredentials/test1-fic": expected 10 segments within the Resource ID but got 3 for "parentId/federatedIdentityCredentials/test1-fic"

How can we reproduce it?

  1. Create Azure provider config named azure-provider-config-team1
  2. Apply composition FedIdTest.yaml and XRD XFedIdTest.yaml
  3. Apply claim-fedidtest.yaml
  4. kubectl describe federatedidentitycredentials.managedidentity.azure.upbound.io test1-fic to see error message; note that the value is apparently already successfully patched to the parentId field
  5. kubectl delete federatedidentitycredentials.managedidentity.azure.upbound.io test1-fic
  6. watch kubectl get federatedidentitycredentials.managedidentity.azure.upbound.io test1-fic; object will be recreated and reach ready: true status

What environment did it happen in?

FedIdTest.yaml.txt XFedIdTest.yaml.txt claim-fedidtest.yaml.txt

sschne commented 7 months ago

This is still happening with current version: Universal Crossplane Version: v1.15.1 Provider Version: 1.0.0 Kubernetes version (use kubectl version): 1.28.5

Anything i can help to get this issue forward?

      observe failed: failed to observe the resource: [{0 parsing "<no value>/federatedIdentityCredentials/test-j7gnh": parsing the FederatedIdentityCredential ID: the number of segments didn't match

      Expected a FederatedIdentityCredential ID that matched (containing 10 segments):

      > /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/example-resource-group/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentityValue/federatedIdentityCredentials/federatedIdentityCredentialValue

      However this value was provided (which was parsed into 0 segments):

      > <no value>/federatedIdentityCredentials/test-j7gnh
github-actions[bot] commented 2 months ago

This provider repo does not have enough maintainers to address every issue. Since there has been no activity in the last 90 days it is now marked as stale. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

github-actions[bot] commented 2 months ago

This issue is being closed since there has been no activity for 14 days since marking it as stale. If you still need help, feel free to comment or reopen the issue!

jusdor commented 2 months ago

Please re-open. This is still relevant.