forked from catalin/fukuops
feat: add jellyseerr
This commit is contained in:
parent
1ce70d911f
commit
7a4f608d2e
3 changed files with 105 additions and 8 deletions
26
tofu/modules/authentik-app/main.tf
Normal file
26
tofu/modules/authentik-app/main.tf
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
terraform {
|
||||
required_version = ">= 1.6"
|
||||
required_providers {
|
||||
authentik = {
|
||||
source = "goauthentik/authentik"
|
||||
version = "2025.12.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
|
||||
}
|
||||
62
tofu/modules/authentik-app/vars.tf
Normal file
62
tofu/modules/authentik-app/vars.tf
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
variable "app_name" {
|
||||
description = "App name"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "app_slug" {
|
||||
description = "App slug, a human-readable URL identifier, e.g.: Google -> google"
|
||||
type = string
|
||||
}
|
||||
|
||||
|
||||
variable "client_type" {
|
||||
type = string
|
||||
default = "confidential"
|
||||
|
||||
validation {
|
||||
condition = contains(["confidential", "public"], var.client_type)
|
||||
error_message = "client_type must be 'confidential' or 'public'"
|
||||
}
|
||||
}
|
||||
|
||||
variable "app_access_group_id" {
|
||||
description = "ID of a group which will have access to the app"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "sub_mode" {
|
||||
type = string
|
||||
default = "user_username"
|
||||
|
||||
validation {
|
||||
condition = contains(["user_id", "user_username", "hashed_user_id"], var.sub_mode)
|
||||
error_message = "sub_mode must be 'user_id', 'user_username' or 'hashed_user_id'"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
variable "open_in_new_tab" {
|
||||
type = bool
|
||||
description = "Open apps in a new tab"
|
||||
default = true
|
||||
}
|
||||
|
||||
variable "app_icon" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "app_description" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "app_publisher" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "app_url" {
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue