Remove unused keycloak resources

This commit is contained in:
2026-02-07 15:40:59 +01:00
parent 3717d0a059
commit 92fa216878
+201 -201
View File
@@ -134,210 +134,210 @@ resource "keycloak_openid_client" "twomartens_gitea" {
] ]
} }
resource "keycloak_openid_client" "twomartens_nextcloud" { # resource "keycloak_openid_client" "twomartens_nextcloud" {
realm_id = keycloak_realm.twomartens_realm.id # realm_id = keycloak_realm.twomartens_realm.id
name = "cloud.2martens.de" # name = "cloud.2martens.de"
enabled = true # enabled = true
access_type = "CONFIDENTIAL" # access_type = "CONFIDENTIAL"
client_id = "nextcloud" # client_id = "nextcloud"
client_secret = var.nextcloud_client_secret # client_secret = var.nextcloud_client_secret
standard_flow_enabled = true # standard_flow_enabled = true
use_refresh_tokens = true # use_refresh_tokens = true
full_scope_allowed = false # full_scope_allowed = false
#
#
# consent_required = true
# base_url = "https://cloud.2martens.de"
# valid_redirect_uris = [
# "https://cloud.2martens.de/index.php/apps/sociallogin/custom_oidc/keycloak"
# ]
# valid_post_logout_redirect_uris = [
# "https://cloud.2martens.de"
# ]
# web_origins = [
# "https://cloud.2martens.de/*"
# ]
# }
# resource "keycloak_openid_client" "twomartens_timetable_frontend" {
# realm_id = keycloak_realm.twomartens_realm.id
# name = "Timetable Frontend"
# enabled = true
# access_type = "PUBLIC"
# client_id = "tsw-timetable-frontend"
# standard_flow_enabled = true
# use_refresh_tokens = false
# full_scope_allowed = false
# pkce_code_challenge_method = "S256"
#
# valid_redirect_uris = [
# "http://localhost:8100/*",
# "https://timetable.2martens.de/*"
# ]
# web_origins = [
# "+"
# ]
# }
consent_required = true # resource "keycloak_role" "timetable_frontend_active_plan" {
base_url = "https://cloud.2martens.de" # realm_id = keycloak_realm.twomartens_realm.id
valid_redirect_uris = [ # name = "ACTIVE_PLAN"
"https://cloud.2martens.de/index.php/apps/sociallogin/custom_oidc/keycloak" # client_id = keycloak_openid_client.twomartens_timetable_frontend.id
] # }
valid_post_logout_redirect_uris = [ #
"https://cloud.2martens.de" # resource "keycloak_role" "timetable_frontend_personal_plan" {
] # realm_id = keycloak_realm.twomartens_realm.id
web_origins = [ # name = "PERSONAL_PLAN"
"https://cloud.2martens.de/*" # client_id = keycloak_openid_client.twomartens_timetable_frontend.id
] # }
} #
# resource "keycloak_generic_role_mapper" "timetable_frontend_view_profile" {
# realm_id = keycloak_realm.twomartens_realm.id
# client_id = keycloak_openid_client.twomartens_timetable_frontend.id
# role_id = keycloak_role.account_view_profile.id
# }
#
# resource "keycloak_generic_role_mapper" "timetable_frontend_active_plan" {
# realm_id = keycloak_realm.twomartens_realm.id
# client_id = keycloak_openid_client.twomartens_timetable_frontend.id
# role_id = keycloak_role.timetable_frontend_active_plan.id
# }
#
# resource "keycloak_generic_role_mapper" "timetable_frontend_personal_plan" {
# realm_id = keycloak_realm.twomartens_realm.id
# client_id = keycloak_openid_client.twomartens_timetable_frontend.id
# role_id = keycloak_role.timetable_frontend_personal_plan.id
# }
resource "keycloak_openid_client" "twomartens_timetable_frontend" { # resource "keycloak_openid_client" "twomartens_wahlrecht_frontend" {
realm_id = keycloak_realm.twomartens_realm.id # realm_id = keycloak_realm.twomartens_realm.id
name = "Timetable Frontend" # name = "Wahlrecht Frontend"
enabled = true # enabled = true
access_type = "PUBLIC" # access_type = "PUBLIC"
client_id = "tsw-timetable-frontend" # client_id = "wahlrecht-frontend"
standard_flow_enabled = true # standard_flow_enabled = true
use_refresh_tokens = false # use_refresh_tokens = false
full_scope_allowed = false # full_scope_allowed = false
pkce_code_challenge_method = "S256" # pkce_code_challenge_method = "S256"
#
valid_redirect_uris = [ # valid_redirect_uris = [
"http://localhost:8100/*", # "http://localhost:4200/*",
"https://timetable.2martens.de/*" # "https://wahlrecht.2martens.de/*"
] # ]
web_origins = [ # web_origins = [
"+" # "+"
] # ]
} # }
#
resource "keycloak_role" "timetable_frontend_active_plan" { # resource "keycloak_openid_client" "twomartens_wahlrecht_backend" {
realm_id = keycloak_realm.twomartens_realm.id # realm_id = keycloak_realm.twomartens_realm.id
name = "ACTIVE_PLAN" # name = "Wahlrecht Backend"
client_id = keycloak_openid_client.twomartens_timetable_frontend.id # enabled = true
} # access_type = "CONFIDENTIAL"
# client_id = "wahlrecht"
resource "keycloak_role" "timetable_frontend_personal_plan" { # standard_flow_enabled = true
realm_id = keycloak_realm.twomartens_realm.id # use_refresh_tokens = false
name = "PERSONAL_PLAN" # full_scope_allowed = false
client_id = keycloak_openid_client.twomartens_timetable_frontend.id #
} # valid_redirect_uris = [
# "http://localhost:12000/*",
resource "keycloak_generic_role_mapper" "timetable_frontend_view_profile" { # "https://api.2martens.de/wahlrecht/*"
realm_id = keycloak_realm.twomartens_realm.id # ]
client_id = keycloak_openid_client.twomartens_timetable_frontend.id # web_origins = [
role_id = keycloak_role.account_view_profile.id # "+"
} # ]
# }
resource "keycloak_generic_role_mapper" "timetable_frontend_active_plan" {
realm_id = keycloak_realm.twomartens_realm.id
client_id = keycloak_openid_client.twomartens_timetable_frontend.id
role_id = keycloak_role.timetable_frontend_active_plan.id
}
resource "keycloak_generic_role_mapper" "timetable_frontend_personal_plan" {
realm_id = keycloak_realm.twomartens_realm.id
client_id = keycloak_openid_client.twomartens_timetable_frontend.id
role_id = keycloak_role.timetable_frontend_personal_plan.id
}
resource "keycloak_openid_client" "twomartens_wahlrecht_frontend" {
realm_id = keycloak_realm.twomartens_realm.id
name = "Wahlrecht Frontend"
enabled = true
access_type = "PUBLIC"
client_id = "wahlrecht-frontend"
standard_flow_enabled = true
use_refresh_tokens = false
full_scope_allowed = false
pkce_code_challenge_method = "S256"
valid_redirect_uris = [
"http://localhost:4200/*",
"https://wahlrecht.2martens.de/*"
]
web_origins = [
"+"
]
}
resource "keycloak_openid_client" "twomartens_wahlrecht_backend" {
realm_id = keycloak_realm.twomartens_realm.id
name = "Wahlrecht Backend"
enabled = true
access_type = "CONFIDENTIAL"
client_id = "wahlrecht"
standard_flow_enabled = true
use_refresh_tokens = false
full_scope_allowed = false
valid_redirect_uris = [
"http://localhost:12000/*",
"https://api.2martens.de/wahlrecht/*"
]
web_origins = [
"+"
]
}
# from here ArgoCD # from here ArgoCD
resource "keycloak_group" "argocd_admins" { # resource "keycloak_group" "argocd_admins" {
realm_id = keycloak_realm.twomartens_realm.id # realm_id = keycloak_realm.twomartens_realm.id
name = "ArgoCDAdmins" # name = "ArgoCDAdmins"
} # }
#
resource "keycloak_openid_client" "twomartens_argocd_test" { # resource "keycloak_openid_client" "twomartens_argocd_test" {
realm_id = keycloak_realm.twomartens_realm.id # realm_id = keycloak_realm.twomartens_realm.id
name = "ArgoCD Test Cluster" # name = "ArgoCD Test Cluster"
enabled = true # enabled = true
access_type = "CONFIDENTIAL" # access_type = "CONFIDENTIAL"
client_id = "argocd-test-oauth" # client_id = "argocd-test-oauth"
standard_flow_enabled = true # standard_flow_enabled = true
use_refresh_tokens = false # use_refresh_tokens = false
full_scope_allowed = false # full_scope_allowed = false
#
valid_redirect_uris = [ # valid_redirect_uris = [
"https://argocd.k8s.test.2martens.de/auth/callback" # "https://argocd.k8s.test.2martens.de/auth/callback"
] # ]
web_origins = [ # web_origins = [
"+" # "+"
] # ]
} # }
#
resource "keycloak_openid_client_optional_scopes" "argocd_test_optional_scopes" { # resource "keycloak_openid_client_optional_scopes" "argocd_test_optional_scopes" {
realm_id = keycloak_realm.twomartens_realm.id # realm_id = keycloak_realm.twomartens_realm.id
client_id = keycloak_openid_client.twomartens_argocd_test.id # client_id = keycloak_openid_client.twomartens_argocd_test.id
#
optional_scopes = [ # optional_scopes = [
keycloak_openid_client_scope.groups_scope.name # keycloak_openid_client_scope.groups_scope.name
] # ]
} # }
#
resource "keycloak_openid_client" "twomartens_argocd_monitoring" { # resource "keycloak_openid_client" "twomartens_argocd_monitoring" {
realm_id = keycloak_realm.twomartens_realm.id # realm_id = keycloak_realm.twomartens_realm.id
name = "ArgoCD Monitoring Cluster" # name = "ArgoCD Monitoring Cluster"
enabled = true # enabled = true
access_type = "CONFIDENTIAL" # access_type = "CONFIDENTIAL"
client_id = "argocd-monitoring-oauth" # client_id = "argocd-monitoring-oauth"
standard_flow_enabled = true # standard_flow_enabled = true
use_refresh_tokens = false # use_refresh_tokens = false
full_scope_allowed = false # full_scope_allowed = false
#
valid_redirect_uris = [ # valid_redirect_uris = [
"https://argocd.k8s.monitoring.2martens.de/auth/callback" # "https://argocd.k8s.monitoring.2martens.de/auth/callback"
] # ]
web_origins = [ # web_origins = [
"+" # "+"
] # ]
} # }
#
resource "keycloak_openid_client_optional_scopes" "argocd_monitoring_optional_scopes" { # resource "keycloak_openid_client_optional_scopes" "argocd_monitoring_optional_scopes" {
realm_id = keycloak_realm.twomartens_realm.id # realm_id = keycloak_realm.twomartens_realm.id
client_id = keycloak_openid_client.twomartens_argocd_monitoring.id # client_id = keycloak_openid_client.twomartens_argocd_monitoring.id
#
optional_scopes = [ # optional_scopes = [
keycloak_openid_client_scope.groups_scope.name # keycloak_openid_client_scope.groups_scope.name
] # ]
} # }
#
# from here Grafana # # from here Grafana
#
resource "keycloak_openid_client" "twomartens_grafana_monitoring" { # resource "keycloak_openid_client" "twomartens_grafana_monitoring" {
realm_id = keycloak_realm.twomartens_realm.id # realm_id = keycloak_realm.twomartens_realm.id
name = "Grafana Monitoring Cluster" # name = "Grafana Monitoring Cluster"
enabled = true # enabled = true
access_type = "PUBLIC" # access_type = "PUBLIC"
client_id = "grafana-oauth" # client_id = "grafana-oauth"
standard_flow_enabled = true # standard_flow_enabled = true
use_refresh_tokens = true # use_refresh_tokens = true
full_scope_allowed = false # full_scope_allowed = false
pkce_code_challenge_method = "S256" # pkce_code_challenge_method = "S256"
#
valid_redirect_uris = [ # valid_redirect_uris = [
"https://grafana.k8s.monitoring.2martens.de/login/generic_oauth" # "https://grafana.k8s.monitoring.2martens.de/login/generic_oauth"
] # ]
web_origins = [ # web_origins = [
"+" # "+"
] # ]
} # }
#
resource "keycloak_role" "grafana_admin" { # resource "keycloak_role" "grafana_admin" {
realm_id = keycloak_realm.twomartens_realm.id # realm_id = keycloak_realm.twomartens_realm.id
client_id = keycloak_openid_client.twomartens_grafana_monitoring.id # client_id = keycloak_openid_client.twomartens_grafana_monitoring.id
name = "admin" # name = "admin"
} # }
#
resource "keycloak_role" "grafana_editor" { # resource "keycloak_role" "grafana_editor" {
realm_id = keycloak_realm.twomartens_realm.id # realm_id = keycloak_realm.twomartens_realm.id
client_id = keycloak_openid_client.twomartens_grafana_monitoring.id # client_id = keycloak_openid_client.twomartens_grafana_monitoring.id
name = "editor" # name = "editor"
} # }