Open mjgp2 opened 1 year ago
Whatever you pass in for the name in fromParameterGroupName
should be getting set as the cluster.dbInstanceParameterGroupName
, so I'm not sure why the escape hatch is necessary. Could you illustrate the difference in your synthesized template both with and without the escape hatch?
Sure.
With:
{
"Type": "AWS::RDS::DBCluster",
"Properties": {
"DatabaseName": "xxx",
"DBClusterIdentifier": "xxx-integration",
"DBClusterParameterGroupName": "xxx-aurora15-custom-cluster-parameter-group",
"DBInstanceParameterGroupName": "xxx-aurora15-custom-instance-parameter-group",
"DBSubnetGroupName": {
"Ref": "xxxdatabaseSubnets48D94137"
},
...
},
...
}
Without:
{
"Type": "AWS::RDS::DBCluster",
"Properties": {
"DatabaseName": "xxx",
"DBClusterIdentifier": "xxx-integration",
"DBClusterParameterGroupName": "xxx-aurora15-custom-cluster-parameter-group",
"DBSubnetGroupName": {
"Ref": "xxxdatabaseSubnets48D94137"
},
...
},
...
Note the instance with or without the hatch has the correct group name:
{
"Type": "AWS::RDS::DBInstance",
"Properties": {
"AutoMinorVersionUpgrade": false,
"DBClusterIdentifier": {
"Ref": "xxxdatabase01057C8A"
},
"DBInstanceClass": "db.t4g.medium",
"DBInstanceIdentifier": "xxx-integrationinstance1",
"DBParameterGroupName": "xxx-aurora15-custom-instance-parameter-group",
"DBSubnetGroupName": {
"Ref": "xxxdatabaseSubnets48D94137"
},
"EnablePerformanceInsights": true,
"Engine": "aurora-postgresql",
...
},
I have just come across this issue too. I managed to fix using a slightly simpler escape-hatch:
const cfnGreenCluster = greenCluster.node.defaultChild as rds.CfnDBCluster;
cfnGreenCluster.dbInstanceParameterGroupName = "my-custom-pg";
Describe the bug
In order to do an in-place major version upgrade of Aurora, you need to set
dbInstanceParameterGroupName
on the cluster, not just on the individual instances. You cannot do this today.Expected Behavior
Aurora cluster would do a major version upgrade
Current Behavior
On trying to upgrade the cluster:
Error: The stack named XXXX failed to deploy: UPDATE_ROLLBACK_COMPLETE: Resource handler returned message: "The current DB instance parameter group XXXXX is custom. You must explicitly specify a new DB instance parameter group, either default or custom, for the engine version upgrade.
Reproduction Steps
Possible Solution
Workaround:
Additional Information/Context
No response
CDK CLI Version
2.61.1
Framework Version
No response
Node.js Version
20.1.0
OS
macos
Language
Typescript
Language Version
No response
Other information
No response