data "keycloak_group" "maingroup2_subgroup1" {
realm_id = data.keycloak_realm.realm.id
name = "Subgroup1"
}
the above always returns the first match and I can't get the ID for the Maingroup2->Subgroup1. For example, if the data resource was supporting parent_id, I could use it like:
data "keycloak_group" "maingroup2" {
realm_id = data.keycloak_realm.realm.id
name = "MainGroup1"
}
data "keycloak_group" "maingroup2_subgroup1" {
realm_id = data.keycloak_realm.realm.id
parent_id = data.keycloak_group.maingroup2.id
name = "Subgroup1"
}
In the end I could use the correct ID for the subgroup later.
Hi,
I am currently facing a difficulty for fetching group ids for recurring subgroup names. For example; I have groups and subgroups like below:
If I have to get the id with:
the above always returns the first match and I can't get the ID for the
Maingroup2->Subgroup1
. For example, if the data resource was supportingparent_id
, I could use it like:In the end I could use the correct ID for the subgroup later.