RDS: cannot major-version upgrade Aurora cluster with custom instance parameter group
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### 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
```
new DatabaseCluster(this, id, {
...
instanceProps: {
parameterGroup: ParameterGroup.fromParameterGroupName(this, `instance-parameter-group-15`, `${this.databaseName}-aurora15-custom-instance-parameter-group`),
},
parameterGroup: ParameterGroup.fromParameterGroupName(this, `cluster-parameter-group-15`, `${this.databaseName}-aurora15-custom-cluster-parameter-group`),
});
```
### Possible Solution
Workaround:
```
const cluster: CfnDBCluster = this.cluster.node.children.filter(x => x instanceof CfnDBCluster)[0] as CfnDBCluster;
cluster.dbInstanceParameterGroupName = `${this.databaseName}-aurora15-custom-instance-parameter-group`;
```
### 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_
Contributor guide
Research direction
Start at the DatabaseCluster construct and inspect how instanceProps.parameterGroup and the cluster parameterGroup are synthesized into CfnDBCluster. Compare the generated resource with the workaround setting CfnDBCluster.dbInstanceParameterGroupName; done means a custom instance parameter group is emitted on the cluster so the Aurora major-version upgrade succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100