infrastructure/tf-stage-1/user_rad4day.tf
Tobias Manske 83784411ed
All checks were successful
continuous-integration/drone/push Build is passing
TF: Fix user groups
2023-12-27 16:12:10 +01:00

34 lines
965 B
HCL

data "keycloak_user" "rad4day" {
realm_id = data.keycloak_realm.realm.id
username = "rad4day"
}
resource "keycloak_user_groups" "rad4day_groups" {
realm_id = data.keycloak_realm.realm.id
user_id = data.keycloak_user.rad4day.id
exhaustive = true
group_ids = [
module.giteaclient.access_group.id,
module.giteaclient.admin_group.id,
module.grafanaclient.access_group.id,
module.grafanaclient.admin_group.id,
module.minioclient.access_group.id,
module.hedgedocclient.access_group.id,
module.minifluxclient.access_group.id,
module.synapseclient.access_group.id,
module.seafileclient.access_group.id,
data.keycloak_group.proxypass.id,
]
}
resource "keycloak_user_roles" "rad4day_roles" {
realm_id = data.keycloak_realm.realm.id
user_id = data.keycloak_user.rad4day.id
role_ids = [
data.keycloak_role.default_role.id,
keycloak_role.minio-consoleAdmin.id,
]
}