refactor: Clean up unused variables and simplify configurations across modules

This commit is contained in:
2025-04-29 19:33:33 +02:00
parent b7408fb4d8
commit 0d3f4a0a30
11 changed files with 5 additions and 67 deletions
-3
View File
@@ -1,8 +1,5 @@
locals { locals {
region = "eu-west-1"
billing_alarm_limit = 20 billing_alarm_limit = 20
billing_alarm_emails = "c.alexandre.pires@alexpires.me" billing_alarm_emails = "c.alexandre.pires@alexpires.me"
account_id = data.aws_caller_identity.current.account_id
} }
data "aws_caller_identity" "current" {}
+2 -2
View File
@@ -43,7 +43,7 @@ locals {
value = "v=DMARC1; p=none; rua=mailto:admin@a13labs.me" value = "v=DMARC1; p=none; rua=mailto:admin@a13labs.me"
}, },
{ {
name = "${local.vps_1.name}" name = local.vps_1.name
type = "A" type = "A"
value = local.vps_1.ip value = local.vps_1.ip
}, },
@@ -145,7 +145,7 @@ locals {
value = "${local.vps_1.name}.alexpires.me" value = "${local.vps_1.name}.alexpires.me"
}, },
{ {
name = "${local.vps_1.name}" name = local.vps_1.name
type = "A" type = "A"
value = local.vps_1.ip value = local.vps_1.ip
}, },
-1
View File
@@ -1,7 +1,6 @@
module "websites" { module "websites" {
source = "../modules/nginx" source = "../modules/nginx"
persistent_folder = local.persistent_folder persistent_folder = local.persistent_folder
primary_domain = local.primary_domain
websites = local.websites websites = local.websites
} }
+3 -17
View File
@@ -22,20 +22,10 @@ locals {
nextcloud_sql_backup_cron_schedule = "40 2 * * *" nextcloud_sql_backup_cron_schedule = "40 2 * * *"
nextcloud_files_backup_cron_schedule = "50 2 * * *" nextcloud_files_backup_cron_schedule = "50 2 * * *"
# monitoring
influxdb_version = "1.8-alpine"
kapacitor_version = "1.6-alpine"
fluent_bit_version = "3.1"
telegraf_version = "1.32-alpine"
chronograf_version = "1.9-alpine"
# m3uproxy # m3uproxy
m3uproxy_version = "latest" m3uproxy_version = "latest"
wireguard_version = "1.0.20210914-r4-ls54" m3uproxy_fqdn = "tv.${local.primary_domain}"
squid_version = "6.1-23.10_edge"
m3uproxy_fqdn = "tv.${local.primary_domain}"
geoip_image = "maxmindinc/geoipupdate"
geoip_version = "latest"
geoip_cron_schedule = "0 0 * * *" geoip_cron_schedule = "0 0 * * *"
geoip_editions = [ geoip_editions = [
@@ -44,9 +34,7 @@ locals {
"GeoLite2-ASN" "GeoLite2-ASN"
] ]
# rustdesk rustdesk_fqdn = "rustdesk.${local.primary_domain}"
rustdesk_version = "latest"
rustdesk_fqdn = "rustdesk.${local.primary_domain}"
# backup # backup
local_backup_retention_days = 2 local_backup_retention_days = 2
@@ -57,8 +45,6 @@ locals {
gitea_files_backup_cron_schedule = "30 2 * * *" gitea_files_backup_cron_schedule = "30 2 * * *"
mail_files_backup_cron_schedule = "0 3 * * *" mail_files_backup_cron_schedule = "0 3 * * *"
# mail settings
getmail_version = "v0.0.1-6.19.07"
fetch_emails_schedule = "*/2 * * * *" fetch_emails_schedule = "*/2 * * * *"
# email settings # email settings
-5
View File
@@ -1,8 +1,3 @@
variable "wordpress_mysql_password" {
description = "MySQL access password"
type = string
sensitive = true
}
variable "mysql_root_password" { variable "mysql_root_password" {
description = "MySQL root password" description = "MySQL root password"
@@ -109,12 +109,6 @@
"SICReplay.pt": { "SICReplay.pt": {
"http_proxy": "http://proxy-pt.m3uproxy.svc.cluster.local:3128" "http_proxy": "http://proxy-pt.m3uproxy.svc.cluster.local:3128"
}, },
"CNNBrasil.br": {
"http_proxy": "http://proxy-pt.m3uproxy.svc.cluster.local:3128"
},
"RTPInternacional.pt": {
"http_proxy": "http://proxy-pt.m3uproxy.svc.cluster.local:3128"
},
"Rádio Comercial": { "Rádio Comercial": {
"disable_remap": true "disable_remap": true
}, },
-1
View File
@@ -4,7 +4,6 @@ locals {
mailboxes_path = "${local.mail_path}/mailboxes" mailboxes_path = "${local.mail_path}/mailboxes"
getmail_path = "${local.mail_path}/getmail" getmail_path = "${local.mail_path}/getmail"
postfix_path = "${local.mail_path}/postfix" postfix_path = "${local.mail_path}/postfix"
mail_backup_path = "${local.persistent_folder}/backup.mail"
getmail_jobs = flatten([ getmail_jobs = flatten([
for account in var.email_accounts : [ for account in var.email_accounts : [
-1
View File
@@ -1,7 +1,6 @@
locals { locals {
persistent_folder = var.persistent_folder persistent_folder = var.persistent_folder
websites_path = "${local.persistent_folder}/web" websites_path = "${local.persistent_folder}/web"
primary_domain = var.primary_domain
websites = var.websites websites = var.websites
} }
-5
View File
@@ -3,11 +3,6 @@ variable "persistent_folder" {
type = string type = string
} }
variable "primary_domain" {
description = "The primary domain for the websites"
type = string
}
variable "tag" { variable "tag" {
description = "The version of the websites to install" description = "The version of the websites to install"
type = string type = string
-4
View File
@@ -1,7 +1,3 @@
locals { locals {
persistent_folder = var.persistent_folder
websites_path = "${local.persistent_folder}/web"
primary_domain = var.primary_domain
websites = var.websites
} }
-22
View File
@@ -1,23 +1 @@
variable "persistent_folder" {
description = "The path to the persistent folder"
type = string
}
variable "primary_domain" {
description = "The primary domain for the websites"
type = string
}
variable "tag" {
description = "The version of the websites to install"
type = string
default = "stable-alpine"
}
variable "websites" {
description = "A list of websites to be deployed"
type = map(object({
domain_name = string
fqdn = list(string)
}))
}