crossplane-contrib / provider-upjet-azuread

AzureAD Provider for Crossplane.
https://marketplace.upbound.io/providers/upbound/provider-azuread/
Apache License 2.0
6 stars 19 forks source link

Fix Example in Permissiongrant Managed Resource #146

Closed jgmartinez closed 3 months ago

jgmartinez commented 3 months ago

Description of your changes

This PR fixes the claimValues example in the PermissionGrant AzureAD provider.

Fixes N/A

I have:

How has this code been tested

Checking Terraform official documentation we can observe there is a mistake in the example:

image

jeanduplessis commented 3 months ago

/test-examples="examples/serviceprincipaldelegated/v1beta1/permissiongrant.yaml"

CasperGN commented 3 months ago

@jeanduplessis I can showcase a synched object from our work below as well:

(⎈|kind-ymir:default)➜  ymir git:(feat/namespace-comp) ✗ k describe permissiongrant red-79ppw-nctk8
Name:         red-79ppw-nctk8
Namespace:
Labels:       crossplane.io/claim-name=red
              crossplane.io/claim-namespace=heimdall-red-dev
              crossplane.io/composite=red-79ppw
Annotations:  crossplane.io/composition-resource-name: permissionGrantsOAuthClaims
              crossplane.io/external-create-pending: 2024-08-15T15:46:24Z
              crossplane.io/external-create-succeeded: 2024-08-15T15:46:24Z
              crossplane.io/external-name: IRughPzCQEy5CoAuLxtvnSSwg5tA0hBJiRkM2sS2bz4
              meta.upbound.io/example-id: serviceprincipaldelegated/v1beta1/permissiongrant
API Version:  serviceprincipaldelegated.azuread.upbound.io/v1beta1
Kind:         PermissionGrant
Metadata:
  Creation Timestamp:  2024-08-15T15:46:24Z
  Finalizers:
    finalizer.managedresource.crossplane.io
  Generate Name:  red-79ppw-
  Generation:     2
  Owner References:
    API Version:           platform.novonordisk.com/v1alpha1
    Block Owner Deletion:  true
    Controller:            true
    Kind:                  XController
    Name:                  red-79ppw-vqsdz
    UID:                   13951c03-124b-43f7-80cb-9a414ff9b0c5
  Resource Version:        128842
  UID:                     a2497e62-0718-46fa-949b-ed0672fde5e2
Spec:
  Deletion Policy:  Delete
  For Provider:
    Claim Values:
      User.Read # Claim is here
    Resource Service Principal Object Id:  9b83b024-d240-4910-8919-0cdac4b66f3e
    Service Principal Object Id:           84a01b21-c2fc-4c40-b90a-802e2f1b6f9d
  Init Provider:
  Management Policies:
    *
  Provider Config Ref:
    Name:  entra
Status:
  At Provider:
    Claim Values:
      User.Read
    Id:                                    IRughPzCQEy5CoAuLxtvnSSwg5tA0hBJiRkM2sS2bz4
    Resource Service Principal Object Id:  9b83b024-d240-4910-8919-0cdac4b66f3e
    Service Principal Object Id:           84a01b21-c2fc-4c40-b90a-802e2f1b6f9d
    User Object Id:
  Conditions:
    Last Transition Time:  2024-08-15T15:46:27Z
    Reason:                Available
    Status:                True
    Type:                  Ready
    Last Transition Time:  2024-08-15T15:46:24Z
    Reason:                ReconcileSuccess
    Status:                True
    Type:                  Synced
    Last Transition Time:  2024-08-15T15:46:25Z
    Reason:                Success
    Status:                True
    Type:                  LastAsyncOperation
jeanduplessis commented 3 months ago

Thank you, @jgmartinez and @CasperGN