postgresql

ballj/postgresql/kubernetes

Terraform Module HCL KUBERNETES

Terraform module to create a PostgreSQL server

Install
module "postgresql" {
source = "ballj/postgresql/kubernetes"
version = "1.2.0"
}
plain text: /constructs/tfmod-ballj-postgresql-kubernetes/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform Kubernetes PostgreSQL This terraform module deploys a PostgreSQL statefulset into a kubernetes cluster. Useage `` module "postgresql" { source = "ballj/postgresql/kubernetes" version = "~> 1.2" namespace = "production" object_prefix = "myapp-db" database_name = "myapp_db" labels = { "app.kubernetes.io/part-of" = "myapp" } } ` Variables StatefulSets Variables | Variable | Required | Default | Description | | --------------------------------- | -------- | --------------------------- | -------------------------------------------------- | | namespace | Yes | N/A | Kubernetes namespace to deploy into | | object_prefix | Yes | N/A | Unique name to prefix all objects with | | database_name | Yes | N/A | Database to create on startup | | username | No | dbuser | Database user to add | |

Inputs (50)
NameTypeDescriptionDefault
namespacestringKubernetes namespace for deployment required
namestringName of the database to create required
object_prefixstringUnique name to prefix all objects with required
pod_management_policystringControls how pods are created during scale up or down"OrderedReady"
empty_dir_sizestringSize of the empty_dir created if no pvc is specified0
readiness_probe_failurenumberMinimum consecutive failures for the probe to be considered failed after having 3
password_secretstringSecret containing database password information""
resources_requests_memorystringThe minimum amount of compute resources requirednull
resources_limits_cpustringThe maximum amount of compute resources allowednull
liveness_probe_periodnumberPeriod of the probe in seconds10
service_traffic_policystringService external traffic policy"Local"
readiness_probe_initial_delaynumberInitial delay of the probe in seconds30
liveness_probe_enabledboolEnable the readyness probetrue
image_namestringDocker image to use"bitnami/postgresql"
password_autocreate_lengthnumberLength of the automatically generated password16
wait_for_rolloutboolWait for the pod rollout to completetrue
revision_historynumberThe number of old ReplicaSets to retain4
readiness_probe_enabledboolEnable the readyness probetrue
service_account_namestringService account name to add to the pod""
security_context_enabledboolEnable the security contexttrue
service_annotationsmap(string)Annotations to add to the service{}
liveness_probe_initial_delaynumberInitial delay of the probe in seconds30
liveness_probe_successnumberMinimum consecutive successes for the probe to be considered successful after ha1
… and 10 more inputs
Outputs (6)
username — Username that can login to the databse
hostname — Name of the kubernetes service
port — Port for the kubernetes service
password_secret — Secret that is created with the database password
password_key — Key for the database password in the secret
name — Database name
Resources (4)
kubernetes_secretkubernetes_servicekubernetes_stateful_setrandom_password
Details
FrameworkTerraform Module
LanguageHCL
Version1.2.0
Cloud KUBERNETES
★ Stars4
Forks10
Total downloads10.1k
Inputs50
Outputs6
Resources4
Namespaceballj
Updated