diff --git a/deploy/stacks/aurora.py b/deploy/stacks/aurora.py index d1b5d36a8..4d2d1630b 100644 --- a/deploy/stacks/aurora.py +++ b/deploy/stacks/aurora.py @@ -30,9 +30,7 @@ def __init__( super().__init__(scope, id, **kwargs) # if exclude_characters property is set make sure that the pwd regex in DbConfig is changed accordingly - db_credentials = rds.DatabaseSecret( - self, f'{resource_prefix}-{envname}-aurora-db', username='dtaadmin' - ) + db_subnet_group = rds.SubnetGroup( self, @@ -65,6 +63,10 @@ def __init__( alias=f'{resource_prefix}-{envname}-aurora', enable_key_rotation=True, ) + + db_credentials = rds.DatabaseSecret( + self, f'{resource_prefix}-{envname}-aurora-db', username='dtaadmin', encryption_key=key + ) database = rds.ServerlessCluster( self,