A DB parameter group acts as a container for engine configuration values that apply to all instances associated with that group. Common use cases include setting character encodings, adjusting connection limits, tuning autovacuum behavior in PostgreSQL, and enabling slow query logs. By default, this module creates a parameter group automatically. You can also reference an existing parameter group or fall back to the AWS-managed default.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/terraform-aws-modules/terraform-aws-rds/llms.txt
Use this file to discover all available pages before exploring further.
Variables
| Variable | Default | Description |
|---|---|---|
create_db_parameter_group | true | Whether to create a parameter group. Set to false to use an existing one or the AWS default. |
parameter_group_name | null | Name of the parameter group to create or reference. Defaults to the instance identifier. |
parameter_group_use_name_prefix | true | When true, appends a unique suffix to the name to avoid conflicts. Set to false to use the exact name. |
family | null | The parameter group family. Required when creating a new parameter group (e.g., mysql8.0, postgres17). |
parameters | null | List of parameter objects to apply. |
parameter_group_description | null | Description for the parameter group. |
parameter_group_skip_destroy | null | When true, removes the parameter group from state on destroy without deleting it from AWS. |
The parameters object
Each entry in parameters accepts the following fields, as defined in variables.tf:
apply_method is omitted, AWS uses the default for that parameter (usually immediate for dynamic parameters and pending-reboot for static ones).
Usage patterns
- Create new
- Use existing
- AWS default
The module creates a parameter group by default. Provide To use an exact name instead of a generated prefix:To use a prefix (the default):AWS will create a parameter group named something like
family and parameters to configure it:prod-instance-mysql-8.0-20240101120000000000000001.PostgreSQL example
For PostgreSQL, the family format ispostgres{major_version}:
Blue/green deployment parameter example
Some parameters requireapply_method = "pending-reboot". For example, enabling logical replication in PostgreSQL for blue/green deployments:
Family naming reference
| Engine | Family pattern | Example |
|---|---|---|
| MySQL | mysql{major}.{minor} | mysql8.0, mysql8.4 |
| MariaDB | mariadb{major}.{minor} | mariadb10.6 |
| PostgreSQL | postgres{major} | postgres14, postgres17 |
| Oracle EE | oracle-ee-{major} | oracle-ee-19 |
| Oracle SE2 | oracle-se2-{major} | oracle-se2-19 |
| SQL Server EX | sqlserver-ex-{major}.{minor} | sqlserver-ex-15.0 |
| SQL Server SE | sqlserver-se-{major}.{minor} | sqlserver-se-15.0 |