Files
homelab/terraform/keycloak/variables.tf
T
Aleksandr Bogomiakov dd591ecd1d
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 7s
Keycloak Terraform / Terraform (push) Failing after 21s
Manage OpenArtifact Keycloak SSO and publish its client credential to Vaultwarden
2026-11-24 20:15:33 +02:00

78 lines
2.6 KiB
Terraform

variable "keycloak_url" {
description = "Keycloak URL (set via TF_VAR_keycloak_url)"
type = string
default = "https://auth.hexor.cy"
}
variable "keycloak_client_id" {
description = "Keycloak Terraform client ID (set via TF_VAR_keycloak_client_id)"
type = string
default = "terraform"
}
variable "keycloak_client_secret" {
description = "Keycloak Terraform client secret (set via TF_VAR_keycloak_client_secret)"
type = string
sensitive = true
}
variable "google_client_id" {
description = "Google OAuth client ID (set via TF_VAR_google_client_id)"
type = string
}
variable "google_client_secret" {
description = "Google OAuth client secret (set via TF_VAR_google_client_secret)"
type = string
sensitive = true
}
variable "groups" {
description = "Standalone Keycloak groups"
type = list(string)
default = []
}
variable "proxy_applications" {
description = "Proxy applications protected by rsauth2-proxy"
type = map(object({
domain = string
allowed_groups = optional(list(string), [])
}))
default = {}
}
variable "oauth2_applications" {
description = "OAuth2/OIDC applications that handle authentication themselves"
type = map(object({
redirect_uris = list(string)
post_logout_redirect_uris = optional(list(string), [])
web_origins = optional(list(string), [])
extra_default_scopes = optional(list(string), [])
extra_optional_scopes = optional(list(string), [])
allowed_groups = optional(list(string), [])
group_full_path = optional(bool, false)
publish_to_vaultwarden = optional(bool, false)
access_token_lifespan = optional(string) # seconds; null keeps the realm default
}))
default = {}
}
variable "vaultwarden_organization_id" {
description = "Vaultwarden organization receiving published Keycloak client credentials"
type = string
validation {
condition = can(regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", var.vaultwarden_organization_id))
error_message = "Set the UUID of the target Vaultwarden organization."
}
}
variable "vaultwarden_collection_id" {
description = "Vaultwarden collection shared by the Terraform writer and application secret reader"
type = string
validation {
condition = can(regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", var.vaultwarden_collection_id))
error_message = "Set the UUID of the target Vaultwarden collection."
}
}