Modify RDS Cluster after restoring from snapshot, if required #926
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes issue 588
That issue is visible when restoring an RDS Cluster from a snapshot. AWS will set the cluster parameter group and backup retention period to the default values and does not allow them to be overridden. This fix ensures that after restoring an RDS Cluster from a snapshot the modifyDbCluster action is executed if any of those parameters has been set to a custom value.
Since it is possible to start a cluster without any instances (omitting the database_name parameter), using 'resourceAwsRDSClusterInstanceUpdate' to update the SG could return an error for not finding any instance to update.
Since 'resourceAwsRDSClusterUpdate' is also able to update the SG across the Cluster and works with zero or more instances in the cluster it makes sense to issue a single call to update all the settings in one go, both solving the error, reducing the number of calls and speeding up the process.