File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ Create and manage an RDS PostgreSQL instance. Includes the ability to manage the
4949| monitoring\_ role\_ arn | Enhanced Monitoring ARN (blank to omit) | ` string ` | ` null ` | no |
5050| multi\_ az | whether to make database multi-az | ` bool ` | ` true ` | no |
5151| name | common name for resources in this module | ` string ` | ` "mysql-postgres" ` | no |
52+ | parameter\_ group\_ family | Parameter Group Family. Need to make explicit for Postgres 9.x | ` string ` | ` "" ` | no |
5253| parameters | Database parameters (will create parameter group if not null) | <pre >list(object({<br > name = string<br > value = string<br > }))</pre > | <pre >[ <br > {<br > "name": "client_encoding",<br > "value": "UTF8"<br > }<br >] </pre > | no |
5354| pass\_ version | Increment to force master user password change (not used if ` password ` is set) | ` number ` | ` 1 ` | no |
5455| password | Master password (if not set, one will be generated dynamically) | ` string ` | ` null ` | no |
Original file line number Diff line number Diff line change @@ -33,7 +33,10 @@ resource "aws_db_parameter_group" "this" {
3333
3434 name_prefix = " ${ var . name } -param"
3535
36- family = " postgres${ var . engine_version } "
36+ family = coalesce (
37+ var. parameter_group_family ,
38+ " postgres${ replace (var. engine_version , " /\\ .\\ d+/" , " " )} " # strips the minor and patch digits from the version
39+ )
3740
3841 dynamic "parameter" {
3942 iterator = each
Original file line number Diff line number Diff line change @@ -136,6 +136,12 @@ variable "parameters" {
136136 }))
137137}
138138
139+ variable "parameter_group_family" {
140+ default = " "
141+ description = " Parameter Group Family. Need to make explicit for Postgres 9.x"
142+ type = string
143+ }
144+
139145variable "performance_insights_enabled" {
140146 default = false
141147 description = " If true, performance insights will be enabled"
You can’t perform that action at this time.
0 commit comments