@ts-cloud/core 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -0
- package/dist/types.d.ts +3 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -45930,9 +45930,12 @@ function composeServerlessAppTemplate(opts) {
|
|
|
45930
45930
|
};
|
|
45931
45931
|
}
|
|
45932
45932
|
if (hasVpc && needsDataVpc) {
|
|
45933
|
+
if (!app.vpc?.id)
|
|
45934
|
+
throw new Error("serverless app: data services (elasticache / aurora-serverless / rdsProxy / efs) need app.vpc.id (the VPC id) so the managed security group is created in the right VPC.");
|
|
45933
45935
|
resources.DataSecurityGroup = {
|
|
45934
45936
|
Type: "AWS::EC2::SecurityGroup",
|
|
45935
45937
|
Properties: {
|
|
45938
|
+
VpcId: app.vpc.id,
|
|
45936
45939
|
GroupDescription: `${slug}-${environment} serverless data access`,
|
|
45937
45940
|
SecurityGroupIngress: [{ IpProtocol: "-1", CidrIp: "10.0.0.0/8" }]
|
|
45938
45941
|
}
|
|
@@ -46013,6 +46016,7 @@ function composeServerlessAppTemplate(opts) {
|
|
|
46013
46016
|
Engine: "aurora-mysql",
|
|
46014
46017
|
EngineMode: "provisioned",
|
|
46015
46018
|
DBClusterIdentifier: `${slug}-${environment}-db`,
|
|
46019
|
+
DatabaseName: "app",
|
|
46016
46020
|
MasterUsername: Fn2.sub("{{resolve:secretsmanager:${DbSecret}:SecretString:username}}"),
|
|
46017
46021
|
MasterUserPassword: Fn2.sub("{{resolve:secretsmanager:${DbSecret}:SecretString:password}}"),
|
|
46018
46022
|
ServerlessV2ScalingConfiguration: { MinCapacity: 0.5, MaxCapacity: 4 },
|
|
@@ -46059,6 +46063,15 @@ function composeServerlessAppTemplate(opts) {
|
|
|
46059
46063
|
RequireTLS: false
|
|
46060
46064
|
}
|
|
46061
46065
|
};
|
|
46066
|
+
resources.DbProxyTargetGroup = {
|
|
46067
|
+
Type: "AWS::RDS::DBProxyTargetGroup",
|
|
46068
|
+
DependsOn: ["DbInstance"],
|
|
46069
|
+
Properties: {
|
|
46070
|
+
DBProxyName: Fn2.ref("DbProxy"),
|
|
46071
|
+
TargetGroupName: "default",
|
|
46072
|
+
DBClusterIdentifiers: [Fn2.ref("DbCluster")]
|
|
46073
|
+
}
|
|
46074
|
+
};
|
|
46062
46075
|
outputs.DbProxyEndpoint = { Description: "RDS Proxy endpoint", Value: Fn2.getAtt("DbProxy", "Endpoint") };
|
|
46063
46076
|
}
|
|
46064
46077
|
outputs.HttpFunctionName = { Description: "HTTP function name", Value: Fn2.ref("HttpFunction") };
|
package/dist/types.d.ts
CHANGED
|
@@ -1632,8 +1632,10 @@ export interface ServerlessAppConfig {
|
|
|
1632
1632
|
* @default 'zip'
|
|
1633
1633
|
*/
|
|
1634
1634
|
packaging?: 'zip' | 'image';
|
|
1635
|
-
/** Attach the functions to a VPC (required for ElastiCache / private RDS). */
|
|
1635
|
+
/** Attach the functions to a VPC (required for ElastiCache / private RDS / EFS). */
|
|
1636
1636
|
vpc?: {
|
|
1637
|
+
/** VPC id — required when ts-cloud provisions a managed security group for data services. */
|
|
1638
|
+
id?: string;
|
|
1637
1639
|
subnets?: string[];
|
|
1638
1640
|
securityGroups?: string[];
|
|
1639
1641
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ts-cloud/core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Core CloudFormation generation library for ts-cloud",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.com>",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"typecheck": "tsc --noEmit"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ts-cloud/aws-types": "0.5.
|
|
34
|
+
"@ts-cloud/aws-types": "0.5.4"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"typescript": "^5.9.3"
|