This commit is contained in:
2023-10-18 18:07:13 +02:00
parent 6eb84da3eb
commit 1d64407196
5 changed files with 50 additions and 54 deletions

View File

@@ -47,25 +47,12 @@ 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
order = 0
}
resource "authentik_policy_binding" "prj_access_vynil" {
target = authentik_application.prj_application.uuid
group = data.authentik_group.vynil-admin.id
order = 1
}
data "http" "get_forward_outpost" {
depends_on = [authentik_provider_proxy.prj_forward]
url = "http://authentik.${var.domain}-auth.svc/api/v3/outposts/instances/?name__iexact=forward"
method = "GET"
request_headers = local.request_headers
request_headers = var.request_headers
lifecycle {
postcondition {
condition = contains([200], self.status_code)

View File

@@ -28,3 +28,5 @@ variable "access-token-validity" {
}
variable "service" {
}
variable "request_headers" {
}