Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rds): make VPC optional for serverless Clusters (#17413)
Fixes #17401 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
1 parent
7441418
commit 4f7818d
Showing
5 changed files
with
230 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/@aws-cdk/aws-rds/test/integ.serverless-cluster-no-vpc.expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"Resources": { | ||
"ServerlessDatabaseWithoutVPC93F9A752": { | ||
"Type": "AWS::RDS::DBCluster", | ||
"Properties": { | ||
"Engine": "aurora-mysql", | ||
"DBClusterParameterGroupName": "default.aurora-mysql5.7", | ||
"EngineMode": "serverless", | ||
"MasterUsername": "admin", | ||
"MasterUserPassword": "7959866cacc02c2d243ecfe177464fe6", | ||
"StorageEncrypted": true, | ||
"VpcSecurityGroupIds": [] | ||
}, | ||
"UpdateReplacePolicy": "Delete", | ||
"DeletionPolicy": "Delete" | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
packages/@aws-cdk/aws-rds/test/integ.serverless-cluster-no-vpc.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import * as cdk from '@aws-cdk/core'; | ||
import * as rds from '../lib'; | ||
|
||
const app = new cdk.App(); | ||
const stack = new cdk.Stack(app, 'aws-cdk-sls-cluster-no-vpc-integ'); | ||
|
||
const cluster = new rds.ServerlessCluster(stack, 'Serverless Database Without VPC', { | ||
engine: rds.DatabaseClusterEngine.AURORA_MYSQL, | ||
credentials: { | ||
username: 'admin', | ||
password: cdk.SecretValue.plainText('7959866cacc02c2d243ecfe177464fe6'), | ||
}, | ||
removalPolicy: cdk.RemovalPolicy.DESTROY, | ||
}); | ||
cluster.connections.allowDefaultPortFromAnyIpv4('Open to the world'); | ||
|
||
app.synth(); |
Oops, something went wrong.