Point identity env provider at in-cluster authentik-server ClusterIP
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful

Parameterise the authentik provider url as var.authentik_url (default:
the environment's public URL) and override it for
identity.k8s.syd1.au.unkin.net to
http://authentik-server.authentik.svc.cluster.local. Combined with
sessionAffinity: ClientIP on the Service, in-cluster CI runs pin to a
single server replica, eliminating the cross-replica read-back race
(goauthentik/terraform-provider-authentik#954).
This commit is contained in:
2026-08-23 23:07:04 +10:00
parent 62fb15791a
commit 218a640882
2 changed files with 11 additions and 1 deletions
@@ -17,6 +17,9 @@ terraform {
}
inputs = {
# ClusterIP + sessionAffinity pins CI to one replica (goauthentik#954); local
# runs must export TF_VAR_authentik_url=https://identity.k8s.syd1.au.unkin.net
authentik_url = "http://authentik-server.authentik.svc.cluster.local"
groups = local.config.groups
permission_groups = local.config.permission_groups
role_groups = local.config.role_groups
+8 -1
View File
@@ -3,7 +3,7 @@ generate "backend" {
if_exists = "overwrite"
contents = <<EOF
provider "authentik" {
url = "https://${path_relative_to_include()}"
url = var.authentik_url
token = var.authentik_token
}
@@ -19,6 +19,13 @@ variable "authentik_token" {
sensitive = true
}
# Defaults to the environment's public URL; an exported TF_VAR_authentik_url
# takes precedence over terragrunt inputs.
variable "authentik_url" {
type = string
default = "https://${path_relative_to_include()}"
}
terraform {
backend "consul" {
address = "https://consul.service.consul"