This commit is contained in:
2023-10-18 17:58:26 +02:00
parent 48f6a85519
commit 6eb84da3eb
6 changed files with 122 additions and 116 deletions

View File

@@ -13,7 +13,7 @@ resource "authentik_group" "groups" {
resource "authentik_group" "subgroup" {
count = length(var.sub-groups)
name = format("%s-%s", local.app-name, var.sub-groups[count.index])
parent = authentik_group.prj_users.id
parent = authentik_group.groups.id
}
resource "authentik_application" "prj_app" {

View File

@@ -0,0 +1,3 @@
output "provider-id" {
value = authentik_provider_proxy.prj_forward.id
}

View File

@@ -9,7 +9,7 @@ locals {
"http" = {
"paths" = [{
"backend" = {
"service" = local.service
"service" = var.service
}
"path" = "/${var.icon}"
"pathType" = "Prefix"
@@ -37,7 +37,6 @@ resource "kubectl_manifest" "prj_ingress_icon" {
}
data "authentik_flow" "default-authorization-flow" {
depends_on = [authentik_group.prj_users]
slug = "default-provider-authorization-implicit-consent"
}
@@ -48,9 +47,9 @@ resource "authentik_provider_proxy" "prj_forward" {
mode = "forward_single"
access_token_validity = var.access-token-validity
}
data "authentik_group" "vynil-admin" {
name = "vynil-forward-admins"
}
resource "authentik_policy_binding" "prj_access_users" {
target = authentik_application.prj_application.uuid
policy = authentik_policy_expression.policy.id

View File

@@ -4,6 +4,9 @@ variable "component" {
variable "instance" {
type = string
}
variable "icon" {
type = string
}
variable "domain" {
type = string
}
@@ -13,12 +16,9 @@ variable "namespace" {
variable "ingress-class" {
type = string
}
variable "labels" {
type = map(string)
}
variable "dns-names" {
type = list(string)
}
@@ -26,5 +26,5 @@ variable "access-token-validity" {
type = string
default = "hours=10" // ;minutes=10
}
variable "service" {
}