Skip to content

Commit

Permalink
chore(rds): undeprecated APIs whose migration will cause interruption (
Browse files Browse the repository at this point in the history
…aws#17683)

All deprecated APIs will be removed from CDKv2.

Migrating from `SnapshotCredentials.fromGeneratedPassword()` to
its documented alternative will modify the RDS
instance in ways that may impact usability of the resource. This API
must not be deprecated.

The alternative APIs to the `DatabaseInstanceEngine` APIs refereced in
this PR will cause the [CFN EngineVersion][1] to be modified.
Modification of this property causes [some interruption][2] to the
resource.
This may cause "some interruption" to users' running applications.

[1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-engineversion
[2]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
Niranjan Jayakar authored and TikiTDO committed Feb 21, 2022
1 parent 4ca2d36 commit 6535226
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 32 deletions.
10 changes: 0 additions & 10 deletions DEPRECATED_APIs.md
Original file line number Diff line number Diff line change
Expand Up @@ -600,20 +600,10 @@
| @aws-cdk/aws-dynamodb | Table.​grantListStreams() | Use {@link #grantTableListStreams} for more granular permission |
| @aws-cdk/aws-dynamodb | Table.​metricSystemErrors() | use `metricSystemErrorsForOperations`. |
| @aws-cdk/aws-dynamodb | TableOptions.​serverSideEncryption | This property is deprecated. In order to obtain the same behavior as enabling this, set the `encryption` property to `TableEncryption.AWS_MANAGED` instead. |
| @aws-cdk/aws-rds | Credentials.​fromUsername() | use `fromGeneratedSecret()` or `fromPassword()` for new Clusters and Instances. Note that switching from `fromUsername()` to `fromGeneratedSecret()` or `fromPassword()` for already deployed Clusters or Instances will result in their replacement! |
| @aws-cdk/aws-rds | CredentialsFromUsernameOptions | supporting API `fromUsername()` has been deprecated. See deprecation notice of the API. |
| @aws-cdk/aws-rds | CredentialsFromUsernameOptions.​password | supporting API `fromUsername()` has been deprecated. See deprecation notice of the API. |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​MARIADB | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link mariaDb()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​MYSQL | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link mysql()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​ORACLE_​EE | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link oracleEe()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​ORACLE_​SE | instances can no longer be created with this engine. See https://forums.aws.amazon.com/ann.jspa?annID=7341 |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​ORACLE_​SE1 | instances can no longer be created with this engine. See https://forums.aws.amazon.com/ann.jspa?annID=7341 |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​ORACLE_​SE2 | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link oracleSe2()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​POSTGRES | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link postgres()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​SQL_​SERVER_​EE | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link sqlServerEe()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​SQL_​SERVER_​EX | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link sqlServerEx()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​SQL_​SERVER_​SE | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link sqlServerSe()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​SQL_​SERVER_​WEB | using unversioned engines is an availability risk. We recommend using versioned engines created using the {@link sqlServerWeb()} method |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​oracleSe() | instances can no longer be created with this engine. See https://forums.aws.amazon.com/ann.jspa?annID=7341 |
| @aws-cdk/aws-rds | DatabaseInstanceEngine.​oracleSe1() | instances can no longer be created with this engine. See https://forums.aws.amazon.com/ann.jspa?annID=7341 |
| @aws-cdk/aws-rds | DatabaseInstanceNewProps.​vpcPlacement | use `vpcSubnets` |
Expand Down
10 changes: 0 additions & 10 deletions deprecated_apis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -599,17 +599,8 @@ constructs.Node#uniqueId
@aws-cdk/aws-rds.Credentials#fromUsername
@aws-cdk/aws-rds.CredentialsFromUsernameOptions
@aws-cdk/aws-rds.CredentialsFromUsernameOptions#password
@aws-cdk/aws-rds.DatabaseInstanceEngine#MARIADB
@aws-cdk/aws-rds.DatabaseInstanceEngine#MYSQL
@aws-cdk/aws-rds.DatabaseInstanceEngine#ORACLE_EE
@aws-cdk/aws-rds.DatabaseInstanceEngine#ORACLE_SE
@aws-cdk/aws-rds.DatabaseInstanceEngine#ORACLE_SE1
@aws-cdk/aws-rds.DatabaseInstanceEngine#ORACLE_SE2
@aws-cdk/aws-rds.DatabaseInstanceEngine#POSTGRES
@aws-cdk/aws-rds.DatabaseInstanceEngine#SQL_SERVER_EE
@aws-cdk/aws-rds.DatabaseInstanceEngine#SQL_SERVER_EX
@aws-cdk/aws-rds.DatabaseInstanceEngine#SQL_SERVER_SE
@aws-cdk/aws-rds.DatabaseInstanceEngine#SQL_SERVER_WEB
@aws-cdk/aws-rds.DatabaseInstanceEngine#oracleSe
@aws-cdk/aws-rds.DatabaseInstanceEngine#oracleSe1
@aws-cdk/aws-rds.DatabaseInstanceNewProps#vpcPlacement
Expand Down Expand Up @@ -721,7 +712,6 @@ constructs.Node#uniqueId
@aws-cdk/aws-rds.PostgresEngineVersion#VER_9_6_6
@aws-cdk/aws-rds.PostgresEngineVersion#VER_9_6_8
@aws-cdk/aws-rds.PostgresEngineVersion#VER_9_6_9
@aws-cdk/aws-rds.SnapshotCredentials#fromGeneratedPassword
@aws-cdk/aws-rds.SqlServerEngineVersion#VER_15_00_4043_23_V1
@aws-cdk/aws-autoscaling.BlockDevice#mappingEnabled
@aws-cdk/aws-autoscaling.CommonAutoScalingGroupProps#notificationsTopic
Expand Down
18 changes: 9 additions & 9 deletions packages/@aws-cdk/aws-rds/lib/instance-engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1572,31 +1572,31 @@ export class DatabaseInstanceEngine {
/**
* The unversioned 'mariadb' instance engine.
*
* @deprecated using unversioned engines is an availability risk.
* NOTE: using unversioned engines is an availability risk.
* We recommend using versioned engines created using the {@link mariaDb()} method
*/
public static readonly MARIADB: IInstanceEngine = new MariaDbInstanceEngine();

/**
* The unversioned 'mysql' instance engine.
*
* @deprecated using unversioned engines is an availability risk.
* NOTE: using unversioned engines is an availability risk.
* We recommend using versioned engines created using the {@link mysql()} method
*/
public static readonly MYSQL: IInstanceEngine = new MySqlInstanceEngine();

/**
* The unversioned 'oracle-ee' instance engine.
*
* @deprecated using unversioned engines is an availability risk.
* NOTE: using unversioned engines is an availability risk.
* We recommend using versioned engines created using the {@link oracleEe()} method
*/
public static readonly ORACLE_EE: IInstanceEngine = new OracleEeInstanceEngine();

/**
* The unversioned 'oracle-se2' instance engine.
*
* @deprecated using unversioned engines is an availability risk.
* NOTE: using unversioned engines is an availability risk.
* We recommend using versioned engines created using the {@link oracleSe2()} method
*/
public static readonly ORACLE_SE2: IInstanceEngine = new OracleSe2InstanceEngine();
Expand All @@ -1618,39 +1618,39 @@ export class DatabaseInstanceEngine {
/**
* The unversioned 'postgres' instance engine.
*
* @deprecated using unversioned engines is an availability risk.
* NOTE: using unversioned engines is an availability risk.
* We recommend using versioned engines created using the {@link postgres()} method
*/
public static readonly POSTGRES: IInstanceEngine = new PostgresInstanceEngine();

/**
* The unversioned 'sqlserver-ee' instance engine.
*
* @deprecated using unversioned engines is an availability risk.
* NOTE: using unversioned engines is an availability risk.
* We recommend using versioned engines created using the {@link sqlServerEe()} method
*/
public static readonly SQL_SERVER_EE: IInstanceEngine = new SqlServerEeInstanceEngine();

/**
* The unversioned 'sqlserver-se' instance engine.
*
* @deprecated using unversioned engines is an availability risk.
* NOTE: using unversioned engines is an availability risk.
* We recommend using versioned engines created using the {@link sqlServerSe()} method
*/
public static readonly SQL_SERVER_SE: IInstanceEngine = new SqlServerSeInstanceEngine();

/**
* The unversioned 'sqlserver-ex' instance engine.
*
* @deprecated using unversioned engines is an availability risk.
* NOTE: using unversioned engines is an availability risk.
* We recommend using versioned engines created using the {@link sqlServerEx()} method
*/
public static readonly SQL_SERVER_EX: IInstanceEngine = new SqlServerExInstanceEngine();

/**
* The unversioned 'sqlserver-web' instance engine.
*
* @deprecated using unversioned engines is an availability risk.
* NOTE: using unversioned engines is an availability risk.
* We recommend using versioned engines created using the {@link sqlServerWeb()} method
*/
public static readonly SQL_SERVER_WEB: IInstanceEngine = new SqlServerWebInstanceEngine();
Expand Down
4 changes: 1 addition & 3 deletions packages/@aws-cdk/aws-rds/lib/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,7 @@ export abstract class SnapshotCredentials {
*
* Note - The username must match the existing master username of the snapshot.
*
* @deprecated use `fromGeneratedSecret()` for new Clusters and Instances.
* Note that switching from `fromGeneratedPassword()` to `fromGeneratedSecret()` for already deployed
* Clusters or Instances will update their master password.
* NOTE: use `fromGeneratedSecret()` for new Clusters and Instances.
*/
public static fromGeneratedPassword(username: string, options: SnapshotCredentialsFromGeneratedPasswordOptions = {}): SnapshotCredentials {
return {
Expand Down

0 comments on commit 6535226

Please sign in to comment.