My use case: In a development instance of the Keycloak I want all users in a custom realm to assume the role realm-management/realm-admin, where realm-management is the client and realm-admin is the client-specific role.
╷
│ Error: defaultRoles not found by name
│
│ with keycloak_default_roles.apps,
│ on apps-realm.tf line 74, in resource "keycloak_default_roles" "apps":
│ 74: resource "keycloak_default_roles" "apps" {
│
╵
Of course, it can't work because I'm mixing role names with ids, but I also cannot reference the client specific role using only a name.
Maybe this resource should have another property named default_role_ids which is an array of role ids instead of role names?
... but only realm roles instead.
My use case: In a development instance of the Keycloak I want all users in a custom realm to assume the role
realm-management/realm-admin
, whererealm-management
is the client andrealm-admin
is the client-specific role.I tried to achieve this using the following code:
This fails with:
Of course, it can't work because I'm mixing role names with ids, but I also cannot reference the client specific role using only a name.
Maybe this resource should have another property named
default_role_ids
which is an array of role ids instead of role names?