Skip to content

Commit

Permalink
Allow passing a subnet selection instead of a subnet type to the crea…
Browse files Browse the repository at this point in the history
…te_database_server function
  • Loading branch information
Edward Keeble committed May 10, 2023
1 parent 84dca4f commit 908fa86
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
15 changes: 9 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"python.analysis.diagnosticMode": "workspace",
"python.analysis.typeCheckingMode": "basic",
"python.formatting.provider": "black",
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true
}
"python.analysis.diagnosticMode": "workspace",
"python.analysis.typeCheckingMode": "basic",
"python.formatting.provider": "black",
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
}
}
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
2.0.0
4 changes: 2 additions & 2 deletions cdk_bootstrapped_db/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def create_database_server(
scope: Construct,
id: str,
vpc: ec2.IVpc,
subnet_type: ec2.SubnetType,
subnet_selection: ec2.SubnetSelection,
deletion_protect: bool,
db_name: Optional[str] = None,
db_snapshot_arn: Optional[str] = None,
Expand Down Expand Up @@ -38,7 +38,7 @@ def create_database_server(
"instance_identifier": "-".join(
[v for v in [Stack.of(scope).stack_name, identifier] if v]
),
"vpc_subnets": {"subnet_type": subnet_type},
"vpc_subnets": subnet_selection,
"deletion_protection": deletion_protect,
"removal_policy": (
RemovalPolicy.SNAPSHOT if deletion_protect else RemovalPolicy.DESTROY
Expand Down

0 comments on commit 908fa86

Please sign in to comment.