-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclients.tf
More file actions
51 lines (42 loc) · 1.35 KB
/
clients.tf
File metadata and controls
51 lines (42 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
resource "keycloak_openid_client" "clients" {
realm_id = keycloak_realm.realm.id
client_id = each.value.client_id
client_secret = each.value.client_secret
for_each = { for i in var.clients : i.client_id => i }
name = each.value.name
enabled = true
access_type = "CONFIDENTIAL"
standard_flow_enabled = true
implicit_flow_enabled = true
login_theme = "keycloak"
direct_access_grants_enabled = true
valid_redirect_uris = each.value.valid_redirect_uris
base_url = each.value.base_url
}
resource "keycloak_role" "argo_admin" {
realm_id = keycloak_realm.realm.id
name = "argoCDAdmins"
description = "ArgoCD admin role"
client_id = keycloak_openid_client.clients["argo-openid-client"].id
attributes = {
managed_by = "opentofu"
}
}
resource "keycloak_role" "minio_admin" {
realm_id = keycloak_realm.realm.id
name = "consoleAdmin"
description = "Minio admin role"
client_id = keycloak_openid_client.clients["minio-openid-client"].id
attributes = {
managed_by = "opentofu"
}
}
resource "keycloak_role" "minio_user" {
realm_id = keycloak_realm.realm.id
name = "readonly"
description = "Minio readonly role"
client_id = keycloak_openid_client.clients["minio-openid-client"].id
attributes = {
managed_by = "opentofu"
}
}