Skip to content

Commit d720566

Browse files
committed
build(keycloak): Remove tenant group provisioning
- Removed `keycloak_group` resource - Previously created tenant-specific groups - Impacts multi-tenancy setup in Keycloak
1 parent 87e97e8 commit d720566

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

lgtm-stack/terraform/keycloak.tf

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,7 @@
2828
# - Team membership determines which tenant data they see
2929
# ============================================================
3030

31-
# ---- [MULTI-TENANCY] Tenant Groups ---------------------------
32-
# For each entry in var.tenants, Terraform creates a Keycloak group
33-
# named "<tenant>-team" (e.g. "webank-team", "azamra-team").
34-
#
35-
# HOW IT WORKS:
36-
# 1. This code creates the group in Keycloak automatically.
37-
# 2. You add a user to this group in the Keycloak Admin Console
38-
# (or via API). The user can have any role (admin/editor/viewer).
39-
# 3. On their next login, the Keycloak JWT contains:
40-
# "groups": ["webank-team", "grafana-editors"] ← both signals
41-
# 4. Grafana reads the "groups" claim and auto-assigns the user
42-
# to the "webank-team" Grafana Team (configured in grafana.tf).
43-
# 5. That team can only query Webank-* datasources → isolation enforced.
44-
#
45-
# To add a new tenant: add its name to var.tenants in terraform.tfvars
46-
# and redeploy. NO manual steps in Keycloak or Grafana.
47-
48-
resource "keycloak_group" "tenant_teams" {
49-
for_each = toset(var.tenants)
50-
51-
realm_id = var.keycloak_realm
52-
name = "${each.key}-team"
53-
}
54-
31+
# ---- OPENID Connect Client -----------------------------------
5532

5633
# ---- OpenID Connect Client -----------------------------------
5734

0 commit comments

Comments
 (0)