64 lines
No EOL
1.8 KiB
HCL
64 lines
No EOL
1.8 KiB
HCL
# STACKIT Project
|
|
variable "stackit_project_id" {
|
|
description = "ID of the stackit Project"
|
|
type = string
|
|
}
|
|
|
|
# Postgres Instance Config
|
|
variable "postgres_instance_name" {
|
|
description = "postgres instance name"
|
|
type = string
|
|
}
|
|
|
|
variable "postgres_instance_replicas" {
|
|
description = "number of replicas for postgres instance"
|
|
type = number
|
|
}
|
|
|
|
variable "postgres_instance_flavor" {
|
|
description = "resources for postgres"
|
|
type = object({
|
|
cpu = number
|
|
ram = number
|
|
})
|
|
}
|
|
|
|
variable "postgres_instance_storage" {
|
|
description = "storage definition for postgres instance"
|
|
type = object({
|
|
class = string # note: value can be any of (premium-perfX-stackit) where X = (2,4,6,8,10,12). Higher number is faster
|
|
size = number
|
|
})
|
|
}
|
|
|
|
variable "postgres_instance_acl" {
|
|
description = "acl for postgres instance"
|
|
type = list(string)
|
|
default = ["193.148.160.0/19", "45.129.40.0/21"] # todo: revisit IP list and set VPN IP range as default
|
|
}
|
|
|
|
variable "postgres_instance_backup_schedule" {
|
|
description = "backup schedule as crontab for postgres instance"
|
|
type = string
|
|
default = "00 02 * * *" # todo: set default based on your needs
|
|
}
|
|
|
|
variable "postgres_instance_version" {
|
|
description = "postgres version for instance"
|
|
type = string
|
|
}
|
|
|
|
variable "postgres_instance_region" {
|
|
description = "region for postgres instance"
|
|
type = string
|
|
}
|
|
|
|
# Postgres User and DB Configs
|
|
variable "postgres_databases" {
|
|
description = "list of users and databases"
|
|
type = list(object({
|
|
db_name = string # db name inside the instance
|
|
user_name = string # username and owner for postgres db
|
|
user_roles = list(string) # List of database access levels for the user. Supported values are: login, createdb.
|
|
}))
|
|
} |