@friggframework/devtools 2.0.0--canary.461.e5a72ea.0 → 2.0.0--canary.461.bb7fcba.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.
|
@@ -83,7 +83,7 @@ class AuroraBuilder extends InfrastructureBuilder {
|
|
|
83
83
|
console.log(`\n[${this.name}] Configuring Aurora PostgreSQL...`);
|
|
84
84
|
|
|
85
85
|
const dbConfig = appDefinition.database.postgres;
|
|
86
|
-
|
|
86
|
+
|
|
87
87
|
// Normalize top-level managementMode
|
|
88
88
|
const globalMode = appDefinition.managementMode || 'discover';
|
|
89
89
|
const vpcIsolation = appDefinition.vpcIsolation || 'shared';
|
|
@@ -95,10 +95,10 @@ class AuroraBuilder extends InfrastructureBuilder {
|
|
|
95
95
|
if (dbConfig.management) {
|
|
96
96
|
console.log(` ⚠️ managementMode='managed' ignoring: database.postgres.management`);
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
|
|
99
99
|
// Clear granular option to prevent conflicts
|
|
100
100
|
delete appDefinition.database.postgres.management;
|
|
101
|
-
|
|
101
|
+
|
|
102
102
|
// Set management based on isolation strategy
|
|
103
103
|
if (vpcIsolation === 'isolated') {
|
|
104
104
|
management = 'managed'; // New VPC = new Aurora
|
|
@@ -88,7 +88,13 @@ class KmsBuilder extends InfrastructureBuilder {
|
|
|
88
88
|
// Use discovered KMS key
|
|
89
89
|
const kmsKeyId = discoveredResources.defaultKmsKeyId || '${env:AWS_DISCOVERY_KMS_KEY_ID}';
|
|
90
90
|
console.log(` Using ${discoveredResources.defaultKmsKeyId ? 'discovered' : 'environment variable'} KMS key`);
|
|
91
|
-
|
|
91
|
+
|
|
92
|
+
// Format as ARN if it's just a key ID (for IAM policies)
|
|
93
|
+
const kmsArn = kmsKeyId.startsWith('arn:')
|
|
94
|
+
? kmsKeyId
|
|
95
|
+
: `arn:aws:kms:\${self:provider.region}:\${aws:accountId}:key/${kmsKeyId}`;
|
|
96
|
+
|
|
97
|
+
result.environment.KMS_KEY_ARN = kmsArn;
|
|
92
98
|
}
|
|
93
99
|
|
|
94
100
|
// Add IAM permissions for Lambda role
|
|
@@ -366,7 +366,8 @@ describe('KmsBuilder', () => {
|
|
|
366
366
|
|
|
367
367
|
const result = await kmsBuilder.build(appDefinition, discoveredResources);
|
|
368
368
|
|
|
369
|
-
|
|
369
|
+
// Should format env var as ARN for IAM policies
|
|
370
|
+
expect(result.environment.KMS_KEY_ARN).toBe('arn:aws:kms:${self:provider.region}:${aws:accountId}:key/${env:AWS_DISCOVERY_KMS_KEY_ID}');
|
|
370
371
|
});
|
|
371
372
|
});
|
|
372
373
|
});
|
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.bb7fcba.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.bb7fcba.0",
|
|
15
|
+
"@friggframework/test": "2.0.0--canary.461.bb7fcba.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.bb7fcba.0",
|
|
38
|
+
"@friggframework/prettier-config": "2.0.0--canary.461.bb7fcba.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": "bb7fcba0918b60051c89f78ce3e4076f7823c7ef"
|
|
74
74
|
}
|