@fjall/components-infrastructure 39.2.3 → 40.0.1

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 (949) hide show
  1. package/LICENSE +2 -0
  2. package/README.md +46 -0
  3. package/dist/lib/app.d.ts +98 -39
  4. package/dist/lib/app.js +253 -40
  5. package/dist/lib/config/aws/accountAuditRole.d.ts +16 -4
  6. package/dist/lib/config/aws/accountAuditRole.js +50 -12
  7. package/dist/lib/config/aws/accountMonitoringRole.d.ts +7 -1
  8. package/dist/lib/config/aws/accountMonitoringRole.js +23 -12
  9. package/dist/lib/config/aws/alarmTopic.d.ts +4 -9
  10. package/dist/lib/config/aws/alarmTopic.js +20 -17
  11. package/dist/lib/config/aws/cloudTrail.d.ts +9 -3
  12. package/dist/lib/config/aws/cloudTrail.js +27 -9
  13. package/dist/lib/config/aws/configRecorder.js +5 -1
  14. package/dist/lib/config/aws/configRulePreset.d.ts +2 -1
  15. package/dist/lib/config/aws/configRulePreset.js +89 -23
  16. package/dist/lib/config/aws/deployBoundarySingleton.d.ts +6 -1
  17. package/dist/lib/config/aws/deployBoundarySingleton.js +8 -2
  18. package/dist/lib/config/aws/disasterRecovery.d.ts +13 -5
  19. package/dist/lib/config/aws/disasterRecovery.js +365 -108
  20. package/dist/lib/config/aws/ebsDefaultEncryption.js +3 -2
  21. package/dist/lib/config/aws/ecrDefaultImage.js +7 -8
  22. package/dist/lib/config/aws/fjallBackupRole.d.ts +25 -0
  23. package/dist/lib/config/aws/fjallBackupRole.js +50 -0
  24. package/dist/lib/config/aws/identityCenter.d.ts +22 -16
  25. package/dist/lib/config/aws/identityCenter.js +148 -143
  26. package/dist/lib/config/aws/identityCentreConfig/builtInOverlap.d.ts +29 -0
  27. package/dist/lib/config/aws/identityCentreConfig/builtInOverlap.js +120 -0
  28. package/dist/lib/config/aws/identityCentreConfig/defaults.d.ts +135 -0
  29. package/dist/lib/config/aws/identityCentreConfig/defaults.js +229 -0
  30. package/dist/lib/config/aws/identityCentreConfig/derivations.d.ts +79 -0
  31. package/dist/lib/config/aws/identityCentreConfig/derivations.js +140 -0
  32. package/dist/lib/config/aws/identityCentreConfig/refusalNames.d.ts +25 -0
  33. package/dist/lib/config/aws/identityCentreConfig/refusalNames.js +59 -0
  34. package/dist/lib/config/aws/identityCentreConfig/setContract.d.ts +14 -0
  35. package/dist/lib/config/aws/identityCentreConfig/setContract.js +39 -0
  36. package/dist/lib/config/aws/identityCentreConfig/types.d.ts +22 -0
  37. package/dist/lib/config/aws/identityCentreConfig/types.js +10 -0
  38. package/dist/lib/config/aws/identityCentreConfig/validate.d.ts +32 -0
  39. package/dist/lib/config/aws/identityCentreConfig/validate.js +266 -0
  40. package/dist/lib/config/aws/identityCentreConfig.d.ts +11 -141
  41. package/dist/lib/config/aws/identityCentreConfig.js +10 -343
  42. package/dist/lib/config/aws/inspectorEnablement.d.ts +6 -3
  43. package/dist/lib/config/aws/inspectorEnablement.js +280 -28
  44. package/dist/lib/config/aws/ipam.js +8 -4
  45. package/dist/lib/config/aws/oidcConnector.d.ts +5 -0
  46. package/dist/lib/config/aws/oidcConnector.js +29 -10
  47. package/dist/lib/config/aws/organisationTrail.js +9 -5
  48. package/dist/lib/config/aws/s3BlockPublicAccess.d.ts +3 -0
  49. package/dist/lib/config/aws/s3BlockPublicAccess.js +8 -4
  50. package/dist/lib/config/aws/scpPreset.d.ts +18 -11
  51. package/dist/lib/config/aws/scpPreset.js +209 -77
  52. package/dist/lib/config/aws/securityHubHub.js +14 -6
  53. package/dist/lib/config/aws/securityServicesAdmin.js +8 -5
  54. package/dist/lib/index.d.ts +3 -0
  55. package/dist/lib/index.js +4 -0
  56. package/dist/lib/lambda-assets/buildkite-controller/asset/THIRD-PARTY-NOTICES.txt +1606 -0
  57. package/dist/lib/lambda-assets/buildkite-controller/asset/index.js +112 -0
  58. package/dist/lib/lambda-assets/buildkite-controller/asset/package.json +4 -0
  59. package/dist/lib/lambda-assets/buildkite-dispatch/asset/THIRD-PARTY-NOTICES.txt +1600 -0
  60. package/dist/lib/lambda-assets/buildkite-dispatch/asset/index.js +108 -0
  61. package/dist/lib/lambda-assets/buildkite-dispatch/asset/package.json +4 -0
  62. package/dist/lib/lambda-assets/buildkite-finish-watcher/asset/THIRD-PARTY-NOTICES.txt +1600 -0
  63. package/dist/lib/lambda-assets/buildkite-finish-watcher/asset/index.js +132 -0
  64. package/dist/lib/lambda-assets/buildkite-finish-watcher/asset/package.json +4 -0
  65. package/dist/lib/lambda-assets/buildkite-token-expiry/asset/THIRD-PARTY-NOTICES.txt +1330 -0
  66. package/dist/lib/lambda-assets/buildkite-token-expiry/asset/index.js +110 -0
  67. package/dist/lib/lambda-assets/buildkite-token-expiry/asset/package.json +4 -0
  68. package/dist/lib/lambda-assets/cert-generator/asset/THIRD-PARTY-NOTICES.txt +1637 -0
  69. package/dist/lib/lambda-assets/cert-generator/asset/index.js +71 -18122
  70. package/dist/lib/lambda-assets/identity-store-user/asset/THIRD-PARTY-NOTICES.txt +1302 -0
  71. package/dist/lib/lambda-assets/identity-store-user/asset/index.js +47 -198
  72. package/dist/lib/lambda-assets/static-site-forms/asset/THIRD-PARTY-NOTICES.txt +1302 -0
  73. package/dist/lib/lambda-assets/static-site-forms/asset/index.js +48 -175
  74. package/dist/lib/lambda-assets/validation-record-repairer/asset/THIRD-PARTY-NOTICES.txt +1336 -0
  75. package/dist/lib/lambda-assets/validation-record-repairer/asset/index.js +110 -0
  76. package/dist/lib/lambda-assets/validation-record-repairer/asset/package.json +4 -0
  77. package/dist/lib/layers/secrets-resolver/bin/error-identity.mjs +6 -8
  78. package/dist/lib/layers/secrets-resolver/bin/mask.mjs +1193 -150
  79. package/dist/lib/layers/secrets-resolver/bin/resolve-secrets +1 -1
  80. package/dist/lib/layers/secrets-resolver/bin/resolve-secrets.mjs +74 -57
  81. package/dist/lib/opennext.d.ts +9 -0
  82. package/dist/lib/opennext.js +9 -0
  83. package/dist/lib/opennextImageLoader.d.ts +62 -0
  84. package/dist/lib/opennextImageLoader.js +251 -0
  85. package/dist/lib/opennextSsmRead.d.ts +41 -0
  86. package/dist/lib/opennextSsmRead.js +113 -0
  87. package/dist/lib/patterns/aws/account.d.ts +14 -5
  88. package/dist/lib/patterns/aws/account.js +71 -40
  89. package/dist/lib/patterns/aws/apexDomainPattern.d.ts +3 -0
  90. package/dist/lib/patterns/aws/apexDomainPattern.js +10 -7
  91. package/dist/lib/patterns/aws/auditRole.d.ts +0 -1
  92. package/dist/lib/patterns/aws/auditRole.js +2 -3
  93. package/dist/lib/patterns/aws/bastionFactory.d.ts +1 -1
  94. package/dist/lib/patterns/aws/bastionFactory.js +13 -8
  95. package/dist/lib/patterns/aws/buildkite/accountAndRegion.d.ts +8 -0
  96. package/dist/lib/patterns/aws/buildkite/accountAndRegion.js +16 -0
  97. package/dist/lib/patterns/aws/buildkite/buildkite.d.ts +24 -95
  98. package/dist/lib/patterns/aws/buildkite/buildkite.js +284 -348
  99. package/dist/lib/patterns/aws/buildkite/cacheStore.d.ts +93 -0
  100. package/dist/lib/patterns/aws/buildkite/cacheStore.js +238 -0
  101. package/dist/lib/patterns/aws/buildkite/controller/admission.d.ts +125 -0
  102. package/dist/lib/patterns/aws/buildkite/controller/admission.js +165 -0
  103. package/dist/lib/patterns/aws/buildkite/controller/agentTargeting.d.ts +22 -0
  104. package/dist/lib/patterns/aws/buildkite/controller/agentTargeting.js +30 -0
  105. package/dist/lib/patterns/aws/buildkite/controller/buildkiteApiError.d.ts +60 -0
  106. package/dist/lib/patterns/aws/buildkite/controller/buildkiteApiError.js +108 -0
  107. package/dist/lib/patterns/aws/buildkite/controller/buildkiteHttp.d.ts +80 -0
  108. package/dist/lib/patterns/aws/buildkite/controller/buildkiteHttp.js +279 -0
  109. package/dist/lib/patterns/aws/buildkite/controller/buildkiteIds.d.ts +9 -0
  110. package/dist/lib/patterns/aws/buildkite/controller/buildkiteIds.js +9 -0
  111. package/dist/lib/patterns/aws/buildkite/controller/buildkiteRateLimits.d.ts +110 -0
  112. package/dist/lib/patterns/aws/buildkite/controller/buildkiteRateLimits.js +214 -0
  113. package/dist/lib/patterns/aws/buildkite/controller/callSignal.d.ts +44 -0
  114. package/dist/lib/patterns/aws/buildkite/controller/callSignal.js +39 -0
  115. package/dist/lib/patterns/aws/buildkite/controller/capacity.d.ts +115 -0
  116. package/dist/lib/patterns/aws/buildkite/controller/capacity.js +90 -0
  117. package/dist/lib/patterns/aws/buildkite/controller/consoleCapture.d.ts +22 -0
  118. package/dist/lib/patterns/aws/buildkite/controller/consoleCapture.js +34 -0
  119. package/dist/lib/patterns/aws/buildkite/controller/controllerConfig.d.ts +140 -0
  120. package/dist/lib/patterns/aws/buildkite/controller/controllerConfig.js +349 -0
  121. package/dist/lib/patterns/aws/buildkite/controller/controllerContext.d.ts +43 -0
  122. package/dist/lib/patterns/aws/buildkite/controller/controllerContext.js +26 -0
  123. package/dist/lib/patterns/aws/buildkite/controller/controllerFleetAws.d.ts +58 -0
  124. package/dist/lib/patterns/aws/buildkite/controller/controllerFleetAws.js +214 -0
  125. package/dist/lib/patterns/aws/buildkite/controller/controllerHandler.d.ts +10 -0
  126. package/dist/lib/patterns/aws/buildkite/controller/controllerHandler.js +34 -0
  127. package/dist/lib/patterns/aws/buildkite/controller/controllerHandoff.d.ts +39 -0
  128. package/dist/lib/patterns/aws/buildkite/controller/controllerHandoff.js +100 -0
  129. package/dist/lib/patterns/aws/buildkite/controller/controllerItems.d.ts +76 -0
  130. package/dist/lib/patterns/aws/buildkite/controller/controllerItems.js +187 -0
  131. package/dist/lib/patterns/aws/buildkite/controller/controllerJobs.d.ts +88 -0
  132. package/dist/lib/patterns/aws/buildkite/controller/controllerJobs.js +205 -0
  133. package/dist/lib/patterns/aws/buildkite/controller/controllerLoop.d.ts +31 -0
  134. package/dist/lib/patterns/aws/buildkite/controller/controllerLoop.js +97 -0
  135. package/dist/lib/patterns/aws/buildkite/controller/controllerReadings.d.ts +59 -0
  136. package/dist/lib/patterns/aws/buildkite/controller/controllerReadings.js +171 -0
  137. package/dist/lib/patterns/aws/buildkite/controller/controllerReconcile.d.ts +37 -0
  138. package/dist/lib/patterns/aws/buildkite/controller/controllerReconcile.js +125 -0
  139. package/dist/lib/patterns/aws/buildkite/controller/controllerRefusals.d.ts +57 -0
  140. package/dist/lib/patterns/aws/buildkite/controller/controllerRefusals.js +143 -0
  141. package/dist/lib/patterns/aws/buildkite/controller/controllerRegistration.d.ts +56 -0
  142. package/dist/lib/patterns/aws/buildkite/controller/controllerRegistration.js +89 -0
  143. package/dist/lib/patterns/aws/buildkite/controller/controllerTable.d.ts +35 -0
  144. package/dist/lib/patterns/aws/buildkite/controller/controllerTable.js +168 -0
  145. package/dist/lib/patterns/aws/buildkite/controller/controllerTableWrites.d.ts +78 -0
  146. package/dist/lib/patterns/aws/buildkite/controller/controllerTableWrites.js +144 -0
  147. package/dist/lib/patterns/aws/buildkite/controller/controllerTelemetry.d.ts +104 -0
  148. package/dist/lib/patterns/aws/buildkite/controller/controllerTelemetry.js +97 -0
  149. package/dist/lib/patterns/aws/buildkite/controller/controllerTick.d.ts +46 -0
  150. package/dist/lib/patterns/aws/buildkite/controller/controllerTick.js +162 -0
  151. package/dist/lib/patterns/aws/buildkite/controller/controllerTiming.d.ts +126 -0
  152. package/dist/lib/patterns/aws/buildkite/controller/controllerTiming.js +145 -0
  153. package/dist/lib/patterns/aws/buildkite/controller/controllerTokens.d.ts +63 -0
  154. package/dist/lib/patterns/aws/buildkite/controller/controllerTokens.js +189 -0
  155. package/dist/lib/patterns/aws/buildkite/controller/dispatch.d.ts +51 -0
  156. package/dist/lib/patterns/aws/buildkite/controller/dispatch.js +390 -0
  157. package/dist/lib/patterns/aws/buildkite/controller/dispatchContract.d.ts +209 -0
  158. package/dist/lib/patterns/aws/buildkite/controller/dispatchContract.js +308 -0
  159. package/dist/lib/patterns/aws/buildkite/controller/dispatchGroup.d.ts +88 -0
  160. package/dist/lib/patterns/aws/buildkite/controller/dispatchGroup.js +212 -0
  161. package/dist/lib/patterns/aws/buildkite/controller/dispatchHolds.d.ts +42 -0
  162. package/dist/lib/patterns/aws/buildkite/controller/dispatchHolds.js +75 -0
  163. package/dist/lib/patterns/aws/buildkite/controller/dispatchTable.d.ts +210 -0
  164. package/dist/lib/patterns/aws/buildkite/controller/dispatchTable.js +435 -0
  165. package/dist/lib/patterns/aws/buildkite/controller/dispatchTiming.d.ts +15 -0
  166. package/dist/lib/patterns/aws/buildkite/controller/dispatchTiming.js +29 -0
  167. package/dist/lib/patterns/aws/buildkite/controller/emf.d.ts +38 -0
  168. package/dist/lib/patterns/aws/buildkite/controller/emf.js +42 -0
  169. package/dist/lib/patterns/aws/buildkite/controller/finishLedger.d.ts +37 -0
  170. package/dist/lib/patterns/aws/buildkite/controller/finishLedger.js +51 -0
  171. package/dist/lib/patterns/aws/buildkite/controller/finishStatus.d.ts +19 -0
  172. package/dist/lib/patterns/aws/buildkite/controller/finishStatus.js +18 -0
  173. package/dist/lib/patterns/aws/buildkite/controller/firstParent.d.ts +85 -0
  174. package/dist/lib/patterns/aws/buildkite/controller/firstParent.js +252 -0
  175. package/dist/lib/patterns/aws/buildkite/controller/fleet.d.ts +96 -0
  176. package/dist/lib/patterns/aws/buildkite/controller/fleet.js +160 -0
  177. package/dist/lib/patterns/aws/buildkite/controller/functionConfig.d.ts +34 -0
  178. package/dist/lib/patterns/aws/buildkite/controller/functionConfig.js +60 -0
  179. package/dist/lib/patterns/aws/buildkite/controller/githubApi.d.ts +44 -0
  180. package/dist/lib/patterns/aws/buildkite/controller/githubApi.js +110 -0
  181. package/dist/lib/patterns/aws/buildkite/controller/handoff.d.ts +85 -0
  182. package/dist/lib/patterns/aws/buildkite/controller/handoff.js +86 -0
  183. package/dist/lib/patterns/aws/buildkite/controller/idleHold.d.ts +47 -0
  184. package/dist/lib/patterns/aws/buildkite/controller/idleHold.js +41 -0
  185. package/dist/lib/patterns/aws/buildkite/controller/jobStates.d.ts +44 -0
  186. package/dist/lib/patterns/aws/buildkite/controller/jobStates.js +34 -0
  187. package/dist/lib/patterns/aws/buildkite/controller/lifecycleBucket.d.ts +24 -0
  188. package/dist/lib/patterns/aws/buildkite/controller/lifecycleBucket.js +42 -0
  189. package/dist/lib/patterns/aws/buildkite/controller/limitedCall.d.ts +11 -0
  190. package/dist/lib/patterns/aws/buildkite/controller/limitedCall.js +24 -0
  191. package/dist/lib/patterns/aws/buildkite/controller/priority.d.ts +26 -0
  192. package/dist/lib/patterns/aws/buildkite/controller/priority.js +43 -0
  193. package/dist/lib/patterns/aws/buildkite/controller/reconcile.d.ts +120 -0
  194. package/dist/lib/patterns/aws/buildkite/controller/reconcile.js +208 -0
  195. package/dist/lib/patterns/aws/buildkite/controller/restApi.d.ts +71 -0
  196. package/dist/lib/patterns/aws/buildkite/controller/restApi.js +164 -0
  197. package/dist/lib/patterns/aws/buildkite/controller/rogueAgents.d.ts +24 -0
  198. package/dist/lib/patterns/aws/buildkite/controller/rogueAgents.js +26 -0
  199. package/dist/lib/patterns/aws/buildkite/controller/stacksApi.d.ts +21 -0
  200. package/dist/lib/patterns/aws/buildkite/controller/stacksApi.js +452 -0
  201. package/dist/lib/patterns/aws/buildkite/controller/stacksApiTypes.d.ts +125 -0
  202. package/dist/lib/patterns/aws/buildkite/controller/stacksApiTypes.js +25 -0
  203. package/dist/lib/patterns/aws/buildkite/controller/tableItems.d.ts +27 -0
  204. package/dist/lib/patterns/aws/buildkite/controller/tableItems.js +58 -0
  205. package/dist/lib/patterns/aws/buildkite/controller/tick.d.ts +141 -0
  206. package/dist/lib/patterns/aws/buildkite/controller/tick.js +219 -0
  207. package/dist/lib/patterns/aws/buildkite/controller/types.d.ts +189 -0
  208. package/dist/lib/patterns/aws/buildkite/controller/types.js +36 -0
  209. package/dist/lib/patterns/aws/buildkite/controllerConstruct.d.ts +66 -0
  210. package/dist/lib/patterns/aws/buildkite/controllerConstruct.js +113 -0
  211. package/dist/lib/patterns/aws/buildkite/controllerGrants.d.ts +148 -0
  212. package/dist/lib/patterns/aws/buildkite/controllerGrants.js +297 -0
  213. package/dist/lib/patterns/aws/buildkite/decryptPaths.d.ts +41 -0
  214. package/dist/lib/patterns/aws/buildkite/decryptPaths.js +88 -0
  215. package/dist/lib/patterns/aws/buildkite/domainStack.d.ts +15 -0
  216. package/dist/lib/patterns/aws/buildkite/domainStack.js +31 -0
  217. package/dist/lib/patterns/aws/buildkite/factory.d.ts +35 -17
  218. package/dist/lib/patterns/aws/buildkite/factory.js +146 -25
  219. package/dist/lib/patterns/aws/buildkite/finishWatcher/judgeFinishes.d.ts +29 -0
  220. package/dist/lib/patterns/aws/buildkite/finishWatcher/judgeFinishes.js +59 -0
  221. package/dist/lib/patterns/aws/buildkite/finishWatcher/ledgerReads.d.ts +16 -0
  222. package/dist/lib/patterns/aws/buildkite/finishWatcher/ledgerReads.js +81 -0
  223. package/dist/lib/patterns/aws/buildkite/finishWatcher/portalClient.d.ts +79 -0
  224. package/dist/lib/patterns/aws/buildkite/finishWatcher/portalClient.js +309 -0
  225. package/dist/lib/patterns/aws/buildkite/finishWatcher/portalJobs.d.ts +105 -0
  226. package/dist/lib/patterns/aws/buildkite/finishWatcher/portalJobs.js +212 -0
  227. package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherConfig.d.ts +72 -0
  228. package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherConfig.js +155 -0
  229. package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherHandler.d.ts +1 -0
  230. package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherHandler.js +20 -0
  231. package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherRun.d.ts +45 -0
  232. package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherRun.js +139 -0
  233. package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherTelemetry.d.ts +71 -0
  234. package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherTelemetry.js +60 -0
  235. package/dist/lib/patterns/aws/buildkite/finishWatcherConstruct.d.ts +72 -0
  236. package/dist/lib/patterns/aws/buildkite/finishWatcherConstruct.js +163 -0
  237. package/dist/lib/patterns/aws/buildkite/iam.d.ts +40 -33
  238. package/dist/lib/patterns/aws/buildkite/iam.js +84 -177
  239. package/dist/lib/patterns/aws/buildkite/image/agentPin.d.ts +50 -0
  240. package/dist/lib/patterns/aws/buildkite/image/agentPin.js +51 -0
  241. package/dist/lib/patterns/aws/buildkite/image/awstoeDocument.d.ts +68 -0
  242. package/dist/lib/patterns/aws/buildkite/image/awstoeDocument.js +110 -0
  243. package/dist/lib/patterns/aws/buildkite/image/baseImage.d.ts +151 -0
  244. package/dist/lib/patterns/aws/buildkite/image/baseImage.js +188 -0
  245. package/dist/lib/patterns/aws/buildkite/image/cacheStoreShape.d.ts +12 -0
  246. package/dist/lib/patterns/aws/buildkite/image/cacheStoreShape.js +12 -0
  247. package/dist/lib/patterns/aws/buildkite/image/cachesManifest.d.ts +110 -0
  248. package/dist/lib/patterns/aws/buildkite/image/cachesManifest.js +99 -0
  249. package/dist/lib/patterns/aws/buildkite/image/ciLayer.d.ts +43 -0
  250. package/dist/lib/patterns/aws/buildkite/image/ciLayer.js +50 -0
  251. package/dist/lib/patterns/aws/buildkite/image/components/THIRD-PARTY-NOTICES.txt +250 -0
  252. package/dist/lib/patterns/aws/buildkite/image/components/agent.d.ts +18 -0
  253. package/dist/lib/patterns/aws/buildkite/image/components/agent.js +69 -0
  254. package/dist/lib/patterns/aws/buildkite/image/components/agentConfig.d.ts +50 -0
  255. package/dist/lib/patterns/aws/buildkite/image/components/agentConfig.js +169 -0
  256. package/dist/lib/patterns/aws/buildkite/image/components/basePackages.d.ts +48 -0
  257. package/dist/lib/patterns/aws/buildkite/image/components/basePackages.js +146 -0
  258. package/dist/lib/patterns/aws/buildkite/image/components/blockDevices.d.ts +34 -0
  259. package/dist/lib/patterns/aws/buildkite/image/components/blockDevices.js +391 -0
  260. package/dist/lib/patterns/aws/buildkite/image/components/browsers.d.ts +41 -0
  261. package/dist/lib/patterns/aws/buildkite/image/components/browsers.js +190 -0
  262. package/dist/lib/patterns/aws/buildkite/image/components/checkoutSsh.d.ts +70 -0
  263. package/dist/lib/patterns/aws/buildkite/image/components/checkoutSsh.js +313 -0
  264. package/dist/lib/patterns/aws/buildkite/image/components/ciLayerShell.d.ts +83 -0
  265. package/dist/lib/patterns/aws/buildkite/image/components/ciLayerShell.js +182 -0
  266. package/dist/lib/patterns/aws/buildkite/image/components/ciNode.d.ts +35 -0
  267. package/dist/lib/patterns/aws/buildkite/image/components/ciNode.js +165 -0
  268. package/dist/lib/patterns/aws/buildkite/image/components/ciPackages.d.ts +29 -0
  269. package/dist/lib/patterns/aws/buildkite/image/components/ciPackages.js +96 -0
  270. package/dist/lib/patterns/aws/buildkite/image/components/docker.d.ts +26 -0
  271. package/dist/lib/patterns/aws/buildkite/image/components/docker.js +141 -0
  272. package/dist/lib/patterns/aws/buildkite/image/components/dockerAppArmor.d.ts +88 -0
  273. package/dist/lib/patterns/aws/buildkite/image/components/dockerAppArmor.js +317 -0
  274. package/dist/lib/patterns/aws/buildkite/image/components/gitMirrors.d.ts +21 -0
  275. package/dist/lib/patterns/aws/buildkite/image/components/gitMirrors.js +244 -0
  276. package/dist/lib/patterns/aws/buildkite/image/components/isolationProbe.d.ts +44 -0
  277. package/dist/lib/patterns/aws/buildkite/image/components/isolationProbe.js +189 -0
  278. package/dist/lib/patterns/aws/buildkite/image/components/jobUser.d.ts +17 -0
  279. package/dist/lib/patterns/aws/buildkite/image/components/jobUser.js +89 -0
  280. package/dist/lib/patterns/aws/buildkite/image/components/keyScan.d.ts +150 -0
  281. package/dist/lib/patterns/aws/buildkite/image/components/keyScan.js +359 -0
  282. package/dist/lib/patterns/aws/buildkite/image/components/laneRunner.d.ts +38 -0
  283. package/dist/lib/patterns/aws/buildkite/image/components/laneRunner.js +134 -0
  284. package/dist/lib/patterns/aws/buildkite/image/components/npmStores.d.ts +61 -0
  285. package/dist/lib/patterns/aws/buildkite/image/components/npmStores.js +285 -0
  286. package/dist/lib/patterns/aws/buildkite/image/components/readiness.d.ts +9 -0
  287. package/dist/lib/patterns/aws/buildkite/image/components/readiness.js +172 -0
  288. package/dist/lib/patterns/aws/buildkite/image/components/scratch.d.ts +35 -0
  289. package/dist/lib/patterns/aws/buildkite/image/components/scratch.js +154 -0
  290. package/dist/lib/patterns/aws/buildkite/image/components/serviceImages.d.ts +18 -0
  291. package/dist/lib/patterns/aws/buildkite/image/components/serviceImages.js +109 -0
  292. package/dist/lib/patterns/aws/buildkite/image/components/shell/curl.d.ts +37 -0
  293. package/dist/lib/patterns/aws/buildkite/image/components/shell/curl.js +54 -0
  294. package/dist/lib/patterns/aws/buildkite/image/components/shell/dpkg.d.ts +18 -0
  295. package/dist/lib/patterns/aws/buildkite/image/components/shell/dpkg.js +79 -0
  296. package/dist/lib/patterns/aws/buildkite/image/components/shell/engine.d.ts +15 -0
  297. package/dist/lib/patterns/aws/buildkite/image/components/shell/engine.js +39 -0
  298. package/dist/lib/patterns/aws/buildkite/image/components/shell/files.d.ts +37 -0
  299. package/dist/lib/patterns/aws/buildkite/image/components/shell/files.js +49 -0
  300. package/dist/lib/patterns/aws/buildkite/image/components/shell/jq.d.ts +22 -0
  301. package/dist/lib/patterns/aws/buildkite/image/components/shell/jq.js +38 -0
  302. package/dist/lib/patterns/aws/buildkite/image/components/shell/manifests.d.ts +10 -0
  303. package/dist/lib/patterns/aws/buildkite/image/components/shell/manifests.js +38 -0
  304. package/dist/lib/patterns/aws/buildkite/image/components/shell/ssm.d.ts +21 -0
  305. package/dist/lib/patterns/aws/buildkite/image/components/shell/ssm.js +25 -0
  306. package/dist/lib/patterns/aws/buildkite/image/components/shell/strict.d.ts +11 -0
  307. package/dist/lib/patterns/aws/buildkite/image/components/shell/strict.js +21 -0
  308. package/dist/lib/patterns/aws/buildkite/image/components/shell/systemd.d.ts +11 -0
  309. package/dist/lib/patterns/aws/buildkite/image/components/shell/systemd.js +23 -0
  310. package/dist/lib/patterns/aws/buildkite/image/components/shell.d.ts +9 -0
  311. package/dist/lib/patterns/aws/buildkite/image/components/shell.js +9 -0
  312. package/dist/lib/patterns/aws/buildkite/image/components/ssmAgentRemoval.d.ts +33 -0
  313. package/dist/lib/patterns/aws/buildkite/image/components/ssmAgentRemoval.js +159 -0
  314. package/dist/lib/patterns/aws/buildkite/image/components/supervisor.d.ts +108 -0
  315. package/dist/lib/patterns/aws/buildkite/image/components/supervisor.js +456 -0
  316. package/dist/lib/patterns/aws/buildkite/image/components/supervisorAgent.d.ts +61 -0
  317. package/dist/lib/patterns/aws/buildkite/image/components/supervisorAgent.js +247 -0
  318. package/dist/lib/patterns/aws/buildkite/image/components/supervisorClient.d.ts +39 -0
  319. package/dist/lib/patterns/aws/buildkite/image/components/supervisorClient.js +177 -0
  320. package/dist/lib/patterns/aws/buildkite/image/components/usernsFence.d.ts +57 -0
  321. package/dist/lib/patterns/aws/buildkite/image/components/usernsFence.js +367 -0
  322. package/dist/lib/patterns/aws/buildkite/image/components/workloadSlice.d.ts +20 -0
  323. package/dist/lib/patterns/aws/buildkite/image/components/workloadSlice.js +137 -0
  324. package/dist/lib/patterns/aws/buildkite/image/fleetImage.d.ts +98 -0
  325. package/dist/lib/patterns/aws/buildkite/image/fleetImage.js +213 -0
  326. package/dist/lib/patterns/aws/buildkite/image/githubHostKeys.d.ts +18 -0
  327. package/dist/lib/patterns/aws/buildkite/image/githubHostKeys.js +22 -0
  328. package/dist/lib/patterns/aws/buildkite/image/imagePin.d.ts +124 -0
  329. package/dist/lib/patterns/aws/buildkite/image/imagePin.js +232 -0
  330. package/dist/lib/patterns/aws/buildkite/image/imagePinLambda.source.cjs +713 -0
  331. package/dist/lib/patterns/aws/buildkite/image/mirroredRepositories.d.ts +67 -0
  332. package/dist/lib/patterns/aws/buildkite/image/mirroredRepositories.js +81 -0
  333. package/dist/lib/patterns/aws/buildkite/image/poolConfig.d.ts +134 -0
  334. package/dist/lib/patterns/aws/buildkite/image/poolConfig.js +290 -0
  335. package/dist/lib/patterns/aws/buildkite/image/runnerCommit.d.ts +44 -0
  336. package/dist/lib/patterns/aws/buildkite/image/runnerCommit.js +71 -0
  337. package/dist/lib/patterns/aws/buildkite/image/supervisor.d.ts +9 -0
  338. package/dist/lib/patterns/aws/buildkite/image/supervisor.js +17 -0
  339. package/dist/lib/patterns/aws/buildkite/image/supervisorContract.d.ts +134 -0
  340. package/dist/lib/patterns/aws/buildkite/image/supervisorContract.js +260 -0
  341. package/dist/lib/patterns/aws/buildkite/image/twoStageImage.d.ts +105 -0
  342. package/dist/lib/patterns/aws/buildkite/image/twoStageImage.js +172 -0
  343. package/dist/lib/patterns/aws/buildkite/image/vmLayout.d.ts +142 -0
  344. package/dist/lib/patterns/aws/buildkite/image/vmLayout.js +142 -0
  345. package/dist/lib/patterns/aws/buildkite/poolSettings.d.ts +33 -0
  346. package/dist/lib/patterns/aws/buildkite/poolSettings.js +88 -0
  347. package/dist/lib/patterns/aws/buildkite/props.d.ts +205 -0
  348. package/dist/lib/patterns/aws/buildkite/props.js +57 -0
  349. package/dist/lib/patterns/aws/buildkite/roleFence.d.ts +24 -0
  350. package/dist/lib/patterns/aws/buildkite/roleFence.js +67 -0
  351. package/dist/lib/patterns/aws/buildkite/scheduledFunction.d.ts +49 -0
  352. package/dist/lib/patterns/aws/buildkite/scheduledFunction.js +56 -0
  353. package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryConfig.d.ts +75 -0
  354. package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryConfig.js +218 -0
  355. package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryDates.d.ts +24 -0
  356. package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryDates.js +81 -0
  357. package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryHandler.d.ts +1 -0
  358. package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryHandler.js +19 -0
  359. package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryReads.d.ts +42 -0
  360. package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryReads.js +156 -0
  361. package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryRun.d.ts +23 -0
  362. package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryRun.js +128 -0
  363. package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryTelemetry.d.ts +121 -0
  364. package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryTelemetry.js +118 -0
  365. package/dist/lib/patterns/aws/buildkite/tokenExpiryCheckConstruct.d.ts +51 -0
  366. package/dist/lib/patterns/aws/buildkite/tokenExpiryCheckConstruct.js +126 -0
  367. package/dist/lib/patterns/aws/buildkite/trustDomainKey.d.ts +100 -0
  368. package/dist/lib/patterns/aws/buildkite/trustDomainKey.js +258 -0
  369. package/dist/lib/patterns/aws/buildkite/userData.d.ts +51 -73
  370. package/dist/lib/patterns/aws/buildkite/userData.js +72 -233
  371. package/dist/lib/patterns/aws/buildkite/validation.d.ts +24 -0
  372. package/dist/lib/patterns/aws/buildkite/validation.js +430 -0
  373. package/dist/lib/patterns/aws/buildkite/vcpuPartition.d.ts +49 -0
  374. package/dist/lib/patterns/aws/buildkite/vcpuPartition.js +134 -0
  375. package/dist/lib/patterns/aws/buildkite.d.ts +5 -10
  376. package/dist/lib/patterns/aws/buildkite.js +4 -10
  377. package/dist/lib/patterns/aws/cdn.d.ts +98 -56
  378. package/dist/lib/patterns/aws/cdn.js +456 -133
  379. package/dist/lib/patterns/aws/cdnAppOrigin.d.ts +5 -7
  380. package/dist/lib/patterns/aws/cdnAppOrigin.js +41 -19
  381. package/dist/lib/patterns/aws/cdnHttpOriginReach.d.ts +15 -0
  382. package/dist/lib/patterns/aws/cdnHttpOriginReach.js +85 -0
  383. package/dist/lib/patterns/aws/clickhouseDatabase.d.ts +60 -22
  384. package/dist/lib/patterns/aws/clickhouseDatabase.js +180 -175
  385. package/dist/lib/patterns/aws/clickhouseTls/types.d.ts +7 -1
  386. package/dist/lib/patterns/aws/compute.d.ts +3 -25
  387. package/dist/lib/patterns/aws/compute.js +33 -22
  388. package/dist/lib/patterns/aws/computeEc2.d.ts +15 -1
  389. package/dist/lib/patterns/aws/computeEc2.js +11 -1
  390. package/dist/lib/patterns/aws/computeEcs.d.ts +112 -30
  391. package/dist/lib/patterns/aws/computeEcs.js +518 -227
  392. package/dist/lib/patterns/aws/computeEcsTypes.d.ts +254 -113
  393. package/dist/lib/patterns/aws/computeLambda.d.ts +10 -1
  394. package/dist/lib/patterns/aws/computeLambda.js +6 -2
  395. package/dist/lib/patterns/aws/computePropApplicability.d.ts +2 -0
  396. package/dist/lib/patterns/aws/computePropApplicability.js +7 -1
  397. package/dist/lib/patterns/aws/database.d.ts +85 -34
  398. package/dist/lib/patterns/aws/database.js +119 -118
  399. package/dist/lib/patterns/aws/databasePropApplicability.d.ts +64 -0
  400. package/dist/lib/patterns/aws/databasePropApplicability.js +12 -5
  401. package/dist/lib/patterns/aws/delegatedDomainPattern.d.ts +3 -0
  402. package/dist/lib/patterns/aws/delegatedDomainPattern.js +29 -13
  403. package/dist/lib/patterns/aws/devSubstrate.d.ts +15 -6
  404. package/dist/lib/patterns/aws/devSubstrate.js +151 -89
  405. package/dist/lib/patterns/aws/dnsRecordComposer.d.ts +32 -1
  406. package/dist/lib/patterns/aws/dnsRecordComposer.js +218 -102
  407. package/dist/lib/patterns/aws/domain.d.ts +2 -2
  408. package/dist/lib/patterns/aws/domain.js +190 -52
  409. package/dist/lib/patterns/aws/domainAliasReach.d.ts +14 -0
  410. package/dist/lib/patterns/aws/domainAliasReach.js +84 -0
  411. package/dist/lib/patterns/aws/domainCertificateComposer.d.ts +7 -10
  412. package/dist/lib/patterns/aws/domainCertificateComposer.js +69 -54
  413. package/dist/lib/patterns/aws/domainValidation.d.ts +1 -0
  414. package/dist/lib/patterns/aws/domainValidation.js +98 -29
  415. package/dist/lib/patterns/aws/externalRecordsPattern.d.ts +4 -3
  416. package/dist/lib/patterns/aws/externalRecordsPattern.js +18 -25
  417. package/dist/lib/patterns/aws/fivetranProxy.d.ts +8 -0
  418. package/dist/lib/patterns/aws/fivetranProxy.js +2 -3
  419. package/dist/lib/patterns/aws/interfaces/cdn.d.ts +10 -4
  420. package/dist/lib/patterns/aws/interfaces/cdn.js +6 -6
  421. package/dist/lib/patterns/aws/interfaces/compute.d.ts +14 -0
  422. package/dist/lib/patterns/aws/interfaces/connector.d.ts +1 -1
  423. package/dist/lib/patterns/aws/interfaces/connector.js +1 -1
  424. package/dist/lib/patterns/aws/interfaces/database.d.ts +31 -8
  425. package/dist/lib/patterns/aws/interfaces/database.js +2 -8
  426. package/dist/lib/patterns/aws/interfaces/domain.d.ts +39 -8
  427. package/dist/lib/patterns/aws/interfaces/index.d.ts +1 -1
  428. package/dist/lib/patterns/aws/interfaces/index.js +1 -1
  429. package/dist/lib/patterns/aws/interfaces/migrationContributor.d.ts +26 -2
  430. package/dist/lib/patterns/aws/interfaces/pattern.d.ts +318 -45
  431. package/dist/lib/patterns/aws/messaging.d.ts +22 -7
  432. package/dist/lib/patterns/aws/messaging.js +28 -8
  433. package/dist/lib/patterns/aws/network.d.ts +25 -9
  434. package/dist/lib/patterns/aws/network.js +21 -16
  435. package/dist/lib/patterns/aws/openNextServerRoutes.d.ts +51 -0
  436. package/dist/lib/patterns/aws/openNextServerRoutes.js +172 -0
  437. package/dist/lib/patterns/aws/organisation.d.ts +37 -11
  438. package/dist/lib/patterns/aws/organisation.js +124 -58
  439. package/dist/lib/patterns/aws/organisationFactory.js +1 -1
  440. package/dist/lib/patterns/aws/pattern.d.ts +1 -1
  441. package/dist/lib/patterns/aws/patternDomain.d.ts +7 -1
  442. package/dist/lib/patterns/aws/patternDomain.js +68 -26
  443. package/dist/lib/patterns/aws/payload.d.ts +36 -2
  444. package/dist/lib/patterns/aws/payload.js +274 -102
  445. package/dist/lib/patterns/aws/payloadPublicRoutes.d.ts +105 -0
  446. package/dist/lib/patterns/aws/payloadPublicRoutes.js +338 -0
  447. package/dist/lib/patterns/aws/platform.js +4 -1
  448. package/dist/lib/patterns/aws/staticSite.d.ts +23 -14
  449. package/dist/lib/patterns/aws/staticSite.js +148 -99
  450. package/dist/lib/patterns/aws/storage.d.ts +27 -10
  451. package/dist/lib/patterns/aws/storage.js +28 -15
  452. package/dist/lib/patterns/aws/targets/targetResolution.d.ts +5 -1
  453. package/dist/lib/patterns/aws/targets/targetResolution.js +6 -2
  454. package/dist/lib/patterns/aws/validationRecordRepairer.d.ts +74 -0
  455. package/dist/lib/patterns/aws/validationRecordRepairer.js +537 -0
  456. package/dist/lib/patterns/aws/vpcPeer.d.ts +1 -1
  457. package/dist/lib/patterns/aws/vpcPeerAccepter.d.ts +1 -1
  458. package/dist/lib/patterns/aws/vpcPeerAccepter.js +35 -25
  459. package/dist/lib/resources/aws/audit/auditRole.d.ts +1 -2
  460. package/dist/lib/resources/aws/audit/auditRole.js +19 -11
  461. package/dist/lib/resources/aws/backup/backupPlan.d.ts +2 -2
  462. package/dist/lib/resources/aws/backup/backupPlan.js +12 -6
  463. package/dist/lib/resources/aws/backup/backupTierReading.d.ts +50 -0
  464. package/dist/lib/resources/aws/backup/backupTierReading.js +62 -0
  465. package/dist/lib/resources/aws/backup/backupVault.d.ts +34 -3
  466. package/dist/lib/resources/aws/backup/backupVault.js +74 -15
  467. package/dist/lib/resources/aws/base/awsStack.d.ts +10 -4
  468. package/dist/lib/resources/aws/base/awsStack.js +39 -12
  469. package/dist/lib/resources/aws/base/costControls.d.ts +52 -0
  470. package/dist/lib/resources/aws/base/costControls.js +111 -0
  471. package/dist/lib/resources/aws/cdn/cachePolicy.d.ts +15 -0
  472. package/dist/lib/resources/aws/cdn/cachePolicy.js +35 -0
  473. package/dist/lib/resources/aws/cdn/cloudFront.d.ts +99 -48
  474. package/dist/lib/resources/aws/cdn/cloudFront.js +191 -107
  475. package/dist/lib/resources/aws/cdn/cloudFrontHostRedirect.d.ts +38 -0
  476. package/dist/lib/resources/aws/cdn/cloudFrontHostRedirect.js +67 -0
  477. package/dist/lib/resources/aws/cdn/cloudFrontLogDelivery.d.ts +1 -1
  478. package/dist/lib/resources/aws/cdn/cloudFrontLogDelivery.js +14 -18
  479. package/dist/lib/resources/aws/cdn/index.d.ts +1 -0
  480. package/dist/lib/resources/aws/cdn/responseHeadersPolicy.d.ts +6 -6
  481. package/dist/lib/resources/aws/cdn/responseHeadersPolicy.js +11 -9
  482. package/dist/lib/resources/aws/compute/applicationLoadBalancer.d.ts +29 -6
  483. package/dist/lib/resources/aws/compute/applicationLoadBalancer.js +85 -7
  484. package/dist/lib/resources/aws/compute/asgInlineLifecycleHook.d.ts +87 -52
  485. package/dist/lib/resources/aws/compute/asgInlineLifecycleHook.js +259 -49
  486. package/dist/lib/resources/aws/compute/asgLifecycleCore.source.cjs +1694 -0
  487. package/dist/lib/resources/aws/compute/asgLifecycleHandlers.d.ts +148 -0
  488. package/dist/lib/resources/aws/compute/asgLifecycleHandlers.js +275 -0
  489. package/dist/lib/resources/aws/compute/asgLifecycleHookPosture.d.ts +52 -0
  490. package/dist/lib/resources/aws/compute/asgLifecycleHookPosture.js +185 -0
  491. package/dist/lib/resources/aws/compute/asgLifecycleHookValidation.d.ts +21 -0
  492. package/dist/lib/resources/aws/compute/asgLifecycleHookValidation.js +113 -0
  493. package/dist/lib/resources/aws/compute/contentDigest.d.ts +87 -0
  494. package/dist/lib/resources/aws/compute/contentDigest.js +294 -0
  495. package/dist/lib/resources/aws/compute/contentDigestLambda.source.cjs +108 -0
  496. package/dist/lib/resources/aws/compute/ec2.d.ts +125 -13
  497. package/dist/lib/resources/aws/compute/ec2.js +212 -25
  498. package/dist/lib/resources/aws/compute/ec2GracefulTerminationHandler.d.ts +41 -15
  499. package/dist/lib/resources/aws/compute/ec2GracefulTerminationHandler.js +51 -162
  500. package/dist/lib/resources/aws/compute/ec2GracefulTerminationLambda.source.cjs +209 -431
  501. package/dist/lib/resources/aws/compute/ec2SshAccess.js +10 -6
  502. package/dist/lib/resources/aws/compute/ecs.d.ts +82 -14
  503. package/dist/lib/resources/aws/compute/ecs.js +251 -80
  504. package/dist/lib/resources/aws/compute/ecsCapacityConfig.d.ts +6 -2
  505. package/dist/lib/resources/aws/compute/ecsCapacityConfig.js +45 -27
  506. package/dist/lib/resources/aws/compute/ecsClusterFactory.d.ts +30 -0
  507. package/dist/lib/resources/aws/compute/ecsClusterFactory.js +41 -0
  508. package/dist/lib/resources/aws/compute/ecsConstants.d.ts +5 -8
  509. package/dist/lib/resources/aws/compute/ecsConstants.js +9 -43
  510. package/dist/lib/resources/aws/compute/ecsContext.d.ts +3 -1
  511. package/dist/lib/resources/aws/compute/ecsImages.d.ts +25 -1
  512. package/dist/lib/resources/aws/compute/ecsImages.js +49 -10
  513. package/dist/lib/resources/aws/compute/ecsLifecycleHookMigration.d.ts +6 -1
  514. package/dist/lib/resources/aws/compute/ecsLifecycleHookMigration.js +30 -14
  515. package/dist/lib/resources/aws/compute/ecsLogDriver.d.ts +22 -0
  516. package/dist/lib/resources/aws/compute/ecsLogDriver.js +44 -0
  517. package/dist/lib/resources/aws/compute/ecsNetworkMode.d.ts +47 -0
  518. package/dist/lib/resources/aws/compute/ecsNetworkMode.js +118 -0
  519. package/dist/lib/resources/aws/compute/ecsNetworking.d.ts +42 -2
  520. package/dist/lib/resources/aws/compute/ecsNetworking.js +207 -135
  521. package/dist/lib/resources/aws/compute/ecsRemoteConnections.d.ts +6 -1
  522. package/dist/lib/resources/aws/compute/ecsRemoteConnections.js +26 -15
  523. package/dist/lib/resources/aws/compute/ecsRoles.d.ts +1 -1
  524. package/dist/lib/resources/aws/compute/ecsRoles.js +4 -1
  525. package/dist/lib/resources/aws/compute/ecsRolloutBarrier.d.ts +53 -21
  526. package/dist/lib/resources/aws/compute/ecsRolloutBarrier.js +106 -82
  527. package/dist/lib/resources/aws/compute/ecsRolloutBarrierLambda.source.cjs +438 -74
  528. package/dist/lib/resources/aws/compute/ecsServiceFactory.d.ts +41 -5
  529. package/dist/lib/resources/aws/compute/ecsServiceFactory.js +127 -40
  530. package/dist/lib/resources/aws/compute/ecsTargetGroup.d.ts +21 -10
  531. package/dist/lib/resources/aws/compute/ecsTargetGroup.js +79 -48
  532. package/dist/lib/resources/aws/compute/ecsTaskDefinition.d.ts +3 -3
  533. package/dist/lib/resources/aws/compute/ecsTaskDefinition.js +58 -47
  534. package/dist/lib/resources/aws/compute/ecsTypes.d.ts +175 -67
  535. package/dist/lib/resources/aws/compute/ecsValidation.d.ts +116 -13
  536. package/dist/lib/resources/aws/compute/ecsValidation.js +286 -44
  537. package/dist/lib/resources/aws/compute/frontedRecords.d.ts +108 -0
  538. package/dist/lib/resources/aws/compute/frontedRecords.js +277 -0
  539. package/dist/lib/resources/aws/compute/imagePipeline.d.ts +250 -0
  540. package/dist/lib/resources/aws/compute/imagePipeline.js +515 -0
  541. package/dist/lib/resources/aws/compute/imdsPosture.d.ts +75 -0
  542. package/dist/lib/resources/aws/compute/imdsPosture.js +174 -0
  543. package/dist/lib/resources/aws/compute/index.d.ts +1 -1
  544. package/dist/lib/resources/aws/compute/index.js +1 -1
  545. package/dist/lib/resources/aws/compute/ingressProfile.d.ts +19 -4
  546. package/dist/lib/resources/aws/compute/ingressProfile.js +4 -3
  547. package/dist/lib/resources/aws/compute/instanceArchitectureWords.d.ts +7 -0
  548. package/dist/lib/resources/aws/compute/instanceArchitectureWords.js +9 -0
  549. package/dist/lib/resources/aws/compute/lambda.d.ts +103 -57
  550. package/dist/lib/resources/aws/compute/lambda.js +191 -110
  551. package/dist/lib/resources/aws/compute/lifecycleHookLambda.source.cjs +278 -111
  552. package/dist/lib/resources/aws/compute/listenerRouting.d.ts +3 -0
  553. package/dist/lib/resources/aws/compute/listenerRouting.js +5 -1
  554. package/dist/lib/resources/aws/compute/loadBalancerIngress.d.ts +88 -0
  555. package/dist/lib/resources/aws/compute/loadBalancerIngress.js +257 -0
  556. package/dist/lib/resources/aws/compute/loadBalancerMigration.d.ts +132 -0
  557. package/dist/lib/resources/aws/compute/loadBalancerMigration.js +190 -0
  558. package/dist/lib/resources/aws/compute/persistentDataVolume.d.ts +51 -26
  559. package/dist/lib/resources/aws/compute/persistentDataVolume.js +53 -162
  560. package/dist/lib/resources/aws/compute/persistentDataVolumeLambda.source.cjs +452 -396
  561. package/dist/lib/resources/aws/compute/ssmAgentPolicy.d.ts +16 -0
  562. package/dist/lib/resources/aws/compute/ssmAgentPolicy.js +40 -0
  563. package/dist/lib/resources/aws/database/clickhouseBucketName.d.ts +18 -0
  564. package/dist/lib/resources/aws/database/clickhouseBucketName.js +47 -0
  565. package/dist/lib/resources/aws/database/clickhouseConstants.d.ts +33 -49
  566. package/dist/lib/resources/aws/database/clickhouseConstants.js +41 -67
  567. package/dist/lib/resources/aws/database/clickhouseDataZone.d.ts +13 -0
  568. package/dist/lib/resources/aws/database/clickhouseDataZone.js +25 -0
  569. package/dist/lib/resources/aws/database/clickhouseMaintenanceScript.d.ts +6 -0
  570. package/dist/lib/resources/aws/database/clickhouseMaintenanceScript.js +13 -3
  571. package/dist/lib/resources/aws/database/clickhouseOptimiseScript.d.ts +42 -25
  572. package/dist/lib/resources/aws/database/clickhouseOptimiseScript.js +101 -17
  573. package/dist/lib/resources/aws/database/clickhouseSchemas.d.ts +7 -18
  574. package/dist/lib/resources/aws/database/clickhouseSchemas.js +17 -31
  575. package/dist/lib/resources/aws/database/clickhouseTuning.js +5 -4
  576. package/dist/lib/resources/aws/database/clickhouseUserData.d.ts +49 -17
  577. package/dist/lib/resources/aws/database/clickhouseUserData.js +89 -51
  578. package/dist/lib/resources/aws/database/clickhouseXmlRenderer.d.ts +3 -2
  579. package/dist/lib/resources/aws/database/clickhouseXmlRenderer.js +5 -4
  580. package/dist/lib/resources/aws/database/dynamodb.d.ts +47 -8
  581. package/dist/lib/resources/aws/database/dynamodb.js +169 -33
  582. package/dist/lib/resources/aws/database/engineVersions.d.ts +55 -0
  583. package/dist/lib/resources/aws/database/engineVersions.js +138 -0
  584. package/dist/lib/resources/aws/database/index.d.ts +1 -0
  585. package/dist/lib/resources/aws/database/index.js +1 -0
  586. package/dist/lib/resources/aws/database/rdsAurora.d.ts +27 -8
  587. package/dist/lib/resources/aws/database/rdsAurora.js +138 -39
  588. package/dist/lib/resources/aws/database/rdsAuroraGlobal.d.ts +21 -5
  589. package/dist/lib/resources/aws/database/rdsAuroraGlobal.js +47 -8
  590. package/dist/lib/resources/aws/database/rdsDefaults.d.ts +9 -2
  591. package/dist/lib/resources/aws/database/rdsDefaults.js +9 -2
  592. package/dist/lib/resources/aws/database/rdsHelpers.d.ts +20 -2
  593. package/dist/lib/resources/aws/database/rdsHelpers.js +40 -7
  594. package/dist/lib/resources/aws/database/rdsInstance.d.ts +29 -5
  595. package/dist/lib/resources/aws/database/rdsInstance.js +119 -50
  596. package/dist/lib/resources/aws/database/rdsProxyOutput.d.ts +2 -5
  597. package/dist/lib/resources/aws/database/rdsProxyOutput.js +9 -13
  598. package/dist/lib/resources/aws/database/trustAnchors.d.ts +18 -0
  599. package/dist/lib/resources/aws/database/trustAnchors.js +36 -0
  600. package/dist/lib/resources/aws/iam/ciIdentity.d.ts +4 -31
  601. package/dist/lib/resources/aws/iam/ciIdentity.js +67 -114
  602. package/dist/lib/resources/aws/iam/ciIdentityFactory.d.ts +1 -1
  603. package/dist/lib/resources/aws/iam/delegationRole.d.ts +3 -20
  604. package/dist/lib/resources/aws/iam/delegationRole.js +51 -53
  605. package/dist/lib/resources/aws/iam/identityCenter/group.js +1 -1
  606. package/dist/lib/resources/aws/iam/identityCenter/permissionSet.js +8 -1
  607. package/dist/lib/resources/aws/iam/identityCenter/user.d.ts +47 -5
  608. package/dist/lib/resources/aws/iam/identityCenter/user.js +95 -24
  609. package/dist/lib/resources/aws/iam/index.d.ts +0 -3
  610. package/dist/lib/resources/aws/iam/index.js +0 -3
  611. package/dist/lib/resources/aws/iam/oidcProviderAdoption.js +15 -15
  612. package/dist/lib/resources/aws/iam/role.js +4 -3
  613. package/dist/lib/resources/aws/logging/cloudTrail.d.ts +13 -5
  614. package/dist/lib/resources/aws/logging/cloudTrail.js +39 -30
  615. package/dist/lib/resources/aws/logging/index.d.ts +5 -0
  616. package/dist/lib/resources/aws/logging/index.js +5 -0
  617. package/dist/lib/resources/aws/logging/logDeliveryBucket.d.ts +124 -0
  618. package/dist/lib/resources/aws/logging/logDeliveryBucket.js +283 -0
  619. package/dist/lib/resources/aws/logging/logGroup.d.ts +176 -10
  620. package/dist/lib/resources/aws/logging/logGroup.js +394 -11
  621. package/dist/lib/resources/aws/logging/logGroupHygiene.d.ts +58 -18
  622. package/dist/lib/resources/aws/logging/logGroupHygiene.js +293 -39
  623. package/dist/lib/resources/aws/logging/logGroupValues.d.ts +15 -0
  624. package/dist/lib/resources/aws/logging/logGroupValues.js +18 -0
  625. package/dist/lib/resources/aws/logging/logLedgerRecord.d.ts +64 -0
  626. package/dist/lib/resources/aws/logging/logLedgerRecord.js +47 -0
  627. package/dist/lib/resources/aws/logging/logPolicyResolution.d.ts +64 -0
  628. package/dist/lib/resources/aws/logging/logPolicyResolution.js +193 -0
  629. package/dist/lib/resources/aws/logging/logRollout.d.ts +1 -0
  630. package/dist/lib/resources/aws/logging/logRollout.js +1 -0
  631. package/dist/lib/resources/aws/logging/logScope.d.ts +121 -0
  632. package/dist/lib/resources/aws/logging/logScope.js +400 -0
  633. package/dist/lib/resources/aws/logging/metricFilter.d.ts +12 -0
  634. package/dist/lib/resources/aws/logging/metricFilter.js +21 -0
  635. package/dist/lib/resources/aws/logging/singletonLogGroup.d.ts +4 -1
  636. package/dist/lib/resources/aws/logging/singletonLogGroup.js +9 -3
  637. package/dist/lib/resources/aws/messaging/eventBridgeQueueGrants.d.ts +5 -0
  638. package/dist/lib/resources/aws/messaging/eventBridgeQueueGrants.js +6 -1
  639. package/dist/lib/resources/aws/messaging/eventBridgeRule.d.ts +32 -12
  640. package/dist/lib/resources/aws/messaging/eventBridgeRule.js +49 -24
  641. package/dist/lib/resources/aws/messaging/eventTargets.d.ts +8 -5
  642. package/dist/lib/resources/aws/messaging/eventTargets.js +65 -9
  643. package/dist/lib/resources/aws/messaging/eventbridge.d.ts +1 -1
  644. package/dist/lib/resources/aws/messaging/eventbridge.js +17 -16
  645. package/dist/lib/resources/aws/messaging/index.d.ts +1 -1
  646. package/dist/lib/resources/aws/messaging/queuePolicyQuota.js +4 -6
  647. package/dist/lib/resources/aws/messaging/schedule.d.ts +24 -6
  648. package/dist/lib/resources/aws/messaging/schedule.js +12 -4
  649. package/dist/lib/resources/aws/messaging/sns.d.ts +13 -4
  650. package/dist/lib/resources/aws/messaging/sns.js +30 -14
  651. package/dist/lib/resources/aws/messaging/sqs.d.ts +61 -0
  652. package/dist/lib/resources/aws/messaging/sqs.js +150 -42
  653. package/dist/lib/resources/aws/messaging/subscription.d.ts +10 -11
  654. package/dist/lib/resources/aws/messaging/subscription.js +6 -0
  655. package/dist/lib/resources/aws/messaging/utils.d.ts +2 -0
  656. package/dist/lib/resources/aws/messaging/utils.js +5 -1
  657. package/dist/lib/resources/aws/monitoring/alarmDefaults.d.ts +5 -2
  658. package/dist/lib/resources/aws/monitoring/alarmDefaults.js +8 -3
  659. package/dist/lib/resources/aws/monitoring/buildkiteControllerAlarms.d.ts +19 -0
  660. package/dist/lib/resources/aws/monitoring/buildkiteControllerAlarms.js +123 -0
  661. package/dist/lib/resources/aws/monitoring/buildkiteControllerMetrics.d.ts +34 -0
  662. package/dist/lib/resources/aws/monitoring/buildkiteControllerMetrics.js +32 -0
  663. package/dist/lib/resources/aws/monitoring/buildkiteFinishWatcherAlarms.d.ts +20 -0
  664. package/dist/lib/resources/aws/monitoring/buildkiteFinishWatcherAlarms.js +115 -0
  665. package/dist/lib/resources/aws/monitoring/buildkiteFinishWatcherMetrics.d.ts +38 -0
  666. package/dist/lib/resources/aws/monitoring/buildkiteFinishWatcherMetrics.js +39 -0
  667. package/dist/lib/resources/aws/monitoring/buildkiteTokenExpiryAlarms.d.ts +50 -0
  668. package/dist/lib/resources/aws/monitoring/buildkiteTokenExpiryAlarms.js +197 -0
  669. package/dist/lib/resources/aws/monitoring/buildkiteTokenExpiryMetrics.d.ts +66 -0
  670. package/dist/lib/resources/aws/monitoring/buildkiteTokenExpiryMetrics.js +57 -0
  671. package/dist/lib/resources/aws/monitoring/buildkiteVcpuAlarms.d.ts +62 -0
  672. package/dist/lib/resources/aws/monitoring/buildkiteVcpuAlarms.js +145 -0
  673. package/dist/lib/resources/aws/monitoring/clickhouseAlarms.d.ts +5 -10
  674. package/dist/lib/resources/aws/monitoring/clickhouseAlarms.js +68 -98
  675. package/dist/lib/resources/aws/monitoring/ecsTaskStopWatchdog.d.ts +10 -5
  676. package/dist/lib/resources/aws/monitoring/ecsTaskStopWatchdog.js +24 -16
  677. package/dist/lib/resources/aws/monitoring/gatedAbsencePager.d.ts +133 -0
  678. package/dist/lib/resources/aws/monitoring/gatedAbsencePager.js +141 -0
  679. package/dist/lib/resources/aws/monitoring/imageBuildFailureAlarm.d.ts +59 -0
  680. package/dist/lib/resources/aws/monitoring/imageBuildFailureAlarm.js +89 -0
  681. package/dist/lib/resources/aws/monitoring/index.d.ts +0 -1
  682. package/dist/lib/resources/aws/monitoring/index.js +0 -1
  683. package/dist/lib/resources/aws/monitoring/logPatternAlarms.d.ts +12 -4
  684. package/dist/lib/resources/aws/monitoring/logPatternAlarms.js +8 -5
  685. package/dist/lib/resources/aws/monitoring/metricNamespaces.d.ts +9 -2
  686. package/dist/lib/resources/aws/monitoring/metricNamespaces.js +12 -2
  687. package/dist/lib/resources/aws/monitoring/scheduleAlarms.d.ts +28 -10
  688. package/dist/lib/resources/aws/monitoring/scheduleAlarms.js +79 -18
  689. package/dist/lib/resources/aws/networking/crossAccountDelegationRecord.d.ts +20 -0
  690. package/dist/lib/resources/aws/networking/crossAccountDelegationRecord.js +25 -2
  691. package/dist/lib/resources/aws/networking/crossAccountReturnRoutes.js +3 -2
  692. package/dist/lib/resources/aws/networking/dnsRecord/aliasRecord.d.ts +8 -0
  693. package/dist/lib/resources/aws/networking/dnsRecord/aliasRecord.js +1 -1
  694. package/dist/lib/resources/aws/networking/dnsRecord/dnsRecordBase.d.ts +16 -2
  695. package/dist/lib/resources/aws/networking/dnsRecord/dnsRecordBase.js +56 -4
  696. package/dist/lib/resources/aws/networking/domainCertificate.d.ts +10 -2
  697. package/dist/lib/resources/aws/networking/domainCertificate.js +13 -10
  698. package/dist/lib/resources/aws/networking/flowLogRetention.d.ts +15 -0
  699. package/dist/lib/resources/aws/networking/flowLogRetention.js +26 -0
  700. package/dist/lib/resources/aws/networking/hostedZone.d.ts +12 -1
  701. package/dist/lib/resources/aws/networking/hostedZone.js +41 -20
  702. package/dist/lib/resources/aws/networking/ipamPool.js +28 -20
  703. package/dist/lib/resources/aws/networking/resolverQueryLoggingConfig.d.ts +57 -0
  704. package/dist/lib/resources/aws/networking/resolverQueryLoggingConfig.js +127 -0
  705. package/dist/lib/resources/aws/networking/serviceDiscovery.d.ts +23 -13
  706. package/dist/lib/resources/aws/networking/serviceDiscovery.js +66 -18
  707. package/dist/lib/resources/aws/networking/vpc.d.ts +40 -5
  708. package/dist/lib/resources/aws/networking/vpc.js +171 -55
  709. package/dist/lib/resources/aws/networking/vpcPeeringAccepterRole.d.ts +1 -1
  710. package/dist/lib/resources/aws/networking/vpcPeeringAccepterRole.js +4 -2
  711. package/dist/lib/resources/aws/networking/vpcPeeringConnection.js +3 -3
  712. package/dist/lib/resources/aws/organisation/costAllocationTagActivator.js +13 -8
  713. package/dist/lib/resources/aws/organisation/organisationAccount.js +55 -8
  714. package/dist/lib/resources/aws/organisation/organisationPolicy.js +3 -1
  715. package/dist/lib/resources/aws/secrets/index.d.ts +0 -1
  716. package/dist/lib/resources/aws/secrets/index.js +0 -1
  717. package/dist/lib/resources/aws/secrets/kms.d.ts +40 -3
  718. package/dist/lib/resources/aws/secrets/kms.js +40 -27
  719. package/dist/lib/resources/aws/secrets/parameter.d.ts +1 -22
  720. package/dist/lib/resources/aws/secrets/parameter.js +2 -93
  721. package/dist/lib/resources/aws/secrets/secret.d.ts +81 -13
  722. package/dist/lib/resources/aws/secrets/secret.js +160 -47
  723. package/dist/lib/resources/aws/secrets/stackEncryptionKey.d.ts +39 -25
  724. package/dist/lib/resources/aws/secrets/stackEncryptionKey.js +46 -28
  725. package/dist/lib/resources/aws/secrets/tlsCaSecret.js +1 -1
  726. package/dist/lib/resources/aws/secrets/tlsServerSecret.d.ts +6 -5
  727. package/dist/lib/resources/aws/secrets/tlsServerSecret.js +6 -5
  728. package/dist/lib/resources/aws/storage/bucketDeployment.d.ts +19 -3
  729. package/dist/lib/resources/aws/storage/bucketDeployment.js +105 -7
  730. package/dist/lib/resources/aws/storage/bucketDeploymentGrants.d.ts +22 -0
  731. package/dist/lib/resources/aws/storage/bucketDeploymentGrants.js +38 -0
  732. package/dist/lib/resources/aws/storage/bucketNotificationsGovernance.d.ts +54 -0
  733. package/dist/lib/resources/aws/storage/bucketNotificationsGovernance.js +321 -0
  734. package/dist/lib/resources/aws/storage/bucketNotificationsHandler.source.cjs +937 -0
  735. package/dist/lib/resources/aws/storage/bucketNotificationsHandlerIdentity.d.ts +50 -0
  736. package/dist/lib/resources/aws/storage/bucketNotificationsHandlerIdentity.js +92 -0
  737. package/dist/lib/resources/aws/storage/bucketNotificationsRolePolicySize.d.ts +33 -0
  738. package/dist/lib/resources/aws/storage/bucketNotificationsRolePolicySize.js +100 -0
  739. package/dist/lib/resources/aws/storage/bucketPolicyAmendment.d.ts +39 -0
  740. package/dist/lib/resources/aws/storage/bucketPolicyAmendment.js +282 -0
  741. package/dist/lib/resources/aws/storage/bucketPolicyDeployments.d.ts +67 -0
  742. package/dist/lib/resources/aws/storage/bucketPolicyDeployments.js +290 -0
  743. package/dist/lib/resources/aws/storage/bucketPolicyIntrinsicBounds.d.ts +31 -0
  744. package/dist/lib/resources/aws/storage/bucketPolicyIntrinsicBounds.js +73 -0
  745. package/dist/lib/resources/aws/storage/ecr.d.ts +18 -2
  746. package/dist/lib/resources/aws/storage/ecr.js +36 -16
  747. package/dist/lib/resources/aws/storage/s3.d.ts +155 -23
  748. package/dist/lib/resources/aws/storage/s3.js +271 -53
  749. package/dist/lib/resources/aws/storage/synthesisedRoleId.d.ts +13 -0
  750. package/dist/lib/resources/aws/storage/synthesisedRoleId.js +23 -0
  751. package/dist/lib/resources/aws/utilities/awsCustomResource.d.ts +70 -10
  752. package/dist/lib/resources/aws/utilities/awsCustomResource.js +120 -21
  753. package/dist/lib/resources/aws/utilities/awsCustomResourceAdmission.d.ts +26 -0
  754. package/dist/lib/resources/aws/utilities/awsCustomResourceAdmission.js +422 -0
  755. package/dist/lib/resources/aws/utilities/awsCustomResourceContract.d.ts +138 -0
  756. package/dist/lib/resources/aws/utilities/awsCustomResourceContract.js +55 -0
  757. package/dist/lib/resources/aws/utilities/awsCustomResourcePolicy.d.ts +74 -0
  758. package/dist/lib/resources/aws/utilities/awsCustomResourcePolicy.js +287 -0
  759. package/dist/lib/resources/aws/utilities/awsCustomResourceProviderLogging.d.ts +33 -0
  760. package/dist/lib/resources/aws/utilities/awsCustomResourceProviderLogging.js +51 -0
  761. package/dist/lib/resources/aws/utilities/awsCustomResourceRawWarning.d.ts +28 -0
  762. package/dist/lib/resources/aws/utilities/awsCustomResourceRawWarning.js +57 -0
  763. package/dist/lib/resources/aws/utilities/awsCustomResourceRefusal.d.ts +51 -0
  764. package/dist/lib/resources/aws/utilities/awsCustomResourceRefusal.js +43 -0
  765. package/dist/lib/resources/aws/utilities/awsCustomResourceRenderGate.d.ts +53 -0
  766. package/dist/lib/resources/aws/utilities/awsCustomResourceRenderGate.js +437 -0
  767. package/dist/lib/resources/aws/utilities/awsSdkCallAllowList.d.ts +262 -0
  768. package/dist/lib/resources/aws/utilities/awsSdkCallAllowList.js +413 -0
  769. package/dist/lib/resources/aws/utilities/awsSdkCallSecrets.d.ts +54 -0
  770. package/dist/lib/resources/aws/utilities/awsSdkCallSecrets.js +192 -0
  771. package/dist/lib/resources/aws/utilities/awsSdkCallValueShapes.d.ts +58 -0
  772. package/dist/lib/resources/aws/utilities/awsSdkCallValueShapes.js +286 -0
  773. package/dist/lib/resources/aws/utilities/codeBuild.d.ts +15 -4
  774. package/dist/lib/resources/aws/utilities/codeBuild.js +46 -2
  775. package/dist/lib/resources/aws/utilities/customResource.d.ts +4 -0
  776. package/dist/lib/resources/aws/utilities/customResource.js +14 -6
  777. package/dist/lib/resources/aws/utilities/customResourceProvider.d.ts +33 -2
  778. package/dist/lib/resources/aws/utilities/customResourceProvider.js +113 -2
  779. package/dist/lib/resources/aws/utilities/index.d.ts +0 -1
  780. package/dist/lib/resources/aws/utilities/index.js +0 -1
  781. package/dist/lib/resources/aws/utilities/tlsCertGenerator.d.ts +17 -3
  782. package/dist/lib/resources/aws/utilities/tlsCertGenerator.js +70 -4
  783. package/dist/lib/terminology/cdkParity.d.ts +79 -0
  784. package/dist/lib/terminology/cdkParity.js +30 -0
  785. package/dist/lib/terminology/parity/compute.d.ts +2 -0
  786. package/dist/lib/terminology/parity/compute.js +667 -0
  787. package/dist/lib/terminology/parity/dataAndMessaging.d.ts +2 -0
  788. package/dist/lib/terminology/parity/dataAndMessaging.js +438 -0
  789. package/dist/lib/terminology/parity/governance.d.ts +2 -0
  790. package/dist/lib/terminology/parity/governance.js +309 -0
  791. package/dist/lib/terminology/parity/index.d.ts +3 -0
  792. package/dist/lib/terminology/parity/index.js +11 -0
  793. package/dist/lib/terminology/parity/storageAndNetworking.d.ts +2 -0
  794. package/dist/lib/terminology/parity/storageAndNetworking.js +522 -0
  795. package/dist/lib/terminology/refuseRemoved.d.ts +7 -0
  796. package/dist/lib/terminology/refuseRemoved.js +13 -0
  797. package/dist/lib/terminology/refuseRenamed.d.ts +49 -0
  798. package/dist/lib/terminology/refuseRenamed.js +310 -0
  799. package/dist/lib/utils/acmTagValue.d.ts +1 -2
  800. package/dist/lib/utils/acmTagValue.js +1 -13
  801. package/dist/lib/utils/adoptedResiduals.d.ts +14 -0
  802. package/dist/lib/utils/adoptedResiduals.js +30 -0
  803. package/dist/lib/utils/albAliasTargetRegistry.d.ts +13 -5
  804. package/dist/lib/utils/albAliasTargetRegistry.js +20 -15
  805. package/dist/lib/utils/backupTierMapping.d.ts +59 -21
  806. package/dist/lib/utils/backupTierMapping.js +48 -15
  807. package/dist/lib/utils/capacityIdentityContext.d.ts +5 -16
  808. package/dist/lib/utils/capacityIdentityContext.js +11 -38
  809. package/dist/lib/utils/capacitySlotLabel.d.ts +7 -0
  810. package/dist/lib/utils/capacitySlotLabel.js +13 -0
  811. package/dist/lib/utils/capitaliseString.d.ts +1 -1
  812. package/dist/lib/utils/capitaliseString.js +1 -1
  813. package/dist/lib/utils/cdkConstructIds.d.ts +13 -0
  814. package/dist/lib/utils/cdkConstructIds.js +17 -0
  815. package/dist/lib/utils/cdkContext.d.ts +139 -14
  816. package/dist/lib/utils/cdkContext.js +200 -33
  817. package/dist/lib/utils/cdnAliasTargetRegistry.d.ts +1 -1
  818. package/dist/lib/utils/cdnAliasTargetRegistry.js +8 -8
  819. package/dist/lib/utils/cfnOutputRead.d.ts +28 -0
  820. package/dist/lib/utils/cfnOutputRead.js +43 -0
  821. package/dist/lib/utils/ciOidcProviderHandler.d.ts +0 -6
  822. package/dist/lib/utils/ciOidcProviderHandler.js +2 -13
  823. package/dist/lib/utils/connections.d.ts +3 -8
  824. package/dist/lib/utils/connections.js +65 -21
  825. package/dist/lib/utils/connector.d.ts +62 -27
  826. package/dist/lib/utils/connector.js +65 -21
  827. package/dist/lib/utils/constructsOfClass.d.ts +3 -0
  828. package/dist/lib/utils/constructsOfClass.js +4 -0
  829. package/dist/lib/utils/costAllocationTags.d.ts +8 -2
  830. package/dist/lib/utils/costAllocationTags.js +1 -1
  831. package/dist/lib/utils/databaseTypes.d.ts +2 -1
  832. package/dist/lib/utils/deployAccount.d.ts +54 -0
  833. package/dist/lib/utils/deployAccount.js +103 -0
  834. package/dist/lib/utils/deployedLoadBalancersContext.d.ts +13 -0
  835. package/dist/lib/utils/deployedLoadBalancersContext.js +18 -0
  836. package/dist/lib/utils/dnsRecordRegistry.d.ts +27 -5
  837. package/dist/lib/utils/dnsRecordRegistry.js +149 -35
  838. package/dist/lib/utils/domainRefusalLabels.d.ts +58 -0
  839. package/dist/lib/utils/domainRefusalLabels.js +112 -0
  840. package/dist/lib/utils/domainTypes.d.ts +15 -7
  841. package/dist/lib/utils/domainTypes.js +51 -19
  842. package/dist/lib/utils/duplicateNames.d.ts +54 -0
  843. package/dist/lib/utils/duplicateNames.js +286 -0
  844. package/dist/lib/utils/engineCompat.d.ts +16 -9
  845. package/dist/lib/utils/engineCompat.js +25 -16
  846. package/dist/lib/utils/env.js +3 -3
  847. package/dist/lib/utils/exportNaming.d.ts +10 -51
  848. package/dist/lib/utils/exportNaming.js +10 -54
  849. package/dist/lib/utils/fjallAppRoot.d.ts +9 -0
  850. package/dist/lib/utils/fjallAppRoot.js +13 -0
  851. package/dist/lib/utils/getAccountId.d.ts +4 -1
  852. package/dist/lib/utils/getAccountId.js +8 -4
  853. package/dist/lib/utils/getConfig.d.ts +0 -1
  854. package/dist/lib/utils/getConfig.js +24 -27
  855. package/dist/lib/utils/hostConstructKey.d.ts +25 -0
  856. package/dist/lib/utils/hostConstructKey.js +44 -0
  857. package/dist/lib/utils/implicitDescription.d.ts +40 -0
  858. package/dist/lib/utils/implicitDescription.js +86 -0
  859. package/dist/lib/utils/index.d.ts +1 -0
  860. package/dist/lib/utils/inlineSource.d.ts +89 -0
  861. package/dist/lib/utils/inlineSource.js +230 -0
  862. package/dist/lib/utils/latin1Description.d.ts +16 -0
  863. package/dist/lib/utils/latin1Description.js +34 -0
  864. package/dist/lib/utils/lightweightProviderTagsAspect.d.ts +25 -0
  865. package/dist/lib/utils/lightweightProviderTagsAspect.js +47 -0
  866. package/dist/lib/utils/logResidual.d.ts +35 -0
  867. package/dist/lib/utils/logResidual.js +210 -0
  868. package/dist/lib/utils/managedDomainContext.d.ts +15 -17
  869. package/dist/lib/utils/managedDomainContext.js +89 -63
  870. package/dist/lib/utils/manifestWriter.d.ts +46 -18
  871. package/dist/lib/utils/manifestWriter.js +129 -78
  872. package/dist/lib/utils/maskedEcho.d.ts +13 -0
  873. package/dist/lib/utils/maskedEcho.js +31 -0
  874. package/dist/lib/utils/operatorScope.d.ts +33 -0
  875. package/dist/lib/utils/operatorScope.js +45 -0
  876. package/dist/lib/utils/orgConfigParser.d.ts +20 -4
  877. package/dist/lib/utils/orgConfigParser.js +127 -63
  878. package/dist/lib/utils/propOwnership.d.ts +20 -0
  879. package/dist/lib/utils/propOwnership.js +18 -0
  880. package/dist/lib/utils/records.d.ts +10 -0
  881. package/dist/lib/utils/records.js +29 -0
  882. package/dist/lib/utils/removalMarkerAspect.d.ts +51 -0
  883. package/dist/lib/utils/removalMarkerAspect.js +95 -0
  884. package/dist/lib/utils/removalMarkerReach.d.ts +69 -0
  885. package/dist/lib/utils/removalMarkerReach.js +147 -0
  886. package/dist/lib/utils/removalPolicy.d.ts +161 -1
  887. package/dist/lib/utils/removalPolicy.js +366 -3
  888. package/dist/lib/utils/renderedTemplate.d.ts +17 -0
  889. package/dist/lib/utils/renderedTemplate.js +45 -0
  890. package/dist/lib/utils/residualLedger.d.ts +47 -0
  891. package/dist/lib/utils/residualLedger.js +431 -0
  892. package/dist/lib/utils/resolveAlertsTopic.d.ts +4 -7
  893. package/dist/lib/utils/resolveAlertsTopic.js +18 -18
  894. package/dist/lib/utils/resourceNaming.d.ts +35 -6
  895. package/dist/lib/utils/resourceNaming.js +166 -36
  896. package/dist/lib/utils/resourceTypeTags.d.ts +10 -8
  897. package/dist/lib/utils/resourceTypeTags.js +11 -13
  898. package/dist/lib/utils/sameStackReference.d.ts +108 -0
  899. package/dist/lib/utils/sameStackReference.js +226 -0
  900. package/dist/lib/utils/stackLabel.d.ts +26 -0
  901. package/dist/lib/utils/stackLabel.js +91 -0
  902. package/dist/lib/utils/stackOutput.d.ts +114 -0
  903. package/dist/lib/utils/stackOutput.js +345 -0
  904. package/dist/lib/utils/stackOutputValidation.d.ts +19 -0
  905. package/dist/lib/utils/stackOutputValidation.js +263 -0
  906. package/dist/lib/utils/stackRegions.d.ts +7 -0
  907. package/dist/lib/utils/stackRegions.js +71 -0
  908. package/dist/lib/utils/stackSingleton.d.ts +8 -0
  909. package/dist/lib/utils/stackSingleton.js +15 -0
  910. package/dist/lib/utils/standardTagsAspect.d.ts +23 -6
  911. package/dist/lib/utils/standardTagsAspect.js +33 -11
  912. package/dist/lib/utils/tagUpdateBehaviour.d.ts +22 -0
  913. package/dist/lib/utils/tagUpdateBehaviour.js +1261 -0
  914. package/dist/lib/utils/templateTags.d.ts +19 -0
  915. package/dist/lib/utils/templateTags.js +59 -0
  916. package/dist/lib/utils/topLevelStack.d.ts +8 -0
  917. package/dist/lib/utils/topLevelStack.js +13 -0
  918. package/dist/lib/utils/validationLogger.d.ts +6 -2
  919. package/dist/lib/utils/validationLogger.js +20 -10
  920. package/dist/lib/utils/vpcUtils.d.ts +22 -0
  921. package/dist/lib/utils/vpcUtils.js +32 -0
  922. package/package.json +64 -25
  923. package/dist/lib/lambda-assets/cert-generator/THIRD-PARTY-NOTICES.txt +0 -341
  924. package/dist/lib/patterns/aws/buildkite/pins.d.ts +0 -69
  925. package/dist/lib/patterns/aws/buildkite/pins.js +0 -79
  926. package/dist/lib/patterns/aws/buildkite/schema.d.ts +0 -8
  927. package/dist/lib/patterns/aws/buildkite/schema.js +0 -8
  928. package/dist/lib/resources/aws/compute/samApplication.d.ts +0 -15
  929. package/dist/lib/resources/aws/compute/samApplication.js +0 -27
  930. package/dist/lib/resources/aws/iam/ciIdentityTrust.d.ts +0 -48
  931. package/dist/lib/resources/aws/iam/ciIdentityTrust.js +0 -87
  932. package/dist/lib/resources/aws/iam/instanceProfile.d.ts +0 -5
  933. package/dist/lib/resources/aws/iam/instanceProfile.js +0 -8
  934. package/dist/lib/resources/aws/iam/policy.d.ts +0 -5
  935. package/dist/lib/resources/aws/iam/policy.js +0 -8
  936. package/dist/lib/resources/aws/monitoring/buildkiteAlarms.d.ts +0 -29
  937. package/dist/lib/resources/aws/monitoring/buildkiteAlarms.js +0 -90
  938. package/dist/lib/resources/aws/secrets/alias.d.ts +0 -5
  939. package/dist/lib/resources/aws/secrets/alias.js +0 -8
  940. package/dist/lib/resources/aws/utilities/resourceShare.d.ts +0 -5
  941. package/dist/lib/resources/aws/utilities/resourceShare.js +0 -8
  942. package/dist/lib/utils/deployTimeWriterMarkerAspect.d.ts +0 -23
  943. package/dist/lib/utils/deployTimeWriterMarkerAspect.js +0 -35
  944. package/dist/lib/utils/getAsync.d.ts +0 -10
  945. package/dist/lib/utils/getAsync.js +0 -32
  946. package/dist/lib/utils/getStackOutput.d.ts +0 -1
  947. package/dist/lib/utils/getStackOutput.js +0 -16
  948. package/dist/lib/utils/stripAndCamelCase.d.ts +0 -1
  949. package/dist/lib/utils/stripAndCamelCase.js +0 -12
@@ -1,7 +1,7 @@
1
- import { AwsLogDriver, ContainerImage, DeploymentLifecycleStage, NetworkMode, Secret as EcsSecret } from "aws-cdk-lib/aws-ecs";
1
+ import { ContainerImage, DeploymentLifecycleStage, NetworkMode, Secret as EcsSecret } from "aws-cdk-lib/aws-ecs";
2
2
  import { Peer, Port } from "aws-cdk-lib/aws-ec2";
3
3
  import { Effect, PolicyStatement, ServicePrincipal } from "aws-cdk-lib/aws-iam";
4
- import { Annotations, Aws, Stack, Tags, Token } from "aws-cdk-lib";
4
+ import { Annotations, Aws, Stack, Tags } from "aws-cdk-lib";
5
5
  import { RetentionDays } from "aws-cdk-lib/aws-logs";
6
6
  import { StringParameter } from "aws-cdk-lib/aws-ssm";
7
7
  import { Construct } from "constructs";
@@ -9,29 +9,39 @@ import { resolveAlertsTopic } from "../../utils/resolveAlertsTopic.js";
9
9
  import { EXPECTED_SCHEMA_VERSION_ENV, EXPECTED_SCHEMA_VERSION_TOOL_ENV, EXPECTED_CH_SCHEMA_VERSION_ENV, isClickHouseDatabase, isDatabase, isRelationalDatabase } from "./interfaces/database.js";
10
10
  import { isConnectionConfig } from "../../utils/connector.js";
11
11
  import { processConnections } from "../../utils/connections.js";
12
+ import { describeImplicitRole } from "../../utils/implicitDescription.js";
12
13
  import { isMigrationContributor } from "./interfaces/migrationContributor.js";
13
- import { resolveImportedSecret } from "../../resources/aws/secrets/index.js";
14
- import App from "../../app.js";
14
+ import { resolveImportedSecret, secretImportIdentity } from "../../resources/aws/secrets/index.js";
15
+ import { App } from "../../app.js";
15
16
  import EcsCluster from "../../resources/aws/compute/ecs.js";
16
17
  import { createScheduledTaskDefinition, createMigrationTaskDefinition, taskSize } from "../../resources/aws/compute/ecsTaskDefinition.js";
17
18
  import { DEFAULT_LOG_RETENTION } from "../../resources/aws/compute/ecsConstants.js";
19
+ import { awsLogDriver } from "../../resources/aws/compute/ecsLogDriver.js";
20
+ import { logGroupValues } from "../../resources/aws/logging/logGroupValues.js";
21
+ import { routedLogCategory } from "../../resources/aws/logging/logScope.js";
18
22
  import { EcsLifecycleHookMigration } from "../../resources/aws/compute/ecsLifecycleHookMigration.js";
23
+ import { tierOrScope } from "../../resources/aws/compute/lambda.js";
19
24
  import { EcsRolloutBarrier } from "../../resources/aws/compute/ecsRolloutBarrier.js";
20
25
  import { Role } from "../../resources/aws/iam/role.js";
21
26
  import { LogGroup } from "../../resources/aws/logging/logGroup.js";
22
27
  import { Schedule } from "../../resources/aws/messaging/schedule.js";
23
28
  import { SecurityGroup } from "../../resources/aws/networking/securityGroup.js";
24
29
  import { toPascalCase } from "../../utils/capitaliseString.js";
30
+ import { ResourceNaming } from "../../utils/resourceNaming.js";
31
+ import { stampOperatorScope } from "../../utils/operatorScope.js";
32
+ import { refuseRenamed } from "../../terminology/refuseRenamed.js";
25
33
  import { FjallLogger } from "../../utils/validationLogger.js";
26
- import { VALIDATION_PATTERNS } from "@fjall/generator";
27
34
  import { evaluateBakeGuard } from "@fjall/util/docker";
28
- import { toKebab, buildParameterPath } from "@fjall/util";
29
- import { MIGRATION_SECURITY_GROUPS_TAG_KEY, SCHEMA_GATE_CH_CA_CERT_ENV, SCHEMA_GATE_CH_DATABASE_ENV, SCHEMA_GATE_CH_URL_ENV, SCHEMA_GATE_CONTAINER_NAME, SCHEMA_GATE_DB_URL_BASE_ENV, SCHEMA_GATE_ECR_REPO_NAME, SCHEMA_GATE_START_TIMEOUT_SECONDS } from "@fjall/util/migration";
35
+ import { toKebab, buildParameterPath, clusterHasNoLoadBalancer, maskSensitiveOutput, refuseOperatorValue, serviceHasTargetGroup, VALUE_NOT_REPEATED } from "@fjall/util";
36
+ import { MIGRATION_CONTAINER_TAG_KEY, MIGRATION_SECURITY_GROUPS_TAG_KEY, SCHEMA_GATE_CH_CA_CERT_ENV, SCHEMA_GATE_CH_DATABASE_ENV, SCHEMA_GATE_CH_URL_ENV, SCHEMA_GATE_CONTAINER_NAME, SCHEMA_GATE_DB_URL_BASE_ENV, SCHEMA_GATE_ECR_REPO_NAME, SCHEMA_GATE_ECR_TAG_MUTABILITY, SCHEMA_GATE_START_TIMEOUT_SECONDS } from "@fjall/util/migration";
30
37
  import { CONSTRUCTS_VERSION } from "../../utils/engineCompat.js";
31
- import { clusterHasNoLoadBalancer, validateEc2ServiceSizing, validateEc2TaskMemoryFit, validateEcsDomainConfig, validateSecretName } from "../../resources/aws/compute/ecsValidation.js";
38
+ import { clusterEc2CapacityFencesImds, refuseCloudMapForNetworkMode, refuseNetworkConnectionsWithoutNetwork, refuseUnknownNetworkMode, scheduledTaskDockerSocketWarnings, validateEc2ServiceSizing, validateEc2TaskMemoryFit, validateEcsDomainConfig, validateSecretName, assertNoSecretKeyOverlap, duplicateServiceNamesRefusal, invalidServiceNamesRefusal } from "../../resources/aws/compute/ecsValidation.js";
39
+ import { DOCKER_SOCKET_ON_FENCED_CAPACITY_WARNING_ID, hostNetworkOnFencedCapacityError } from "../../resources/aws/compute/imdsPosture.js";
40
+ import { dnsRecordTypeName, taskNetworkMode } from "../../resources/aws/compute/ecsNetworkMode.js";
41
+ import { CLOUD_MAP_DNS_RECORD_TYPES, registeredDnsRecordType, isCloudMapDnsRecordType } from "../../resources/aws/networking/serviceDiscovery.js";
32
42
  import { validateSharedEc2CapacityConfig } from "../../resources/aws/compute/ecsCapacityConfig.js";
33
- import { validateTargetGroupSettings } from "../../resources/aws/compute/ecsTargetGroup.js";
34
- import { COMPUTE_DEFAULTS, collectImportedSecretNames } from "./compute.js";
43
+ import { refuseUncheckedService, validateTargetGroupSettings } from "../../resources/aws/compute/ecsTargetGroup.js";
44
+ import { COMPUTE_DEFAULTS } from "./compute.js";
35
45
  import { isHookMigrations, normaliseSchemaGate } from "./computeEcsTypes.js";
36
46
  export { ScalingType } from "./computeEcsTypes.js";
37
47
  import { ScalingType } from "./computeEcsTypes.js";
@@ -86,6 +96,9 @@ function validateSeparateTaskDef(serviceName, separateTaskDef) {
86
96
  * Extracted for clarity and detail parity with database/network patterns.
87
97
  */
88
98
  export function validateEcsProps(props) {
99
+ if (props.cluster !== undefined) {
100
+ refuseRenamed("EcsClusterConfig", props.cluster);
101
+ }
89
102
  // Mirror of the resources-layer domainConfig checks (H8 legacy `region`
90
103
  // rejection, routingPolicy shape) — defence-in-depth per generator-standards
91
104
  // § "Validate at the Lowest Layer the Field Belongs To". The cluster name is
@@ -95,18 +108,13 @@ export function validateEcsProps(props) {
95
108
  if (!props.services || props.services.length === 0) {
96
109
  throw new Error("At least one service must be specified in 'services' array.");
97
110
  }
98
- // Validate unique service names
99
111
  const serviceNames = props.services.map((s) => s.name);
100
- const duplicateNames = serviceNames.filter((name, index) => serviceNames.indexOf(name) !== index);
101
- if (duplicateNames.length > 0) {
102
- throw new Error(`Duplicate service names: ${[...new Set(duplicateNames)].join(", ")}`);
103
- }
104
- // Validate service name format
105
- const invalidNames = props.services.filter((s) => !VALIDATION_PATTERNS.ECS_SERVICE_NAME.test(s.name));
106
- if (invalidNames.length > 0) {
107
- throw new Error(`Invalid service names: ${invalidNames.map((s) => s.name).join(", ")}. ` +
108
- "Service names must start with a letter and contain only letters, numbers, and hyphens.");
109
- }
112
+ const duplicates = duplicateServiceNamesRefusal(serviceNames);
113
+ if (duplicates !== undefined)
114
+ throw new Error(duplicates);
115
+ const invalid = invalidServiceNamesRefusal(serviceNames);
116
+ if (invalid !== undefined)
117
+ throw new Error(invalid);
110
118
  // Reject secret-shaped buildArgs at synth time (mirror of the resources-layer
111
119
  // validateEcsClusterProps check — direct `new EcsCluster(...)` consumers hit
112
120
  // that one, EcsCompute/ComputeFactory consumers hit this one).
@@ -116,9 +124,15 @@ export function validateEcsProps(props) {
116
124
  if (findings.length > 0) {
117
125
  throw new Error(`Service '${service.name}': ${findings.map((f) => f.message).join(" ")}`);
118
126
  }
127
+ for (const container of service.containers ?? []) {
128
+ if (typeof container.healthCheck === "object") {
129
+ refuseRenamed("EcsContainerHealthCheck", container.healthCheck);
130
+ }
131
+ }
119
132
  }
120
- // Validate routing when multiple services have ports
121
- const servicesWithPorts = props.services.filter((s) => s.containers?.some((c) => c.port));
133
+ // Validate routing when the load balancer serves more than one service
134
+ const loadBalancerDisabled = clusterHasNoLoadBalancer(props.cluster);
135
+ const servicesWithPorts = props.services.filter((s) => serviceHasTargetGroup(s, loadBalancerDisabled));
122
136
  if (servicesWithPorts.length > 1) {
123
137
  const missingRouting = servicesWithPorts.filter((s) => {
124
138
  const rules = Array.isArray(s.routing)
@@ -184,6 +198,18 @@ export function validateEcsProps(props) {
184
198
  "The ec2Config will be ignored unless capacityProvider is set to 'EC2'.");
185
199
  }
186
200
  validateEc2ServiceSizing(service);
201
+ // Mirrors of the resources layer's refusals, which read the same task
202
+ // mode, so a service in the plan fails here first.
203
+ const taskMode = taskNetworkMode(service, props.cluster?.directAccess === true);
204
+ refuseUnknownNetworkMode(`Service '${service.name}'`, taskMode.mode);
205
+ if (taskMode.mode === NetworkMode.NONE) {
206
+ refuseNetworkConnectionsWithoutNetwork(`Service '${service.name}'`, service.connections);
207
+ }
208
+ // eslint-disable-next-line fjall/paired-ecs-validation -- the resources layer receives the Cloud Map service this registers as cloudMapService, whose record type validateEcsClusterProps judges through the same refuseCloudMapForNetworkMode
209
+ const serviceDiscovery = service.serviceDiscovery;
210
+ if (serviceDiscovery !== undefined) {
211
+ refuseServiceDiscoveryForNetworkMode(`Service '${service.name}'`, serviceDiscovery.dnsRecordType, taskMode);
212
+ }
187
213
  // Throw-only at this layer: the gate container is not yet injected here
188
214
  // (wireSchemaGate prepends it later), so the demand under-counts by the
189
215
  // gate's 512 MiB — a conservative early throw. The resources-layer call
@@ -197,7 +223,8 @@ export function validateEcsProps(props) {
197
223
  throw new Error(`Service '${service.name}': circuitBreaker.threshold must be a positive integer (got ${threshold}).`);
198
224
  }
199
225
  }
200
- validateTargetGroupSettings(service, clusterHasNoLoadBalancer(props.cluster));
226
+ validateTargetGroupSettings(service, loadBalancerDisabled);
227
+ refuseUncheckedService(service, loadBalancerDisabled);
201
228
  if (service.deployment !== undefined) {
202
229
  const min = service.deployment.minHealthyPercent;
203
230
  const max = service.deployment.maxHealthyPercent;
@@ -236,12 +263,16 @@ export function validateEcsProps(props) {
236
263
  }
237
264
  const targetService = serviceByName.get(target);
238
265
  if (targetService === undefined) {
239
- throw new Error(`Service '${service.name}': awaitMigrationsFrom names unknown service '${target}'. ` +
240
- "It must name another service in the same cluster.");
266
+ // Neither the unmatched name nor a declared one is repeated, since
267
+ // each is the author's: the refusal counts the others (FJL-481).
268
+ const others = serviceByName.size - 1;
269
+ throw new Error(maskSensitiveOutput(`Service '${service.name}': awaitMigrationsFrom names a service this cluster does not declare. ` +
270
+ `It must name another service in the same cluster, which declares ${others} other ${others === 1 ? "service" : "services"}, each under the name of its entry in services. ` +
271
+ VALUE_NOT_REPEATED));
241
272
  }
242
273
  if (targetService.migrations === undefined ||
243
274
  !isHookMigrations(targetService.migrations)) {
244
- throw new Error(`Service '${service.name}': awaitMigrationsFrom names service '${target}', which does not ` +
275
+ throw new Error(`Service '${service.name}': awaitMigrationsFrom names a service that does not ` +
245
276
  "declare lifecycle-hook or post-deploy migrations. Only those modes have a single " +
246
277
  "completion point to await (init-container migrations run per-replica).");
247
278
  }
@@ -262,7 +293,7 @@ export function validateEcsProps(props) {
262
293
  const hasEc2Service = props.services.some((s) => s.capacityProvider === "EC2");
263
294
  if (!hasEc2Service) {
264
295
  throw new Error("cluster.directAccess: true requires at least one service with capacityProvider: 'EC2'. " +
265
- "directAccess opens host-network ports on EC2 instances and has no effect on Fargate services.");
296
+ "directAccess binds each container port to the same port on the EC2 instances and has no effect on Fargate services.");
266
297
  }
267
298
  if (props.cluster.securityGroup !== undefined) {
268
299
  throw new Error("cluster.directAccess: true cannot be combined with a caller-supplied cluster.securityGroup. " +
@@ -276,17 +307,53 @@ export function validateEcsProps(props) {
276
307
  throw new Error(`Scheduled task '${entry.name}': networkMode AWS_VPC is not supported for scheduled tasks — ` +
277
308
  "a scheduled task's connections are wired to the cluster's EC2 capacity security groups " +
278
309
  "(EcsCluster.getEc2CapacityConnectable), which an awsvpc task's own ENI does not wear, so every " +
279
- "connection grant would be unreachable at runtime with nothing failing at synth. Remove networkMode " +
280
- "to run on the instance ENI, or set NetworkMode.HOST. Govern the task's reachability with the " +
310
+ "connection grant would be unreachable at runtime with nothing failing at synth. Remove networkMode, " +
311
+ "or set NetworkMode.BRIDGE, to run on the instance ENI. Govern the task's reachability with the " +
281
312
  "cluster-level securityGroup on EcsClusterConfig.");
282
313
  }
314
+ if (entry.networkMode === NetworkMode.NONE) {
315
+ refuseNetworkConnectionsWithoutNetwork(`Scheduled task '${entry.name}'`, entry.connections);
316
+ }
317
+ if (entry.networkMode === NetworkMode.HOST &&
318
+ clusterEc2CapacityFencesImds(props.services)) {
319
+ throw new Error(hostNetworkOnFencedCapacityError(`Scheduled task '${entry.name}'`));
320
+ }
283
321
  if (entry.logGroup !== undefined && entry.logRetention !== undefined) {
284
322
  throw new Error(`Scheduled task '${entry.name}': "logGroup" and "logRetention" are mutually exclusive on ` +
285
323
  "EcsScheduledTaskConfig — the supplied logGroup owns its own retention, so logRetention " +
286
324
  `(${entry.logRetention}) would be silently discarded. Supply one or the other, not both.`);
287
325
  }
326
+ if (entry.logGroup !== undefined && entry.logCategory !== undefined) {
327
+ throw new Error(`Scheduled task '${entry.name}': "logGroup" and "logCategory" are mutually exclusive on ` +
328
+ "EcsScheduledTaskConfig — the supplied logGroup carries its own log category, so " +
329
+ "logCategory would be silently discarded. Supply one or the other, not both.");
330
+ }
288
331
  }
289
332
  }
333
+ /**
334
+ * Refuses a `serviceDiscovery` registration a task's network mode can't
335
+ * take. `registerService` creates the Cloud Map service with the record type
336
+ * `registeredDnsRecordType` gives, so that is the one judged. A record type
337
+ * outside `CLOUD_MAP_DNS_RECORD_TYPES` is refused without being named.
338
+ */
339
+ function refuseServiceDiscoveryForNetworkMode(subject, requested, taskMode) {
340
+ if (requested !== undefined && !isCloudMapDnsRecordType(requested)) {
341
+ throw new Error(refuseOperatorValue(`${subject} serviceDiscovery.dnsRecordType`, `it must be ${CLOUD_MAP_DNS_RECORD_TYPES.map((type) => `"${type}"`).join(" or ")}`));
342
+ }
343
+ const recordType = registeredDnsRecordType(requested);
344
+ refuseCloudMapForNetworkMode(subject, {
345
+ registration: "serviceDiscovery",
346
+ recordTypeSource: requested === undefined
347
+ ? `serviceDiscovery.dnsRecordType is unset, so Cloud Map registers ${dnsRecordTypeName(recordType)} records`
348
+ : `serviceDiscovery.dnsRecordType is "${requested}"`,
349
+ recordTypeCure: (admitted) => {
350
+ const settable = admitted.filter((type) => isCloudMapDnsRecordType(type));
351
+ return settable.length === 0
352
+ ? undefined
353
+ : `set serviceDiscovery.dnsRecordType to ${settable.map((type) => `"${type}"`).join(" or ")}`;
354
+ }
355
+ }, taskMode, recordType);
356
+ }
290
357
  const DEFAULT_MIGRATE_CONTAINER_NAME = "migrate";
291
358
  /**
292
359
  * Postgres-family scheme test for the gate's v1 eligibility filter. The URL
@@ -399,19 +466,24 @@ function resolveMigrationDatabaseForService(service) {
399
466
  if (connections === undefined || connections.length === 0)
400
467
  return undefined;
401
468
  const matches = [];
402
- for (const spec of connections) {
469
+ const positions = [];
470
+ for (const [index, spec] of connections.entries()) {
403
471
  const resource = isConnectionConfig(spec) ? spec.resource : spec;
404
472
  if (!isDatabase(resource))
405
473
  continue;
406
474
  if (!isRelationalDatabase(resource))
407
475
  continue;
408
- if (resource.getMigrationsConfig() !== undefined)
476
+ if (resource.getMigrationsConfig() !== undefined) {
409
477
  matches.push(resource);
478
+ positions.push(index + 1);
479
+ }
410
480
  }
411
481
  if (matches.length === 0)
412
482
  return undefined;
413
483
  if (matches.length > 1) {
414
- const names = matches.map((d) => d.node.id).join(", ");
484
+ // Located by position in `connections`: a construct id is a name the
485
+ // operator chose (FJL-481).
486
+ const names = `connections ${positions.join(", ")}, counting from 1`;
415
487
  throw new Error(`${schemaGateSubjectLabel(service)}: connections include two or more relational ` +
416
488
  `databases declaring \`migrations:\` (${names}). The schema-version ` +
417
489
  `gate cannot inject ${EXPECTED_SCHEMA_VERSION_ENV} unambiguously. ` +
@@ -420,6 +492,32 @@ function resolveMigrationDatabaseForService(service) {
420
492
  }
421
493
  return matches[0];
422
494
  }
495
+ /**
496
+ * Refuses a hook migration that would run against a GlobalAurora database
497
+ * whose member in this Region is the read-only secondary, which cannot take a
498
+ * schema migration. Such a database contributes its own host, so the
499
+ * migration runs against it unless the service sets
500
+ * `migrations.environment.DATABASE_HOST` itself. The refusal names the
501
+ * database and its primary Region, whose deploy runs the migration against
502
+ * the writable member.
503
+ */
504
+ function refuseMigrationOnReadOnlySecondary(service, migrations, modeLabel) {
505
+ if (migrations.environment?.DATABASE_HOST !== undefined)
506
+ return;
507
+ for (const spec of service.connections ?? []) {
508
+ const resource = isConnectionConfig(spec) ? spec.resource : spec;
509
+ if (!isDatabase(resource) || !isRelationalDatabase(resource))
510
+ continue;
511
+ const primaryRegion = resource.readOnlySecondaryOf;
512
+ if (primaryRegion === undefined)
513
+ continue;
514
+ throw new Error(`Service '${service.name}': its ${modeLabel} migration connects to the ` +
515
+ `database '${resource.node.id}', whose member in this Region is the ` +
516
+ "read-only secondary of a global database, which cannot take a " +
517
+ "schema migration. Declare the migration only on the deploy to the " +
518
+ `primary Region, ${primaryRegion}.`);
519
+ }
520
+ }
423
521
  /**
424
522
  * ClickHouse mirror of `resolveMigrationDatabaseForService`. Two-CH-per-service
425
523
  * is rejected for the same reason: the gate can only inject one
@@ -430,19 +528,24 @@ function resolveClickHouseDatabaseForService(service) {
430
528
  if (connections === undefined || connections.length === 0)
431
529
  return undefined;
432
530
  const matches = [];
433
- for (const spec of connections) {
531
+ const positions = [];
532
+ for (const [index, spec] of connections.entries()) {
434
533
  const resource = isConnectionConfig(spec) ? spec.resource : spec;
435
534
  if (!isDatabase(resource))
436
535
  continue;
437
536
  if (!isClickHouseDatabase(resource))
438
537
  continue;
439
- if (resource.getMigrationsConfig() !== undefined)
538
+ if (resource.getMigrationsConfig() !== undefined) {
440
539
  matches.push(resource);
540
+ positions.push(index + 1);
541
+ }
441
542
  }
442
543
  if (matches.length === 0)
443
544
  return undefined;
444
545
  if (matches.length > 1) {
445
- const names = matches.map((d) => d.node.id).join(", ");
546
+ // Located by position in `connections`: a construct id is a name the
547
+ // operator chose (FJL-481).
548
+ const names = `connections ${positions.join(", ")}, counting from 1`;
446
549
  throw new Error(`${schemaGateSubjectLabel(service)}: connections include two or more ClickHouse ` +
447
550
  `databases declaring \`migrations:\` (${names}). The schema-version ` +
448
551
  `gate cannot inject ${EXPECTED_CH_SCHEMA_VERSION_ENV} unambiguously. ` +
@@ -485,9 +588,9 @@ function mergePgSchemaVersionEnv(params) {
485
588
  `{ materialise: false } if the author value must be ` +
486
589
  `authoritative, or schemaGate: false to silence this warning.`
487
590
  : `The author value wins in this container's env.`;
488
- Annotations.of(annotationsScope).addWarning(`${subject}: author-set ${EXPECTED_SCHEMA_VERSION_ENV}` +
489
- `='${authoredValue}' overrides the value resolved from the connected ` +
490
- `database's \`migrations:\` config ('${resolvedValue}'). ${gateNote}` +
591
+ Annotations.of(annotationsScope).addWarning(`${subject}: author-set ${EXPECTED_SCHEMA_VERSION_ENV} overrides the ` +
592
+ `value resolved from the connected database's \`migrations:\` ` +
593
+ `config. Neither value is repeated here. ${gateNote}` +
491
594
  ` Note that ` +
492
595
  `${EXPECTED_SCHEMA_VERSION_TOOL_ENV} will still be auto-injected ` +
493
596
  `to ensure the runtime gate passes — both envs must emit together.`);
@@ -521,28 +624,29 @@ function mergeChSchemaVersionEnv(params) {
521
624
  if (authoredValue !== undefined &&
522
625
  authoredValue !== resolvedValue &&
523
626
  annotationsScope !== undefined) {
524
- Annotations.of(annotationsScope).addWarning(`${subject}: author-set ${EXPECTED_CH_SCHEMA_VERSION_ENV}` +
525
- `='${authoredValue}' overrides the value resolved from the connected ` +
526
- `ClickHouse database's \`migrations:\` config ('${resolvedValue}'). The ` +
527
- `author value wins; ${params.overrideRemedy}`);
627
+ Annotations.of(annotationsScope).addWarning(`${subject}: author-set ${EXPECTED_CH_SCHEMA_VERSION_ENV} overrides the ` +
628
+ `value resolved from the connected ClickHouse database's ` +
629
+ `\`migrations:\` config. Neither value is repeated here. The author ` +
630
+ `value wins; ${params.overrideRemedy}`);
528
631
  }
529
632
  return mergeAuthorWins(authored, resolved);
530
633
  }
531
- function getResourceLabel(resource) {
532
- if (resource !== null &&
533
- typeof resource === "object" &&
534
- "node" in resource &&
535
- resource.node !== null &&
536
- typeof resource.node === "object" &&
537
- "id" in resource.node &&
538
- typeof resource.node.id === "string") {
539
- return resource.node.id;
540
- }
541
- return resource?.constructor?.name ?? "<unknown>";
542
- }
543
634
  function isSecurityGroupPeer(peer) {
544
635
  return typeof peer.addIngressRule === "function";
545
636
  }
637
+ /**
638
+ * A service as a lifecycle hook refusal locates it, by its place in
639
+ * `services`, counting from 1. Its name is the author's, and the ECS service
640
+ * name grammar holds a pasted secret whole, which the mask cannot see
641
+ * (FJL-481).
642
+ */
643
+ function servicePositionLabel(position) {
644
+ return `Service ${position} (counting from 1 in the order services lists them)`;
645
+ }
646
+ /** Whether a merged key came from a contributor that spells it from fjall's constants. */
647
+ function fjallSpelledKey(origins, key) {
648
+ return origins.get(key)?.fjallSpelled === true;
649
+ }
546
650
  /**
547
651
  * Walks a service's `connections:` array, dispatches through
548
652
  * `isMigrationContributor`, and accumulates a single merged
@@ -554,65 +658,96 @@ function isSecurityGroupPeer(peer) {
554
658
  * contributors disagree on an env key or `secretsImport` entry (two databases
555
659
  * each contributing `DATABASE_HOST` with different values, or two ClickHouse
556
660
  * instances each contributing `SCHEMA_ADMIN_PASSWORD` from different secrets),
557
- * synth throws naming both resources so the author resolves via
661
+ * synth throws locating both resources by their positions in `connections`
662
+ * (never a construct id or a value, FJL-481) so the author resolves via
558
663
  * `migrations.environment.<key>` / `migrations.secretsImport.<key>` or by
559
664
  * splitting the service. `taskRolePolicies` and `egress` are additive — no
560
665
  * conflict resolution needed. Two-DB conflicts on the schema-version gate
561
666
  * already throw upstream in `resolveMigrationDatabaseForService`.
562
667
  */
563
- function collectMigrationContributions(service) {
668
+ function collectMigrationContributions(service, servicePosition, task) {
564
669
  const merged = {
565
670
  environment: {},
566
671
  secretsImport: {},
567
672
  taskRolePolicies: [],
568
673
  egress: []
569
674
  };
675
+ // Each contributor is located by its position in `connections`, counted
676
+ // from 1: its construct id is a name the operator chose, and a contributed
677
+ // value can be the operator's text (a databaseName, an imported secret's
678
+ // name), so a conflict refusal repeats neither (FJL-481).
570
679
  const envOrigin = new Map();
571
680
  const secretOrigin = new Map();
681
+ const collected = () => ({
682
+ ...merged,
683
+ environmentOrigins: envOrigin,
684
+ secretOrigins: secretOrigin
685
+ });
572
686
  const connections = service.connections;
573
- if (connections === undefined || connections.length === 0)
574
- return merged;
575
- for (const spec of connections) {
687
+ if (connections === undefined || connections.length === 0) {
688
+ return collected();
689
+ }
690
+ for (const [index, spec] of connections.entries()) {
576
691
  const resource = isConnectionConfig(spec) ? spec.resource : spec;
577
692
  if (!isMigrationContributor(resource))
578
693
  continue;
579
- const contribution = resource.getMigrationContributions();
694
+ const contribution = resource.getMigrationContributions(task);
580
695
  if (contribution === undefined)
581
696
  continue;
582
- const label = getResourceLabel(resource);
697
+ const position = index + 1;
583
698
  if (contribution.environment !== undefined) {
584
699
  for (const [key, value] of Object.entries(contribution.environment)) {
585
700
  const prior = envOrigin.get(key);
701
+ const fjallSpelled = prior?.fjallSpelled === true ||
702
+ contribution.fjallSpelledEnvironmentKeys?.has(key) === true;
586
703
  if (prior !== undefined && merged.environment[key] !== value) {
587
- throw new Error(`Service '${service.name}': contributors '${prior}' and '${label}' ` +
588
- `both contribute migration env '${key}' with conflicting values ` +
589
- `('${merged.environment[key]}' vs '${value}'). Resolve by setting ` +
590
- `migrations.environment.${key} explicitly on the service.`);
704
+ const located = `${servicePositionLabel(servicePosition)}: connections ${prior.position} ` +
705
+ `and ${position} (counting from 1)`;
706
+ throw new Error(maskSensitiveOutput(fjallSpelled
707
+ ? `${located} contribute migration env '${key}' with ` +
708
+ `conflicting values, which are not repeated here. Resolve by ` +
709
+ `setting migrations.environment.${key} explicitly on the service.`
710
+ : `${located} contribute a migration env entry under one key, ` +
711
+ `with conflicting values. Neither the key nor the values are ` +
712
+ `repeated here, since the key can be built from a name an ` +
713
+ `author chose. Resolve by setting migrations.environment.<key> ` +
714
+ `explicitly on the service, under the key both connections contribute.`));
591
715
  }
592
716
  merged.environment[key] = value;
593
- envOrigin.set(key, prior ?? label);
717
+ envOrigin.set(key, {
718
+ position: prior?.position ?? position,
719
+ fjallSpelled
720
+ });
594
721
  }
595
722
  }
596
723
  if (contribution.secretsImport !== undefined) {
597
724
  for (const [key, value] of Object.entries(contribution.secretsImport)) {
598
- // The literal-external-name outage guard runs POST-merge in
599
- // `wireLifecycleHookMigrations`, not here: a literal a contributor supplies
600
- // can be legitimately overridden by the author (`migrations.secretsImport.<key>
601
- // = { arn }`) or coincide with a manifest-collected service import, both of
602
- // which deploy fine. Throwing pre-merge here would pre-empt those escapes
603
- // (the 2026-06-04 outage shape is only reachable if the merged literal is
604
- // ALSO absent from the deploy manifest — checked once the merge has settled).
605
725
  const prior = secretOrigin.get(key);
726
+ // One key is one string, so it is fjall's when any contributor spells
727
+ // it from a fjall constant.
728
+ const fjallSpelled = prior?.fjallSpelled === true ||
729
+ contribution.fjallSpelledSecretKeys?.has(key) === true;
730
+ const priorImport = merged.secretsImport[key];
606
731
  if (prior !== undefined &&
607
- merged.secretsImport[key]?.name !== value.name) {
608
- throw new Error(`Service '${service.name}': contributors '${prior}' and '${label}' ` +
609
- `both contribute migration secretsImport '${key}' with conflicting ` +
610
- `values (secret '${merged.secretsImport[key]?.name ?? ""}' vs ` +
611
- `'${value.name}'). Resolve by setting migrations.secretsImport.${key} ` +
612
- `explicitly on the service.`);
732
+ priorImport !== undefined &&
733
+ secretImportIdentity(priorImport) !== secretImportIdentity(value)) {
734
+ const located = `${servicePositionLabel(servicePosition)}: connections ${prior.position} ` +
735
+ `and ${position} (counting from 1)`;
736
+ throw new Error(maskSensitiveOutput(fjallSpelled
737
+ ? `${located} contribute migration secretsImport '${key}' ` +
738
+ `naming different secrets, which are not repeated here. Resolve ` +
739
+ `by setting migrations.secretsImport.${key} explicitly on the service.`
740
+ : `${located} contribute a migration secretsImport entry under one ` +
741
+ `key, naming different secrets. Neither the key nor the secrets ` +
742
+ `are repeated here, since the key can be built from a name an ` +
743
+ `author chose. Resolve by setting migrations.secretsImport.<key> ` +
744
+ `explicitly on the service, under the key both connections contribute.`));
613
745
  }
614
746
  merged.secretsImport[key] = value;
615
- secretOrigin.set(key, prior ?? label);
747
+ secretOrigin.set(key, {
748
+ position: prior?.position ?? position,
749
+ fjallSpelled
750
+ });
616
751
  }
617
752
  }
618
753
  if (contribution.taskRolePolicies !== undefined) {
@@ -622,12 +757,16 @@ function collectMigrationContributions(service) {
622
757
  merged.egress.push(...contribution.egress);
623
758
  }
624
759
  }
625
- return merged;
760
+ return collected();
626
761
  }
627
762
  /**
628
763
  * Merge contributor-supplied env/secrets into the author's explicit
629
764
  * `migrations:` block. Author-explicit wins on key collisions with a synth
630
- * warning so the author can audit what was overridden.
765
+ * warning so the author can audit what was overridden. The warning names the
766
+ * key, masked, only where a contributor spells it from fjall's constants, and
767
+ * never a value or Secrets Manager name, since a key can be built from a name
768
+ * an author chose and a value can carry a credential the mask has no anchor
769
+ * for (FJL-481).
631
770
  */
632
771
  function mergeContributionsIntoMigrations(migrations, contributions, scope, serviceName) {
633
772
  const contributedEnv = contributions.environment ?? {};
@@ -637,9 +776,16 @@ function mergeContributionsIntoMigrations(migrations, contributions, scope, serv
637
776
  const mergedEnv = { ...contributedEnv };
638
777
  for (const [key, value] of Object.entries(authoredEnv)) {
639
778
  if (contributedEnv[key] !== undefined && contributedEnv[key] !== value) {
640
- Annotations.of(scope).addWarning(`Service '${serviceName}': author-set migrations.environment.${key}` +
641
- `='${value}' overrides contributor value ` +
642
- `('${contributedEnv[key]}').`);
779
+ const named = fjallSpelledKey(contributions.environmentOrigins, key);
780
+ Annotations.of(scope).addWarning(maskSensitiveOutput(`Service '${serviceName}': ` +
781
+ (named
782
+ ? `author-set migrations.environment.${key} ` +
783
+ `overrides the value a connected resource contributes. ` +
784
+ `Neither value is repeated here.`
785
+ : `an entry the author set in migrations.environment overrides ` +
786
+ `the value a connected resource contributes under the same key. ` +
787
+ `Neither the key nor either value is repeated here, since the ` +
788
+ `key can be built from a name an author chose.`)));
643
789
  }
644
790
  mergedEnv[key] = value;
645
791
  }
@@ -649,18 +795,36 @@ function mergeContributionsIntoMigrations(migrations, contributions, scope, serv
649
795
  const mergedSecrets = {};
650
796
  for (const [key, value] of Object.entries(contributedSecrets)) {
651
797
  if (authoredSsm.has(key)) {
652
- Annotations.of(scope).addWarning(`Service '${serviceName}': author-set migrations.secrets entry ${key} ` +
653
- `overrides contributor secret ('${value.name ?? ""}').`);
798
+ const named = fjallSpelledKey(contributions.secretOrigins, key);
799
+ Annotations.of(scope).addWarning(maskSensitiveOutput(`Service '${serviceName}': ` +
800
+ (named
801
+ ? `author-set migrations.secrets entry ${key} ` +
802
+ `overrides the secret a connected resource contributes. ` +
803
+ `The contributed Secrets Manager name is not repeated here.`
804
+ : `an entry the author set in migrations.secrets overrides the ` +
805
+ `secret a connected resource contributes under the same key. ` +
806
+ `Neither the key nor the contributed Secrets Manager name is ` +
807
+ `repeated here, since the key can be built from a name an ` +
808
+ `author chose.`)));
654
809
  continue;
655
810
  }
656
811
  mergedSecrets[key] = value;
657
812
  }
658
813
  for (const [key, value] of Object.entries(authoredSecrets)) {
659
- if (contributedSecrets[key] !== undefined &&
660
- contributedSecrets[key]?.name !== value.name) {
661
- Annotations.of(scope).addWarning(`Service '${serviceName}': author-set migrations.secretsImport.${key} ` +
662
- `(secret '${value.name}') overrides contributor secret ` +
663
- `('${contributedSecrets[key]?.name ?? ""}').`);
814
+ const contributed = contributedSecrets[key];
815
+ if (contributed !== undefined &&
816
+ secretImportIdentity(contributed) !== secretImportIdentity(value)) {
817
+ const named = fjallSpelledKey(contributions.secretOrigins, key);
818
+ Annotations.of(scope).addWarning(maskSensitiveOutput(`Service '${serviceName}': ` +
819
+ (named
820
+ ? `author-set migrations.secretsImport.${key} ` +
821
+ `overrides the secret a connected resource contributes. ` +
822
+ `Neither Secrets Manager name is repeated here.`
823
+ : `an entry the author set in migrations.secretsImport overrides ` +
824
+ `the secret a connected resource contributes under the same ` +
825
+ `key. Neither the key nor either Secrets Manager name is ` +
826
+ `repeated here, since the key can be built from a name an ` +
827
+ `author chose.`)));
664
828
  }
665
829
  mergedSecrets[key] = value;
666
830
  }
@@ -674,8 +838,9 @@ function mergeContributionsIntoMigrations(migrations, contributions, scope, serv
674
838
  }
675
839
  /**
676
840
  * Merge contributor-supplied IAM policies and egress entries into the author's
677
- * `separateTaskDef` block. Both fields are additive — contributor entries are
678
- * appended to the author's list.
841
+ * `separateTaskDef` block. Both fields are additive, and the author's entries
842
+ * follow the contributors'. An entry's index in `egressTo` names its peer's
843
+ * ingress rule, so an author's entry ahead of them would replace their rules.
679
844
  */
680
845
  function mergeContributionsIntoSeparateTaskDef(separateTaskDef, contributions) {
681
846
  const contributedPolicies = contributions.taskRolePolicies ?? [];
@@ -694,45 +859,6 @@ function mergeContributionsIntoSeparateTaskDef(separateTaskDef, contributions) {
694
859
  ...(mergedEgress.length > 0 && { egressTo: mergedEgress })
695
860
  };
696
861
  }
697
- /**
698
- * Outage guard (2026-06-04): a literal (non-token) secret NAME in the migrate task's
699
- * merged `secretsImport` renders a suffixless partial ARN that AccessDenies at task
700
- * launch UNLESS @fjall/deploy-core resolves it to a complete ARN. deploy-core resolves
701
- * exactly the names the build manifest carries in `importedSecretNames` — which the
702
- * factory (compute.ts) collects from the service's own container + author-declared
703
- * `migrations.secretsImport`, but NOT from contributor-derived credentials (merged AFTER
704
- * the manifest was written). So a merged literal absent from that name-set is
705
- * unresolvable and would ship the outage shape; fail loud at synth instead.
706
- *
707
- * Passes (correctly): an author `{ arn }` override (complete ARN, no name to resolve), a
708
- * managed `getImport()` token (`Token.isUnresolved`), and a contributor literal that
709
- * COINCIDES with a manifest-collected service import (deploy-core resolves it anyway).
710
- * The reconstruction here reuses the factory's own `collectImportedSecretNames`, so the
711
- * name-set stays identical to what was actually written.
712
- */
713
- function assertMigrationSecretsResolvable(service, effectiveMigrations) {
714
- const manifestResolvableNames = new Set();
715
- for (const container of service.containers ?? []) {
716
- collectImportedSecretNames(container.secretsImport, manifestResolvableNames);
717
- }
718
- collectImportedSecretNames(service.migrations?.secretsImport, manifestResolvableNames);
719
- for (const [key, value] of Object.entries(effectiveMigrations.secretsImport ?? {})) {
720
- if (value.name !== undefined &&
721
- !Token.isUnresolved(value.name) &&
722
- !manifestResolvableNames.has(value.name)) {
723
- throw new Error(`Service '${service.name}': migration secretsImport '${key}' resolves to the ` +
724
- `literal external secret name '${value.name}', contributed by a connected ` +
725
- `database but neither declared on the service nor present in the deploy ` +
726
- `manifest — deploy-core never resolves it to a complete ARN, so it renders a ` +
727
- `suffixless partial ARN that AccessDenies at task launch (the 2026-06-04 ` +
728
- `outage shape). This usually means the migration task targets a database whose ` +
729
- `credentials are an imported/replicated secret (e.g. a GlobalAurora read-only ` +
730
- `secondary). Run migrations against the primary region (a read-only secondary ` +
731
- `cannot accept schema migrations), or pin the credential on the service: ` +
732
- `migrations.secretsImport.${key} = { arn: "<complete-secret-arn>" }.`);
733
- }
734
- }
735
- }
736
862
  /**
737
863
  * Build container configurations for an ECS service.
738
864
  * Converts user-facing EcsContainerConfig to internal EcsClusterProps format.
@@ -790,6 +916,11 @@ export function buildContainerConfigs(service, schemaVersionEnv, annotationsScop
790
916
  name: SCHEMA_GATE_CONTAINER_NAME,
791
917
  image: schemaGate.image,
792
918
  verbatimImage: true,
919
+ // a gate image the author brought is not ours to vouch for
920
+ ...(schemaGate.defaultImageTag !== undefined &&
921
+ SCHEMA_GATE_ECR_TAG_MUTABILITY === "IMMUTABLE" && {
922
+ immutableImageTag: true
923
+ }),
793
924
  // SUCCESS dependencies require a non-essential target
794
925
  essential: false,
795
926
  environment: schemaGate.environment,
@@ -864,7 +995,7 @@ function builtContainerName(serviceName, container, index) {
864
995
  * their containers are built in the order they are authored, so the
865
996
  * primary's place in `containers` is its place when built.
866
997
  */
867
- function primaryContainerDefinition(svcConfig, taskDefinition) {
998
+ function primaryContainerDefinition(svcConfig, servicePosition, taskDefinition) {
868
999
  const containers = svcConfig.containers ?? [];
869
1000
  const primary = primaryContainerConfig(containers);
870
1001
  if (primary === undefined)
@@ -872,7 +1003,9 @@ function primaryContainerDefinition(svcConfig, taskDefinition) {
872
1003
  const name = builtContainerName(svcConfig.name, primary, containers.indexOf(primary));
873
1004
  const definition = taskDefinition.findContainer(name);
874
1005
  if (definition === undefined) {
875
- throw new Error(`Service '${svcConfig.name}': its task definition has no container '${name}' for its primary container`);
1006
+ throw new Error(`${servicePositionLabel(servicePosition)}: its task definition has no ` +
1007
+ `container under the name its primary container is built under. ` +
1008
+ `Neither the service's name nor the container's is repeated here.`);
876
1009
  }
877
1010
  return definition;
878
1011
  }
@@ -901,7 +1034,7 @@ function secretsBeneathMigration(authored, primary) {
901
1034
  ...(Object.keys(secretsImport).length > 0 && { secretsImport })
902
1035
  };
903
1036
  }
904
- function resolveMigrationImage(svcConfig, migrations, inheritedImage) {
1037
+ function resolveMigrationImage(svcConfig, servicePosition, migrations, inheritedImage) {
905
1038
  if (migrations.image !== undefined)
906
1039
  return migrations.image;
907
1040
  // Order dependency: inheritedImage carries the <ServiceName>ImageTag
@@ -911,12 +1044,12 @@ function resolveMigrationImage(svcConfig, migrations, inheritedImage) {
911
1044
  const primary = primaryContainerConfig(svcConfig.containers);
912
1045
  const containerImage = primary?.image ?? svcConfig.image;
913
1046
  if (containerImage !== undefined && typeof containerImage !== "string") {
914
- throw new Error(`Service '${svcConfig.name}': a lifecycle-hook migration needs a string image URI ` +
1047
+ throw new Error(`${servicePositionLabel(servicePosition)}: a lifecycle-hook migration needs a string image URI ` +
915
1048
  `(got CDK Repository). Pass migrations.image as a string.`);
916
1049
  }
917
1050
  if (containerImage === undefined) {
918
- throw new Error(`Service '${svcConfig.name}': a lifecycle-hook migration needs a resolvable image — ` +
919
- `set migrations.image, service.image, or a container.image (string URI).`);
1051
+ throw new Error(`${servicePositionLabel(servicePosition)}: a lifecycle-hook migration needs a resolvable image. ` +
1052
+ `Set migrations.image, service.image, or a container.image (string URI).`);
920
1053
  }
921
1054
  return containerImage;
922
1055
  }
@@ -959,11 +1092,24 @@ export class EcsCompute extends Construct {
959
1092
  ecsCluster;
960
1093
  clusterId;
961
1094
  appName;
962
- migrationTaskDefinitions = new Map();
1095
+ /**
1096
+ * Service name → its hook migration's task definition and the name of the
1097
+ * container that runs the migration, recorded where both are built.
1098
+ */
1099
+ hookMigrations = new Map();
963
1100
  /** The cluster's physical name, as a literal. */
964
1101
  clusterName;
965
- /** Service name → its rollout barrier, made on first use. */
1102
+ appBackupTier;
1103
+ /**
1104
+ * Service name → its rollout barrier, which completes once the service's
1105
+ * deployment has finished, made on first use.
1106
+ */
966
1107
  rolloutBarriers = new Map();
1108
+ /**
1109
+ * Service name → its migration barrier, which completes once the migration
1110
+ * its PRE_SCALE_UP hook ran has exited 0, made on first use.
1111
+ */
1112
+ migrationBarriers = new Map();
967
1113
  /**
968
1114
  * Service name → exact `@fjall/schema-gate` semver, for every service that
969
1115
  * materialised the gate container with the DEFAULT image this synth.
@@ -978,6 +1124,7 @@ export class EcsCompute extends Construct {
978
1124
  validateEcsProps(props);
979
1125
  this.clusterId = id;
980
1126
  this.appName = props.appName;
1127
+ this.appBackupTier = props.appBackupTier;
981
1128
  const schemaGateImageTags = new Map();
982
1129
  this.schemaGateImageTags = schemaGateImageTags;
983
1130
  const services = props.services.map((service) => {
@@ -1026,14 +1173,14 @@ export class EcsCompute extends Construct {
1026
1173
  alarms: service.alarms,
1027
1174
  logAlarms: service.logAlarms,
1028
1175
  logMetricNamespace: service.logMetricNamespace,
1176
+ ...(service.logCategory !== undefined && {
1177
+ logCategory: service.logCategory
1178
+ }),
1029
1179
  circuitBreaker: service.circuitBreaker,
1030
1180
  ...(service.deployment !== undefined && {
1031
1181
  deployment: service.deployment
1032
1182
  }),
1033
1183
  ...(cloudMapService !== undefined && { cloudMapService }),
1034
- ...(service.serviceDiscovery?.dnsRecordType !== undefined && {
1035
- cloudMapDnsRecordType: service.serviceDiscovery.dnsRecordType
1036
- }),
1037
1184
  ...(service.networkMode !== undefined && {
1038
1185
  networkMode: service.networkMode
1039
1186
  }),
@@ -1056,20 +1203,24 @@ export class EcsCompute extends Construct {
1056
1203
  }),
1057
1204
  ...(props.cluster.loadBalancerAccessLogs !== undefined && {
1058
1205
  loadBalancerAccessLogs: props.cluster.loadBalancerAccessLogs
1206
+ }),
1207
+ ...(props.cluster.loadBalancerMigration !== undefined && {
1208
+ loadBalancerMigration: props.cluster.loadBalancerMigration
1059
1209
  })
1060
1210
  }
1061
1211
  : undefined;
1062
1212
  const resolvedAlertsTopic = resolveAlertsTopic(this, `${id}AlertsTopic`, props.alertsTopic);
1213
+ const resolvedApplicationId = props.applicationId ??
1214
+ (App.hasInstance() ? App.getInstance().getName() : undefined);
1063
1215
  const ecsProps = {
1064
- clusterName: id,
1216
+ clusterName: ResourceNaming.ecsClusterName(id),
1065
1217
  appName: props.appName,
1066
1218
  vpc: props.vpc,
1067
1219
  ecrRepository: props.ecrRepository || COMPUTE_DEFAULTS.ECS.FALLBACK_IMAGE,
1068
1220
  cluster,
1069
1221
  services,
1070
1222
  alertsTopic: resolvedAlertsTopic,
1071
- applicationId: props.applicationId ??
1072
- (App.hasInstance() ? App.getInstance().getName() : undefined),
1223
+ applicationId: resolvedApplicationId,
1073
1224
  ...(props.taskStopWatchdog === false && { taskStopWatchdog: false }),
1074
1225
  ...(props.deployableServices === false && { deployableServices: false }),
1075
1226
  ...(props.containerInsights !== undefined && {
@@ -1084,7 +1235,7 @@ export class EcsCompute extends Construct {
1084
1235
  this.connections = this.ecsCluster.connections;
1085
1236
  this.wireLifecycleHookMigrations(props.services);
1086
1237
  this.wireServiceMigrationDependencies(props.services);
1087
- this.materialiseScheduledTasks(id, props);
1238
+ this.materialiseScheduledTasks(id, props, resolvedAlertsTopic, resolvedApplicationId);
1088
1239
  }
1089
1240
  /**
1090
1241
  * Walks a service's `connections:` for a relational database carrying a
@@ -1248,21 +1399,64 @@ export class EcsCompute extends Construct {
1248
1399
  };
1249
1400
  }
1250
1401
  /**
1251
- * Encryption for a log group this pattern creates beside the cluster's
1252
- * own (scheduled-task and migration-task logs): the stack's shared key
1253
- * when the app backup tier encrypts, nothing otherwise — the same key the
1254
- * cluster resolved for its service and exec-audit groups.
1402
+ * What a log group this pattern creates beside the cluster's own
1403
+ * (scheduled-task and migration-task logs) renders while its log category
1404
+ * is head: the stack's shared key when the app backup tier encrypts,
1405
+ * nothing otherwise — the same key the cluster resolved for its service and
1406
+ * exec-audit groups.
1407
+ */
1408
+ tierLogGroupHead(retention) {
1409
+ return {
1410
+ retention,
1411
+ removalPolicy: "env-default",
1412
+ encryption: this.ecsCluster.encryptionKey !== undefined
1413
+ ? "tier-key"
1414
+ : "service-default"
1415
+ };
1416
+ }
1417
+ /**
1418
+ * The log group a scheduled task writes to when its author supplied none.
1419
+ * Only a group Fjall creates is stamped into the operator's reach; a
1420
+ * supplied group is the author's to tag.
1255
1421
  */
1256
- tierLogGroupEncryption() {
1257
- const key = this.ecsCluster.encryptionKey;
1258
- return key === undefined ? {} : { encryptionKey: key.forLogGroups() };
1422
+ createScheduledTaskLogGroup(id, entry) {
1423
+ const logCategory = routedLogCategory(entry.logCategory, `Scheduled task '${entry.name}'`);
1424
+ const logGroup = new LogGroup(this, `${id}${toPascalCase(entry.name)}LogGroup`, {
1425
+ logCategory,
1426
+ tierSource: this.ecsCluster.logTierSource,
1427
+ ...logGroupValues(logCategory, this.tierLogGroupHead(DEFAULT_LOG_RETENTION), {
1428
+ ...(entry.logRetention !== undefined && {
1429
+ retention: entry.logRetention
1430
+ })
1431
+ })
1432
+ });
1433
+ stampOperatorScope(logGroup, "AWS::Logs::LogGroup");
1434
+ return logGroup;
1259
1435
  }
1260
- materialiseScheduledTasks(id, props) {
1436
+ /**
1437
+ * Builds each scheduled task's definition and its `Schedule`.
1438
+ *
1439
+ * Takes the cluster's already-resolved `alertsTopic` and `applicationId`
1440
+ * rather than re-resolving them: `resolveAlertsTopic` calls
1441
+ * `Topic.fromTopicArn` under a fixed construct id, which is not cached, so a
1442
+ * second call in this scope throws on the duplicate construct name.
1443
+ *
1444
+ * A schedule reaching a target through EventBridge can fail in ways the task
1445
+ * itself never sees — a throttled rule, a target invocation AWS could not
1446
+ * deliver, a payload dead-lettered after its retries. The DLQ retains that
1447
+ * payload by default and the alarms report it whenever the cluster carries a
1448
+ * topic; `deadLetterQueue: false` and `alarms: false` on the entry opt out of
1449
+ * each independently.
1450
+ */
1451
+ materialiseScheduledTasks(id, props, alertsTopic, applicationId) {
1261
1452
  const scheduledTasks = props.cluster?.scheduledTasks;
1262
1453
  if (!scheduledTasks || scheduledTasks.length === 0)
1263
1454
  return;
1264
- const app = App.getInstance();
1455
+ const appName = props.appName ?? applicationId;
1265
1456
  for (const entry of scheduledTasks) {
1457
+ for (const warning of scheduledTaskDockerSocketWarnings(entry, props.services)) {
1458
+ Annotations.of(this).addWarningV2(DOCKER_SOCKET_ON_FENCED_CAPACITY_WARNING_ID, warning);
1459
+ }
1266
1460
  const taskDef = this.buildScheduledTaskDefinition(id, entry);
1267
1461
  this.ecsCluster.registerScheduledTaskDefinition(entry.name, taskDef);
1268
1462
  // Construct under `this` (NOT app.addSchedule) so the schedule lives
@@ -1276,7 +1470,15 @@ export class EcsCompute extends Construct {
1276
1470
  serviceName: entry.name,
1277
1471
  taskCount: 1
1278
1472
  },
1279
- applicationId: app.getName()
1473
+ ...(alertsTopic !== undefined && { alertsTopic }),
1474
+ ...(entry.alarms === false
1475
+ ? { alarms: false }
1476
+ : entry.alarms !== undefined && { alarmConfig: entry.alarms }),
1477
+ ...(entry.deadLetterQueue !== false && {
1478
+ deadLetterQueue: { enabled: true }
1479
+ }),
1480
+ ...(applicationId !== undefined && { applicationId }),
1481
+ ...(appName !== undefined && { appName })
1280
1482
  });
1281
1483
  }
1282
1484
  }
@@ -1297,15 +1499,8 @@ export class EcsCompute extends Construct {
1297
1499
  });
1298
1500
  }
1299
1501
  }
1300
- // `logRetention` must not reach the driver: AwsLogDriver.bind() creates
1301
- // a raw RETAIN LogGroup inside aws-cdk-lib, escaping the env-aware
1302
- // removal default (D17).
1303
- const logGroup = entry.logGroup ??
1304
- new LogGroup(this, `${id}${toPascalCase(entry.name)}LogGroup`, {
1305
- retention: entry.logRetention ?? DEFAULT_LOG_RETENTION,
1306
- ...this.tierLogGroupEncryption()
1307
- });
1308
- const logging = new AwsLogDriver({
1502
+ const logGroup = entry.logGroup ?? this.createScheduledTaskLogGroup(id, entry);
1503
+ const logging = awsLogDriver({
1309
1504
  streamPrefix: `/ecs-scheduled/${id}/${entry.name}`,
1310
1505
  logGroup
1311
1506
  });
@@ -1319,6 +1514,10 @@ export class EcsCompute extends Construct {
1319
1514
  ...(secrets !== undefined && { secrets }),
1320
1515
  logging
1321
1516
  });
1517
+ // CDK makes the execution role only once a container asks for one, for its
1518
+ // image, log driver or secrets (aws-cdk-lib 2.273.0).
1519
+ describeImplicitRole(taskDef.taskRole, `Task role of the scheduled ECS task ${taskDef.family}`);
1520
+ describeImplicitRole(taskDef.executionRole, `Execution role of the scheduled ECS task ${taskDef.family}`);
1322
1521
  if (entry.connections !== undefined && entry.connections.length > 0) {
1323
1522
  try {
1324
1523
  processConnections(entry.connections, taskDef.taskRole, this.ecsCluster.getEc2CapacityConnectable());
@@ -1377,8 +1576,14 @@ export class EcsCompute extends Construct {
1377
1576
  * Without `awaitMigrationsFrom` the sibling rolls out in parallel with the
1378
1577
  * owner, so its gate-refused task churn can trip the deployment circuit
1379
1578
  * breaker before the migration lands. The gate refusing is by design (new
1380
- * code must not serve the old schema); the missing ordering on the owner's
1381
- * rollout barrier is the author-fixable part — warn, don't disable.
1579
+ * code must not serve the old schema); the missing ordering after the
1580
+ * owner's migration is the author-fixable part — warn, don't disable. The
1581
+ * warning names what each choice waits for: `awaitMigrationsFrom` waits for
1582
+ * a `lifecycle-hook` owner's migration and a `post-deploy` owner's whole
1583
+ * deployment, and `getRolloutBarrier` for the owner's whole deployment. It
1584
+ * offers `getRolloutBarrier` beside `awaitMigrationsFrom` only for a
1585
+ * `lifecycle-hook` owner, because a `post-deploy` owner's dependant already
1586
+ * waits on that barrier.
1382
1587
  */
1383
1588
  warnUngatedSiblingsOfHookOwners(services) {
1384
1589
  for (const owner of services) {
@@ -1402,14 +1607,25 @@ export class EcsCompute extends Construct {
1402
1607
  resolveClickHouseDatabaseForService(sibling) === ownerCh;
1403
1608
  if (!sharesDb && !sharesCh)
1404
1609
  continue;
1610
+ const ownerRunsPreScaleUp = ownerMigrations.mode === "lifecycle-hook";
1611
+ const awaitedPoint = ownerRunsPreScaleUp
1612
+ ? `'${owner.name}''s migration has exited 0, while ` +
1613
+ `'${owner.name}' is still rolling out`
1614
+ : `'${owner.name}''s deployment has finished`;
1615
+ const releaseServingAdvice = ownerRunsPreScaleUp
1616
+ ? ` If it also needs '${owner.name}''s new release serving, keep ` +
1617
+ `that and add a dependency on ` +
1618
+ `getRolloutBarrier("${owner.name}"), which waits for ` +
1619
+ `'${owner.name}''s whole deployment.`
1620
+ : "";
1405
1621
  Annotations.of(this).addWarning(`Service '${sibling.name}': consumes a database whose migrations ` +
1406
1622
  `run via service '${owner.name}''s deployment hook, but does ` +
1407
1623
  `not declare awaitMigrationsFrom: "${owner.name}". Its ` +
1408
1624
  `materialised schema gate will refuse tasks that scale up ` +
1409
1625
  `before the migration lands, which can trip the deployment ` +
1410
1626
  `circuit breaker. Add awaitMigrationsFrom: "${owner.name}" so ` +
1411
- `it rolls out only once '${owner.name}''s deployment has ` +
1412
- `finished; if it already awaits another service, depend on ` +
1627
+ `it rolls out only once ${awaitedPoint}.${releaseServingAdvice} ` +
1628
+ `If it already awaits another service, depend on ` +
1413
1629
  `getRolloutBarrier("${owner.name}") instead. Or set ` +
1414
1630
  `schemaGate: { materialise: false }.`);
1415
1631
  }
@@ -1431,18 +1647,19 @@ export class EcsCompute extends Construct {
1431
1647
  */
1432
1648
  wireLifecycleHookMigrations(services) {
1433
1649
  this.warnUngatedSiblingsOfHookOwners(services);
1434
- for (const svcConfig of services) {
1650
+ for (const [index, svcConfig] of services.entries()) {
1435
1651
  const migrations = svcConfig.migrations;
1436
1652
  if (!migrations || !isHookMigrations(migrations))
1437
1653
  continue;
1438
1654
  const modeLabel = migrations.mode;
1655
+ const servicePosition = index + 1;
1439
1656
  if (svcConfig.capacityProvider === "EC2") {
1440
- throw new Error(`Service '${svcConfig.name}': migrations.mode === "${modeLabel}" requires FARGATE or FARGATE_SPOT capacity (got "EC2"). ` +
1657
+ throw new Error(`${servicePositionLabel(servicePosition)}: migrations.mode === "${modeLabel}" requires FARGATE or FARGATE_SPOT capacity (got "EC2"). ` +
1441
1658
  `Use migrations.mode === "init-container" (the default) for EC2 services.`);
1442
1659
  }
1443
1660
  if (migrations.image !== undefined &&
1444
1661
  typeof migrations.image !== "string") {
1445
- throw new Error(`Service '${svcConfig.name}': migrations.image must be a string in ${modeLabel} mode. ` +
1662
+ throw new Error(`${servicePositionLabel(servicePosition)}: migrations.image must be a string in ${modeLabel} mode. ` +
1446
1663
  `CDK Repository constructs are not supported here — pass the image URI as a string.`);
1447
1664
  }
1448
1665
  const service = this.ecsCluster.getService(svcConfig.name);
@@ -1459,41 +1676,53 @@ export class EcsCompute extends Construct {
1459
1676
  if (service.connections.securityGroups.length === 0) {
1460
1677
  throw new Error(`EcsCompute: service "${svcConfig.name}" has no security groups; lifecycle-hook migration RunTask requires at least one.`);
1461
1678
  }
1462
- const contributions = collectMigrationContributions(svcConfig);
1679
+ refuseMigrationOnReadOnlySecondary(svcConfig, migrations, modeLabel);
1680
+ const contributions = collectMigrationContributions(svcConfig, servicePosition, { ownRoles: migrations.separateTaskDef !== undefined });
1463
1681
  const effectiveMigrations = mergeContributionsIntoMigrations(migrations, contributions, this, svcConfig.name);
1464
- assertMigrationSecretsResolvable(svcConfig, effectiveMigrations);
1465
1682
  const effectiveSeparateTaskDef = migrations.separateTaskDef !== undefined
1466
1683
  ? mergeContributionsIntoSeparateTaskDef(migrations.separateTaskDef, contributions)
1467
1684
  : undefined;
1468
1685
  const schemaVersionEnv = this.resolveSchemaVersionEnv(svcConfig);
1469
1686
  const migrationTaskDefinition = effectiveSeparateTaskDef !== undefined
1470
- ? this.synthesiseMigrationTaskDef(svcConfig, effectiveMigrations, effectiveSeparateTaskDef, service, cluster.vpc, schemaVersionEnv)
1471
- : this.synthesiseInheritedMigrationTaskDef(svcConfig, migrations, effectiveMigrations, service, schemaVersionEnv);
1687
+ ? this.synthesiseMigrationTaskDef(svcConfig, servicePosition, effectiveMigrations, effectiveSeparateTaskDef, service, cluster.vpc, schemaVersionEnv)
1688
+ : this.synthesiseInheritedMigrationTaskDef(svcConfig, servicePosition, migrations, effectiveMigrations, service, schemaVersionEnv);
1472
1689
  new EcsLifecycleHookMigration(this, `${toPascalCase(svcConfig.name)}Migrate`, {
1473
1690
  service,
1474
- primaryContainer: primaryContainerDefinition(svcConfig, taskDefinition),
1691
+ primaryContainer: primaryContainerDefinition(svcConfig, servicePosition, taskDefinition),
1475
1692
  serviceName: svcConfig.name,
1476
1693
  clusterName: this.clusterName,
1477
1694
  clusterArn: cluster.clusterArn,
1478
1695
  migrationTaskDefinition,
1479
1696
  timeoutSeconds: effectiveMigrations.timeoutSeconds,
1480
- lifecycleStage: lifecycleStageForHookMode(effectiveMigrations.mode)
1697
+ lifecycleStage: lifecycleStageForHookMode(effectiveMigrations.mode),
1698
+ appBackupTier: tierOrScope(this.appBackupTier)
1481
1699
  });
1482
1700
  }
1483
1701
  }
1484
1702
  /**
1485
1703
  * Orders each service that declares `awaitMigrationsFrom` after the named
1486
- * migrate-owning service's rollout, so a DB-connecting worker never starts
1487
- * before the owner's migrations have applied. Each owner gets one rollout
1488
- * barrier (`EcsRolloutBarrier`): a custom resource that completes only once
1489
- * ECS reports the owner's deployment of its task definition finished, its
1490
- * lifecycle-hook migration included, and fails once ECS rolled that
1491
- * deployment back. Every dependant's `DependsOn` names the barrier.
1704
+ * owner's migration, so a database-connecting worker never starts before
1705
+ * the owner's migrations have applied. Every dependant's `DependsOn` names
1706
+ * one of the owner's barriers (`EcsRolloutBarrier`), custom resources whose
1707
+ * dependants wait for their response.
1708
+ *
1709
+ * - A `lifecycle-hook` owner's is its migration barrier. It completes once
1710
+ * the migration its PRE_SCALE_UP hook ran for the owner's new revision has
1711
+ * exited 0, so the dependant rolls out during the owner's rollout and may
1712
+ * start while the owner's old tasks still serve, or before any task of the
1713
+ * owner serves on a first create.
1714
+ * - A `post-deploy` owner's is its rollout barrier. It completes once ECS
1715
+ * reports the owner's deployment of its task definition finished, and
1716
+ * fails once ECS rolled that deployment back, because ECS documents no
1717
+ * order of the stages after POST_SCALE_UP for a rolling deployment.
1492
1718
  *
1493
- * A `DependsOn` on the owner service itself no longer orders this: since
1494
- * 2026-10-01 CloudFormation starts the dependants of an updating ECS
1495
- * service at its eventual-consistency check, 20-31 s into the update, while
1496
- * a custom resource's dependants wait for its response (FJL-901).
1719
+ * A `DependsOn` on the owner service itself orders neither, because
1720
+ * CloudFormation can start an updating ECS service's dependants at its
1721
+ * eventual consistency check, before the service completes. From 1829
1722
+ * AEST on 1 October 2026 to 0358 AEST on 2 October, production's ECS
1723
+ * service updates ran that check 20 to 37 s into the update. From 1335
1724
+ * AEST on 2 October each ran it within about a second of completing
1725
+ * (FJL-901 design, production events read to 4 October 2026).
1497
1726
  *
1498
1727
  * Shape (target exists, declares hook migrations, no self / cycle) is
1499
1728
  * already guaranteed by `validateEcsProps`.
@@ -1507,10 +1736,19 @@ export class EcsCompute extends Construct {
1507
1736
  if (dependent === undefined) {
1508
1737
  throw new Error(`Service '${svcConfig.name}' not found in cluster after synthesis — cannot order its rollout.`);
1509
1738
  }
1510
- dependent.node.addDependency(this.rolloutBarrierOf(ownerName));
1739
+ const owner = services.find((service) => service.name === ownerName);
1740
+ const ownerRunsPreScaleUp = owner?.migrations !== undefined &&
1741
+ isHookMigrations(owner.migrations) &&
1742
+ owner.migrations.mode === "lifecycle-hook";
1743
+ dependent.node.addDependency(ownerRunsPreScaleUp
1744
+ ? this.migrationBarrierOf(ownerName)
1745
+ : this.rolloutBarrierOf(ownerName));
1511
1746
  }
1512
1747
  }
1513
- /** The service's one rollout barrier, made on first use. */
1748
+ /**
1749
+ * The service's one rollout barrier, made on first use: it completes once
1750
+ * ECS reports the service's deployment of its task definition finished.
1751
+ */
1514
1752
  rolloutBarrierOf(serviceName) {
1515
1753
  const existing = this.rolloutBarriers.get(serviceName);
1516
1754
  if (existing !== undefined)
@@ -1520,6 +1758,7 @@ export class EcsCompute extends Construct {
1520
1758
  throw new Error(`Service '${serviceName}' is not a service of this cluster, so it has no rollout barrier.`);
1521
1759
  }
1522
1760
  const barrier = new EcsRolloutBarrier(this, `${toPascalCase(serviceName)}RolloutBarrier`, {
1761
+ completesAfter: "rollout",
1523
1762
  service,
1524
1763
  serviceName,
1525
1764
  clusterName: this.clusterName,
@@ -1528,6 +1767,31 @@ export class EcsCompute extends Construct {
1528
1767
  this.rolloutBarriers.set(serviceName, barrier);
1529
1768
  return barrier;
1530
1769
  }
1770
+ /**
1771
+ * The service's one migration barrier, made on first use: it completes once
1772
+ * the migration its PRE_SCALE_UP hook ran for the service's new revision
1773
+ * has exited 0, and has no edge to the service.
1774
+ */
1775
+ migrationBarrierOf(serviceName) {
1776
+ const existing = this.migrationBarriers.get(serviceName);
1777
+ if (existing !== undefined)
1778
+ return existing;
1779
+ const service = this.ecsCluster.getService(serviceName);
1780
+ const migration = this.hookMigrations.get(serviceName);
1781
+ if (service === undefined || migration === undefined) {
1782
+ throw new Error(`Service '${serviceName}' runs no lifecycle-hook migration in this cluster, so it has no migration barrier.`);
1783
+ }
1784
+ const barrier = new EcsRolloutBarrier(this, `${toPascalCase(serviceName)}MigrationBarrier`, {
1785
+ completesAfter: "migrations",
1786
+ serviceName,
1787
+ clusterName: this.clusterName,
1788
+ taskDefinitionArn: service.taskDefinition.taskDefinitionArn,
1789
+ migrationContainerName: migration.containerName,
1790
+ migrationFamily: this.migrationFamilyOf(serviceName)
1791
+ });
1792
+ this.migrationBarriers.set(serviceName, barrier);
1793
+ return barrier;
1794
+ }
1531
1795
  /**
1532
1796
  * Synthesise a dedicated migration task definition for a lifecycle-hook
1533
1797
  * migration when `separateTaskDef` is set. Creates the migration's own
@@ -1535,18 +1799,22 @@ export class EcsCompute extends Construct {
1535
1799
  * present, else reuses the service's SGs), and the Fargate task definition
1536
1800
  * with the migration container baked in.
1537
1801
  */
1538
- synthesiseMigrationTaskDef(svcConfig, migrations, separateTaskDef, service, vpc, schemaVersionEnv) {
1802
+ synthesiseMigrationTaskDef(svcConfig, servicePosition, migrations, separateTaskDef, service, vpc, schemaVersionEnv) {
1539
1803
  const stack = Stack.of(this);
1540
1804
  const idPrefix = `${toPascalCase(svcConfig.name)}Migrate`;
1541
1805
  const containerName = migrations.name ?? DEFAULT_MIGRATE_CONTAINER_NAME;
1542
- const family = `${this.clusterId}-${svcConfig.name}-migrate`;
1543
- const inheritedImage = primaryContainerDefinition(svcConfig, service.taskDefinition)?.imageName;
1544
- const image = resolveMigrationImage(svcConfig, migrations, inheritedImage);
1806
+ const family = this.migrationFamilyOf(svcConfig.name);
1807
+ const inheritedImage = primaryContainerDefinition(svcConfig, servicePosition, service.taskDefinition)?.imageName;
1808
+ const image = resolveMigrationImage(svcConfig, servicePosition, migrations, inheritedImage);
1809
+ const logCategory = routedLogCategory(svcConfig.logCategory, `Service '${svcConfig.name}'`);
1545
1810
  const logGroup = new LogGroup(this, `${idPrefix}LogGroup`, {
1546
- retention: RetentionDays.ONE_MONTH,
1547
- ...this.tierLogGroupEncryption()
1811
+ logCategory,
1812
+ tierSource: this.ecsCluster.logTierSource,
1813
+ ...logGroupValues(logCategory, this.tierLogGroupHead(RetentionDays.ONE_MONTH))
1548
1814
  });
1815
+ stampOperatorScope(logGroup, "AWS::Logs::LogGroup");
1549
1816
  const executionRole = new Role(this, `${idPrefix}ExecutionRole`, {
1817
+ description: `ECS task execution role of the ${idPrefix} migration task`,
1550
1818
  assumedBy: new ServicePrincipal("ecs-tasks.amazonaws.com")
1551
1819
  });
1552
1820
  executionRole.addToPolicy(new PolicyStatement({
@@ -1561,6 +1829,7 @@ export class EcsCompute extends Construct {
1561
1829
  }));
1562
1830
  logGroup.grantWrite(executionRole);
1563
1831
  const taskRole = new Role(this, `${idPrefix}TaskRole`, {
1832
+ description: `ECS task role of the ${idPrefix} migration task`,
1564
1833
  assumedBy: new ServicePrincipal("ecs-tasks.amazonaws.com")
1565
1834
  });
1566
1835
  taskRole.addToPolicy(new PolicyStatement({
@@ -1617,7 +1886,7 @@ export class EcsCompute extends Construct {
1617
1886
  }),
1618
1887
  environment: containerEnvironment,
1619
1888
  secrets: secretsResolved,
1620
- logging: new AwsLogDriver({
1889
+ logging: awsLogDriver({
1621
1890
  streamPrefix: `/ecs-migrate/${svcConfig.name}`,
1622
1891
  logGroup
1623
1892
  })
@@ -1671,9 +1940,21 @@ export class EcsCompute extends Construct {
1671
1940
  // migration runs in the service's groups, from the revision it serves.
1672
1941
  Tags.of(taskDefinition).add(MIGRATION_SECURITY_GROUPS_TAG_KEY, migrationSg.securityGroupId, { includeResourceTypes: ["AWS::ECS::TaskDefinition"] });
1673
1942
  }
1674
- this.migrationTaskDefinitions.set(svcConfig.name, taskDefinition);
1943
+ this.recordHookMigration(svcConfig.name, taskDefinition, containerName);
1675
1944
  return taskDefinition;
1676
1945
  }
1946
+ /**
1947
+ * Records a service's hook migration, and tags its task definition with the
1948
+ * container whose exit the hook takes as the migration's verdict. The
1949
+ * migration barrier awaits the same container. CloudFormation updates a task
1950
+ * definition's tags in place, so the tag registers no new revision.
1951
+ */
1952
+ recordHookMigration(serviceName, taskDefinition, containerName) {
1953
+ Tags.of(taskDefinition).add(MIGRATION_CONTAINER_TAG_KEY, containerName, {
1954
+ includeResourceTypes: ["AWS::ECS::TaskDefinition"]
1955
+ });
1956
+ this.hookMigrations.set(serviceName, { taskDefinition, containerName });
1957
+ }
1677
1958
  /**
1678
1959
  * The migration task definition of a lifecycle-hook migration without
1679
1960
  * `separateTaskDef`. It runs what the hook's `RunTask` of the service's
@@ -1686,7 +1967,7 @@ export class EcsCompute extends Construct {
1686
1967
  * `separateTaskDef` migration, whose roles are its own, so they never
1687
1968
  * widen the service's.
1688
1969
  */
1689
- synthesiseInheritedMigrationTaskDef(svcConfig, authored, migrations, service, schemaVersionEnv) {
1970
+ synthesiseInheritedMigrationTaskDef(svcConfig, servicePosition, authored, migrations, service, schemaVersionEnv) {
1690
1971
  const idPrefix = `${toPascalCase(svcConfig.name)}Migrate`;
1691
1972
  const serviceTaskDefinition = service.taskDefinition;
1692
1973
  const executionRole = serviceTaskDefinition.executionRole;
@@ -1699,12 +1980,12 @@ export class EcsCompute extends Construct {
1699
1980
  }
1700
1981
  const primary = primaryContainerConfig(svcConfig.containers);
1701
1982
  const taskDefinition = createMigrationTaskDefinition(this, `${idPrefix}TaskDefinition`, {
1702
- family: `${this.clusterId}-${svcConfig.name}-migrate`,
1983
+ family: this.migrationFamilyOf(svcConfig.name),
1703
1984
  ...taskSize(svcConfig),
1704
1985
  executionRole,
1705
1986
  taskRole: serviceTaskDefinition.taskRole
1706
1987
  });
1707
- const image = resolveMigrationImage(svcConfig, migrations, primaryContainerDefinition(svcConfig, serviceTaskDefinition)?.imageName);
1988
+ const image = resolveMigrationImage(svcConfig, servicePosition, migrations, primaryContainerDefinition(svcConfig, servicePosition, serviceTaskDefinition)?.imageName);
1708
1989
  const { secretsResolved } = this.resolveMigrationSecrets(svcConfig, { ...authored, ...secretsBeneathMigration(authored, primary) }, idPrefix);
1709
1990
  const containerEnvironment = {
1710
1991
  ...(primary?.environment ?? {}),
@@ -1718,35 +1999,37 @@ export class EcsCompute extends Construct {
1718
1999
  }
1719
2000
  }
1720
2001
  const entryPoint = migrations.entryPoint ?? primary?.entryPoint;
2002
+ const containerName = migrations.name ?? DEFAULT_MIGRATE_CONTAINER_NAME;
1721
2003
  taskDefinition.addContainer(`${idPrefix}Container`, {
1722
- containerName: migrations.name ?? DEFAULT_MIGRATE_CONTAINER_NAME,
2004
+ containerName,
1723
2005
  image: ContainerImage.fromRegistry(image),
1724
2006
  command: migrations.command,
1725
2007
  ...(entryPoint !== undefined && { entryPoint }),
1726
2008
  environment: containerEnvironment,
1727
2009
  secrets: secretsResolved,
1728
- logging: new AwsLogDriver({
2010
+ logging: awsLogDriver({
1729
2011
  streamPrefix: `/ecs-migrate/${svcConfig.name}`,
1730
2012
  logGroup
1731
2013
  })
1732
2014
  });
2015
+ this.recordHookMigration(svcConfig.name, taskDefinition, containerName);
1733
2016
  return taskDefinition;
1734
2017
  }
2018
+ /**
2019
+ * The family of a service's hook migration task definition, a literal that
2020
+ * both builders name it by and the migration barrier lists its tasks by.
2021
+ */
2022
+ migrationFamilyOf(serviceName) {
2023
+ return `${this.clusterId}-${serviceName}-migrate`;
2024
+ }
1735
2025
  resolveMigrationSecrets(svcConfig, migrations, idPrefix) {
1736
2026
  const secretsResolved = {};
1737
2027
  const hasSecretsManagerSecrets = migrations.secretsImport !== undefined &&
1738
2028
  Object.keys(migrations.secretsImport).length > 0;
1739
- const secretsImport = migrations.secretsImport;
1740
- const namedTwice = secretsImport === undefined
1741
- ? []
1742
- : [...new Set(migrations.secrets ?? [])].filter((key) => Object.hasOwn(secretsImport, key));
1743
- if (namedTwice.length > 0) {
1744
- // Both kinds resolve into one record keyed by variable name, and the SSM
1745
- // secret, resolved second, replaces the import, as before 39.0.6.
1746
- Annotations.of(this).addWarning(`The migration of service '${svcConfig.name}' names ${namedTwice.join(", ")} ` +
1747
- `in both secrets and secretsImport. The SSM secret is used and the ` +
1748
- `secretsImport entry is not; name each variable once. Fjall 40 refuses this at synth.`);
1749
- }
2029
+ // Both kinds resolve into one record keyed by variable name, so one
2030
+ // would silently replace the other. Refused by position, never by name
2031
+ // (FJL-481).
2032
+ assertNoSecretKeyOverlap(migrations.secrets ?? [], migrations.secretsImport, `The migration of service '${svcConfig.name}'`);
1750
2033
  if (migrations.secretsImport) {
1751
2034
  for (const [key, secretImport] of Object.entries(migrations.secretsImport)) {
1752
2035
  const secret = resolveImportedSecret(this, `${idPrefix}${key}Secret`, secretImport);
@@ -1796,6 +2079,9 @@ export class EcsCompute extends Construct {
1796
2079
  getIngressProfile() {
1797
2080
  return this.ecsCluster.getIngressProfile();
1798
2081
  }
2082
+ frontWithCdn(protocolPolicy, cdn) {
2083
+ return this.ecsCluster.frontWithCdn(protocolPolicy, cdn);
2084
+ }
1799
2085
  /** Get a specific service by name. */
1800
2086
  getService(name) {
1801
2087
  return this.ecsCluster.getService(name);
@@ -1810,15 +2096,16 @@ export class EcsCompute extends Construct {
1810
2096
  }
1811
2097
  /**
1812
2098
  * Get the migration task definition for a service. Returns `undefined` when
1813
- * the service has no `migrations: { mode: "lifecycle-hook", separateTaskDef }`
1814
- * configured — escape hatch for callers that need to attach grants (e.g.
1815
- * `bucket.grantReadWrite(td.taskRole)`) to the migration task role. Without
1816
- * `separateTaskDef` the migration runs in a task definition of its own that
1817
- * this does not return: its task role is the service's, so a grant to it
1818
- * would widen the service.
2099
+ * the service has no lifecycle-hook or post-deploy `migrations` — escape
2100
+ * hatch for callers that need to attach grants (e.g.
2101
+ * `bucket.grantReadWrite(td.taskRole)`) to the migration task role.
2102
+ * Without `separateTaskDef` that role IS the service's task role, so a
2103
+ * grant to it widens the service too. The hook and the migration barrier
2104
+ * wait only for the migration container, so a container added here is
2105
+ * neither awaited nor able to fail the migration.
1819
2106
  */
1820
2107
  getMigrationTaskDefinition(serviceName) {
1821
- return this.migrationTaskDefinitions.get(serviceName);
2108
+ return this.hookMigrations.get(serviceName)?.taskDefinition;
1822
2109
  }
1823
2110
  /**
1824
2111
  * The rollout barrier of a service: a custom resource that completes only
@@ -1829,9 +2116,13 @@ export class EcsCompute extends Construct {
1829
2116
  * `compute.getService("worker")?.node.addDependency(compute.getRolloutBarrier("app"))`.
1830
2117
  * A `DependsOn` on the service itself does not order this: CloudFormation
1831
2118
  * may start a service's dependants at its eventual-consistency check, long
1832
- * before its deployment finishes (FJL-901). A service has one barrier,
1833
- * shared with `awaitMigrationsFrom`; one the cluster does not run is
1834
- * refused.
2119
+ * before its deployment finishes (FJL-901). A service has one rollout
2120
+ * barrier, shared with `awaitMigrationsFrom` on a `post-deploy` owner;
2121
+ * `awaitMigrationsFrom` on a `lifecycle-hook` owner waits for the owner's
2122
+ * migration barrier instead, which completes once the migration has exited
2123
+ * 0. A worker that needs the owner's whole rollout keeps
2124
+ * `awaitMigrationsFrom` and depends on this barrier too. A service the
2125
+ * cluster does not run is refused.
1835
2126
  */
1836
2127
  getRolloutBarrier(serviceName) {
1837
2128
  return this.rolloutBarrierOf(serviceName);