Panfactum LogoPanfactum
Infrastructure ModulesDirect Modules
test_kube_pg_cluster
Stable
Direct
Source Code Link

Test Postgres Cluster on Kubernetes

Used in the bootstrapping guide to demonstrate the capabilities of the PostgreSQL cluster.

Providers

The following providers are needed by this module:

  • aws (5.70.0)

  • kubectl (2.0.4)

  • kubernetes (2.27.0)

  • pf (0.0.3)

  • random (3.6.0)

  • time (0.10.0)

  • vault (3.25.0)

Required Inputs

The following input variables are required:

eks_cluster_name

Description: The name of the EKS cluster.

Type: string

Optional Inputs

The following input variables are optional (have default values):

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)

Default: []

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

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

vpa_enabled

Description: Whether to enable the vertical pod autoscaler

Type: bool

Default: true

Outputs

The following outputs are exported:

db_admin_role

Description: n/a

db_reader_role

Description: n/a

db_superuser_role

Description: n/a

Usage

No notes