Refacto and add modules

This commit is contained in:
2024-02-06 11:03:20 +01:00
parent 159b576b24
commit bcdf666cc0
47 changed files with 661 additions and 338 deletions

View File

@@ -12,52 +12,52 @@ variable "labels" {
}
variable "backups" {
default = {
"enable" = false
"endpoint" = ""
default = {
"enable" = false
"endpoint" = ""
"key_id_key" = "s3-id"
"restic_key" = "bck-password"
"schedule" = {
"db" = "30 3 * * *"
}
"secret_key" = "s3-secret"
"secret_key" = "s3-secret"
"secret_name" = "backup-settings"
"use_barman" = false
"use_barman" = false
}
type = object({
enable = optional(bool),
endpoint = optional(string),
type = object({
enable = optional(bool),
endpoint = optional(string),
key_id_key = optional(string),
restic_key = optional(string),
schedule = optional(object({
db = optional(string),
})),
secret_key = optional(string),
secret_key = optional(string),
secret_name = optional(string),
use_barman = optional(bool)
use_barman = optional(bool)
})
}
variable "images" {
type = object({
postgresql = optional(object({registry = optional(string), repository = optional(string), tag = optional(number)})),
type = object({
postgresql = optional(object({ registry = optional(string), repository = optional(string), tag = optional(number) })),
})
default = {
default = {
"postgresql" = {
"registry" = "ghcr.io"
"registry" = "ghcr.io"
"repository" = "cloudnative-pg/postgresql"
"tag" = 15.3
"tag" = 15.3
}
}
}
variable "replicas" {
type = number
default = 1
type = number
default = 1
}
variable "storage" {
type = object({
type = object({
size = optional(string)
})
default = {
default = {
"size" = "5Gi"
}
}
}