Keep default roles for users with additional roles

This commit is contained in:
Tobias Manske 2023-12-22 15:44:02 +01:00
parent 2a0a82e484
commit 049e2d339b
Signed by: tobias
GPG Key ID: 9164B527694A0709
2 changed files with 8 additions and 2 deletions

View File

@ -25,3 +25,8 @@ terraform {
data "keycloak_realm" "realm" { data "keycloak_realm" "realm" {
realm = var.realm realm = var.realm
} }
data "keycloak_role" "default_role" {
realm_id = data.keycloak_realm.realm.id
name = "default-roles-tobiasmanske.de"
}

View File

@ -26,6 +26,7 @@ resource "keycloak_user_roles" "rad4day_roles" {
user_id = data.keycloak_user.rad4day.id user_id = data.keycloak_user.rad4day.id
role_ids = [ role_ids = [
data.keycloak_role.default_role.id,
keycloak_role.minio-consoleAdmin.id, keycloak_role.minio-consoleAdmin.id,
] ]
} }