@swovohq/fuel 0.2.2-alpha.88 → 0.2.2-alpha.89

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 (148) hide show
  1. package/README.md +65 -2
  2. package/dist/commands/create-app.d.ts.map +1 -1
  3. package/dist/commands/create-app.js +9 -3
  4. package/dist/commands/create-app.js.map +1 -1
  5. package/dist/commands/infra-deploy.d.ts.map +1 -1
  6. package/dist/commands/infra-deploy.js +3 -0
  7. package/dist/commands/infra-deploy.js.map +1 -1
  8. package/dist/commands/infra-init.d.ts.map +1 -1
  9. package/dist/commands/infra-init.js +63 -6
  10. package/dist/commands/infra-init.js.map +1 -1
  11. package/dist/infra/credentials.d.ts.map +1 -1
  12. package/dist/infra/credentials.js +5 -2
  13. package/dist/infra/credentials.js.map +1 -1
  14. package/dist/infra/github-client.d.ts +6 -0
  15. package/dist/infra/github-client.d.ts.map +1 -1
  16. package/dist/infra/github-client.js +30 -0
  17. package/dist/infra/github-client.js.map +1 -1
  18. package/dist/infra/github-token-link.d.ts +4 -0
  19. package/dist/infra/github-token-link.d.ts.map +1 -0
  20. package/dist/infra/github-token-link.js +28 -0
  21. package/dist/infra/github-token-link.js.map +1 -0
  22. package/dist/infra/orchestrator.d.ts +4 -1
  23. package/dist/infra/orchestrator.d.ts.map +1 -1
  24. package/dist/infra/orchestrator.js +16 -7
  25. package/dist/infra/orchestrator.js.map +1 -1
  26. package/dist/infra/preflight.d.ts.map +1 -1
  27. package/dist/infra/preflight.js +9 -1
  28. package/dist/infra/preflight.js.map +1 -1
  29. package/dist/infra/template-engine.d.ts +0 -4
  30. package/dist/infra/template-engine.d.ts.map +1 -1
  31. package/dist/infra/template-engine.js +36 -12
  32. package/dist/infra/template-engine.js.map +1 -1
  33. package/dist/infra/types.d.ts.map +1 -1
  34. package/dist/infra/types.js +58 -6
  35. package/dist/infra/types.js.map +1 -1
  36. package/dist/infra-templates/TODO-azure-prod.md +119 -0
  37. package/dist/infra-templates/modules/azure-container-app/main.tf +124 -0
  38. package/dist/infra-templates/modules/azure-container-app/outputs.tf +24 -0
  39. package/dist/infra-templates/modules/azure-container-app/variables.tf +80 -0
  40. package/dist/infra-templates/modules/azure-container-apps-environment/main.tf +18 -0
  41. package/dist/infra-templates/modules/azure-container-apps-environment/outputs.tf +14 -0
  42. package/dist/infra-templates/modules/azure-container-apps-environment/variables.tf +24 -0
  43. package/dist/infra-templates/modules/azure-container-registry/main.tf +10 -0
  44. package/dist/infra-templates/modules/azure-container-registry/outputs.tf +14 -0
  45. package/dist/infra-templates/modules/azure-container-registry/variables.tf +20 -0
  46. package/dist/infra-templates/modules/azure-front-door/main.tf +80 -0
  47. package/dist/infra-templates/modules/azure-front-door/outputs.tf +20 -0
  48. package/dist/infra-templates/modules/azure-front-door/variables.tf +26 -0
  49. package/dist/infra-templates/modules/azure-github-oidc/main.tf +48 -0
  50. package/dist/infra-templates/modules/azure-github-oidc/outputs.tf +9 -0
  51. package/dist/infra-templates/modules/azure-github-oidc/variables.tf +69 -0
  52. package/dist/infra-templates/modules/azure-key-vault/main.tf +21 -0
  53. package/dist/infra-templates/modules/azure-key-vault/outputs.tf +11 -0
  54. package/dist/infra-templates/modules/azure-key-vault/variables.tf +43 -0
  55. package/dist/infra-templates/modules/azure-monitor/main.tf +29 -0
  56. package/dist/infra-templates/modules/azure-monitor/outputs.tf +17 -0
  57. package/dist/infra-templates/modules/azure-monitor/variables.tf +32 -0
  58. package/dist/infra-templates/modules/azure-network/main.tf +134 -0
  59. package/dist/infra-templates/modules/azure-network/outputs.tf +44 -0
  60. package/dist/infra-templates/modules/azure-network/variables.tf +56 -0
  61. package/dist/infra-templates/modules/azure-postgresql-flexible/main.tf +34 -0
  62. package/dist/infra-templates/modules/azure-postgresql-flexible/outputs.tf +20 -0
  63. package/dist/infra-templates/modules/azure-postgresql-flexible/variables.tf +54 -0
  64. package/dist/infra-templates/modules/azure-redis-cache/main.tf +32 -0
  65. package/dist/infra-templates/modules/azure-redis-cache/outputs.tf +15 -0
  66. package/dist/infra-templates/modules/azure-redis-cache/variables.tf +30 -0
  67. package/dist/infra-templates/modules/azure-resource-group/main.tf +5 -0
  68. package/dist/infra-templates/modules/azure-resource-group/outputs.tf +11 -0
  69. package/dist/infra-templates/modules/azure-resource-group/variables.tf +16 -0
  70. package/dist/infra-templates/modules/azure-sql-database/main.tf +63 -0
  71. package/dist/infra-templates/modules/azure-sql-database/outputs.tf +20 -0
  72. package/dist/infra-templates/modules/azure-sql-database/variables.tf +78 -0
  73. package/dist/infra-templates/modules/azure-storage-account/main.tf +13 -0
  74. package/dist/infra-templates/modules/azure-storage-account/outputs.tf +16 -0
  75. package/dist/infra-templates/modules/azure-storage-account/variables.tf +38 -0
  76. package/dist/infra-templates/modules/cloud-watch/event-bridge.tf +15 -0
  77. package/dist/infra-templates/modules/cloud-watch/lambda.tf +84 -0
  78. package/dist/infra-templates/modules/cloud-watch/lambda_function.zip +0 -0
  79. package/dist/infra-templates/modules/cloud-watch/lambda_function_deploy.zip +0 -0
  80. package/dist/infra-templates/modules/cloud-watch/main.tf +156 -0
  81. package/dist/infra-templates/modules/cloud-watch/sns.tf +3 -0
  82. package/dist/infra-templates/modules/cloud-watch/variables.tf +38 -0
  83. package/dist/infra-templates/modules/ecs-core/alb.tf +126 -0
  84. package/dist/infra-templates/modules/ecs-core/cloudwatch.tf +48 -0
  85. package/dist/infra-templates/modules/ecs-core/iam.tf +95 -0
  86. package/dist/infra-templates/modules/ecs-core/main.tf +12 -0
  87. package/dist/infra-templates/modules/ecs-core/outputs.tf +44 -0
  88. package/dist/infra-templates/modules/ecs-core/secrets.tf +9 -0
  89. package/dist/infra-templates/modules/ecs-core/security_groups.tf +73 -0
  90. package/dist/infra-templates/modules/ecs-core/variables.tf +96 -0
  91. package/dist/infra-templates/modules/ecs-service/ecs_autoscaling.tf +51 -0
  92. package/dist/infra-templates/modules/ecs-service/ecs_service.tf +39 -0
  93. package/dist/infra-templates/modules/ecs-service/ecs_task_definition.tf +56 -0
  94. package/dist/infra-templates/modules/ecs-service/variables.tf +170 -0
  95. package/dist/infra-templates/modules/elastic-container-registry/main.tf +32 -0
  96. package/dist/infra-templates/modules/elastic-container-registry/outputs.tf +9 -0
  97. package/dist/infra-templates/modules/elastic-container-registry/variables.tf +25 -0
  98. package/dist/infra-templates/modules/github-oidc-role/main.tf +46 -0
  99. package/dist/infra-templates/modules/github-oidc-role/outputs.tf +4 -0
  100. package/dist/infra-templates/modules/github-oidc-role/variables.tf +11 -0
  101. package/dist/infra-templates/modules/guardduty/main.tf +8 -0
  102. package/dist/infra-templates/modules/iam/main.tf +205 -0
  103. package/dist/infra-templates/modules/iam/outputs.tf +3 -0
  104. package/dist/infra-templates/modules/iam/variables.tf +4 -0
  105. package/dist/infra-templates/modules/random-key/main.tf +11 -0
  106. package/dist/infra-templates/modules/random-key/outputs.tf +4 -0
  107. package/dist/infra-templates/modules/random-key/variables.tf +10 -0
  108. package/dist/infra-templates/modules/redis/main.tf +47 -0
  109. package/dist/infra-templates/modules/redis/outputs.tf +8 -0
  110. package/dist/infra-templates/modules/redis/variables.tf +20 -0
  111. package/dist/infra-templates/modules/relational-database-service/main.tf +44 -0
  112. package/dist/infra-templates/modules/relational-database-service/outputs.tf +13 -0
  113. package/dist/infra-templates/modules/relational-database-service/security-group.tf +15 -0
  114. package/dist/infra-templates/modules/relational-database-service/variables.tf +50 -0
  115. package/dist/infra-templates/modules/secret/main.tf +14 -0
  116. package/dist/infra-templates/modules/secret/outputs.tf +3 -0
  117. package/dist/infra-templates/modules/secret/variables.tf +8 -0
  118. package/dist/infra-templates/modules/simple-storage-service/main.tf +28 -0
  119. package/dist/infra-templates/modules/simple-storage-service/variables.tf +4 -0
  120. package/dist/infra-templates/modules/vpc/data.tf +2 -0
  121. package/dist/infra-templates/modules/vpc/main.tf +76 -0
  122. package/dist/infra-templates/modules/vpc/outputs.tf +23 -0
  123. package/dist/infra-templates/modules/vpc/variables.tf +5 -0
  124. package/dist/infra-templates/package.json +6 -0
  125. package/dist/infra-templates/templates/azure/MANUAL_DEPLOY.md +168 -0
  126. package/dist/infra-templates/templates/azure/backend.tf +8 -0
  127. package/dist/infra-templates/templates/azure/data.tf +21 -0
  128. package/dist/infra-templates/templates/azure/default.tfvars +0 -0
  129. package/dist/infra-templates/templates/azure/locals.tf +116 -0
  130. package/dist/infra-templates/templates/azure/main.tf +421 -0
  131. package/dist/infra-templates/templates/azure/outputs.tf +40 -0
  132. package/dist/infra-templates/templates/azure/providers.tf +65 -0
  133. package/dist/infra-templates/templates/azure/variables.tf +69 -0
  134. package/dist/infra-templates/templates/azure/workflows/build_and_deploy.yml +155 -0
  135. package/dist/infra-templates/templates/azure/workflows/tests.yml +63 -0
  136. package/dist/infra-templates/templates/ecs/README.md +225 -0
  137. package/dist/infra-templates/templates/ecs/backend.tf +7 -0
  138. package/dist/infra-templates/templates/ecs/data.tf +6 -0
  139. package/dist/infra-templates/templates/ecs/default.tfvars +1 -0
  140. package/dist/infra-templates/templates/ecs/locals.tf +97 -0
  141. package/dist/infra-templates/templates/ecs/main.tf +185 -0
  142. package/dist/infra-templates/templates/ecs/outputs.tf +42 -0
  143. package/dist/infra-templates/templates/ecs/providers.tf +21 -0
  144. package/dist/infra-templates/templates/ecs/variables.tf +105 -0
  145. package/dist/infra-templates/templates/ecs/workflows/build_and_deploy.yml +188 -0
  146. package/dist/infra-templates/templates/ecs/workflows/tests.yml +65 -0
  147. package/package.json +2 -2
  148. package/schema/fuel.schema.json +78 -44
@@ -2,58 +2,25 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "oneOf": [
4
4
  {
5
- "$ref": "#/definitions/ecsConfig"
5
+ "allOf": [
6
+ {
7
+ "$ref": "#/definitions/ecsConfig"
8
+ }
9
+ ]
6
10
  },
7
11
  {
8
12
  "$ref": "#/definitions/azureConfig"
9
13
  }
10
14
  ],
11
15
  "definitions": {
12
- "ecsConfig": {
13
- "type": "object",
14
- "properties": {
15
- "name": {
16
- "type": "string",
17
- "minLength": 1
18
- },
19
- "slack_webhook_url": {
20
- "type": "string"
21
- },
22
- "github_repo_name": {
23
- "description": "Name of the GitHub repository to create/use. Defaults to \"${name}-monorepo\". Set this explicitly when this fuel.yml should target a repo already used by another environment (e.g. a separate prod fuel.yml with its own `name` pointing at the same repo as dev).",
24
- "type": "string"
25
- },
26
- "deployment": {
27
- "type": "string",
28
- "const": "ecs"
29
- },
30
- "ssl": {
31
- "type": "string",
32
- "minLength": 1,
33
- "description": "ACM certificate ARN attached to the ALB HTTPS listener, e.g. arn:aws:acm:us-east-1:ACCOUNT_ID:certificate/CERTIFICATE_ID."
34
- },
35
- "apps": {
36
- "minItems": 1,
37
- "type": "array",
38
- "items": {
39
- "$ref": "#/definitions/ecsApp"
40
- }
41
- }
42
- },
43
- "required": [
44
- "name",
45
- "deployment",
46
- "ssl",
47
- "apps"
48
- ],
49
- "additionalProperties": {}
50
- },
51
16
  "ecsApp": {
52
17
  "type": "object",
53
18
  "properties": {
54
19
  "name": {
55
20
  "type": "string",
56
- "minLength": 1
21
+ "minLength": 1,
22
+ "maxLength": 32,
23
+ "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"
57
24
  },
58
25
  "technology": {
59
26
  "type": "string",
@@ -176,7 +143,9 @@
176
143
  "name": {
177
144
  "type": "string",
178
145
  "minLength": 1,
179
- "description": "Worker name. Used as the ECS service name / Container App name depending on deployment."
146
+ "maxLength": 32,
147
+ "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$",
148
+ "description": "Worker name. Used as the ECS service name."
180
149
  },
181
150
  "dockerfile": {
182
151
  "type": "string",
@@ -190,6 +159,47 @@
190
159
  ],
191
160
  "additionalProperties": {}
192
161
  },
162
+ "ecsConfig": {
163
+ "type": "object",
164
+ "properties": {
165
+ "name": {
166
+ "type": "string",
167
+ "minLength": 1,
168
+ "maxLength": 20,
169
+ "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$"
170
+ },
171
+ "slack_webhook_url": {
172
+ "type": "string"
173
+ },
174
+ "github_repo_name": {
175
+ "description": "Name of the GitHub repository to create/use. Defaults to \"${name}-monorepo\". Set this explicitly when this fuel.yml should target a repo already used by another environment (e.g. a separate prod fuel.yml with its own `name` pointing at the same repo as dev).",
176
+ "type": "string"
177
+ },
178
+ "deployment": {
179
+ "type": "string",
180
+ "const": "ecs"
181
+ },
182
+ "ssl": {
183
+ "type": "string",
184
+ "minLength": 1,
185
+ "description": "ACM certificate ARN attached to the ALB HTTPS listener, e.g. arn:aws:acm:us-east-1:ACCOUNT_ID:certificate/CERTIFICATE_ID."
186
+ },
187
+ "apps": {
188
+ "minItems": 1,
189
+ "type": "array",
190
+ "items": {
191
+ "$ref": "#/definitions/ecsApp"
192
+ }
193
+ }
194
+ },
195
+ "required": [
196
+ "name",
197
+ "deployment",
198
+ "ssl",
199
+ "apps"
200
+ ],
201
+ "additionalProperties": {}
202
+ },
193
203
  "azureConfig": {
194
204
  "type": "object",
195
205
  "properties": {
@@ -379,7 +389,9 @@
379
389
  "properties": {
380
390
  "name": {
381
391
  "type": "string",
382
- "minLength": 1
392
+ "minLength": 2,
393
+ "maxLength": 32,
394
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$"
383
395
  },
384
396
  "technology": {
385
397
  "type": "string",
@@ -436,7 +448,7 @@
436
448
  "default": [],
437
449
  "type": "array",
438
450
  "items": {
439
- "$ref": "#/definitions/worker"
451
+ "$ref": "#/definitions/azureWorker"
440
452
  }
441
453
  },
442
454
  "database": {
@@ -598,6 +610,28 @@
598
610
  "container_app"
599
611
  ],
600
612
  "additionalProperties": {}
613
+ },
614
+ "azureWorker": {
615
+ "type": "object",
616
+ "properties": {
617
+ "name": {
618
+ "type": "string",
619
+ "minLength": 2,
620
+ "maxLength": 32,
621
+ "pattern": "^[a-z][a-z0-9]*(-[a-z0-9]+)*$",
622
+ "description": "Worker name. Used as the Container App name."
623
+ },
624
+ "dockerfile": {
625
+ "type": "string",
626
+ "minLength": 1,
627
+ "description": "Path to the worker's Dockerfile relative to the project root."
628
+ }
629
+ },
630
+ "required": [
631
+ "name",
632
+ "dockerfile"
633
+ ],
634
+ "additionalProperties": {}
601
635
  }
602
636
  }
603
637
  }