From ca93b2046361311b25f7552aca4fed0766af8f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?c=C4=83t=C4=83lin?= Date: Wed, 17 Jul 2024 17:18:11 +0200 Subject: [PATCH] feat: add portainer authentik-oidc tofu module --- tofu/authentik/main.tf | 17 +++++++++++++++++ tofu/authentik/sample.env | 2 ++ tofu/authentik/vars.tf | 10 ++++++++++ 3 files changed, 29 insertions(+) diff --git a/tofu/authentik/main.tf b/tofu/authentik/main.tf index d453958..accccd8 100644 --- a/tofu/authentik/main.tf +++ b/tofu/authentik/main.tf @@ -85,3 +85,20 @@ module "miniflux" { app_url = "https://feeds.roboces.dev" sub_mode = "hashed_user_id" } + +module "portainer" { + source = "../modules/authentik-oidc" + app_name = "Portainer" + app_slug = "portainer" + client_id = var.portainer_client_id + client_secret = var.portainer_client_secret + app_access_group_id = authentik_group.admins.id + redirect_uris = [ + "https://containers.fukurokuju.dev/" + ] + app_icon = "https://www.portainer.io/hubfs/crane-icon.svg" + app_description = "Kubernetes and Docker container Management Software" + app_publisher = "Portainer" + app_url = "https://containers.fukurokuju.dev/" + sub_mode = "hashed_user_id" +} diff --git a/tofu/authentik/sample.env b/tofu/authentik/sample.env index 5950ef6..2c0dc5b 100644 --- a/tofu/authentik/sample.env +++ b/tofu/authentik/sample.env @@ -8,3 +8,5 @@ TF_VAR_gitea_client_id= TF_VAR_gitea_client_secret= TF_VAR_miniflux_client_id= TF_VAR_miniflux_client_secret= +TF_VAR_portainer_client_id= +TF_VAR_portainer_client_secret= diff --git a/tofu/authentik/vars.tf b/tofu/authentik/vars.tf index 1c96f52..55bf825 100644 --- a/tofu/authentik/vars.tf +++ b/tofu/authentik/vars.tf @@ -37,3 +37,13 @@ variable "miniflux_client_secret" { description = "Client secret" type = string } + +variable "portainer_client_id" { + description = "Client ID" + type = string +} + +variable "portainer_client_secret" { + description = "Client secret" + type = string +}