Skip to content

Commit

Permalink
feat(dbcluster) CFN-459 - Database Insights Mode CloudFormation support
Browse files Browse the repository at this point in the history
  • Loading branch information
angusy29 committed Jan 8, 2025
1 parent 6f88e4c commit e314edb
Show file tree
Hide file tree
Showing 17 changed files with 43 additions and 29 deletions.
4 changes: 2 additions & 2 deletions aws-rds-cfn-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>utils</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>rds</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<dependency>
<groupId>software.amazon.cloudformation</groupId>
Expand Down
4 changes: 2 additions & 2 deletions aws-rds-customdbengineversion/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>rds</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<dependency>
<groupId>software.amazon.rds.common</groupId>
Expand Down Expand Up @@ -54,7 +54,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-query-protocol</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
<dependency>
Expand Down
4 changes: 4 additions & 0 deletions aws-rds-dbcluster/aws-rds-dbcluster.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
"description": "A value that indicates whether to copy all tags from the DB cluster to snapshots of the DB cluster. The default is not to copy them.",
"type": "boolean"
},
"DatabaseInsightsMode": {
"description": "A value that indicates the mode of Database Insights to enable for the DB cluster",
"type": "string"
},
"DatabaseName": {
"description": "The name of your database. If you don't provide a name, then Amazon RDS won't create a database in this DB cluster. For naming constraints, see Naming Constraints in the Amazon RDS User Guide.",
"type": "string"
Expand Down
6 changes: 3 additions & 3 deletions aws-rds-dbcluster/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>rds</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ec2</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/software.amazon.awssdk/aws-query-protocol -->
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-query-protocol</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/software.amazon.cloudformation/aws-cloudformation-rpdk-java-plugin -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ static CreateDbClusterRequest createDbClusterRequest(
.backupRetentionPeriod(model.getBackupRetentionPeriod())
.clusterScalabilityType(model.getClusterScalabilityType())
.copyTagsToSnapshot(model.getCopyTagsToSnapshot())
.databaseInsightsMode(model.getDatabaseInsightsMode())
.databaseName(model.getDatabaseName())
.dbClusterIdentifier(model.getDBClusterIdentifier())
.dbClusterInstanceClass(model.getDBClusterInstanceClass())
Expand Down Expand Up @@ -215,6 +216,7 @@ static ModifyDbClusterRequest modifyDbClusterAfterCreateRequest(final ResourceMo
.backupRetentionPeriod(desiredModel.getBackupRetentionPeriod())
.cloudwatchLogsExportConfiguration(config)
.copyTagsToSnapshot(desiredModel.getCopyTagsToSnapshot())
.databaseInsightsMode(desiredModel.getDatabaseInsightsMode())
.dbClusterIdentifier(desiredModel.getDBClusterIdentifier())
.dbClusterInstanceClass(desiredModel.getDBClusterInstanceClass())
.dbClusterParameterGroupName(desiredModel.getDBClusterParameterGroupName())
Expand Down Expand Up @@ -268,6 +270,7 @@ static ModifyDbClusterRequest modifyDbClusterRequest(
.backupRetentionPeriod(desiredModel.getBackupRetentionPeriod())
.cloudwatchLogsExportConfiguration(config)
.copyTagsToSnapshot(desiredModel.getCopyTagsToSnapshot())
.databaseInsightsMode(desiredModel.getDatabaseInsightsMode())
.dbClusterIdentifier(desiredModel.getDBClusterIdentifier())
.dbClusterInstanceClass(desiredModel.getDBClusterInstanceClass())
.dbClusterParameterGroupName(desiredModel.getDBClusterParameterGroupName())
Expand Down Expand Up @@ -556,6 +559,7 @@ public static ResourceModel translateDbClusterFromSdk(
.backtrackWindow(Translator.castToInt(dbCluster.backtrackWindow()))
.backupRetentionPeriod(dbCluster.backupRetentionPeriod())
.copyTagsToSnapshot(dbCluster.copyTagsToSnapshot())
.databaseInsightsMode(dbCluster.databaseInsightsModeAsString())
.databaseName(dbCluster.databaseName())
.dBClusterArn(dbCluster.dbClusterArn())
.dBClusterIdentifier(dbCluster.dbClusterIdentifier())
Expand Down
4 changes: 2 additions & 2 deletions aws-rds-dbclusterendpoint/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>rds</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/software.amazon.cloudformation/aws-cloudformation-rpdk-java-plugin -->
<dependency>
Expand Down Expand Up @@ -78,7 +78,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-query-protocol</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<dependency>
<groupId>software.amazon.rds.common</groupId>
Expand Down
4 changes: 2 additions & 2 deletions aws-rds-dbclusterparametergroup/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>rds</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/software.amazon.cloudformation/aws-cloudformation-rpdk-java-plugin -->
<dependency>
Expand Down Expand Up @@ -78,7 +78,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-query-protocol</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<dependency>
<groupId>software.amazon.rds.common</groupId>
Expand Down
7 changes: 6 additions & 1 deletion aws-rds-dbinstance/aws-rds-dbinstance.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@
"type": "string",
"description": "The instance profile associated with the underlying Amazon EC2 instance of an RDS Custom DB instance. The instance profile must meet the following requirements:\n * The profile must exist in your account.\n * The profile must have an IAM role that Amazon EC2 has permissions to assume.\n * The instance profile name and the associated IAM role name must start with the prefix AWSRDSCustom .\nFor the list of permissions required for the IAM role, see Configure IAM and your VPC in the Amazon RDS User Guide .\n\nThis setting is required for RDS Custom."
},
"DatabaseInsightsMode": {
"description": "A value that indicates the mode of Database Insights to enable for the DB instance",
"type": "string"
},
"DBClusterIdentifier": {
"type": "string",
"description": "The identifier of the DB cluster that the instance will belong to."
Expand Down Expand Up @@ -555,7 +559,8 @@
"/properties/DBInstanceArn",
"/properties/MasterUserSecret/SecretArn",
"/properties/CertificateDetails/CAIdentifier",
"/properties/CertificateDetails/ValidTill"
"/properties/CertificateDetails/ValidTill",
"/properties/DatabaseInsightsMode"
],
"primaryIdentifier": [
"/properties/DBInstanceIdentifier"
Expand Down
6 changes: 3 additions & 3 deletions aws-rds-dbinstance/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>rds</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ec2</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/software.amazon.cloudformation/aws-cloudformation-rpdk-java-plugin -->
<dependency>
Expand All @@ -58,7 +58,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-query-protocol</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ public static ResourceModel.ResourceModelBuilder translateDbInstanceFromSdkBuild
.characterSetName(dbInstance.characterSetName())
.copyTagsToSnapshot(dbInstance.copyTagsToSnapshot())
.customIAMInstanceProfile(dbInstance.customIamInstanceProfile())
.databaseInsightsMode(dbInstance.databaseInsightsModeAsString())
.dBClusterIdentifier(dbInstance.dbClusterIdentifier())
.dBInstanceArn(dbInstance.dbInstanceArn())
.dBInstanceClass(dbInstance.dbInstanceClass())
Expand Down
4 changes: 2 additions & 2 deletions aws-rds-dbparametergroup/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-query-protocol</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>rds</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/software.amazon.cloudformation/aws-cloudformation-rpdk-java-plugin -->
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions aws-rds-dbshardgroup/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>rds</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/software.amazon.cloudformation/aws-cloudformation-rpdk-java-plugin -->
<dependency>
Expand All @@ -53,7 +53,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-query-protocol</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions aws-rds-dbsubnetgroup/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-query-protocol</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>rds</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/software.amazon.cloudformation/aws-cloudformation-rpdk-java-plugin -->
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions aws-rds-eventsubscription/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-query-protocol</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<dependency>
<groupId>software.amazon.rds.common</groupId>
Expand All @@ -35,7 +35,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>rds</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/software.amazon.cloudformation/aws-cloudformation-rpdk-java-plugin -->
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions aws-rds-globalcluster/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-query-protocol</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<dependency>
<groupId>software.amazon.rds.common</groupId>
Expand All @@ -35,7 +35,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>rds</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/software.amazon.cloudformation/aws-cloudformation-rpdk-java-plugin -->
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions aws-rds-integration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-query-protocol</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>rds</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/software.amazon.cloudformation/aws-cloudformation-rpdk-java-plugin -->
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions aws-rds-optiongroup/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-query-protocol</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>rds</artifactId>
<version>2.29.16</version>
<version>2.29.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/software.amazon.cloudformation/aws-cloudformation-rpdk-java-plugin -->
<dependency>
Expand Down

0 comments on commit e314edb

Please sign in to comment.