forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rds): change the way Engines are modeled
Change the types of the engine from DatabaseClusterEngine and its subclass, DatabaseInstanceEngine, to 2 separate interfaces, IClusterEngine and IInstanceEngine. Add properties to each of them, including engineVersion, and thus stop taking engineVersion separately as a property for instances, clusters and OptionGroups. Allow changing the version of an existing engine to an arbitrary string. Add a bind()-like protocol to both IClusterEngine and IInstanceEngine, which allows expressing validation and default values logic directly in the engines, instead of hard-coding them in cluster and instance. Because of those changes, creating a default cluster with Aurora MySQL or Postgres engines now works out of the box, instead of failing at deploy time. We also correctly set the port for Postgres clusters to 5432, instead of setting it to 3306 (which is the MySQL port). Fixes aws#2213 Fixes aws#2512 Fixes aws#4150 Fixes aws#5126 Fixes aws#6532 Fixes aws#7072 BREAKING CHANGE: the class DatabaseClusterEngine has been replaced with the interface IClusterEngine in the type of DatabaseClusterProps.engine * **rds**: the class DatabaseInstanceEngine has been replaced with the interface IInstanceEngine in the type of DatabaseInstanceSourceProps.engine * **rds**: DatabaseClusterProps.engineVersion has been removed, in favor of the withVersion() method on IClusterEngine * **rds**: DatabaseInstanceNewProps.instanceClass has been renamed to instanceType * **rds**: DatabaseInstanceSourceProps.engineVersion has been removed, in favor of the withVersion() method on IInstanceEngine * **rds**: the engine property can no longer be passed when creating a DatabaseInstanceReadReplica * **rds**: the property majorEngineVersion can no longer be passed when creating an OptionGroup (instead, the version is taken directly from the passed engine)
- Loading branch information
Showing
16 changed files
with
828 additions
and
366 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.