@friggframework/devtools 2.0.0--canary.425.29ee443.0 → 2.0.0--canary.425.2d58c19.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.
|
@@ -605,6 +605,19 @@ function generateIAMCloudFormation(appDefinition, options = {}) {
|
|
|
605
605
|
},
|
|
606
606
|
},
|
|
607
607
|
},
|
|
608
|
+
{
|
|
609
|
+
Sid: 'FriggKMSManagement',
|
|
610
|
+
Effect: 'Allow',
|
|
611
|
+
Action: [
|
|
612
|
+
'kms:CreateKey',
|
|
613
|
+
'kms:PutKeyPolicy',
|
|
614
|
+
'kms:EnableKeyRotation',
|
|
615
|
+
'kms:TagResource',
|
|
616
|
+
'kms:UntagResource',
|
|
617
|
+
'kms:ListResourceTags',
|
|
618
|
+
],
|
|
619
|
+
Resource: '*',
|
|
620
|
+
},
|
|
608
621
|
],
|
|
609
622
|
},
|
|
610
623
|
},
|
|
@@ -1001,7 +1001,11 @@ const composeServerlessDefinition = async (AppDefinition) => {
|
|
|
1001
1001
|
// Always set KMS_KEY_ARN from custom.kmsGrants for consistency
|
|
1002
1002
|
// This translates AWS_DISCOVERY_KMS_KEY_ID to the runtime variable KMS_KEY_ARN
|
|
1003
1003
|
if (!definition.provider.environment.KMS_KEY_ARN) {
|
|
1004
|
-
|
|
1004
|
+
// Use the discovered value directly when available (from in-process discovery)
|
|
1005
|
+
// Otherwise fall back to environment variable (from separate discovery process)
|
|
1006
|
+
definition.provider.environment.KMS_KEY_ARN =
|
|
1007
|
+
discoveredResources.defaultKmsKeyId ||
|
|
1008
|
+
'${env:AWS_DISCOVERY_KMS_KEY_ID}';
|
|
1005
1009
|
}
|
|
1006
1010
|
}
|
|
1007
1011
|
|
|
@@ -291,8 +291,9 @@ describe('composeServerlessDefinition', () => {
|
|
|
291
291
|
expect(result.plugins).toContain('serverless-kms-grants');
|
|
292
292
|
|
|
293
293
|
// Check custom configuration
|
|
294
|
+
// When creating a new key, it should reference the CloudFormation resource
|
|
294
295
|
expect(result.custom.kmsGrants).toEqual({
|
|
295
|
-
kmsKeyId: '
|
|
296
|
+
kmsKeyId: { 'Fn::GetAtt': ['FriggKMSKey', 'Arn'] }
|
|
296
297
|
});
|
|
297
298
|
});
|
|
298
299
|
|
|
@@ -545,7 +546,7 @@ describe('composeServerlessDefinition', () => {
|
|
|
545
546
|
|
|
546
547
|
// VPC
|
|
547
548
|
expect(result.provider.vpc).toBeDefined();
|
|
548
|
-
|
|
549
|
+
// custom.vpc doesn't exist in the serverless template
|
|
549
550
|
expect(result.resources.Resources.VPCEndpointS3).toBeDefined();
|
|
550
551
|
|
|
551
552
|
// KMS
|
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.425.
|
|
4
|
+
"version": "2.0.0--canary.425.2d58c19.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@aws-sdk/client-ec2": "^3.835.0",
|
|
7
7
|
"@aws-sdk/client-kms": "^3.835.0",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"@babel/eslint-parser": "^7.18.9",
|
|
10
10
|
"@babel/parser": "^7.25.3",
|
|
11
11
|
"@babel/traverse": "^7.25.3",
|
|
12
|
-
"@friggframework/schemas": "2.0.0--canary.425.
|
|
13
|
-
"@friggframework/test": "2.0.0--canary.425.
|
|
12
|
+
"@friggframework/schemas": "2.0.0--canary.425.2d58c19.0",
|
|
13
|
+
"@friggframework/test": "2.0.0--canary.425.2d58c19.0",
|
|
14
14
|
"@hapi/boom": "^10.0.1",
|
|
15
15
|
"@inquirer/prompts": "^5.3.8",
|
|
16
16
|
"axios": "^1.7.2",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"serverless-http": "^2.7.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@friggframework/eslint-config": "2.0.0--canary.425.
|
|
36
|
-
"@friggframework/prettier-config": "2.0.0--canary.425.
|
|
35
|
+
"@friggframework/eslint-config": "2.0.0--canary.425.2d58c19.0",
|
|
36
|
+
"@friggframework/prettier-config": "2.0.0--canary.425.2d58c19.0",
|
|
37
37
|
"jest": "^30.1.3",
|
|
38
38
|
"prettier": "^2.7.1",
|
|
39
39
|
"serverless": "3.39.0",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "2d58c196b068fafce914e0fc631d72a30b745f31"
|
|
70
70
|
}
|