@friggframework/devtools 2.0.0--canary.461.d94b7a7.0 → 2.0.0--canary.461.aa02ace.0
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.
|
@@ -148,10 +148,10 @@ class VpcBuilder extends InfrastructureBuilder {
|
|
|
148
148
|
kms: discoveredResources.kmsVpcEndpointId,
|
|
149
149
|
secretsManager: discoveredResources.secretsManagerVpcEndpointId,
|
|
150
150
|
};
|
|
151
|
-
const allEndpointsExist = existingEndpoints.s3 && existingEndpoints.dynamodb &&
|
|
152
|
-
|
|
153
|
-
const someEndpointsExist = existingEndpoints.s3 || existingEndpoints.dynamodb ||
|
|
154
|
-
|
|
151
|
+
const allEndpointsExist = existingEndpoints.s3 && existingEndpoints.dynamodb &&
|
|
152
|
+
existingEndpoints.kms && existingEndpoints.secretsManager;
|
|
153
|
+
const someEndpointsExist = existingEndpoints.s3 || existingEndpoints.dynamodb ||
|
|
154
|
+
existingEndpoints.kms || existingEndpoints.secretsManager;
|
|
155
155
|
|
|
156
156
|
if (appDefinition.vpc.enableVPCEndpoints !== false) {
|
|
157
157
|
if (vpcManagement === 'create-new') {
|
|
@@ -682,7 +682,7 @@ class VpcBuilder extends InfrastructureBuilder {
|
|
|
682
682
|
if (!existingEndpoints.dynamodb) missing.push('DynamoDB');
|
|
683
683
|
if (!existingEndpoints.kms && appDefinition.encryption?.fieldLevelEncryptionMethod === 'kms') missing.push('KMS');
|
|
684
684
|
if (!existingEndpoints.secretsManager) missing.push('Secrets Manager');
|
|
685
|
-
|
|
685
|
+
|
|
686
686
|
if (missing.length > 0) {
|
|
687
687
|
console.log(` Creating missing VPC Endpoints: ${missing.join(', ')}...`);
|
|
688
688
|
} else {
|
|
@@ -710,51 +710,51 @@ class VpcBuilder extends InfrastructureBuilder {
|
|
|
710
710
|
// S3 Gateway Endpoint (only if missing)
|
|
711
711
|
if (!existingEndpoints.s3) {
|
|
712
712
|
result.resources.FriggS3VPCEndpoint = {
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
713
|
+
Type: 'AWS::EC2::VPCEndpoint',
|
|
714
|
+
Properties: {
|
|
715
|
+
VpcId: vpcId,
|
|
716
|
+
ServiceName: 'com.amazonaws.${self:provider.region}.s3',
|
|
717
|
+
VpcEndpointType: 'Gateway',
|
|
718
|
+
RouteTableIds: [{ Ref: 'FriggLambdaRouteTable' }],
|
|
719
|
+
},
|
|
720
|
+
};
|
|
721
721
|
}
|
|
722
722
|
|
|
723
723
|
// DynamoDB Gateway Endpoint (only if missing)
|
|
724
724
|
if (!existingEndpoints.dynamodb) {
|
|
725
725
|
result.resources.FriggDynamoDBVPCEndpoint = {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
726
|
+
Type: 'AWS::EC2::VPCEndpoint',
|
|
727
|
+
Properties: {
|
|
728
|
+
VpcId: vpcId,
|
|
729
|
+
ServiceName: 'com.amazonaws.${self:provider.region}.dynamodb',
|
|
730
|
+
VpcEndpointType: 'Gateway',
|
|
731
|
+
RouteTableIds: [{ Ref: 'FriggLambdaRouteTable' }],
|
|
732
|
+
},
|
|
733
|
+
};
|
|
734
734
|
}
|
|
735
735
|
|
|
736
736
|
// VPC Endpoint Security Group (only if KMS or Secrets Manager are missing)
|
|
737
737
|
if (!existingEndpoints.kms || !existingEndpoints.secretsManager) {
|
|
738
738
|
result.resources.FriggVPCEndpointSecurityGroup = {
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
739
|
+
Type: 'AWS::EC2::SecurityGroup',
|
|
740
|
+
Properties: {
|
|
741
|
+
GroupDescription: 'Security group for VPC Endpoints',
|
|
742
|
+
VpcId: vpcId,
|
|
743
|
+
SecurityGroupIngress: [
|
|
744
|
+
{
|
|
745
|
+
IpProtocol: 'tcp',
|
|
746
|
+
FromPort: 443,
|
|
747
|
+
ToPort: 443,
|
|
748
|
+
SourceSecurityGroupId: { Ref: 'FriggLambdaSecurityGroup' },
|
|
749
|
+
Description: 'HTTPS from Lambda',
|
|
750
|
+
},
|
|
751
|
+
],
|
|
752
|
+
Tags: [
|
|
753
|
+
{ Key: 'Name', Value: '${self:service}-${self:provider.stage}-vpc-endpoint-sg' },
|
|
754
|
+
{ Key: 'ManagedBy', Value: 'Frigg' },
|
|
755
|
+
],
|
|
756
|
+
},
|
|
757
|
+
};
|
|
758
758
|
}
|
|
759
759
|
|
|
760
760
|
// KMS Interface Endpoint (only if missing AND KMS encryption is enabled)
|
|
@@ -775,16 +775,16 @@ class VpcBuilder extends InfrastructureBuilder {
|
|
|
775
775
|
// Secrets Manager Interface Endpoint (only if missing)
|
|
776
776
|
if (!existingEndpoints.secretsManager) {
|
|
777
777
|
result.resources.FriggSecretsManagerVPCEndpoint = {
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
778
|
+
Type: 'AWS::EC2::VPCEndpoint',
|
|
779
|
+
Properties: {
|
|
780
|
+
VpcId: vpcId,
|
|
781
|
+
ServiceName: 'com.amazonaws.${self:provider.region}.secretsmanager',
|
|
782
|
+
VpcEndpointType: 'Interface',
|
|
783
|
+
SubnetIds: result.vpcConfig.subnetIds,
|
|
784
|
+
SecurityGroupIds: [{ Ref: 'FriggVPCEndpointSecurityGroup' }],
|
|
785
|
+
PrivateDnsEnabled: true,
|
|
786
|
+
},
|
|
787
|
+
};
|
|
788
788
|
}
|
|
789
789
|
|
|
790
790
|
console.log(` ✅ Created ${missing.length} VPC endpoint(s): ${missing.join(', ')}`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/devtools",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.461.
|
|
4
|
+
"version": "2.0.0--canary.461.aa02ace.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@aws-sdk/client-ec2": "^3.835.0",
|
|
7
7
|
"@aws-sdk/client-kms": "^3.835.0",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"@babel/eslint-parser": "^7.18.9",
|
|
12
12
|
"@babel/parser": "^7.25.3",
|
|
13
13
|
"@babel/traverse": "^7.25.3",
|
|
14
|
-
"@friggframework/schemas": "2.0.0--canary.461.
|
|
15
|
-
"@friggframework/test": "2.0.0--canary.461.
|
|
14
|
+
"@friggframework/schemas": "2.0.0--canary.461.aa02ace.0",
|
|
15
|
+
"@friggframework/test": "2.0.0--canary.461.aa02ace.0",
|
|
16
16
|
"@hapi/boom": "^10.0.1",
|
|
17
17
|
"@inquirer/prompts": "^5.3.8",
|
|
18
18
|
"axios": "^1.7.2",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"serverless-http": "^2.7.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@friggframework/eslint-config": "2.0.0--canary.461.
|
|
38
|
-
"@friggframework/prettier-config": "2.0.0--canary.461.
|
|
37
|
+
"@friggframework/eslint-config": "2.0.0--canary.461.aa02ace.0",
|
|
38
|
+
"@friggframework/prettier-config": "2.0.0--canary.461.aa02ace.0",
|
|
39
39
|
"aws-sdk-client-mock": "^4.1.0",
|
|
40
40
|
"aws-sdk-client-mock-jest": "^4.1.0",
|
|
41
41
|
"jest": "^30.1.3",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "aa02ace634ba3b5a59a207891f7012b5b08d9f5e"
|
|
74
74
|
}
|