feat: manage Grafana Authentik SSO
This commit is contained in:
parent
76594f3f1e
commit
ac594775c6
|
|
@ -576,14 +576,21 @@ grafana_sso() {
|
|||
local action="${1:-plan}"
|
||||
local stack="bootstrap/sso-grafana"
|
||||
local bootstrap_token
|
||||
local authentik_url="${LAB_AUTHENTIK_PUBLIC_URL:-}"
|
||||
|
||||
require_debian_server "sso-grafana"
|
||||
|
||||
if [[ "${authentik_url}" != https://* ]]; then
|
||||
echo "LAB_AUTHENTIK_PUBLIC_URL must be an HTTPS URL in homelab.yml." >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Authentik creates this API token for akadmin on its first startup. Using
|
||||
# the SOPS-encrypted bootstrap value makes the identity stack reproducible
|
||||
# after an Authentik database destroy/recreate cycle.
|
||||
bootstrap_token="$(authentik_bootstrap_api_token)" || return 1
|
||||
export TF_VAR_authentik_token="${bootstrap_token}"
|
||||
export TF_VAR_authentik_url="${authentik_url}"
|
||||
|
||||
case "${action}" in
|
||||
plan)
|
||||
|
|
|
|||
Loading…
Reference in New Issue