Summary
Managed Resources are now identified by their unique identifying properties instead of relying on their non-deterministic UUID.
Effectively changing the logic how the "external-name" is managed:
- If external-name is set: try to resolve resource by UUID (get UUID from external-name)
- If resource can be resolved by UUID: return UUID
- If resource can NOT be resolved by UUID OR external-name is NOT set:
try to resolve resource by identifying properties (realmId, clientId, etc.) - If resource can be resolved by identifying properties: return UUID of resolved resource
- return that resource does not exist
This approach makes it easy to pick-up management of existing resources that already exists without knowing the UUID.
Example:
apiVersion: role.keycloak.crossplane.io/v1alpha1
kind: Role
metadata:
annotations:
# Here we reference the role by "<realm>/<role_name>"
crossplane.io/external-name: master/uma_authorization
name: builtin-master-realm-role-uma-authorization
spec:
deletionPolicy: Orphan
forProvider:
name: uma_authorization
realmId: master
managementPolicies:
- Observe
providerConfigRef:
name: keycloak-provider-config
Fixes: #126
What's Changed
- fix(deps): update github.com/keycloak/terraform-provider-keycloak digest to 0e8f2d7 by @renovate in #268
- chore(deps): update gcr.io/distroless/static docker digest to 95ea148 by @renovate in #266
- fix(deps): update github.com/keycloak/terraform-provider-keycloak digest to 01b172b by @renovate in #269
- fix(deps): update github.com/keycloak/terraform-provider-keycloak digest to 34995e8 by @renovate in #270
- fix(deps): update github.com/keycloak/terraform-provider-keycloak digest to ef8c259 by @renovate in #271
- chore(deps): update actions/setup-go digest to 0aaccfd by @renovate in #272
- fix(deps): update github.com/keycloak/terraform-provider-keycloak digest to 08aec98 by @renovate in #273
- chore(deps): update github-actions by @renovate in #274
- Import Resources by Identifiers (Name, etc.) by @denniskniep in #206
Full Changelog: v1.13.0...v2.0.0