fukuops/tofu/modules/authentik-app/main.tf

26 lines
696 B
HCL

terraform {
required_version = ">= 1.6"
required_providers {
authentik = {
source = "goauthentik/authentik"
version = "2026.2.0"
}
}
}
resource "authentik_application" "app" {
name = var.app_name
slug = var.app_slug
open_in_new_tab = var.open_in_new_tab
meta_icon = var.app_icon
meta_description = var.app_description
meta_publisher = var.app_publisher
meta_launch_url = var.app_url
}
resource "authentik_policy_binding" "app_access" {
target = authentik_application.app.uuid
group = var.app_access_group_id
order = 0
count = var.app_access_group_id != "" ? 1 : 0 # only add it if the group's name exists
}