feat(cloudformation): pass EngineMode and StorageEncrypted to RDS clusters (#3482)

AWS::RDS::DBCluster templates set these fields but the provisioner
never read them, so CFN-provisioned clusters kept the defaults.

Signed-off-by: Matheus Oliveira <matheus.6148@gmail.com>
This commit is contained in:
Matheus Oliveira authored and GitHub committed 2026-09-12 11:44:53 -05:00
1 parent e0d43189f7
commit 4471e92a0f
2 files changed
+33 -5

No files matched your search

@@ -220,6 +220,25 @@ class RdsCfnProvisionerTest {
0.0, 16.0, 600);
}
@Test
void provisionsDbClusterWithEngineModeAndStorageEncrypted() {
DbCluster cluster = mock(DbCluster.class);
when(cluster.getDbClusterIdentifier()).thenReturn("mycluster");
when(rdsService.createDbCluster(any(), any(), any(), any(), any(), any(), anyBoolean(), any(),
any(), any(), anyBoolean(), any(), any(), any(), any(), anyBoolean(), any(), any(),
anyBoolean()))
.thenReturn(cluster);
provision("Cluster", "AWS::RDS::DBCluster", """
{"DBClusterIdentifier":"mycluster","Engine":"aurora-postgresql",
"EngineMode":"serverless","StorageEncrypted":true}
""");
verify(rdsService).createDbCluster("mycluster", "aurora-postgresql", null,
null, null, null, false, null, null, null, false, "us-east-1",
null, null, null, false, null, "serverless", true);
}
@Test
void rejectsNonNumericServerlessV2Capacity() {
// A non-numeric capacity is invalid input, not an absent value: the stack fails rather than