Skip to main content
Aurora uses two types of parameter groups:
  • Cluster parameter group (aws_rds_cluster_parameter_group) — applies to the entire cluster and engine-level settings.
  • DB parameter group (aws_db_parameter_group) — applies per-instance and controls instance-level settings.
The module creates both when the corresponding variable is set. To use an existing parameter group instead, provide its name directly.

Cluster parameter group

Set the cluster_parameter_group variable to create a new cluster parameter group:
cluster_parameter_group
object
default:"null"
Configuration for the cluster parameter group. When set to null (default), no group is created.
  • family (required) — The parameter group family, e.g. aurora-postgresql17, aurora-mysql8.0.
  • name (optional) — Name for the group. Defaults to var.name.
  • use_name_prefix (optional, default true) — Use the name as a prefix for a unique generated name.
  • description (optional) — Description. Defaults to "<family> for Aurora cluster <name>".
  • parameters (optional) — List of parameter objects. Each has:
    • name — parameter name
    • value — parameter value
    • apply_method (optional, default "immediate") — "immediate" or "pending-reboot"
To use an existing cluster parameter group instead:
cluster_parameter_group_name
string
default:"null"
Name of an existing cluster parameter group to attach. Use this when cluster_parameter_group is null.

DB parameter group

Set the db_parameter_group variable to create a new DB parameter group applied to all instances:
db_parameter_group
object
default:"null"
Configuration for the DB (instance-level) parameter group. When set to null (default), no group is created.Same structure as cluster_parameter_group: family, name, use_name_prefix, description, and parameters.
To use a different parameter group per instance, set db_parameter_group_name in the instances map:
instances = {
  1 = {
    instance_class          = "db.r8g.2xlarge"
    publicly_accessible     = true
    db_parameter_group_name = "default.aurora-postgresql14"
  }
  2 = {
    identifier     = "static-member-1"
    instance_class = "db.r8g.2xlarge"
    # uses the db_parameter_group created by the module
  }
}
immediate vs pending-reboot — Use apply_method = "immediate" for parameters that can be changed without a restart (dynamic parameters). Use apply_method = "pending-reboot" for static parameters that require a database restart to take effect. Applying the wrong method for a static parameter will result in an error from the AWS API.

Major version upgrades

When performing a major engine version upgrade, you can specify a parameter group that applies to all instances during the upgrade:
allow_major_version_upgrade
bool
default:"false"
Enable major engine version upgrades when changing engine_version.
cluster_db_instance_parameter_group_name
string
default:"null"
Instance parameter group to associate with all instances during a major version upgrade. Only valid when allow_major_version_upgrade is true.

Common parameter families

EngineFamily examples
Aurora PostgreSQL 17aurora-postgresql17
Aurora PostgreSQL 16aurora-postgresql16
Aurora PostgreSQL 14aurora-postgresql14
Aurora MySQL 8.0aurora-mysql8.0

Examples

Taken from the postgresql example — sets a slow query log threshold and enforces SSL:
module "aurora" {
  source = "terraform-aws-modules/rds-aurora/aws"

  name           = "ex-postgresql"
  engine         = "aurora-postgresql"
  engine_version = "17.5"

  cluster_parameter_group = {
    name        = "ex-postgresql"
    family      = "aurora-postgresql17"
    description = "ex-postgresql example cluster parameter group"
    parameters = [
      {
        name         = "log_min_duration_statement"
        value        = 4000
        apply_method = "immediate"
      },
      {
        name         = "rds.force_ssl"
        value        = 1
        apply_method = "pending-reboot"
      }
    ]
  }

  db_parameter_group = {
    name        = "ex-postgresql"
    family      = "aurora-postgresql17"
    description = "ex-postgresql example DB parameter group"
    parameters = [
      {
        name         = "log_min_duration_statement"
        value        = 4000
        apply_method = "immediate"
      }
    ]
  }
}

Build docs developers (and LLMs) love