You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The read replica instance always uses the same engine as the source instance
but some CF validations require the engine to be explicitely passed when some
properties are specified.
Pass the `engine` property to the CF resource if `domain` is specified.
Closes#18786
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy file name to clipboardExpand all lines: packages/@aws-cdk/aws-rds/lib/instance.ts
+6
Original file line number
Diff line number
Diff line change
@@ -1171,12 +1171,18 @@ export class DatabaseInstanceReadReplica extends DatabaseInstanceNew implements
1171
1171
thrownewError(`Cannot set 'backupRetention', as engine '${engineDescription(props.sourceDatabaseInstance.engine)}' does not support automatic backups for read replicas`);
1172
1172
}
1173
1173
1174
+
// The read replica instance always uses the same engine as the source instance
1175
+
// but some CF validations require the engine to be explicitely passed when some
1176
+
// properties are specified.
1177
+
constshouldPassEngine=props.domain!=null;
1178
+
1174
1179
constinstance=newCfnDBInstance(this,'Resource',{
1175
1180
...this.newCfnProps,
1176
1181
// this must be ARN, not ID, because of https://github.com/terraform-providers/terraform-provider-aws/issues/528#issuecomment-391169012
0 commit comments