@@ -148,27 +148,25 @@ describe('Aurora', () => {
148148 template . hasResourceProperties ( 'AWS::RDS::DBProxy' , { DBProxyName : 'Test' } ) ;
149149 } ) ;
150150 it ( 'removalPolicy defaults to RETAIN for infrastructure resources' , ( ) => {
151- // Get all resources from the template
152151 const templateJson = template . toJSON ( ) ;
153152 const resources = templateJson . Resources || { } ;
154153
155- // Check infrastructure resource types that should be retained
156154 const infrastructureTypes = [
157155 'AWS::RDS::DBCluster' ,
158156 'AWS::RDS::DBInstance' ,
159157 'AWS::SecretsManager::Secret' ,
160158 'AWS::RDS::DBClusterParameterGroup' ,
161159 'AWS::EC2::SecurityGroup' ,
160+ 'AWS::EC2::SecurityGroupEgress' ,
161+ 'AWS::EC2::SecurityGroupIngress' ,
162162 ] ;
163163
164164 const infrastructureResources = Object . entries ( resources ) . filter ( ( [ _ , resource ] : [ string , any ] ) =>
165165 infrastructureTypes . includes ( resource . Type ) ,
166166 ) ;
167167
168- // Verify we found some infrastructure resources
169168 expect ( infrastructureResources . length ) . toBeGreaterThan ( 0 ) ;
170169
171- // Check that these resources have DeletionPolicy: Retain by default
172170 infrastructureResources . forEach ( ( [ , resource ] : [ string , any ] ) => {
173171 expect ( resource . DeletionPolicy ) . toBe ( 'Retain' ) ;
174172 } ) ;
@@ -466,13 +464,14 @@ describe('Aurora', () => {
466464 const templateJson = template . toJSON ( ) ;
467465 const resources = templateJson . Resources || { } ;
468466
469- // Infrastructure resources that should be RETAINED
470467 const infrastructureTypes = [
471468 'AWS::RDS::DBCluster' ,
472469 'AWS::RDS::DBInstance' ,
473470 'AWS::RDS::DBClusterParameterGroup' ,
474471 'AWS::RDS::DBSubnetGroup' ,
475472 'AWS::EC2::SecurityGroup' ,
473+ 'AWS::EC2::SecurityGroupEgress' ,
474+ 'AWS::EC2::SecurityGroupIngress' ,
476475 'AWS::SecretsManager::Secret' ,
477476 ] ;
478477
0 commit comments