feat: add gitea tofu app
This commit is contained in:
parent
dc6fc316e7
commit
c00e10a505
4 changed files with 38 additions and 9 deletions
|
|
@ -22,7 +22,7 @@ resource "authentik_group" "ci" {
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "authentik_group" "admins" {
|
resource "authentik_group" "admins" {
|
||||||
name = "authentik Admins"
|
name = "authentik Admins"
|
||||||
is_superuser = true
|
is_superuser = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -35,9 +35,9 @@ module "argo-workflows" {
|
||||||
app_access_group_id = authentik_group.ci.id
|
app_access_group_id = authentik_group.ci.id
|
||||||
redirect_uris = ["https://ci.fuku/oauth2/callback"]
|
redirect_uris = ["https://ci.fuku/oauth2/callback"]
|
||||||
app_icon = "https://argoproj.github.io/icons/icon-512x512.png"
|
app_icon = "https://argoproj.github.io/icons/icon-512x512.png"
|
||||||
app_description = "Kubernetes-native workflow engine supporting DAG and step-based workflows"
|
app_description = "Kubernetes-native workflow engine supporting DAG and step-based workflows"
|
||||||
app_publisher = "Argo Project"
|
app_publisher = "Argo Project"
|
||||||
app_url = "https://ci.fuku"
|
app_url = "https://ci.fuku"
|
||||||
}
|
}
|
||||||
|
|
||||||
module "firezone" {
|
module "firezone" {
|
||||||
|
|
@ -49,8 +49,23 @@ module "firezone" {
|
||||||
app_access_group_id = authentik_group.admins.id
|
app_access_group_id = authentik_group.admins.id
|
||||||
redirect_uris = ["https://fz.fukurokuju.dev/auth/oidc/authentik/callback/"]
|
redirect_uris = ["https://fz.fukurokuju.dev/auth/oidc/authentik/callback/"]
|
||||||
app_icon = "https://www.firezone.dev/icon.svg"
|
app_icon = "https://www.firezone.dev/icon.svg"
|
||||||
app_description = "VPN"
|
app_description = "VPN"
|
||||||
app_publisher = "Firezone"
|
app_publisher = "Firezone"
|
||||||
app_url = "https://fz.fukurokuju.dev"
|
app_url = "https://fz.fukurokuju.dev"
|
||||||
sub_mode = "hashed_user_id"
|
sub_mode = "hashed_user_id"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module "gitea" {
|
||||||
|
source = "../modules/authentik"
|
||||||
|
app_name = "Gitea"
|
||||||
|
app_slug = "gitea"
|
||||||
|
client_id = var.gitea_client_id
|
||||||
|
client_secret = var.gitea_client_secret
|
||||||
|
app_access_group_id = ""
|
||||||
|
redirect_uris = ["https://git.roboces.dev/user/oauth2/authentik/callback"]
|
||||||
|
app_icon = "https://about.gitea.com/gitea.svg"
|
||||||
|
app_description = "Git with a cup of Tea 🍵"
|
||||||
|
app_publisher = "Gitea"
|
||||||
|
app_url = "https://git.roboces.dev/user/oauth2/authentik"
|
||||||
|
sub_mode = "hashed_user_id"
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,3 +4,5 @@
|
||||||
TF_VAR_argo_workflows_client_secret=
|
TF_VAR_argo_workflows_client_secret=
|
||||||
TF_VAR_firezone_client_id=
|
TF_VAR_firezone_client_id=
|
||||||
TF_VAR_firezone_client_secret=
|
TF_VAR_firezone_client_secret=
|
||||||
|
TF_VAR_gitea_client_id=
|
||||||
|
TF_VAR_gitea_client_secret=
|
||||||
|
|
|
||||||
|
|
@ -17,3 +17,13 @@ variable "firezone_client_secret" {
|
||||||
description = "Client secret"
|
description = "Client secret"
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "gitea_client_id" {
|
||||||
|
description = "Client ID"
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "gitea_client_secret" {
|
||||||
|
description = "Client secret"
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,10 @@ resource "authentik_application" "app" {
|
||||||
meta_publisher = var.app_publisher
|
meta_publisher = var.app_publisher
|
||||||
meta_launch_url = var.app_url
|
meta_launch_url = var.app_url
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "authentik_policy_binding" "app_access" {
|
resource "authentik_policy_binding" "app_access" {
|
||||||
target = authentik_application.app.uuid
|
target = authentik_application.app.uuid
|
||||||
group = var.app_access_group_id
|
group = var.app_access_group_id
|
||||||
order = 0
|
order = 0
|
||||||
|
count = var.app_access_group_id != "" ? 1 : 0
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue