@friggframework/devtools 2.0.0-next.61 → 2.0.0-next.62

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.
Files changed (305) hide show
  1. package/package.json +14 -7
  2. package/.eslintrc.json +0 -3
  3. package/CHANGELOG.md +0 -132
  4. package/infrastructure/ARCHITECTURE.md +0 -487
  5. package/infrastructure/CLAUDE.md +0 -481
  6. package/infrastructure/HEALTH.md +0 -468
  7. package/infrastructure/README.md +0 -522
  8. package/infrastructure/__tests__/fixtures/mock-aws-resources.js +0 -391
  9. package/infrastructure/__tests__/helpers/test-utils.js +0 -277
  10. package/infrastructure/__tests__/postgres-config.test.js +0 -914
  11. package/infrastructure/__tests__/template-generation.test.js +0 -687
  12. package/infrastructure/create-frigg-infrastructure.js +0 -147
  13. package/infrastructure/docs/POSTGRES-CONFIGURATION.md +0 -630
  14. package/infrastructure/docs/PRE-DEPLOYMENT-HEALTH-CHECK-SPEC.md +0 -1317
  15. package/infrastructure/docs/WEBSOCKET-CONFIGURATION.md +0 -105
  16. package/infrastructure/docs/deployment-instructions.md +0 -268
  17. package/infrastructure/docs/generate-iam-command.md +0 -278
  18. package/infrastructure/docs/iam-policy-templates.md +0 -193
  19. package/infrastructure/domains/database/aurora-builder.js +0 -809
  20. package/infrastructure/domains/database/aurora-builder.test.js +0 -950
  21. package/infrastructure/domains/database/aurora-discovery.js +0 -87
  22. package/infrastructure/domains/database/aurora-discovery.test.js +0 -188
  23. package/infrastructure/domains/database/aurora-resolver.js +0 -210
  24. package/infrastructure/domains/database/aurora-resolver.test.js +0 -347
  25. package/infrastructure/domains/database/migration-builder.js +0 -701
  26. package/infrastructure/domains/database/migration-builder.test.js +0 -321
  27. package/infrastructure/domains/database/migration-resolver.js +0 -163
  28. package/infrastructure/domains/database/migration-resolver.test.js +0 -337
  29. package/infrastructure/domains/health/application/ports/IPropertyReconciler.js +0 -164
  30. package/infrastructure/domains/health/application/ports/IResourceDetector.js +0 -129
  31. package/infrastructure/domains/health/application/ports/IResourceImporter.js +0 -142
  32. package/infrastructure/domains/health/application/ports/IStackRepository.js +0 -131
  33. package/infrastructure/domains/health/application/ports/index.js +0 -26
  34. package/infrastructure/domains/health/application/use-cases/__tests__/execute-resource-import-use-case.test.js +0 -679
  35. package/infrastructure/domains/health/application/use-cases/__tests__/mismatch-analyzer-method-name.test.js +0 -167
  36. package/infrastructure/domains/health/application/use-cases/__tests__/repair-via-import-use-case.test.js +0 -1130
  37. package/infrastructure/domains/health/application/use-cases/execute-resource-import-use-case.js +0 -221
  38. package/infrastructure/domains/health/application/use-cases/reconcile-properties-use-case.js +0 -152
  39. package/infrastructure/domains/health/application/use-cases/reconcile-properties-use-case.test.js +0 -343
  40. package/infrastructure/domains/health/application/use-cases/repair-via-import-use-case.js +0 -535
  41. package/infrastructure/domains/health/application/use-cases/repair-via-import-use-case.test.js +0 -376
  42. package/infrastructure/domains/health/application/use-cases/run-health-check-use-case.js +0 -213
  43. package/infrastructure/domains/health/application/use-cases/run-health-check-use-case.test.js +0 -441
  44. package/infrastructure/domains/health/docs/ACME-DEV-DRIFT-ANALYSIS.md +0 -267
  45. package/infrastructure/domains/health/docs/BUILD-VS-DEPLOYED-TEMPLATE-ANALYSIS.md +0 -324
  46. package/infrastructure/domains/health/docs/ORPHAN-DETECTION-ANALYSIS.md +0 -386
  47. package/infrastructure/domains/health/docs/SPEC-CLEANUP-COMMAND.md +0 -1419
  48. package/infrastructure/domains/health/docs/TDD-IMPLEMENTATION-SUMMARY.md +0 -391
  49. package/infrastructure/domains/health/docs/TEMPLATE-COMPARISON-IMPLEMENTATION.md +0 -551
  50. package/infrastructure/domains/health/domain/entities/issue.js +0 -299
  51. package/infrastructure/domains/health/domain/entities/issue.test.js +0 -528
  52. package/infrastructure/domains/health/domain/entities/property-mismatch.js +0 -108
  53. package/infrastructure/domains/health/domain/entities/property-mismatch.test.js +0 -275
  54. package/infrastructure/domains/health/domain/entities/resource.js +0 -159
  55. package/infrastructure/domains/health/domain/entities/resource.test.js +0 -432
  56. package/infrastructure/domains/health/domain/entities/stack-health-report.js +0 -306
  57. package/infrastructure/domains/health/domain/entities/stack-health-report.test.js +0 -601
  58. package/infrastructure/domains/health/domain/services/__tests__/health-score-percentage-based.test.js +0 -380
  59. package/infrastructure/domains/health/domain/services/__tests__/import-progress-monitor.test.js +0 -971
  60. package/infrastructure/domains/health/domain/services/__tests__/import-template-generator.test.js +0 -1150
  61. package/infrastructure/domains/health/domain/services/__tests__/logical-id-mapper.test.js +0 -672
  62. package/infrastructure/domains/health/domain/services/__tests__/template-parser.test.js +0 -496
  63. package/infrastructure/domains/health/domain/services/__tests__/update-progress-monitor.test.js +0 -419
  64. package/infrastructure/domains/health/domain/services/health-score-calculator.js +0 -248
  65. package/infrastructure/domains/health/domain/services/health-score-calculator.test.js +0 -504
  66. package/infrastructure/domains/health/domain/services/import-progress-monitor.js +0 -195
  67. package/infrastructure/domains/health/domain/services/import-template-generator.js +0 -435
  68. package/infrastructure/domains/health/domain/services/logical-id-mapper.js +0 -345
  69. package/infrastructure/domains/health/domain/services/mismatch-analyzer.js +0 -234
  70. package/infrastructure/domains/health/domain/services/mismatch-analyzer.test.js +0 -431
  71. package/infrastructure/domains/health/domain/services/property-mutability-config.js +0 -382
  72. package/infrastructure/domains/health/domain/services/template-parser.js +0 -245
  73. package/infrastructure/domains/health/domain/services/update-progress-monitor.js +0 -192
  74. package/infrastructure/domains/health/domain/value-objects/health-score.js +0 -138
  75. package/infrastructure/domains/health/domain/value-objects/health-score.test.js +0 -267
  76. package/infrastructure/domains/health/domain/value-objects/property-mutability.js +0 -161
  77. package/infrastructure/domains/health/domain/value-objects/property-mutability.test.js +0 -198
  78. package/infrastructure/domains/health/domain/value-objects/resource-state.js +0 -167
  79. package/infrastructure/domains/health/domain/value-objects/resource-state.test.js +0 -196
  80. package/infrastructure/domains/health/domain/value-objects/stack-identifier.js +0 -192
  81. package/infrastructure/domains/health/domain/value-objects/stack-identifier.test.js +0 -262
  82. package/infrastructure/domains/health/infrastructure/adapters/__tests__/orphan-detection-cfn-tagged.test.js +0 -312
  83. package/infrastructure/domains/health/infrastructure/adapters/__tests__/orphan-detection-multi-stack.test.js +0 -367
  84. package/infrastructure/domains/health/infrastructure/adapters/__tests__/orphan-detection-relationship-analysis.test.js +0 -432
  85. package/infrastructure/domains/health/infrastructure/adapters/aws-property-reconciler.js +0 -784
  86. package/infrastructure/domains/health/infrastructure/adapters/aws-property-reconciler.test.js +0 -1133
  87. package/infrastructure/domains/health/infrastructure/adapters/aws-resource-detector.js +0 -565
  88. package/infrastructure/domains/health/infrastructure/adapters/aws-resource-detector.test.js +0 -554
  89. package/infrastructure/domains/health/infrastructure/adapters/aws-resource-importer.js +0 -318
  90. package/infrastructure/domains/health/infrastructure/adapters/aws-resource-importer.test.js +0 -398
  91. package/infrastructure/domains/health/infrastructure/adapters/aws-stack-repository.js +0 -777
  92. package/infrastructure/domains/health/infrastructure/adapters/aws-stack-repository.test.js +0 -580
  93. package/infrastructure/domains/integration/integration-builder.js +0 -404
  94. package/infrastructure/domains/integration/integration-builder.test.js +0 -690
  95. package/infrastructure/domains/integration/integration-resolver.js +0 -170
  96. package/infrastructure/domains/integration/integration-resolver.test.js +0 -369
  97. package/infrastructure/domains/integration/websocket-builder.js +0 -69
  98. package/infrastructure/domains/integration/websocket-builder.test.js +0 -195
  99. package/infrastructure/domains/networking/vpc-builder.js +0 -2051
  100. package/infrastructure/domains/networking/vpc-builder.test.js +0 -1960
  101. package/infrastructure/domains/networking/vpc-discovery.js +0 -177
  102. package/infrastructure/domains/networking/vpc-discovery.test.js +0 -350
  103. package/infrastructure/domains/networking/vpc-resolver.js +0 -505
  104. package/infrastructure/domains/networking/vpc-resolver.test.js +0 -801
  105. package/infrastructure/domains/parameters/ssm-builder.js +0 -79
  106. package/infrastructure/domains/parameters/ssm-builder.test.js +0 -189
  107. package/infrastructure/domains/parameters/ssm-discovery.js +0 -84
  108. package/infrastructure/domains/parameters/ssm-discovery.test.js +0 -210
  109. package/infrastructure/domains/security/iam-generator.js +0 -816
  110. package/infrastructure/domains/security/iam-generator.test.js +0 -204
  111. package/infrastructure/domains/security/kms-builder.js +0 -415
  112. package/infrastructure/domains/security/kms-builder.test.js +0 -392
  113. package/infrastructure/domains/security/kms-discovery.js +0 -80
  114. package/infrastructure/domains/security/kms-discovery.test.js +0 -177
  115. package/infrastructure/domains/security/kms-resolver.js +0 -96
  116. package/infrastructure/domains/security/kms-resolver.test.js +0 -216
  117. package/infrastructure/domains/security/templates/frigg-deployment-iam-stack.yaml +0 -401
  118. package/infrastructure/domains/security/templates/iam-policy-basic.json +0 -218
  119. package/infrastructure/domains/security/templates/iam-policy-full.json +0 -288
  120. package/infrastructure/domains/shared/base-builder.js +0 -112
  121. package/infrastructure/domains/shared/base-resolver.js +0 -186
  122. package/infrastructure/domains/shared/base-resolver.test.js +0 -305
  123. package/infrastructure/domains/shared/builder-orchestrator.js +0 -212
  124. package/infrastructure/domains/shared/builder-orchestrator.test.js +0 -213
  125. package/infrastructure/domains/shared/cloudformation-discovery-v2.js +0 -334
  126. package/infrastructure/domains/shared/cloudformation-discovery.js +0 -672
  127. package/infrastructure/domains/shared/cloudformation-discovery.test.js +0 -985
  128. package/infrastructure/domains/shared/environment-builder.js +0 -119
  129. package/infrastructure/domains/shared/environment-builder.test.js +0 -247
  130. package/infrastructure/domains/shared/providers/aws-provider-adapter.js +0 -579
  131. package/infrastructure/domains/shared/providers/aws-provider-adapter.test.js +0 -416
  132. package/infrastructure/domains/shared/providers/azure-provider-adapter.stub.js +0 -93
  133. package/infrastructure/domains/shared/providers/cloud-provider-adapter.js +0 -136
  134. package/infrastructure/domains/shared/providers/gcp-provider-adapter.stub.js +0 -82
  135. package/infrastructure/domains/shared/providers/provider-factory.js +0 -108
  136. package/infrastructure/domains/shared/providers/provider-factory.test.js +0 -170
  137. package/infrastructure/domains/shared/resource-discovery.enhanced.test.js +0 -306
  138. package/infrastructure/domains/shared/resource-discovery.js +0 -233
  139. package/infrastructure/domains/shared/resource-discovery.test.js +0 -588
  140. package/infrastructure/domains/shared/types/app-definition.js +0 -205
  141. package/infrastructure/domains/shared/types/discovery-result.js +0 -106
  142. package/infrastructure/domains/shared/types/discovery-result.test.js +0 -258
  143. package/infrastructure/domains/shared/types/index.js +0 -46
  144. package/infrastructure/domains/shared/types/resource-ownership.js +0 -108
  145. package/infrastructure/domains/shared/types/resource-ownership.test.js +0 -101
  146. package/infrastructure/domains/shared/utilities/base-definition-factory.js +0 -394
  147. package/infrastructure/domains/shared/utilities/base-definition-factory.js.bak +0 -338
  148. package/infrastructure/domains/shared/utilities/base-definition-factory.test.js +0 -291
  149. package/infrastructure/domains/shared/utilities/handler-path-resolver.js +0 -134
  150. package/infrastructure/domains/shared/utilities/handler-path-resolver.test.js +0 -268
  151. package/infrastructure/domains/shared/utilities/prisma-layer-manager.js +0 -159
  152. package/infrastructure/domains/shared/utilities/prisma-layer-manager.test.js +0 -444
  153. package/infrastructure/domains/shared/validation/env-validator.js +0 -78
  154. package/infrastructure/domains/shared/validation/env-validator.test.js +0 -173
  155. package/infrastructure/domains/shared/validation/plugin-validator.js +0 -187
  156. package/infrastructure/domains/shared/validation/plugin-validator.test.js +0 -323
  157. package/infrastructure/esbuild.config.js +0 -53
  158. package/infrastructure/index.js +0 -4
  159. package/infrastructure/infrastructure-composer.js +0 -117
  160. package/infrastructure/infrastructure-composer.test.js +0 -1895
  161. package/infrastructure/integration.test.js +0 -383
  162. package/infrastructure/scripts/build-prisma-layer.js +0 -701
  163. package/infrastructure/scripts/build-prisma-layer.test.js +0 -170
  164. package/infrastructure/scripts/build-time-discovery.js +0 -238
  165. package/infrastructure/scripts/build-time-discovery.test.js +0 -379
  166. package/infrastructure/scripts/run-discovery.js +0 -110
  167. package/infrastructure/scripts/verify-prisma-layer.js +0 -72
  168. package/layers/prisma/.build-complete +0 -3
  169. package/layers/prisma/nodejs/package.json +0 -8
  170. package/management-ui/.eslintrc.js +0 -22
  171. package/management-ui/components.json +0 -21
  172. package/management-ui/docs/phase2-integration-guide.md +0 -320
  173. package/management-ui/index.html +0 -13
  174. package/management-ui/package.json +0 -76
  175. package/management-ui/packages/devtools/frigg-cli/ui-command/index.js +0 -302
  176. package/management-ui/postcss.config.js +0 -6
  177. package/management-ui/server/api/backend.js +0 -256
  178. package/management-ui/server/api/cli.js +0 -315
  179. package/management-ui/server/api/codegen.js +0 -663
  180. package/management-ui/server/api/connections.js +0 -857
  181. package/management-ui/server/api/discovery.js +0 -185
  182. package/management-ui/server/api/environment/index.js +0 -1
  183. package/management-ui/server/api/environment/router.js +0 -378
  184. package/management-ui/server/api/environment.js +0 -328
  185. package/management-ui/server/api/integrations.js +0 -876
  186. package/management-ui/server/api/logs.js +0 -248
  187. package/management-ui/server/api/monitoring.js +0 -282
  188. package/management-ui/server/api/open-ide.js +0 -31
  189. package/management-ui/server/api/project.js +0 -1029
  190. package/management-ui/server/api/users/sessions.js +0 -371
  191. package/management-ui/server/api/users/simulation.js +0 -254
  192. package/management-ui/server/api/users.js +0 -362
  193. package/management-ui/server/api-contract.md +0 -275
  194. package/management-ui/server/index.js +0 -873
  195. package/management-ui/server/middleware/errorHandler.js +0 -93
  196. package/management-ui/server/middleware/security.js +0 -32
  197. package/management-ui/server/processManager.js +0 -296
  198. package/management-ui/server/server.js +0 -346
  199. package/management-ui/server/services/aws-monitor.js +0 -413
  200. package/management-ui/server/services/npm-registry.js +0 -347
  201. package/management-ui/server/services/template-engine.js +0 -538
  202. package/management-ui/server/utils/cliIntegration.js +0 -220
  203. package/management-ui/server/utils/environment/auditLogger.js +0 -471
  204. package/management-ui/server/utils/environment/awsParameterStore.js +0 -275
  205. package/management-ui/server/utils/environment/encryption.js +0 -278
  206. package/management-ui/server/utils/environment/envFileManager.js +0 -286
  207. package/management-ui/server/utils/import-commonjs.js +0 -28
  208. package/management-ui/server/utils/response.js +0 -83
  209. package/management-ui/server/websocket/handler.js +0 -325
  210. package/management-ui/src/App.jsx +0 -25
  211. package/management-ui/src/assets/FriggLogo.svg +0 -1
  212. package/management-ui/src/components/AppRouter.jsx +0 -65
  213. package/management-ui/src/components/Button.jsx +0 -70
  214. package/management-ui/src/components/Card.jsx +0 -97
  215. package/management-ui/src/components/EnvironmentCompare.jsx +0 -400
  216. package/management-ui/src/components/EnvironmentEditor.jsx +0 -372
  217. package/management-ui/src/components/EnvironmentImportExport.jsx +0 -469
  218. package/management-ui/src/components/EnvironmentSchema.jsx +0 -491
  219. package/management-ui/src/components/EnvironmentSecurity.jsx +0 -463
  220. package/management-ui/src/components/ErrorBoundary.jsx +0 -73
  221. package/management-ui/src/components/IntegrationCard.jsx +0 -481
  222. package/management-ui/src/components/IntegrationCardEnhanced.jsx +0 -770
  223. package/management-ui/src/components/IntegrationExplorer.jsx +0 -379
  224. package/management-ui/src/components/IntegrationStatus.jsx +0 -336
  225. package/management-ui/src/components/Layout.jsx +0 -716
  226. package/management-ui/src/components/LoadingSpinner.jsx +0 -113
  227. package/management-ui/src/components/RepositoryPicker.jsx +0 -248
  228. package/management-ui/src/components/SessionMonitor.jsx +0 -350
  229. package/management-ui/src/components/StatusBadge.jsx +0 -208
  230. package/management-ui/src/components/UserContextSwitcher.jsx +0 -212
  231. package/management-ui/src/components/UserSimulation.jsx +0 -327
  232. package/management-ui/src/components/Welcome.jsx +0 -434
  233. package/management-ui/src/components/codegen/APIEndpointGenerator.jsx +0 -637
  234. package/management-ui/src/components/codegen/APIModuleSelector.jsx +0 -227
  235. package/management-ui/src/components/codegen/CodeGenerationWizard.jsx +0 -247
  236. package/management-ui/src/components/codegen/CodePreviewEditor.jsx +0 -316
  237. package/management-ui/src/components/codegen/DynamicModuleForm.jsx +0 -271
  238. package/management-ui/src/components/codegen/FormBuilder.jsx +0 -737
  239. package/management-ui/src/components/codegen/IntegrationGenerator.jsx +0 -855
  240. package/management-ui/src/components/codegen/ProjectScaffoldWizard.jsx +0 -797
  241. package/management-ui/src/components/codegen/SchemaBuilder.jsx +0 -303
  242. package/management-ui/src/components/codegen/TemplateSelector.jsx +0 -586
  243. package/management-ui/src/components/codegen/index.js +0 -10
  244. package/management-ui/src/components/connections/ConnectionConfigForm.jsx +0 -362
  245. package/management-ui/src/components/connections/ConnectionHealthMonitor.jsx +0 -182
  246. package/management-ui/src/components/connections/ConnectionTester.jsx +0 -200
  247. package/management-ui/src/components/connections/EntityRelationshipMapper.jsx +0 -292
  248. package/management-ui/src/components/connections/OAuthFlow.jsx +0 -204
  249. package/management-ui/src/components/connections/index.js +0 -5
  250. package/management-ui/src/components/index.js +0 -21
  251. package/management-ui/src/components/monitoring/APIGatewayMetrics.jsx +0 -222
  252. package/management-ui/src/components/monitoring/LambdaMetrics.jsx +0 -169
  253. package/management-ui/src/components/monitoring/MetricsChart.jsx +0 -197
  254. package/management-ui/src/components/monitoring/MonitoringDashboard.jsx +0 -393
  255. package/management-ui/src/components/monitoring/SQSMetrics.jsx +0 -246
  256. package/management-ui/src/components/monitoring/index.js +0 -6
  257. package/management-ui/src/components/monitoring/monitoring.css +0 -218
  258. package/management-ui/src/components/theme-provider.jsx +0 -52
  259. package/management-ui/src/components/theme-toggle.jsx +0 -39
  260. package/management-ui/src/components/ui/badge.tsx +0 -36
  261. package/management-ui/src/components/ui/button.test.jsx +0 -56
  262. package/management-ui/src/components/ui/button.tsx +0 -57
  263. package/management-ui/src/components/ui/card.tsx +0 -76
  264. package/management-ui/src/components/ui/dropdown-menu.tsx +0 -199
  265. package/management-ui/src/components/ui/select.tsx +0 -157
  266. package/management-ui/src/components/ui/skeleton.jsx +0 -15
  267. package/management-ui/src/hooks/useFrigg.jsx +0 -387
  268. package/management-ui/src/hooks/useSocket.jsx +0 -58
  269. package/management-ui/src/index.css +0 -193
  270. package/management-ui/src/lib/utils.ts +0 -6
  271. package/management-ui/src/main.jsx +0 -10
  272. package/management-ui/src/pages/CodeGeneration.jsx +0 -14
  273. package/management-ui/src/pages/Connections.jsx +0 -252
  274. package/management-ui/src/pages/ConnectionsEnhanced.jsx +0 -633
  275. package/management-ui/src/pages/Dashboard.jsx +0 -311
  276. package/management-ui/src/pages/Environment.jsx +0 -314
  277. package/management-ui/src/pages/IntegrationConfigure.jsx +0 -669
  278. package/management-ui/src/pages/IntegrationDiscovery.jsx +0 -567
  279. package/management-ui/src/pages/IntegrationTest.jsx +0 -742
  280. package/management-ui/src/pages/Integrations.jsx +0 -253
  281. package/management-ui/src/pages/Monitoring.jsx +0 -17
  282. package/management-ui/src/pages/Simulation.jsx +0 -155
  283. package/management-ui/src/pages/Users.jsx +0 -492
  284. package/management-ui/src/services/api.js +0 -41
  285. package/management-ui/src/services/apiModuleService.js +0 -193
  286. package/management-ui/src/services/websocket-handlers.js +0 -120
  287. package/management-ui/src/test/api/project.test.js +0 -273
  288. package/management-ui/src/test/components/Welcome.test.jsx +0 -378
  289. package/management-ui/src/test/mocks/server.js +0 -178
  290. package/management-ui/src/test/setup.js +0 -61
  291. package/management-ui/src/test/utils/test-utils.jsx +0 -134
  292. package/management-ui/src/utils/repository.js +0 -98
  293. package/management-ui/src/utils/repository.test.js +0 -118
  294. package/management-ui/src/workflows/phase2-integration-workflows.js +0 -884
  295. package/management-ui/tailwind.config.js +0 -63
  296. package/management-ui/tsconfig.json +0 -37
  297. package/management-ui/tsconfig.node.json +0 -10
  298. package/management-ui/vite.config.js +0 -26
  299. package/management-ui/vitest.config.js +0 -38
  300. package/test/auther-definition-method-tester.js +0 -45
  301. package/test/index.js +0 -9
  302. package/test/integration-validator.js +0 -2
  303. package/test/mock-api-readme.md +0 -102
  304. package/test/mock-api.js +0 -284
  305. package/test/mock-integration.js +0 -78
@@ -1,267 +0,0 @@
1
- # acme-integrations-dev Stack Drift Analysis
2
-
3
- **Date**: 2025-10-27
4
- **Stack**: acme-integrations-dev (us-east-1)
5
- **Status**: 65/100 Health Score (degraded)
6
-
7
- ## Executive Summary
8
-
9
- The Lambda functions were **manually moved from Frigg VPC to Default VPC**, causing:
10
- - ✅ 16 orphaned resources (3 VPCs, 10 subnets, 3 security groups) - correctly detected
11
- - ⚠️ 32 property mismatch warnings (VPC drift on all 16 Lambda functions)
12
-
13
- **The template expects** Lambdas to use Frigg-managed VPC `vpc-0eadd96976d29ede7`.
14
- **But Lambdas actually use** AWS default VPC `vpc-01f21101d4ed6db59`.
15
-
16
- ## Detailed Analysis
17
-
18
- ### CloudFormation Template Expectations
19
-
20
- The template specifies Lambda functions should use:
21
-
22
- ```yaml
23
- VpcConfig:
24
- SecurityGroupIds:
25
- - sg-07c01370e830b6ad6 # Frigg Lambda SG (in vpc-0eadd96976d29ede7)
26
- SubnetIds:
27
- - subnet-00ab9e0502e66aac3 # Private subnet 1 (in vpc-0eadd96976d29ede7)
28
- - subnet-00d085a52937aaf91 # Private subnet 2 (in vpc-0eadd96976d29ede7)
29
- ```
30
-
31
- **These resources belong to:** `vpc-0eadd96976d29ede7` (10.0.0.0/16)
32
-
33
- ### Actual Lambda Configuration
34
-
35
- Lambda functions are actually running in:
36
-
37
- ```json
38
- {
39
- "VpcId": "vpc-01f21101d4ed6db59", // AWS Default VPC (172.31.0.0/16)
40
- "SecurityGroupIds": [
41
- "sg-0aca40438d17344c4" // Default VPC security group (NOT in template)
42
- ],
43
- "SubnetIds": [
44
- "subnet-020d32e3ca398a041", // Default VPC subnet 1 (NOT in template)
45
- "subnet-0c186318804aba790" // Default VPC subnet 2 (NOT in template)
46
- ]
47
- }
48
- ```
49
-
50
- **These resources belong to:** `vpc-01f21101d4ed6db59` (172.31.0.0/16) - AWS Default VPC
51
-
52
- ### Orphaned Resources Analysis
53
-
54
- #### 1. VPC: vpc-0eadd96976d29ede7 (10.0.0.0/16) ✅ CORRECT VPC TO IMPORT
55
-
56
- **Status:**
57
- - Has CloudFormation tags: `stack-name=acme-integrations-dev`, `logical-id=FriggVPC`
58
- - NOT in CloudFormation stack (stack has 0 VPCs managed)
59
- - Contains subnets that are **EXPECTED by template**:
60
- - `subnet-00ab9e0502e66aac3` (10.0.0.0/24) - Expected by template ✅
61
- - `subnet-00d085a52937aaf91` (10.0.1.0/24) - Expected by template ✅
62
- - Contains security group that is **EXPECTED by template**:
63
- - `sg-07c01370e830b6ad6` - Expected by template ✅
64
-
65
- **Conclusion:** This is the **CORRECT VPC** that should be imported! The template expects Lambdas to use this VPC, but they were manually moved to default VPC.
66
-
67
- **Stage Verification:** Has `STAGE=dev` tag ✅
68
-
69
- #### 2. VPC: vpc-0e2351eac99adcb83 (10.0.0.0/16) - OLD/DUPLICATE
70
-
71
- **Status:**
72
- - Has CloudFormation tags: `stack-name=acme-integrations-dev`, `logical-id=FriggVPC`
73
- - NOT in CloudFormation stack
74
- - Contains orphaned subnets NOT referenced by template
75
- - Same CIDR as vpc-0eadd96976d29ede7 (duplicate)
76
-
77
- **Conclusion:** Old/duplicate VPC, should be **DELETED**
78
-
79
- **Stage Verification:** Has `STAGE=dev` tag
80
-
81
- #### 3. VPC: vpc-020a0365610c05f0b (10.0.0.0/16) - OLD/DUPLICATE
82
-
83
- **Status:**
84
- - Has CloudFormation tags: `stack-name=acme-integrations-dev`, `logical-id=FriggVPC`
85
- - NOT in CloudFormation stack
86
- - Contains orphaned subnets NOT referenced by template
87
- - Same CIDR as vpc-0eadd96976d29ede7 (duplicate)
88
-
89
- **Conclusion:** Old/duplicate VPC, should be **DELETED**
90
-
91
- **Stage Verification:** Has `STAGE=dev` tag
92
-
93
- ## What Happened?
94
-
95
- 1. **Initial Deployment**: CloudFormation created `vpc-0eadd96976d29ede7` with subnets and security groups
96
- 2. **VPC Removed from Stack**: VPC was removed from CloudFormation management (but resources still exist)
97
- 3. **Manual Migration**: Lambda functions were manually updated to use default VPC instead
98
- 4. **Result**: Template expects Frigg VPC, but Lambdas use default VPC → drift
99
-
100
- ## Recommended Actions
101
-
102
- ### Option 1: Import Frigg VPC and Let CloudFormation Fix Drift (RECOMMENDED)
103
-
104
- **Steps:**
105
-
106
- 1. **Import the correct VPC and its resources:**
107
- ```bash
108
- # Import vpc-0eadd96976d29ede7 and its subnets/SG
109
- frigg repair --import quo-integrations-dev
110
- # When prompted, select ONLY vpc-0eadd96976d29ede7
111
- ```
112
-
113
- 2. **CloudFormation will automatically update Lambdas:**
114
- - CloudFormation will detect the VPC/subnet/SG mismatch
115
- - Next stack update will **automatically** update Lambda VPC configs
116
- - Lambdas will be moved from default VPC back to Frigg VPC
117
-
118
- 3. **Delete the duplicate VPCs:**
119
- ```bash
120
- aws ec2 delete-vpc --vpc-id vpc-0e2351eac99adcb83
121
- aws ec2 delete-vpc --vpc-id vpc-020a0365610c05f0b
122
- ```
123
-
124
- **CloudFormation Behavior:**
125
- - ✅ YES, CloudFormation WILL automatically update Lambda VPC configs
126
- - ✅ CloudFormation will handle the migration safely (blue-green deployment)
127
- - ✅ No downtime - new Lambda versions created, traffic switched over
128
-
129
- **Benefits:**
130
- - ✅ Stack returns to intended state (Lambdas in Frigg VPC)
131
- - ✅ Health score improves to 100/100
132
- - ✅ Proper VPC isolation restored
133
- - ✅ CloudFormation manages all resources again
134
-
135
- **Risks:**
136
- - ⚠️ Lambda cold starts during VPC migration (~10-30 seconds)
137
- - ⚠️ Must ensure Frigg VPC networking is configured correctly
138
-
139
- ### Option 2: Update Template to Use Default VPC (NOT RECOMMENDED)
140
-
141
- **Steps:**
142
-
143
- 1. Update serverless.yml to remove VPC configuration
144
- 2. Deploy stack update
145
- 3. Delete all 3 orphaned Frigg VPCs
146
-
147
- **Why NOT recommended:**
148
- - ❌ Loses VPC isolation benefits
149
- - ❌ Lambda functions exposed to internet (less secure)
150
- - ❌ Shared default VPC across all accounts
151
- - ❌ No control over networking
152
-
153
- ### Option 3: Delete All and Let CloudFormation Recreate (RISKY)
154
-
155
- **Steps:**
156
-
157
- 1. Delete all 3 orphaned VPCs
158
- 2. Add VPC back to CloudFormation template
159
- 3. Deploy stack update
160
-
161
- **Why RISKY:**
162
- - ❌ CloudFormation will create NEW VPC with different ID
163
- - ❌ Requires stack update to fix Lambda drift
164
- - ❌ More disruptive than import
165
-
166
- ## Answering Your Questions
167
-
168
- ### Q1: What are the drifted properties?
169
-
170
- **Answer:**
171
- - **Expected** (from template): Subnets in `vpc-0eadd96976d29ede7` (Frigg VPC)
172
- - **Actual** (in AWS): Subnets in `vpc-01f21101d4ed6db59` (default VPC)
173
- - **Cause**: Lambdas were manually moved to default VPC
174
-
175
- ### Q2: Will CloudFormation migrate Lambdas if we import the VPC?
176
-
177
- **Answer:** ✅ **YES!**
178
-
179
- When you import `vpc-0eadd96976d29ede7` and its subnets/SG:
180
- 1. CloudFormation will recognize the resources exist
181
- 2. Next stack update will detect Lambda VPC config drift
182
- 3. CloudFormation will automatically update Lambda functions to use imported VPC
183
- 4. Migration happens safely with blue-green deployment (no downtime)
184
-
185
- ### Q3: What's the right approach?
186
-
187
- **Answer:** **Import `vpc-0eadd96976d29ede7` and delete the other 2 VPCs**
188
-
189
- This VPC is the one the template expects, and it contains the correct subnets/SG that match the template.
190
-
191
- ### Q4: Are these VPCs intended for -dev stage?
192
-
193
- **Answer:** ✅ **YES, all 3 VPCs have `STAGE=dev` tags**
194
-
195
- But only `vpc-0eadd96976d29ede7` contains the resources referenced by the template. The other 2 are duplicates/old deployments.
196
-
197
- ## Implementation Plan
198
-
199
- 1. ✅ **Verify VPC networking is correct:**
200
- ```bash
201
- # Check route tables, NAT gateways, internet gateways
202
- aws ec2 describe-route-tables --filters "Name=vpc-id,Values=vpc-0eadd96976d29ede7"
203
- aws ec2 describe-nat-gateways --filter "Name=vpc-id,Values=vpc-0eadd96976d29ede7"
204
- ```
205
-
206
- 2. ✅ **Import the correct VPC:**
207
- ```bash
208
- frigg repair --import quo-integrations-dev
209
- # Select: vpc-0eadd96976d29ede7 ONLY
210
- # Select: All subnets in vpc-0eadd96976d29ede7
211
- # Select: sg-07c01370e830b6ad6
212
- ```
213
-
214
- 3. ✅ **Deploy stack update to fix Lambda drift:**
215
- ```bash
216
- frigg deploy --stage dev
217
- # CloudFormation will update Lambda VPC configs automatically
218
- ```
219
-
220
- 4. ✅ **Verify Lambdas migrated successfully:**
221
- ```bash
222
- aws lambda get-function-configuration --function-name quo-integrations-dev-attio \
223
- --query 'VpcConfig.{VpcId:VpcId,SubnetIds:SubnetIds}'
224
- ```
225
-
226
- 5. ✅ **Delete duplicate VPCs:**
227
- ```bash
228
- # Delete subnets first, then VPCs
229
- aws ec2 delete-vpc --vpc-id vpc-0e2351eac99adcb83
230
- aws ec2 delete-vpc --vpc-id vpc-020a0365610c05f0b
231
- ```
232
-
233
- 6. ✅ **Re-run health check:**
234
- ```bash
235
- frigg doctor quo-integrations-dev
236
- # Should show 100/100 health score
237
- ```
238
-
239
- ## Next Steps for Relationship Analysis Implementation
240
-
241
- Based on this real-world scenario, the relationship analysis should:
242
-
243
- 1. **Detect template-expected resources:**
244
- - Parse CloudFormation template to find expected VPC config
245
- - Extract subnet IDs, security group IDs from template
246
-
247
- 2. **Match orphans against expected resources:**
248
- - `vpc-0eadd96976d29ede7` contains expected subnets → **HIGH priority import**
249
- - Other VPCs don't contain expected resources → **LOW priority (delete)**
250
-
251
- 3. **Show recommendation:**
252
- ```
253
- ⚠ Multiple VPCs detected (3 orphaned)
254
-
255
- Analysis:
256
- 1. vpc-0eadd96976d29ede7 - Contains resources expected by template [IMPORT THIS]
257
- - subnet-00ab9e0502e66aac3 (expected)
258
- - subnet-00d085a52937aaf91 (expected)
259
- - sg-07c01370e830b6ad6 (expected)
260
-
261
- 2. vpc-0e2351eac99adcb83 - No expected resources [DELETE]
262
- 3. vpc-020a0365610c05f0b - No expected resources [DELETE]
263
-
264
- Recommendation:
265
- ✅ Import vpc-0eadd96976d29ede7 to restore template compliance
266
- ❌ Delete vpc-0e2351eac99adcb83 and vpc-020a0365610c05f0b (old/unused)
267
- ```
@@ -1,324 +0,0 @@
1
- # Build Template vs Deployed Template Analysis
2
-
3
- **CRITICAL DISCOVERY**: The local build template and deployed CloudFormation template are DIFFERENT!
4
-
5
- ## The Discrepancy
6
-
7
- ### Local Build Template (.serverless/cloudformation-template-update-stack.json)
8
-
9
- **Contains VPC Resources:**
10
- ```json
11
- {
12
- "Resources": {
13
- "FriggVPC": { "Type": "AWS::EC2::VPC" },
14
- "FriggPrivateSubnet1": { "Type": "AWS::EC2::Subnet" },
15
- "FriggPrivateSubnet2": { "Type": "AWS::EC2::Subnet" },
16
- "FriggPublicSubnet": { "Type": "AWS::EC2::Subnet" },
17
- "FriggPublicSubnet2": { "Type": "AWS::EC2::Subnet" },
18
- "FriggLambdaSecurityGroup": { "Type": "AWS::EC2::SecurityGroup" },
19
- "FriggVPCEndpointSecurityGroup": { "Type": "AWS::EC2::SecurityGroup" }
20
- }
21
- }
22
- ```
23
-
24
- **Lambda VPC Config uses Refs:**
25
- ```json
26
- {
27
- "VpcConfig": {
28
- "SecurityGroupIds": [{ "Ref": "FriggLambdaSecurityGroup" }],
29
- "SubnetIds": [
30
- { "Ref": "FriggPrivateSubnet1" },
31
- { "Ref": "FriggPrivateSubnet2" }
32
- ]
33
- }
34
- }
35
- ```
36
-
37
- ### Deployed CloudFormation Template (in AWS)
38
-
39
- **Does NOT contain VPC Resources:**
40
- - ✅ Has Lambda functions
41
- - ✅ Has SQS queues
42
- - ✅ Has IAM roles
43
- - ❌ **NO VPC resources** (FriggVPC, FriggPrivateSubnet1, FriggPrivateSubnet2, etc.)
44
-
45
- **Lambda VPC Config uses Hardcoded Physical IDs:**
46
- ```json
47
- {
48
- "VpcConfig": {
49
- "SecurityGroupIds": ["sg-07c01370e830b6ad6"], // Hardcoded physical ID
50
- "SubnetIds": [
51
- "subnet-00ab9e0502e66aac3", // Hardcoded physical ID
52
- "subnet-00d085a52937aaf91" // Hardcoded physical ID
53
- ]
54
- }
55
- }
56
- ```
57
-
58
- ## What This Means
59
-
60
- ### 1. VPC Resources Were Removed from Stack
61
-
62
- At some point, the VPC resources were removed from CloudFormation management:
63
- - VPC was created by CloudFormation originally
64
- - VPC was later removed from the template/stack (but physical resources left in AWS)
65
- - Lambda functions still reference the VPC subnets/SG by physical ID
66
-
67
- ### 2. Local Build != Deployed State
68
-
69
- **If you deploy the local build template now:**
70
- - CloudFormation will try to CREATE new VPC resources (FriggVPC, subnets, SG)
71
- - CloudFormation will FAIL because resources with those logical IDs already exist physically
72
- - OR it will create NEW resources with different physical IDs
73
- - Lambda functions will reference the NEW resources (via Ref)
74
-
75
- ### 3. Import Operation is Complex
76
-
77
- When you import `vpc-0eadd96976d29ede7`:
78
- - You need to map it to the logical ID `FriggVPC` in the template
79
- - You need to import ALL related resources:
80
- - `FriggPrivateSubnet1` → `subnet-00ab9e0502e66aac3`
81
- - `FriggPrivateSubnet2` → `subnet-00d085a52937aaf91`
82
- - `FriggLambdaSecurityGroup` → `sg-07c01370e830b6ad6`
83
- - etc.
84
-
85
- ## CloudFormation Import Process
86
-
87
- ### How Import Works
88
-
89
- **Q: Will it know to grab the right VPC?**
90
-
91
- **A:** ❌ **NO, you must explicitly tell it which physical ID maps to which logical ID**
92
-
93
- CloudFormation import requires:
94
- ```json
95
- {
96
- "Resources": [
97
- {
98
- "ResourceType": "AWS::EC2::VPC",
99
- "LogicalResourceId": "FriggVPC",
100
- "ResourceIdentifier": {
101
- "VpcId": "vpc-0eadd96976d29ede7" // You specify this
102
- }
103
- },
104
- {
105
- "ResourceType": "AWS::EC2::Subnet",
106
- "LogicalResourceId": "FriggPrivateSubnet1",
107
- "ResourceIdentifier": {
108
- "SubnetId": "subnet-00ab9e0502e66aac3" // You specify this
109
- }
110
- },
111
- // ... more resources
112
- ]
113
- }
114
- ```
115
-
116
- **Q: Will it clear or delete the old resources?**
117
-
118
- **A:** ❌ **NO, you must manually delete unused resources**
119
-
120
- CloudFormation import:
121
- - ✅ Adds existing resources to the stack (doesn't create or delete anything)
122
- - ✅ Updates Lambda Refs to point to imported resources
123
- - ❌ Does NOT delete the 2 unused VPCs
124
- - ❌ Does NOT clean up orphaned resources
125
-
126
- ## The Right Approach
127
-
128
- ### Step 1: Update Local Build Template to Match Deployed State
129
-
130
- **OPTION A: Remove VPC from local template (quick fix)**
131
-
132
- Remove VPC resources from `serverless.yml`:
133
- ```yaml
134
- # Comment out or remove:
135
- # resources:
136
- # Resources:
137
- # FriggVPC: ...
138
- # FriggPrivateSubnet1: ...
139
- ```
140
-
141
- Then use hardcoded subnet/SG IDs:
142
- ```yaml
143
- provider:
144
- vpc:
145
- securityGroupIds:
146
- - sg-07c01370e830b6ad6
147
- subnetIds:
148
- - subnet-00ab9e0502e66aac3
149
- - subnet-00d085a52937aaf91
150
- ```
151
-
152
- **OPTION B: Import VPC resources to stack (proper fix)**
153
-
154
- 1. Create import template with mappings
155
- 2. Run CloudFormation import operation
156
- 3. Redeploy with local template
157
-
158
- ### Step 2: Decision Point
159
-
160
- **CRITICAL QUESTION: Do you want CloudFormation to manage the VPC?**
161
-
162
- **If YES (recommended for Frigg framework):**
163
- - ✅ Import `vpc-0eadd96976d29ede7` and its resources
164
- - ✅ CloudFormation will manage VPC lifecycle
165
- - ✅ Template and reality stay in sync
166
- - ✅ Proper infrastructure as code
167
-
168
- **If NO (simpler but less controlled):**
169
- - ✅ Remove VPC from local template
170
- - ✅ Use hardcoded subnet/SG IDs in serverless.yml
171
- - ✅ Manually manage VPC outside CloudFormation
172
- - ⚠️ Template drift will always exist
173
-
174
- ## Recommended Action (CloudFormation Import)
175
-
176
- ### Phase 1: Prepare Import Template
177
-
178
- ```bash
179
- # 1. Get the local template
180
- cd /Users/sean/Documents/GitHub/quo--frigg/backend
181
-
182
- # 2. Create import-resources.json
183
- cat > import-resources.json <<EOF
184
- [
185
- {
186
- "ResourceType": "AWS::EC2::VPC",
187
- "LogicalResourceId": "FriggVPC",
188
- "ResourceIdentifier": { "VpcId": "vpc-0eadd96976d29ede7" }
189
- },
190
- {
191
- "ResourceType": "AWS::EC2::Subnet",
192
- "LogicalResourceId": "FriggPrivateSubnet1",
193
- "ResourceIdentifier": { "SubnetId": "subnet-00ab9e0502e66aac3" }
194
- },
195
- {
196
- "ResourceType": "AWS::EC2::Subnet",
197
- "LogicalResourceId": "FriggPrivateSubnet2",
198
- "ResourceIdentifier": { "SubnetId": "subnet-00d085a52937aaf91" }
199
- },
200
- {
201
- "ResourceType": "AWS::EC2::SecurityGroup",
202
- "LogicalResourceId": "FriggLambdaSecurityGroup",
203
- "ResourceIdentifier": { "GroupId": "sg-07c01370e830b6ad6" }
204
- }
205
- // ... add other resources (public subnets, SGs, etc.)
206
- ]
207
- EOF
208
- ```
209
-
210
- ### Phase 2: Create Change Set for Import
211
-
212
- ```bash
213
- aws cloudformation create-change-set \
214
- --stack-name quo-integrations-dev \
215
- --change-set-name import-vpc-resources \
216
- --change-set-type IMPORT \
217
- --resources-to-import file://import-resources.json \
218
- --template-body file://.serverless/cloudformation-template-update-stack.json \
219
- --capabilities CAPABILITY_IAM \
220
- --region us-east-1
221
- ```
222
-
223
- ### Phase 3: Review and Execute
224
-
225
- ```bash
226
- # Review the change set
227
- aws cloudformation describe-change-set \
228
- --stack-name quo-integrations-dev \
229
- --change-set-name import-vpc-resources \
230
- --region us-east-1
231
-
232
- # Execute if looks good
233
- aws cloudformation execute-change-set \
234
- --stack-name quo-integrations-dev \
235
- --change-set-name import-vpc-resources \
236
- --region us-east-1
237
- ```
238
-
239
- ### Phase 4: Update Lambda VPC Configs
240
-
241
- After import, CloudFormation will:
242
- - ✅ Recognize VPC resources are in the stack
243
- - ✅ Lambda Refs will resolve to imported physical IDs
244
- - ✅ Next deploy will update Lambda VPC configs from default VPC back to Frigg VPC
245
-
246
- ### Phase 5: Clean Up
247
-
248
- ```bash
249
- # Delete unused VPCs
250
- aws ec2 delete-vpc --vpc-id vpc-0e2351eac99adcb83 --region us-east-1
251
- aws ec2 delete-vpc --vpc-id vpc-020a0365610c05f0b --region us-east-1
252
- ```
253
-
254
- ## Alternative: Simpler Approach (Remove VPC from Template)
255
-
256
- If you don't want CloudFormation to manage VPC:
257
-
258
- ### Step 1: Update serverless.yml
259
-
260
- ```yaml
261
- provider:
262
- name: aws
263
- vpc:
264
- # Hardcode the VPC resources
265
- securityGroupIds:
266
- - sg-07c01370e830b6ad6
267
- subnetIds:
268
- - subnet-00ab9e0502e66aac3
269
- - subnet-00d085a52937aaf91
270
-
271
- # Remove VPC resource definitions
272
- # resources:
273
- # Resources:
274
- # FriggVPC: ...
275
- ```
276
-
277
- ### Step 2: Deploy
278
-
279
- ```bash
280
- serverless deploy --stage dev
281
- ```
282
-
283
- ### Step 3: Clean Up
284
-
285
- ```bash
286
- # Delete all 3 orphaned VPCs
287
- aws ec2 delete-vpc --vpc-id vpc-0eadd96976d29ede7
288
- aws ec2 delete-vpc --vpc-id vpc-0e2351eac99adcb83
289
- aws ec2 delete-vpc --vpc-id vpc-020a0365610c05f0b
290
- ```
291
-
292
- ## Recommendation
293
-
294
- **For Frigg Framework consistency: Import VPC resources**
295
-
296
- Why:
297
- - ✅ Maintains infrastructure as code principles
298
- - ✅ VPC lifecycle managed by CloudFormation
299
- - ✅ Consistent with Frigg framework design
300
- - ✅ Template matches deployed state
301
- - ✅ `frigg doctor` will show 100/100 health
302
-
303
- **Trade-offs:**
304
- - ⚠️ More complex import process
305
- - ⚠️ Must map all VPC resources correctly
306
- - ⚠️ One-time effort but proper long-term solution
307
-
308
- ## Next Steps for Relationship Analysis
309
-
310
- The relationship analysis should:
311
-
312
- 1. **Parse local build template** (not just deployed template)
313
- 2. **Detect CloudFormation Refs** in Lambda VPC configs
314
- 3. **Resolve Refs to physical IDs** from deployed stack
315
- 4. **Match orphaned resources** against resolved physical IDs
316
- 5. **Identify import mapping**:
317
- - `FriggVPC` (logical) → `vpc-0eadd96976d29ede7` (physical)
318
- - `FriggPrivateSubnet1` → `subnet-00ab9e0502e66aac3`
319
- - etc.
320
-
321
- This will enable `frigg repair --import` to:
322
- - Show correct VPC to import
323
- - Generate import-resources.json automatically
324
- - Handle CloudFormation import operation