diff --git a/main.tf b/main.tf index 860f2bf..1f73015 100644 --- a/main.tf +++ b/main.tf @@ -105,6 +105,8 @@ provider "tailscale" { module "infrastructure" { source = "./modules/infrastructure" + admin_email = var.admin_email + scaleway_project_id = var.scaleway_project_id default_ssh_key = var.default_ssh_key @@ -137,6 +139,8 @@ provider "postgresql" { module "services" { source = "./modules/services" + admin_email = var.admin_email + authentik_url = var.authentik_url services = var.services diff --git a/modules/infrastructure/scaleway.tf b/modules/infrastructure/scaleway.tf index 1a27d44..3a88614 100644 --- a/modules/infrastructure/scaleway.tf +++ b/modules/infrastructure/scaleway.tf @@ -8,7 +8,7 @@ resource "scaleway_account_ssh_key" "default" { } data "scaleway_iam_user" "serguzim" { - email = "tobias@msrg.cc" + email = var.admin_email } resource "scaleway_iam_application" "service_applications" { diff --git a/modules/infrastructure/variables.tf b/modules/infrastructure/variables.tf index f5339ee..8598789 100644 --- a/modules/infrastructure/variables.tf +++ b/modules/infrastructure/variables.tf @@ -1,3 +1,5 @@ +variable "admin_email" {} + variable "scaleway_project_id" { sensitive = true } diff --git a/modules/services/authentik.tf b/modules/services/authentik.tf index 323ec21..80ce95d 100644 --- a/modules/services/authentik.tf +++ b/modules/services/authentik.tf @@ -25,7 +25,7 @@ data "authentik_property_mapping_provider_scope" "default_scopes" { resource "authentik_user" "default" { username = "serguzim" name = "Tobias Reisinger" - email = "tobias@msrg.cc" + email = var.admin_email } resource "authentik_property_mapping_provider_scope" "minio" { diff --git a/modules/services/variables.tf b/modules/services/variables.tf index c70a7d9..9ac5c49 100644 --- a/modules/services/variables.tf +++ b/modules/services/variables.tf @@ -1,5 +1,6 @@ -variable "authentik_url" { -} +variable "admin_email" {} + +variable "authentik_url" {} variable "services" { type = map(object({ diff --git a/variables.tf b/variables.tf index ae30b4a..cf4ebf8 100644 --- a/variables.tf +++ b/variables.tf @@ -6,6 +6,9 @@ variable "backend_bucket" { sensitive = false } +variable "admin_email" { + default = "tobias@msrg.cc" +} variable "authentik_url" { default = "https://auth.serguzim.me"