Postgres Cluster on Kubernetes
Providers
The following providers are needed by this module:
-
aws (5.39.1)
-
kubernetes (2.27.0)
-
random (3.6.0)
-
time (0.10.0)
-
vault (3.25.0)
Required Inputs
The following input variables are required:
aws_iam_ip_allow_list
Description: A list of IPs that can use the service account token to authenticate with AWS API
Type: list(string)
eks_cluster_name
Description: The name of the EKS cluster.
Type: string
pg_cluster_namespace
Description: The namespace to deploy to the cluster into
Type: string
pg_storage_gb
Description: The number of gigabytes of storage to provision for the postgres cluster
Type: number
Optional Inputs
The following input variables are optional (have default values):
backups_enabled
Description: Whether this database has backups enabled
Type: bool
Default: true
backups_force_delete
Description: Whether to delete backups on destroy
Type: bool
Default: false
burstable_instances_enabled
Description: Whether the database nodes can be scheduled on burstable instances
Type: bool
Default: false
log_connections_enabled
Description: Whether to log each connection
Type: bool
Default: false
pg_cpu_millicores
Description: The amount of cpu to allocate to the postgres pods (in millicores)
Type: number
Default: 250
pg_instances
Description: The number of instances to deploy in the postgres cluster
Type: number
Default: 2
pg_memory_mb
Description: The amount of memory to allocate to the postgres pods (in Mi)
Type: number
Default: 1000
pg_version
Description: The version of postgres to deploy
Type: string
Default: "16.2-10"
pgbouncer_pool_mode
Description: What pool_mode to run pgbouncer in
Type: string
Default: "session"
pgbouncer_version
Description: The version of the cloudnative-pg/pgbouncer image to use
Type: string
Default: "1.22.1"
pull_through_cache_enabled
Description: Whether to use the ECR pull through cache for the deployed images
Type: bool
Default: false
spot_instances_enabled
Description: Whether the database nodes can be scheduled on spot instances
Type: bool
Default: false
vpa_enabled
Description: Whether to enable the vertical pod autoscaler
Type: bool
Default: true
Outputs
The following outputs are exported:
database
Description: The database to use for application data
db_admin_role
Description: n/a
db_reader_role
Description: n/a
db_superuser_role
Description: n/a
pooler_r_service_name
Description: The service name of the pgbouncer connection pooler that allows read access
pooler_r_service_port
Description: n/a
pooler_rw_service_name
Description: The service name of the pgbouncer connection pooler that allows read-write access
pooler_rw_service_port
Description: n/a
r_service_name
Description: The service name for all db instances that allow read access
r_service_port
Description: n/a
ro_service_name
Description: The service name for the db instances that only allow read access
ro_service_port
Description: n/a
rw_service_name
Description: The service name of the db node that allows read-write access
rw_service_port
Description: n/a
server_certs_secret
Description: The secret containing the server certificates for the database
superuser_password
Description: The password for root user of the database
superuser_username
Description: The root user of the database
Usage
No notes