Skip to content

Commit

Permalink
Fix postgres default parameter group settings
Browse files Browse the repository at this point in the history
  • Loading branch information
nightfury1204 committed Mar 13, 2024
1 parent 87ffb22 commit 7310050
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions provider/aws/formation/resource/postgres.json.tmpl
Expand Up @@ -106,13 +106,17 @@
"DBInstanceClass": { "Ref": "Class" },
"DBInstanceIdentifier": { "Ref": "AWS::StackName" },
"DBName": "app",
"DBParameterGroupName": { "Fn::If": [ "BlankParameterGroupName", { "Fn::If": [ "Version9",
{ "Fn::Join": [ ".", [
{ "Fn::Select": [ 0, { "Fn::Split": [ ".", { "Ref": "Version" } ] } ] },
{ "Fn::Select": [ 1, { "Fn::Split": [ ".", { "Ref": "Version" } ] } ] }
] ] },
{ "Fn::Select": [ 0, { "Fn::Split": [ ".", { "Ref": "Version" } ] } ] }
] },
"DBParameterGroupName": { "Fn::If": [ "BlankParameterGroupName",
{ "Fn::Sub": [ "default.postgres${Base}", {
"Base": { "Fn::If": [ "Version9",
{ "Fn::Join": [ ".", [
{ "Fn::Select": [ 0, { "Fn::Split": [ ".", { "Ref": "Version" } ] } ] },
{ "Fn::Select": [ 1, { "Fn::Split": [ ".", { "Ref": "Version" } ] } ] }
] ] },
{ "Fn::Select": [ 0, { "Fn::Split": [ ".", { "Ref": "Version" } ] } ] }
] }
} ] }
,
{ "Ref": "ParameterGroupName" } ] },
"DBSubnetGroupName": { "Ref": "SubnetGroup" },
"DeletionProtection": { "Ref": "DeletionProtection" },
Expand Down

0 comments on commit 7310050

Please sign in to comment.