@fjall/components-infrastructure 39.2.5 → 40.0.2
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.
- package/LICENSE +2 -0
- package/README.md +46 -0
- package/dist/lib/app.d.ts +98 -39
- package/dist/lib/app.js +253 -40
- package/dist/lib/config/aws/accountAuditRole.d.ts +16 -4
- package/dist/lib/config/aws/accountAuditRole.js +50 -12
- package/dist/lib/config/aws/accountMonitoringRole.d.ts +7 -1
- package/dist/lib/config/aws/accountMonitoringRole.js +23 -12
- package/dist/lib/config/aws/alarmTopic.d.ts +4 -9
- package/dist/lib/config/aws/alarmTopic.js +20 -17
- package/dist/lib/config/aws/cloudTrail.d.ts +9 -3
- package/dist/lib/config/aws/cloudTrail.js +27 -9
- package/dist/lib/config/aws/configRecorder.js +5 -1
- package/dist/lib/config/aws/configRulePreset.d.ts +2 -1
- package/dist/lib/config/aws/configRulePreset.js +89 -23
- package/dist/lib/config/aws/deployBoundarySingleton.d.ts +6 -1
- package/dist/lib/config/aws/deployBoundarySingleton.js +8 -2
- package/dist/lib/config/aws/disasterRecovery.d.ts +13 -5
- package/dist/lib/config/aws/disasterRecovery.js +365 -108
- package/dist/lib/config/aws/ebsDefaultEncryption.js +3 -2
- package/dist/lib/config/aws/ecrDefaultImage.js +7 -8
- package/dist/lib/config/aws/fjallBackupRole.d.ts +25 -0
- package/dist/lib/config/aws/fjallBackupRole.js +50 -0
- package/dist/lib/config/aws/identityCenter.d.ts +22 -16
- package/dist/lib/config/aws/identityCenter.js +148 -143
- package/dist/lib/config/aws/identityCentreConfig/builtInOverlap.d.ts +29 -0
- package/dist/lib/config/aws/identityCentreConfig/builtInOverlap.js +120 -0
- package/dist/lib/config/aws/identityCentreConfig/defaults.d.ts +135 -0
- package/dist/lib/config/aws/identityCentreConfig/defaults.js +229 -0
- package/dist/lib/config/aws/identityCentreConfig/derivations.d.ts +79 -0
- package/dist/lib/config/aws/identityCentreConfig/derivations.js +140 -0
- package/dist/lib/config/aws/identityCentreConfig/refusalNames.d.ts +25 -0
- package/dist/lib/config/aws/identityCentreConfig/refusalNames.js +59 -0
- package/dist/lib/config/aws/identityCentreConfig/setContract.d.ts +14 -0
- package/dist/lib/config/aws/identityCentreConfig/setContract.js +39 -0
- package/dist/lib/config/aws/identityCentreConfig/types.d.ts +22 -0
- package/dist/lib/config/aws/identityCentreConfig/types.js +10 -0
- package/dist/lib/config/aws/identityCentreConfig/validate.d.ts +32 -0
- package/dist/lib/config/aws/identityCentreConfig/validate.js +266 -0
- package/dist/lib/config/aws/identityCentreConfig.d.ts +11 -141
- package/dist/lib/config/aws/identityCentreConfig.js +10 -343
- package/dist/lib/config/aws/inspectorEnablement.d.ts +6 -3
- package/dist/lib/config/aws/inspectorEnablement.js +280 -28
- package/dist/lib/config/aws/ipam.js +8 -4
- package/dist/lib/config/aws/oidcConnector.d.ts +5 -0
- package/dist/lib/config/aws/oidcConnector.js +29 -10
- package/dist/lib/config/aws/organisationTrail.js +9 -5
- package/dist/lib/config/aws/s3BlockPublicAccess.d.ts +3 -0
- package/dist/lib/config/aws/s3BlockPublicAccess.js +8 -4
- package/dist/lib/config/aws/scpPreset.d.ts +18 -11
- package/dist/lib/config/aws/scpPreset.js +209 -77
- package/dist/lib/config/aws/securityHubHub.js +14 -6
- package/dist/lib/config/aws/securityServicesAdmin.js +8 -5
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/index.js +4 -0
- package/dist/lib/lambda-assets/buildkite-controller/asset/THIRD-PARTY-NOTICES.txt +1606 -0
- package/dist/lib/lambda-assets/buildkite-controller/asset/index.js +112 -0
- package/dist/lib/lambda-assets/buildkite-controller/asset/package.json +4 -0
- package/dist/lib/lambda-assets/buildkite-dispatch/asset/THIRD-PARTY-NOTICES.txt +1600 -0
- package/dist/lib/lambda-assets/buildkite-dispatch/asset/index.js +108 -0
- package/dist/lib/lambda-assets/buildkite-dispatch/asset/package.json +4 -0
- package/dist/lib/lambda-assets/buildkite-finish-watcher/asset/THIRD-PARTY-NOTICES.txt +1600 -0
- package/dist/lib/lambda-assets/buildkite-finish-watcher/asset/index.js +132 -0
- package/dist/lib/lambda-assets/buildkite-finish-watcher/asset/package.json +4 -0
- package/dist/lib/lambda-assets/buildkite-token-expiry/asset/THIRD-PARTY-NOTICES.txt +1330 -0
- package/dist/lib/lambda-assets/buildkite-token-expiry/asset/index.js +110 -0
- package/dist/lib/lambda-assets/buildkite-token-expiry/asset/package.json +4 -0
- package/dist/lib/lambda-assets/cert-generator/asset/THIRD-PARTY-NOTICES.txt +1637 -0
- package/dist/lib/lambda-assets/cert-generator/asset/index.js +71 -18122
- package/dist/lib/lambda-assets/identity-store-user/asset/THIRD-PARTY-NOTICES.txt +1302 -0
- package/dist/lib/lambda-assets/identity-store-user/asset/index.js +47 -198
- package/dist/lib/lambda-assets/static-site-forms/asset/THIRD-PARTY-NOTICES.txt +1302 -0
- package/dist/lib/lambda-assets/static-site-forms/asset/index.js +48 -175
- package/dist/lib/lambda-assets/validation-record-repairer/asset/THIRD-PARTY-NOTICES.txt +1336 -0
- package/dist/lib/lambda-assets/validation-record-repairer/asset/index.js +110 -0
- package/dist/lib/lambda-assets/validation-record-repairer/asset/package.json +4 -0
- package/dist/lib/layers/secrets-resolver/bin/error-identity.mjs +6 -8
- package/dist/lib/layers/secrets-resolver/bin/mask.mjs +1193 -154
- package/dist/lib/layers/secrets-resolver/bin/resolve-secrets +1 -1
- package/dist/lib/layers/secrets-resolver/bin/resolve-secrets.mjs +74 -57
- package/dist/lib/opennext.d.ts +9 -0
- package/dist/lib/opennext.js +9 -0
- package/dist/lib/opennextImageLoader.d.ts +62 -0
- package/dist/lib/opennextImageLoader.js +251 -0
- package/dist/lib/opennextSsmRead.d.ts +41 -0
- package/dist/lib/opennextSsmRead.js +113 -0
- package/dist/lib/patterns/aws/account.d.ts +14 -5
- package/dist/lib/patterns/aws/account.js +71 -40
- package/dist/lib/patterns/aws/apexDomainPattern.d.ts +3 -0
- package/dist/lib/patterns/aws/apexDomainPattern.js +10 -7
- package/dist/lib/patterns/aws/auditRole.d.ts +0 -1
- package/dist/lib/patterns/aws/auditRole.js +2 -3
- package/dist/lib/patterns/aws/bastionFactory.d.ts +1 -1
- package/dist/lib/patterns/aws/bastionFactory.js +13 -8
- package/dist/lib/patterns/aws/buildkite/accountAndRegion.d.ts +8 -0
- package/dist/lib/patterns/aws/buildkite/accountAndRegion.js +16 -0
- package/dist/lib/patterns/aws/buildkite/buildkite.d.ts +24 -95
- package/dist/lib/patterns/aws/buildkite/buildkite.js +284 -348
- package/dist/lib/patterns/aws/buildkite/cacheStore.d.ts +93 -0
- package/dist/lib/patterns/aws/buildkite/cacheStore.js +238 -0
- package/dist/lib/patterns/aws/buildkite/controller/admission.d.ts +125 -0
- package/dist/lib/patterns/aws/buildkite/controller/admission.js +165 -0
- package/dist/lib/patterns/aws/buildkite/controller/agentTargeting.d.ts +22 -0
- package/dist/lib/patterns/aws/buildkite/controller/agentTargeting.js +30 -0
- package/dist/lib/patterns/aws/buildkite/controller/buildkiteApiError.d.ts +60 -0
- package/dist/lib/patterns/aws/buildkite/controller/buildkiteApiError.js +108 -0
- package/dist/lib/patterns/aws/buildkite/controller/buildkiteHttp.d.ts +80 -0
- package/dist/lib/patterns/aws/buildkite/controller/buildkiteHttp.js +279 -0
- package/dist/lib/patterns/aws/buildkite/controller/buildkiteIds.d.ts +9 -0
- package/dist/lib/patterns/aws/buildkite/controller/buildkiteIds.js +9 -0
- package/dist/lib/patterns/aws/buildkite/controller/buildkiteRateLimits.d.ts +110 -0
- package/dist/lib/patterns/aws/buildkite/controller/buildkiteRateLimits.js +214 -0
- package/dist/lib/patterns/aws/buildkite/controller/callSignal.d.ts +44 -0
- package/dist/lib/patterns/aws/buildkite/controller/callSignal.js +39 -0
- package/dist/lib/patterns/aws/buildkite/controller/capacity.d.ts +115 -0
- package/dist/lib/patterns/aws/buildkite/controller/capacity.js +90 -0
- package/dist/lib/patterns/aws/buildkite/controller/consoleCapture.d.ts +22 -0
- package/dist/lib/patterns/aws/buildkite/controller/consoleCapture.js +34 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerConfig.d.ts +140 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerConfig.js +349 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerContext.d.ts +43 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerContext.js +26 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerFleetAws.d.ts +58 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerFleetAws.js +214 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerHandler.d.ts +10 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerHandler.js +34 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerHandoff.d.ts +39 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerHandoff.js +100 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerItems.d.ts +76 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerItems.js +187 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerJobs.d.ts +88 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerJobs.js +205 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerLoop.d.ts +31 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerLoop.js +97 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerReadings.d.ts +59 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerReadings.js +171 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerReconcile.d.ts +37 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerReconcile.js +125 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerRefusals.d.ts +57 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerRefusals.js +143 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerRegistration.d.ts +56 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerRegistration.js +89 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerTable.d.ts +35 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerTable.js +168 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerTableWrites.d.ts +78 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerTableWrites.js +144 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerTelemetry.d.ts +104 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerTelemetry.js +97 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerTick.d.ts +46 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerTick.js +162 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerTiming.d.ts +126 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerTiming.js +145 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerTokens.d.ts +63 -0
- package/dist/lib/patterns/aws/buildkite/controller/controllerTokens.js +189 -0
- package/dist/lib/patterns/aws/buildkite/controller/dispatch.d.ts +51 -0
- package/dist/lib/patterns/aws/buildkite/controller/dispatch.js +390 -0
- package/dist/lib/patterns/aws/buildkite/controller/dispatchContract.d.ts +209 -0
- package/dist/lib/patterns/aws/buildkite/controller/dispatchContract.js +308 -0
- package/dist/lib/patterns/aws/buildkite/controller/dispatchGroup.d.ts +88 -0
- package/dist/lib/patterns/aws/buildkite/controller/dispatchGroup.js +212 -0
- package/dist/lib/patterns/aws/buildkite/controller/dispatchHolds.d.ts +42 -0
- package/dist/lib/patterns/aws/buildkite/controller/dispatchHolds.js +75 -0
- package/dist/lib/patterns/aws/buildkite/controller/dispatchTable.d.ts +210 -0
- package/dist/lib/patterns/aws/buildkite/controller/dispatchTable.js +435 -0
- package/dist/lib/patterns/aws/buildkite/controller/dispatchTiming.d.ts +15 -0
- package/dist/lib/patterns/aws/buildkite/controller/dispatchTiming.js +29 -0
- package/dist/lib/patterns/aws/buildkite/controller/emf.d.ts +38 -0
- package/dist/lib/patterns/aws/buildkite/controller/emf.js +42 -0
- package/dist/lib/patterns/aws/buildkite/controller/finishLedger.d.ts +37 -0
- package/dist/lib/patterns/aws/buildkite/controller/finishLedger.js +51 -0
- package/dist/lib/patterns/aws/buildkite/controller/finishStatus.d.ts +19 -0
- package/dist/lib/patterns/aws/buildkite/controller/finishStatus.js +18 -0
- package/dist/lib/patterns/aws/buildkite/controller/firstParent.d.ts +85 -0
- package/dist/lib/patterns/aws/buildkite/controller/firstParent.js +252 -0
- package/dist/lib/patterns/aws/buildkite/controller/fleet.d.ts +96 -0
- package/dist/lib/patterns/aws/buildkite/controller/fleet.js +160 -0
- package/dist/lib/patterns/aws/buildkite/controller/functionConfig.d.ts +34 -0
- package/dist/lib/patterns/aws/buildkite/controller/functionConfig.js +60 -0
- package/dist/lib/patterns/aws/buildkite/controller/githubApi.d.ts +44 -0
- package/dist/lib/patterns/aws/buildkite/controller/githubApi.js +110 -0
- package/dist/lib/patterns/aws/buildkite/controller/handoff.d.ts +85 -0
- package/dist/lib/patterns/aws/buildkite/controller/handoff.js +86 -0
- package/dist/lib/patterns/aws/buildkite/controller/idleHold.d.ts +47 -0
- package/dist/lib/patterns/aws/buildkite/controller/idleHold.js +41 -0
- package/dist/lib/patterns/aws/buildkite/controller/jobStates.d.ts +44 -0
- package/dist/lib/patterns/aws/buildkite/controller/jobStates.js +34 -0
- package/dist/lib/patterns/aws/buildkite/controller/lifecycleBucket.d.ts +24 -0
- package/dist/lib/patterns/aws/buildkite/controller/lifecycleBucket.js +42 -0
- package/dist/lib/patterns/aws/buildkite/controller/limitedCall.d.ts +11 -0
- package/dist/lib/patterns/aws/buildkite/controller/limitedCall.js +24 -0
- package/dist/lib/patterns/aws/buildkite/controller/priority.d.ts +26 -0
- package/dist/lib/patterns/aws/buildkite/controller/priority.js +43 -0
- package/dist/lib/patterns/aws/buildkite/controller/reconcile.d.ts +120 -0
- package/dist/lib/patterns/aws/buildkite/controller/reconcile.js +208 -0
- package/dist/lib/patterns/aws/buildkite/controller/restApi.d.ts +71 -0
- package/dist/lib/patterns/aws/buildkite/controller/restApi.js +164 -0
- package/dist/lib/patterns/aws/buildkite/controller/rogueAgents.d.ts +24 -0
- package/dist/lib/patterns/aws/buildkite/controller/rogueAgents.js +26 -0
- package/dist/lib/patterns/aws/buildkite/controller/stacksApi.d.ts +21 -0
- package/dist/lib/patterns/aws/buildkite/controller/stacksApi.js +452 -0
- package/dist/lib/patterns/aws/buildkite/controller/stacksApiTypes.d.ts +125 -0
- package/dist/lib/patterns/aws/buildkite/controller/stacksApiTypes.js +25 -0
- package/dist/lib/patterns/aws/buildkite/controller/tableItems.d.ts +27 -0
- package/dist/lib/patterns/aws/buildkite/controller/tableItems.js +58 -0
- package/dist/lib/patterns/aws/buildkite/controller/tick.d.ts +141 -0
- package/dist/lib/patterns/aws/buildkite/controller/tick.js +219 -0
- package/dist/lib/patterns/aws/buildkite/controller/types.d.ts +189 -0
- package/dist/lib/patterns/aws/buildkite/controller/types.js +36 -0
- package/dist/lib/patterns/aws/buildkite/controllerConstruct.d.ts +66 -0
- package/dist/lib/patterns/aws/buildkite/controllerConstruct.js +113 -0
- package/dist/lib/patterns/aws/buildkite/controllerGrants.d.ts +148 -0
- package/dist/lib/patterns/aws/buildkite/controllerGrants.js +297 -0
- package/dist/lib/patterns/aws/buildkite/decryptPaths.d.ts +41 -0
- package/dist/lib/patterns/aws/buildkite/decryptPaths.js +88 -0
- package/dist/lib/patterns/aws/buildkite/domainStack.d.ts +15 -0
- package/dist/lib/patterns/aws/buildkite/domainStack.js +31 -0
- package/dist/lib/patterns/aws/buildkite/factory.d.ts +35 -17
- package/dist/lib/patterns/aws/buildkite/factory.js +146 -25
- package/dist/lib/patterns/aws/buildkite/finishWatcher/judgeFinishes.d.ts +29 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcher/judgeFinishes.js +59 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcher/ledgerReads.d.ts +16 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcher/ledgerReads.js +81 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcher/portalClient.d.ts +79 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcher/portalClient.js +309 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcher/portalJobs.d.ts +105 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcher/portalJobs.js +212 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherConfig.d.ts +72 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherConfig.js +155 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherHandler.d.ts +1 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherHandler.js +20 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherRun.d.ts +45 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherRun.js +139 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherTelemetry.d.ts +71 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcher/watcherTelemetry.js +60 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcherConstruct.d.ts +72 -0
- package/dist/lib/patterns/aws/buildkite/finishWatcherConstruct.js +163 -0
- package/dist/lib/patterns/aws/buildkite/iam.d.ts +40 -33
- package/dist/lib/patterns/aws/buildkite/iam.js +84 -177
- package/dist/lib/patterns/aws/buildkite/image/agentPin.d.ts +50 -0
- package/dist/lib/patterns/aws/buildkite/image/agentPin.js +51 -0
- package/dist/lib/patterns/aws/buildkite/image/awstoeDocument.d.ts +68 -0
- package/dist/lib/patterns/aws/buildkite/image/awstoeDocument.js +110 -0
- package/dist/lib/patterns/aws/buildkite/image/baseImage.d.ts +151 -0
- package/dist/lib/patterns/aws/buildkite/image/baseImage.js +188 -0
- package/dist/lib/patterns/aws/buildkite/image/cacheStoreShape.d.ts +12 -0
- package/dist/lib/patterns/aws/buildkite/image/cacheStoreShape.js +12 -0
- package/dist/lib/patterns/aws/buildkite/image/cachesManifest.d.ts +110 -0
- package/dist/lib/patterns/aws/buildkite/image/cachesManifest.js +99 -0
- package/dist/lib/patterns/aws/buildkite/image/ciLayer.d.ts +43 -0
- package/dist/lib/patterns/aws/buildkite/image/ciLayer.js +50 -0
- package/dist/lib/patterns/aws/buildkite/image/components/THIRD-PARTY-NOTICES.txt +250 -0
- package/dist/lib/patterns/aws/buildkite/image/components/agent.d.ts +18 -0
- package/dist/lib/patterns/aws/buildkite/image/components/agent.js +69 -0
- package/dist/lib/patterns/aws/buildkite/image/components/agentConfig.d.ts +50 -0
- package/dist/lib/patterns/aws/buildkite/image/components/agentConfig.js +169 -0
- package/dist/lib/patterns/aws/buildkite/image/components/basePackages.d.ts +48 -0
- package/dist/lib/patterns/aws/buildkite/image/components/basePackages.js +146 -0
- package/dist/lib/patterns/aws/buildkite/image/components/blockDevices.d.ts +34 -0
- package/dist/lib/patterns/aws/buildkite/image/components/blockDevices.js +391 -0
- package/dist/lib/patterns/aws/buildkite/image/components/browsers.d.ts +41 -0
- package/dist/lib/patterns/aws/buildkite/image/components/browsers.js +190 -0
- package/dist/lib/patterns/aws/buildkite/image/components/checkoutSsh.d.ts +70 -0
- package/dist/lib/patterns/aws/buildkite/image/components/checkoutSsh.js +313 -0
- package/dist/lib/patterns/aws/buildkite/image/components/ciLayerShell.d.ts +83 -0
- package/dist/lib/patterns/aws/buildkite/image/components/ciLayerShell.js +182 -0
- package/dist/lib/patterns/aws/buildkite/image/components/ciNode.d.ts +35 -0
- package/dist/lib/patterns/aws/buildkite/image/components/ciNode.js +165 -0
- package/dist/lib/patterns/aws/buildkite/image/components/ciPackages.d.ts +29 -0
- package/dist/lib/patterns/aws/buildkite/image/components/ciPackages.js +96 -0
- package/dist/lib/patterns/aws/buildkite/image/components/docker.d.ts +26 -0
- package/dist/lib/patterns/aws/buildkite/image/components/docker.js +141 -0
- package/dist/lib/patterns/aws/buildkite/image/components/dockerAppArmor.d.ts +88 -0
- package/dist/lib/patterns/aws/buildkite/image/components/dockerAppArmor.js +317 -0
- package/dist/lib/patterns/aws/buildkite/image/components/gitMirrors.d.ts +21 -0
- package/dist/lib/patterns/aws/buildkite/image/components/gitMirrors.js +244 -0
- package/dist/lib/patterns/aws/buildkite/image/components/isolationProbe.d.ts +44 -0
- package/dist/lib/patterns/aws/buildkite/image/components/isolationProbe.js +189 -0
- package/dist/lib/patterns/aws/buildkite/image/components/jobUser.d.ts +17 -0
- package/dist/lib/patterns/aws/buildkite/image/components/jobUser.js +89 -0
- package/dist/lib/patterns/aws/buildkite/image/components/keyScan.d.ts +150 -0
- package/dist/lib/patterns/aws/buildkite/image/components/keyScan.js +359 -0
- package/dist/lib/patterns/aws/buildkite/image/components/laneRunner.d.ts +38 -0
- package/dist/lib/patterns/aws/buildkite/image/components/laneRunner.js +134 -0
- package/dist/lib/patterns/aws/buildkite/image/components/npmStores.d.ts +61 -0
- package/dist/lib/patterns/aws/buildkite/image/components/npmStores.js +285 -0
- package/dist/lib/patterns/aws/buildkite/image/components/readiness.d.ts +9 -0
- package/dist/lib/patterns/aws/buildkite/image/components/readiness.js +172 -0
- package/dist/lib/patterns/aws/buildkite/image/components/scratch.d.ts +35 -0
- package/dist/lib/patterns/aws/buildkite/image/components/scratch.js +154 -0
- package/dist/lib/patterns/aws/buildkite/image/components/serviceImages.d.ts +18 -0
- package/dist/lib/patterns/aws/buildkite/image/components/serviceImages.js +109 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/curl.d.ts +37 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/curl.js +54 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/dpkg.d.ts +18 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/dpkg.js +79 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/engine.d.ts +15 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/engine.js +39 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/files.d.ts +37 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/files.js +49 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/jq.d.ts +22 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/jq.js +38 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/manifests.d.ts +10 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/manifests.js +38 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/ssm.d.ts +21 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/ssm.js +25 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/strict.d.ts +11 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/strict.js +21 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/systemd.d.ts +11 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell/systemd.js +23 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell.d.ts +9 -0
- package/dist/lib/patterns/aws/buildkite/image/components/shell.js +9 -0
- package/dist/lib/patterns/aws/buildkite/image/components/ssmAgentRemoval.d.ts +33 -0
- package/dist/lib/patterns/aws/buildkite/image/components/ssmAgentRemoval.js +159 -0
- package/dist/lib/patterns/aws/buildkite/image/components/supervisor.d.ts +108 -0
- package/dist/lib/patterns/aws/buildkite/image/components/supervisor.js +456 -0
- package/dist/lib/patterns/aws/buildkite/image/components/supervisorAgent.d.ts +61 -0
- package/dist/lib/patterns/aws/buildkite/image/components/supervisorAgent.js +247 -0
- package/dist/lib/patterns/aws/buildkite/image/components/supervisorClient.d.ts +39 -0
- package/dist/lib/patterns/aws/buildkite/image/components/supervisorClient.js +177 -0
- package/dist/lib/patterns/aws/buildkite/image/components/usernsFence.d.ts +57 -0
- package/dist/lib/patterns/aws/buildkite/image/components/usernsFence.js +367 -0
- package/dist/lib/patterns/aws/buildkite/image/components/workloadSlice.d.ts +20 -0
- package/dist/lib/patterns/aws/buildkite/image/components/workloadSlice.js +137 -0
- package/dist/lib/patterns/aws/buildkite/image/fleetImage.d.ts +98 -0
- package/dist/lib/patterns/aws/buildkite/image/fleetImage.js +213 -0
- package/dist/lib/patterns/aws/buildkite/image/githubHostKeys.d.ts +18 -0
- package/dist/lib/patterns/aws/buildkite/image/githubHostKeys.js +22 -0
- package/dist/lib/patterns/aws/buildkite/image/imagePin.d.ts +124 -0
- package/dist/lib/patterns/aws/buildkite/image/imagePin.js +232 -0
- package/dist/lib/patterns/aws/buildkite/image/imagePinLambda.source.cjs +713 -0
- package/dist/lib/patterns/aws/buildkite/image/mirroredRepositories.d.ts +67 -0
- package/dist/lib/patterns/aws/buildkite/image/mirroredRepositories.js +81 -0
- package/dist/lib/patterns/aws/buildkite/image/poolConfig.d.ts +134 -0
- package/dist/lib/patterns/aws/buildkite/image/poolConfig.js +290 -0
- package/dist/lib/patterns/aws/buildkite/image/runnerCommit.d.ts +44 -0
- package/dist/lib/patterns/aws/buildkite/image/runnerCommit.js +71 -0
- package/dist/lib/patterns/aws/buildkite/image/supervisor.d.ts +9 -0
- package/dist/lib/patterns/aws/buildkite/image/supervisor.js +17 -0
- package/dist/lib/patterns/aws/buildkite/image/supervisorContract.d.ts +134 -0
- package/dist/lib/patterns/aws/buildkite/image/supervisorContract.js +260 -0
- package/dist/lib/patterns/aws/buildkite/image/twoStageImage.d.ts +105 -0
- package/dist/lib/patterns/aws/buildkite/image/twoStageImage.js +172 -0
- package/dist/lib/patterns/aws/buildkite/image/vmLayout.d.ts +142 -0
- package/dist/lib/patterns/aws/buildkite/image/vmLayout.js +142 -0
- package/dist/lib/patterns/aws/buildkite/poolSettings.d.ts +33 -0
- package/dist/lib/patterns/aws/buildkite/poolSettings.js +88 -0
- package/dist/lib/patterns/aws/buildkite/props.d.ts +205 -0
- package/dist/lib/patterns/aws/buildkite/props.js +57 -0
- package/dist/lib/patterns/aws/buildkite/roleFence.d.ts +24 -0
- package/dist/lib/patterns/aws/buildkite/roleFence.js +67 -0
- package/dist/lib/patterns/aws/buildkite/scheduledFunction.d.ts +49 -0
- package/dist/lib/patterns/aws/buildkite/scheduledFunction.js +56 -0
- package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryConfig.d.ts +75 -0
- package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryConfig.js +218 -0
- package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryDates.d.ts +24 -0
- package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryDates.js +81 -0
- package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryHandler.d.ts +1 -0
- package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryHandler.js +19 -0
- package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryReads.d.ts +42 -0
- package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryReads.js +156 -0
- package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryRun.d.ts +23 -0
- package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryRun.js +128 -0
- package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryTelemetry.d.ts +121 -0
- package/dist/lib/patterns/aws/buildkite/tokenExpiry/expiryTelemetry.js +118 -0
- package/dist/lib/patterns/aws/buildkite/tokenExpiryCheckConstruct.d.ts +51 -0
- package/dist/lib/patterns/aws/buildkite/tokenExpiryCheckConstruct.js +126 -0
- package/dist/lib/patterns/aws/buildkite/trustDomainKey.d.ts +100 -0
- package/dist/lib/patterns/aws/buildkite/trustDomainKey.js +258 -0
- package/dist/lib/patterns/aws/buildkite/userData.d.ts +51 -73
- package/dist/lib/patterns/aws/buildkite/userData.js +72 -233
- package/dist/lib/patterns/aws/buildkite/validation.d.ts +24 -0
- package/dist/lib/patterns/aws/buildkite/validation.js +430 -0
- package/dist/lib/patterns/aws/buildkite/vcpuPartition.d.ts +49 -0
- package/dist/lib/patterns/aws/buildkite/vcpuPartition.js +134 -0
- package/dist/lib/patterns/aws/buildkite.d.ts +5 -10
- package/dist/lib/patterns/aws/buildkite.js +4 -10
- package/dist/lib/patterns/aws/cdn.d.ts +98 -56
- package/dist/lib/patterns/aws/cdn.js +456 -133
- package/dist/lib/patterns/aws/cdnAppOrigin.d.ts +5 -7
- package/dist/lib/patterns/aws/cdnAppOrigin.js +41 -19
- package/dist/lib/patterns/aws/cdnHttpOriginReach.d.ts +15 -0
- package/dist/lib/patterns/aws/cdnHttpOriginReach.js +85 -0
- package/dist/lib/patterns/aws/clickhouseDatabase.d.ts +60 -22
- package/dist/lib/patterns/aws/clickhouseDatabase.js +180 -175
- package/dist/lib/patterns/aws/clickhouseTls/types.d.ts +7 -1
- package/dist/lib/patterns/aws/compute.d.ts +3 -25
- package/dist/lib/patterns/aws/compute.js +33 -22
- package/dist/lib/patterns/aws/computeEc2.d.ts +15 -1
- package/dist/lib/patterns/aws/computeEc2.js +11 -1
- package/dist/lib/patterns/aws/computeEcs.d.ts +112 -30
- package/dist/lib/patterns/aws/computeEcs.js +518 -227
- package/dist/lib/patterns/aws/computeEcsTypes.d.ts +254 -113
- package/dist/lib/patterns/aws/computeLambda.d.ts +10 -1
- package/dist/lib/patterns/aws/computeLambda.js +6 -2
- package/dist/lib/patterns/aws/computePropApplicability.d.ts +2 -0
- package/dist/lib/patterns/aws/computePropApplicability.js +7 -1
- package/dist/lib/patterns/aws/database.d.ts +85 -34
- package/dist/lib/patterns/aws/database.js +119 -118
- package/dist/lib/patterns/aws/databasePropApplicability.d.ts +64 -0
- package/dist/lib/patterns/aws/databasePropApplicability.js +12 -5
- package/dist/lib/patterns/aws/delegatedDomainPattern.d.ts +3 -0
- package/dist/lib/patterns/aws/delegatedDomainPattern.js +29 -13
- package/dist/lib/patterns/aws/devSubstrate.d.ts +15 -6
- package/dist/lib/patterns/aws/devSubstrate.js +151 -89
- package/dist/lib/patterns/aws/dnsRecordComposer.d.ts +32 -1
- package/dist/lib/patterns/aws/dnsRecordComposer.js +218 -102
- package/dist/lib/patterns/aws/domain.d.ts +2 -2
- package/dist/lib/patterns/aws/domain.js +190 -52
- package/dist/lib/patterns/aws/domainAliasReach.d.ts +14 -0
- package/dist/lib/patterns/aws/domainAliasReach.js +84 -0
- package/dist/lib/patterns/aws/domainCertificateComposer.d.ts +7 -10
- package/dist/lib/patterns/aws/domainCertificateComposer.js +69 -54
- package/dist/lib/patterns/aws/domainValidation.d.ts +1 -0
- package/dist/lib/patterns/aws/domainValidation.js +98 -29
- package/dist/lib/patterns/aws/externalRecordsPattern.d.ts +4 -3
- package/dist/lib/patterns/aws/externalRecordsPattern.js +18 -25
- package/dist/lib/patterns/aws/fivetranProxy.d.ts +8 -0
- package/dist/lib/patterns/aws/fivetranProxy.js +2 -3
- package/dist/lib/patterns/aws/interfaces/cdn.d.ts +10 -4
- package/dist/lib/patterns/aws/interfaces/cdn.js +6 -6
- package/dist/lib/patterns/aws/interfaces/compute.d.ts +14 -0
- package/dist/lib/patterns/aws/interfaces/connector.d.ts +1 -1
- package/dist/lib/patterns/aws/interfaces/connector.js +1 -1
- package/dist/lib/patterns/aws/interfaces/database.d.ts +31 -8
- package/dist/lib/patterns/aws/interfaces/database.js +2 -8
- package/dist/lib/patterns/aws/interfaces/domain.d.ts +39 -8
- package/dist/lib/patterns/aws/interfaces/index.d.ts +1 -1
- package/dist/lib/patterns/aws/interfaces/index.js +1 -1
- package/dist/lib/patterns/aws/interfaces/migrationContributor.d.ts +26 -2
- package/dist/lib/patterns/aws/interfaces/pattern.d.ts +318 -45
- package/dist/lib/patterns/aws/messaging.d.ts +22 -7
- package/dist/lib/patterns/aws/messaging.js +28 -8
- package/dist/lib/patterns/aws/network.d.ts +25 -9
- package/dist/lib/patterns/aws/network.js +21 -16
- package/dist/lib/patterns/aws/openNextServerRoutes.d.ts +51 -0
- package/dist/lib/patterns/aws/openNextServerRoutes.js +172 -0
- package/dist/lib/patterns/aws/organisation.d.ts +37 -11
- package/dist/lib/patterns/aws/organisation.js +124 -58
- package/dist/lib/patterns/aws/organisationFactory.js +1 -1
- package/dist/lib/patterns/aws/pattern.d.ts +1 -1
- package/dist/lib/patterns/aws/patternDomain.d.ts +7 -1
- package/dist/lib/patterns/aws/patternDomain.js +68 -26
- package/dist/lib/patterns/aws/payload.d.ts +36 -2
- package/dist/lib/patterns/aws/payload.js +274 -102
- package/dist/lib/patterns/aws/payloadPublicRoutes.d.ts +105 -0
- package/dist/lib/patterns/aws/payloadPublicRoutes.js +338 -0
- package/dist/lib/patterns/aws/platform.js +4 -1
- package/dist/lib/patterns/aws/staticSite.d.ts +23 -14
- package/dist/lib/patterns/aws/staticSite.js +148 -99
- package/dist/lib/patterns/aws/storage.d.ts +27 -10
- package/dist/lib/patterns/aws/storage.js +28 -15
- package/dist/lib/patterns/aws/targets/targetResolution.d.ts +5 -1
- package/dist/lib/patterns/aws/targets/targetResolution.js +6 -2
- package/dist/lib/patterns/aws/validationRecordRepairer.d.ts +74 -0
- package/dist/lib/patterns/aws/validationRecordRepairer.js +537 -0
- package/dist/lib/patterns/aws/vpcPeer.d.ts +1 -1
- package/dist/lib/patterns/aws/vpcPeerAccepter.d.ts +1 -1
- package/dist/lib/patterns/aws/vpcPeerAccepter.js +35 -25
- package/dist/lib/resources/aws/audit/auditRole.d.ts +1 -2
- package/dist/lib/resources/aws/audit/auditRole.js +19 -11
- package/dist/lib/resources/aws/backup/backupPlan.d.ts +2 -2
- package/dist/lib/resources/aws/backup/backupPlan.js +12 -6
- package/dist/lib/resources/aws/backup/backupTierReading.d.ts +50 -0
- package/dist/lib/resources/aws/backup/backupTierReading.js +62 -0
- package/dist/lib/resources/aws/backup/backupVault.d.ts +34 -3
- package/dist/lib/resources/aws/backup/backupVault.js +74 -15
- package/dist/lib/resources/aws/base/awsStack.d.ts +10 -4
- package/dist/lib/resources/aws/base/awsStack.js +39 -12
- package/dist/lib/resources/aws/base/costControls.d.ts +52 -0
- package/dist/lib/resources/aws/base/costControls.js +111 -0
- package/dist/lib/resources/aws/cdn/cachePolicy.d.ts +15 -0
- package/dist/lib/resources/aws/cdn/cachePolicy.js +35 -0
- package/dist/lib/resources/aws/cdn/cloudFront.d.ts +99 -48
- package/dist/lib/resources/aws/cdn/cloudFront.js +191 -107
- package/dist/lib/resources/aws/cdn/cloudFrontHostRedirect.d.ts +38 -0
- package/dist/lib/resources/aws/cdn/cloudFrontHostRedirect.js +67 -0
- package/dist/lib/resources/aws/cdn/cloudFrontLogDelivery.d.ts +1 -1
- package/dist/lib/resources/aws/cdn/cloudFrontLogDelivery.js +14 -18
- package/dist/lib/resources/aws/cdn/index.d.ts +1 -0
- package/dist/lib/resources/aws/cdn/responseHeadersPolicy.d.ts +6 -6
- package/dist/lib/resources/aws/cdn/responseHeadersPolicy.js +11 -9
- package/dist/lib/resources/aws/compute/applicationLoadBalancer.d.ts +29 -6
- package/dist/lib/resources/aws/compute/applicationLoadBalancer.js +85 -7
- package/dist/lib/resources/aws/compute/asgInlineLifecycleHook.d.ts +87 -52
- package/dist/lib/resources/aws/compute/asgInlineLifecycleHook.js +259 -49
- package/dist/lib/resources/aws/compute/asgLifecycleCore.source.cjs +1694 -0
- package/dist/lib/resources/aws/compute/asgLifecycleHandlers.d.ts +148 -0
- package/dist/lib/resources/aws/compute/asgLifecycleHandlers.js +275 -0
- package/dist/lib/resources/aws/compute/asgLifecycleHookPosture.d.ts +52 -0
- package/dist/lib/resources/aws/compute/asgLifecycleHookPosture.js +185 -0
- package/dist/lib/resources/aws/compute/asgLifecycleHookValidation.d.ts +21 -0
- package/dist/lib/resources/aws/compute/asgLifecycleHookValidation.js +113 -0
- package/dist/lib/resources/aws/compute/contentDigest.d.ts +87 -0
- package/dist/lib/resources/aws/compute/contentDigest.js +294 -0
- package/dist/lib/resources/aws/compute/contentDigestLambda.source.cjs +108 -0
- package/dist/lib/resources/aws/compute/ec2.d.ts +125 -13
- package/dist/lib/resources/aws/compute/ec2.js +212 -25
- package/dist/lib/resources/aws/compute/ec2GracefulTerminationHandler.d.ts +41 -15
- package/dist/lib/resources/aws/compute/ec2GracefulTerminationHandler.js +51 -162
- package/dist/lib/resources/aws/compute/ec2GracefulTerminationLambda.source.cjs +209 -431
- package/dist/lib/resources/aws/compute/ec2SshAccess.js +10 -6
- package/dist/lib/resources/aws/compute/ecs.d.ts +82 -14
- package/dist/lib/resources/aws/compute/ecs.js +251 -80
- package/dist/lib/resources/aws/compute/ecsCapacityConfig.d.ts +6 -2
- package/dist/lib/resources/aws/compute/ecsCapacityConfig.js +45 -27
- package/dist/lib/resources/aws/compute/ecsClusterFactory.d.ts +30 -0
- package/dist/lib/resources/aws/compute/ecsClusterFactory.js +41 -0
- package/dist/lib/resources/aws/compute/ecsConstants.d.ts +5 -8
- package/dist/lib/resources/aws/compute/ecsConstants.js +9 -43
- package/dist/lib/resources/aws/compute/ecsContext.d.ts +3 -1
- package/dist/lib/resources/aws/compute/ecsImages.d.ts +25 -1
- package/dist/lib/resources/aws/compute/ecsImages.js +49 -10
- package/dist/lib/resources/aws/compute/ecsLifecycleHookMigration.d.ts +6 -1
- package/dist/lib/resources/aws/compute/ecsLifecycleHookMigration.js +30 -14
- package/dist/lib/resources/aws/compute/ecsLogDriver.d.ts +22 -0
- package/dist/lib/resources/aws/compute/ecsLogDriver.js +44 -0
- package/dist/lib/resources/aws/compute/ecsNetworkMode.d.ts +47 -0
- package/dist/lib/resources/aws/compute/ecsNetworkMode.js +118 -0
- package/dist/lib/resources/aws/compute/ecsNetworking.d.ts +42 -2
- package/dist/lib/resources/aws/compute/ecsNetworking.js +207 -135
- package/dist/lib/resources/aws/compute/ecsRemoteConnections.d.ts +6 -1
- package/dist/lib/resources/aws/compute/ecsRemoteConnections.js +26 -15
- package/dist/lib/resources/aws/compute/ecsRoles.d.ts +1 -1
- package/dist/lib/resources/aws/compute/ecsRoles.js +4 -1
- package/dist/lib/resources/aws/compute/ecsRolloutBarrier.d.ts +53 -21
- package/dist/lib/resources/aws/compute/ecsRolloutBarrier.js +106 -82
- package/dist/lib/resources/aws/compute/ecsRolloutBarrierLambda.source.cjs +438 -74
- package/dist/lib/resources/aws/compute/ecsServiceFactory.d.ts +41 -5
- package/dist/lib/resources/aws/compute/ecsServiceFactory.js +127 -40
- package/dist/lib/resources/aws/compute/ecsTargetGroup.d.ts +21 -10
- package/dist/lib/resources/aws/compute/ecsTargetGroup.js +79 -48
- package/dist/lib/resources/aws/compute/ecsTaskDefinition.d.ts +3 -3
- package/dist/lib/resources/aws/compute/ecsTaskDefinition.js +58 -47
- package/dist/lib/resources/aws/compute/ecsTypes.d.ts +175 -67
- package/dist/lib/resources/aws/compute/ecsValidation.d.ts +116 -13
- package/dist/lib/resources/aws/compute/ecsValidation.js +286 -44
- package/dist/lib/resources/aws/compute/frontedRecords.d.ts +108 -0
- package/dist/lib/resources/aws/compute/frontedRecords.js +277 -0
- package/dist/lib/resources/aws/compute/imagePipeline.d.ts +250 -0
- package/dist/lib/resources/aws/compute/imagePipeline.js +515 -0
- package/dist/lib/resources/aws/compute/imdsPosture.d.ts +75 -0
- package/dist/lib/resources/aws/compute/imdsPosture.js +174 -0
- package/dist/lib/resources/aws/compute/index.d.ts +1 -1
- package/dist/lib/resources/aws/compute/index.js +1 -1
- package/dist/lib/resources/aws/compute/ingressProfile.d.ts +19 -4
- package/dist/lib/resources/aws/compute/ingressProfile.js +4 -3
- package/dist/lib/resources/aws/compute/instanceArchitectureWords.d.ts +7 -0
- package/dist/lib/resources/aws/compute/instanceArchitectureWords.js +9 -0
- package/dist/lib/resources/aws/compute/lambda.d.ts +103 -57
- package/dist/lib/resources/aws/compute/lambda.js +191 -110
- package/dist/lib/resources/aws/compute/lifecycleHookLambda.source.cjs +278 -111
- package/dist/lib/resources/aws/compute/listenerRouting.d.ts +3 -0
- package/dist/lib/resources/aws/compute/listenerRouting.js +5 -1
- package/dist/lib/resources/aws/compute/loadBalancerIngress.d.ts +88 -0
- package/dist/lib/resources/aws/compute/loadBalancerIngress.js +257 -0
- package/dist/lib/resources/aws/compute/loadBalancerMigration.d.ts +132 -0
- package/dist/lib/resources/aws/compute/loadBalancerMigration.js +190 -0
- package/dist/lib/resources/aws/compute/persistentDataVolume.d.ts +51 -26
- package/dist/lib/resources/aws/compute/persistentDataVolume.js +53 -162
- package/dist/lib/resources/aws/compute/persistentDataVolumeLambda.source.cjs +452 -396
- package/dist/lib/resources/aws/compute/ssmAgentPolicy.d.ts +16 -0
- package/dist/lib/resources/aws/compute/ssmAgentPolicy.js +40 -0
- package/dist/lib/resources/aws/database/clickhouseBucketName.d.ts +18 -0
- package/dist/lib/resources/aws/database/clickhouseBucketName.js +47 -0
- package/dist/lib/resources/aws/database/clickhouseConstants.d.ts +33 -49
- package/dist/lib/resources/aws/database/clickhouseConstants.js +41 -67
- package/dist/lib/resources/aws/database/clickhouseDataZone.d.ts +13 -0
- package/dist/lib/resources/aws/database/clickhouseDataZone.js +25 -0
- package/dist/lib/resources/aws/database/clickhouseMaintenanceScript.d.ts +6 -0
- package/dist/lib/resources/aws/database/clickhouseMaintenanceScript.js +13 -3
- package/dist/lib/resources/aws/database/clickhouseOptimiseScript.d.ts +42 -25
- package/dist/lib/resources/aws/database/clickhouseOptimiseScript.js +101 -17
- package/dist/lib/resources/aws/database/clickhouseSchemas.d.ts +7 -18
- package/dist/lib/resources/aws/database/clickhouseSchemas.js +17 -31
- package/dist/lib/resources/aws/database/clickhouseTuning.js +5 -4
- package/dist/lib/resources/aws/database/clickhouseUserData.d.ts +49 -17
- package/dist/lib/resources/aws/database/clickhouseUserData.js +89 -51
- package/dist/lib/resources/aws/database/clickhouseXmlRenderer.d.ts +3 -2
- package/dist/lib/resources/aws/database/clickhouseXmlRenderer.js +5 -4
- package/dist/lib/resources/aws/database/dynamodb.d.ts +47 -8
- package/dist/lib/resources/aws/database/dynamodb.js +169 -33
- package/dist/lib/resources/aws/database/engineVersions.d.ts +55 -0
- package/dist/lib/resources/aws/database/engineVersions.js +138 -0
- package/dist/lib/resources/aws/database/index.d.ts +1 -0
- package/dist/lib/resources/aws/database/index.js +1 -0
- package/dist/lib/resources/aws/database/rdsAurora.d.ts +27 -8
- package/dist/lib/resources/aws/database/rdsAurora.js +138 -39
- package/dist/lib/resources/aws/database/rdsAuroraGlobal.d.ts +21 -5
- package/dist/lib/resources/aws/database/rdsAuroraGlobal.js +47 -8
- package/dist/lib/resources/aws/database/rdsDefaults.d.ts +9 -2
- package/dist/lib/resources/aws/database/rdsDefaults.js +9 -2
- package/dist/lib/resources/aws/database/rdsHelpers.d.ts +20 -2
- package/dist/lib/resources/aws/database/rdsHelpers.js +40 -7
- package/dist/lib/resources/aws/database/rdsInstance.d.ts +29 -5
- package/dist/lib/resources/aws/database/rdsInstance.js +119 -50
- package/dist/lib/resources/aws/database/rdsProxyOutput.d.ts +2 -5
- package/dist/lib/resources/aws/database/rdsProxyOutput.js +9 -13
- package/dist/lib/resources/aws/database/trustAnchors.d.ts +18 -0
- package/dist/lib/resources/aws/database/trustAnchors.js +36 -0
- package/dist/lib/resources/aws/iam/ciIdentity.d.ts +4 -31
- package/dist/lib/resources/aws/iam/ciIdentity.js +67 -114
- package/dist/lib/resources/aws/iam/ciIdentityFactory.d.ts +1 -1
- package/dist/lib/resources/aws/iam/delegationRole.d.ts +3 -20
- package/dist/lib/resources/aws/iam/delegationRole.js +51 -53
- package/dist/lib/resources/aws/iam/identityCenter/group.js +1 -1
- package/dist/lib/resources/aws/iam/identityCenter/permissionSet.js +8 -1
- package/dist/lib/resources/aws/iam/identityCenter/user.d.ts +47 -5
- package/dist/lib/resources/aws/iam/identityCenter/user.js +95 -24
- package/dist/lib/resources/aws/iam/index.d.ts +0 -3
- package/dist/lib/resources/aws/iam/index.js +0 -3
- package/dist/lib/resources/aws/iam/oidcProviderAdoption.js +15 -15
- package/dist/lib/resources/aws/iam/role.js +4 -3
- package/dist/lib/resources/aws/logging/cloudTrail.d.ts +13 -5
- package/dist/lib/resources/aws/logging/cloudTrail.js +39 -30
- package/dist/lib/resources/aws/logging/index.d.ts +5 -0
- package/dist/lib/resources/aws/logging/index.js +5 -0
- package/dist/lib/resources/aws/logging/logDeliveryBucket.d.ts +124 -0
- package/dist/lib/resources/aws/logging/logDeliveryBucket.js +283 -0
- package/dist/lib/resources/aws/logging/logGroup.d.ts +176 -10
- package/dist/lib/resources/aws/logging/logGroup.js +394 -11
- package/dist/lib/resources/aws/logging/logGroupHygiene.d.ts +58 -18
- package/dist/lib/resources/aws/logging/logGroupHygiene.js +293 -39
- package/dist/lib/resources/aws/logging/logGroupValues.d.ts +15 -0
- package/dist/lib/resources/aws/logging/logGroupValues.js +18 -0
- package/dist/lib/resources/aws/logging/logLedgerRecord.d.ts +64 -0
- package/dist/lib/resources/aws/logging/logLedgerRecord.js +47 -0
- package/dist/lib/resources/aws/logging/logPolicyResolution.d.ts +64 -0
- package/dist/lib/resources/aws/logging/logPolicyResolution.js +193 -0
- package/dist/lib/resources/aws/logging/logRollout.d.ts +1 -0
- package/dist/lib/resources/aws/logging/logRollout.js +1 -0
- package/dist/lib/resources/aws/logging/logScope.d.ts +121 -0
- package/dist/lib/resources/aws/logging/logScope.js +400 -0
- package/dist/lib/resources/aws/logging/metricFilter.d.ts +12 -0
- package/dist/lib/resources/aws/logging/metricFilter.js +21 -0
- package/dist/lib/resources/aws/logging/singletonLogGroup.d.ts +4 -1
- package/dist/lib/resources/aws/logging/singletonLogGroup.js +9 -3
- package/dist/lib/resources/aws/messaging/eventBridgeQueueGrants.d.ts +5 -0
- package/dist/lib/resources/aws/messaging/eventBridgeQueueGrants.js +6 -1
- package/dist/lib/resources/aws/messaging/eventBridgeRule.d.ts +32 -12
- package/dist/lib/resources/aws/messaging/eventBridgeRule.js +49 -24
- package/dist/lib/resources/aws/messaging/eventTargets.d.ts +8 -5
- package/dist/lib/resources/aws/messaging/eventTargets.js +65 -9
- package/dist/lib/resources/aws/messaging/eventbridge.d.ts +1 -1
- package/dist/lib/resources/aws/messaging/eventbridge.js +17 -16
- package/dist/lib/resources/aws/messaging/index.d.ts +1 -1
- package/dist/lib/resources/aws/messaging/queuePolicyQuota.js +4 -6
- package/dist/lib/resources/aws/messaging/schedule.d.ts +24 -6
- package/dist/lib/resources/aws/messaging/schedule.js +12 -4
- package/dist/lib/resources/aws/messaging/sns.d.ts +13 -4
- package/dist/lib/resources/aws/messaging/sns.js +30 -14
- package/dist/lib/resources/aws/messaging/sqs.d.ts +61 -0
- package/dist/lib/resources/aws/messaging/sqs.js +150 -42
- package/dist/lib/resources/aws/messaging/subscription.d.ts +10 -11
- package/dist/lib/resources/aws/messaging/subscription.js +6 -0
- package/dist/lib/resources/aws/messaging/utils.d.ts +2 -0
- package/dist/lib/resources/aws/messaging/utils.js +5 -1
- package/dist/lib/resources/aws/monitoring/alarmDefaults.d.ts +5 -2
- package/dist/lib/resources/aws/monitoring/alarmDefaults.js +8 -3
- package/dist/lib/resources/aws/monitoring/buildkiteControllerAlarms.d.ts +19 -0
- package/dist/lib/resources/aws/monitoring/buildkiteControllerAlarms.js +123 -0
- package/dist/lib/resources/aws/monitoring/buildkiteControllerMetrics.d.ts +34 -0
- package/dist/lib/resources/aws/monitoring/buildkiteControllerMetrics.js +32 -0
- package/dist/lib/resources/aws/monitoring/buildkiteFinishWatcherAlarms.d.ts +20 -0
- package/dist/lib/resources/aws/monitoring/buildkiteFinishWatcherAlarms.js +115 -0
- package/dist/lib/resources/aws/monitoring/buildkiteFinishWatcherMetrics.d.ts +38 -0
- package/dist/lib/resources/aws/monitoring/buildkiteFinishWatcherMetrics.js +39 -0
- package/dist/lib/resources/aws/monitoring/buildkiteTokenExpiryAlarms.d.ts +50 -0
- package/dist/lib/resources/aws/monitoring/buildkiteTokenExpiryAlarms.js +197 -0
- package/dist/lib/resources/aws/monitoring/buildkiteTokenExpiryMetrics.d.ts +66 -0
- package/dist/lib/resources/aws/monitoring/buildkiteTokenExpiryMetrics.js +57 -0
- package/dist/lib/resources/aws/monitoring/buildkiteVcpuAlarms.d.ts +62 -0
- package/dist/lib/resources/aws/monitoring/buildkiteVcpuAlarms.js +145 -0
- package/dist/lib/resources/aws/monitoring/clickhouseAlarms.d.ts +5 -10
- package/dist/lib/resources/aws/monitoring/clickhouseAlarms.js +68 -98
- package/dist/lib/resources/aws/monitoring/ecsTaskStopWatchdog.d.ts +10 -5
- package/dist/lib/resources/aws/monitoring/ecsTaskStopWatchdog.js +24 -16
- package/dist/lib/resources/aws/monitoring/gatedAbsencePager.d.ts +133 -0
- package/dist/lib/resources/aws/monitoring/gatedAbsencePager.js +141 -0
- package/dist/lib/resources/aws/monitoring/imageBuildFailureAlarm.d.ts +59 -0
- package/dist/lib/resources/aws/monitoring/imageBuildFailureAlarm.js +89 -0
- package/dist/lib/resources/aws/monitoring/index.d.ts +0 -1
- package/dist/lib/resources/aws/monitoring/index.js +0 -1
- package/dist/lib/resources/aws/monitoring/logPatternAlarms.d.ts +12 -4
- package/dist/lib/resources/aws/monitoring/logPatternAlarms.js +8 -5
- package/dist/lib/resources/aws/monitoring/metricNamespaces.d.ts +9 -2
- package/dist/lib/resources/aws/monitoring/metricNamespaces.js +12 -2
- package/dist/lib/resources/aws/monitoring/scheduleAlarms.d.ts +28 -10
- package/dist/lib/resources/aws/monitoring/scheduleAlarms.js +79 -18
- package/dist/lib/resources/aws/networking/crossAccountDelegationRecord.d.ts +20 -0
- package/dist/lib/resources/aws/networking/crossAccountDelegationRecord.js +25 -2
- package/dist/lib/resources/aws/networking/crossAccountReturnRoutes.js +3 -2
- package/dist/lib/resources/aws/networking/dnsRecord/aliasRecord.d.ts +8 -0
- package/dist/lib/resources/aws/networking/dnsRecord/aliasRecord.js +1 -1
- package/dist/lib/resources/aws/networking/dnsRecord/dnsRecordBase.d.ts +16 -2
- package/dist/lib/resources/aws/networking/dnsRecord/dnsRecordBase.js +56 -4
- package/dist/lib/resources/aws/networking/domainCertificate.d.ts +10 -2
- package/dist/lib/resources/aws/networking/domainCertificate.js +13 -10
- package/dist/lib/resources/aws/networking/flowLogRetention.d.ts +15 -0
- package/dist/lib/resources/aws/networking/flowLogRetention.js +26 -0
- package/dist/lib/resources/aws/networking/hostedZone.d.ts +12 -1
- package/dist/lib/resources/aws/networking/hostedZone.js +41 -20
- package/dist/lib/resources/aws/networking/ipamPool.js +28 -20
- package/dist/lib/resources/aws/networking/resolverQueryLoggingConfig.d.ts +57 -0
- package/dist/lib/resources/aws/networking/resolverQueryLoggingConfig.js +127 -0
- package/dist/lib/resources/aws/networking/serviceDiscovery.d.ts +23 -13
- package/dist/lib/resources/aws/networking/serviceDiscovery.js +66 -18
- package/dist/lib/resources/aws/networking/vpc.d.ts +40 -5
- package/dist/lib/resources/aws/networking/vpc.js +171 -55
- package/dist/lib/resources/aws/networking/vpcPeeringAccepterRole.d.ts +1 -1
- package/dist/lib/resources/aws/networking/vpcPeeringAccepterRole.js +4 -2
- package/dist/lib/resources/aws/networking/vpcPeeringConnection.js +3 -3
- package/dist/lib/resources/aws/organisation/costAllocationTagActivator.js +13 -8
- package/dist/lib/resources/aws/organisation/organisationAccount.js +55 -8
- package/dist/lib/resources/aws/organisation/organisationPolicy.js +3 -1
- package/dist/lib/resources/aws/secrets/index.d.ts +0 -1
- package/dist/lib/resources/aws/secrets/index.js +0 -1
- package/dist/lib/resources/aws/secrets/kms.d.ts +40 -3
- package/dist/lib/resources/aws/secrets/kms.js +40 -27
- package/dist/lib/resources/aws/secrets/parameter.d.ts +1 -22
- package/dist/lib/resources/aws/secrets/parameter.js +2 -93
- package/dist/lib/resources/aws/secrets/secret.d.ts +81 -13
- package/dist/lib/resources/aws/secrets/secret.js +160 -47
- package/dist/lib/resources/aws/secrets/stackEncryptionKey.d.ts +39 -25
- package/dist/lib/resources/aws/secrets/stackEncryptionKey.js +46 -28
- package/dist/lib/resources/aws/secrets/tlsCaSecret.js +1 -1
- package/dist/lib/resources/aws/secrets/tlsServerSecret.d.ts +6 -5
- package/dist/lib/resources/aws/secrets/tlsServerSecret.js +6 -5
- package/dist/lib/resources/aws/storage/bucketDeployment.d.ts +19 -3
- package/dist/lib/resources/aws/storage/bucketDeployment.js +105 -7
- package/dist/lib/resources/aws/storage/bucketDeploymentGrants.d.ts +22 -0
- package/dist/lib/resources/aws/storage/bucketDeploymentGrants.js +38 -0
- package/dist/lib/resources/aws/storage/bucketNotificationsGovernance.d.ts +54 -0
- package/dist/lib/resources/aws/storage/bucketNotificationsGovernance.js +321 -0
- package/dist/lib/resources/aws/storage/bucketNotificationsHandler.source.cjs +937 -0
- package/dist/lib/resources/aws/storage/bucketNotificationsHandlerIdentity.d.ts +50 -0
- package/dist/lib/resources/aws/storage/bucketNotificationsHandlerIdentity.js +92 -0
- package/dist/lib/resources/aws/storage/bucketNotificationsRolePolicySize.d.ts +33 -0
- package/dist/lib/resources/aws/storage/bucketNotificationsRolePolicySize.js +100 -0
- package/dist/lib/resources/aws/storage/bucketPolicyAmendment.d.ts +39 -0
- package/dist/lib/resources/aws/storage/bucketPolicyAmendment.js +282 -0
- package/dist/lib/resources/aws/storage/bucketPolicyDeployments.d.ts +67 -0
- package/dist/lib/resources/aws/storage/bucketPolicyDeployments.js +290 -0
- package/dist/lib/resources/aws/storage/bucketPolicyIntrinsicBounds.d.ts +31 -0
- package/dist/lib/resources/aws/storage/bucketPolicyIntrinsicBounds.js +73 -0
- package/dist/lib/resources/aws/storage/ecr.d.ts +18 -2
- package/dist/lib/resources/aws/storage/ecr.js +36 -16
- package/dist/lib/resources/aws/storage/s3.d.ts +155 -23
- package/dist/lib/resources/aws/storage/s3.js +271 -53
- package/dist/lib/resources/aws/storage/synthesisedRoleId.d.ts +13 -0
- package/dist/lib/resources/aws/storage/synthesisedRoleId.js +23 -0
- package/dist/lib/resources/aws/utilities/awsCustomResource.d.ts +70 -10
- package/dist/lib/resources/aws/utilities/awsCustomResource.js +120 -21
- package/dist/lib/resources/aws/utilities/awsCustomResourceAdmission.d.ts +26 -0
- package/dist/lib/resources/aws/utilities/awsCustomResourceAdmission.js +422 -0
- package/dist/lib/resources/aws/utilities/awsCustomResourceContract.d.ts +138 -0
- package/dist/lib/resources/aws/utilities/awsCustomResourceContract.js +55 -0
- package/dist/lib/resources/aws/utilities/awsCustomResourcePolicy.d.ts +74 -0
- package/dist/lib/resources/aws/utilities/awsCustomResourcePolicy.js +287 -0
- package/dist/lib/resources/aws/utilities/awsCustomResourceProviderLogging.d.ts +33 -0
- package/dist/lib/resources/aws/utilities/awsCustomResourceProviderLogging.js +51 -0
- package/dist/lib/resources/aws/utilities/awsCustomResourceRawWarning.d.ts +28 -0
- package/dist/lib/resources/aws/utilities/awsCustomResourceRawWarning.js +57 -0
- package/dist/lib/resources/aws/utilities/awsCustomResourceRefusal.d.ts +51 -0
- package/dist/lib/resources/aws/utilities/awsCustomResourceRefusal.js +43 -0
- package/dist/lib/resources/aws/utilities/awsCustomResourceRenderGate.d.ts +53 -0
- package/dist/lib/resources/aws/utilities/awsCustomResourceRenderGate.js +437 -0
- package/dist/lib/resources/aws/utilities/awsSdkCallAllowList.d.ts +262 -0
- package/dist/lib/resources/aws/utilities/awsSdkCallAllowList.js +413 -0
- package/dist/lib/resources/aws/utilities/awsSdkCallSecrets.d.ts +54 -0
- package/dist/lib/resources/aws/utilities/awsSdkCallSecrets.js +192 -0
- package/dist/lib/resources/aws/utilities/awsSdkCallValueShapes.d.ts +58 -0
- package/dist/lib/resources/aws/utilities/awsSdkCallValueShapes.js +286 -0
- package/dist/lib/resources/aws/utilities/codeBuild.d.ts +15 -4
- package/dist/lib/resources/aws/utilities/codeBuild.js +46 -2
- package/dist/lib/resources/aws/utilities/customResource.d.ts +4 -0
- package/dist/lib/resources/aws/utilities/customResource.js +14 -6
- package/dist/lib/resources/aws/utilities/customResourceProvider.d.ts +33 -2
- package/dist/lib/resources/aws/utilities/customResourceProvider.js +113 -2
- package/dist/lib/resources/aws/utilities/index.d.ts +0 -1
- package/dist/lib/resources/aws/utilities/index.js +0 -1
- package/dist/lib/resources/aws/utilities/tlsCertGenerator.d.ts +17 -3
- package/dist/lib/resources/aws/utilities/tlsCertGenerator.js +70 -4
- package/dist/lib/terminology/cdkParity.d.ts +79 -0
- package/dist/lib/terminology/cdkParity.js +30 -0
- package/dist/lib/terminology/parity/compute.d.ts +2 -0
- package/dist/lib/terminology/parity/compute.js +667 -0
- package/dist/lib/terminology/parity/dataAndMessaging.d.ts +2 -0
- package/dist/lib/terminology/parity/dataAndMessaging.js +438 -0
- package/dist/lib/terminology/parity/governance.d.ts +2 -0
- package/dist/lib/terminology/parity/governance.js +309 -0
- package/dist/lib/terminology/parity/index.d.ts +3 -0
- package/dist/lib/terminology/parity/index.js +11 -0
- package/dist/lib/terminology/parity/storageAndNetworking.d.ts +2 -0
- package/dist/lib/terminology/parity/storageAndNetworking.js +522 -0
- package/dist/lib/terminology/refuseRemoved.d.ts +7 -0
- package/dist/lib/terminology/refuseRemoved.js +13 -0
- package/dist/lib/terminology/refuseRenamed.d.ts +49 -0
- package/dist/lib/terminology/refuseRenamed.js +310 -0
- package/dist/lib/utils/acmTagValue.d.ts +1 -2
- package/dist/lib/utils/acmTagValue.js +1 -13
- package/dist/lib/utils/adoptedResiduals.d.ts +14 -0
- package/dist/lib/utils/adoptedResiduals.js +30 -0
- package/dist/lib/utils/albAliasTargetRegistry.d.ts +13 -5
- package/dist/lib/utils/albAliasTargetRegistry.js +20 -15
- package/dist/lib/utils/backupTierMapping.d.ts +59 -21
- package/dist/lib/utils/backupTierMapping.js +48 -15
- package/dist/lib/utils/capacityIdentityContext.d.ts +5 -16
- package/dist/lib/utils/capacityIdentityContext.js +11 -38
- package/dist/lib/utils/capacitySlotLabel.d.ts +7 -0
- package/dist/lib/utils/capacitySlotLabel.js +13 -0
- package/dist/lib/utils/capitaliseString.d.ts +1 -1
- package/dist/lib/utils/capitaliseString.js +1 -1
- package/dist/lib/utils/cdkConstructIds.d.ts +13 -0
- package/dist/lib/utils/cdkConstructIds.js +17 -0
- package/dist/lib/utils/cdkContext.d.ts +139 -14
- package/dist/lib/utils/cdkContext.js +200 -33
- package/dist/lib/utils/cdnAliasTargetRegistry.d.ts +1 -1
- package/dist/lib/utils/cdnAliasTargetRegistry.js +8 -8
- package/dist/lib/utils/cfnOutputRead.d.ts +28 -0
- package/dist/lib/utils/cfnOutputRead.js +43 -0
- package/dist/lib/utils/ciOidcProviderHandler.d.ts +0 -6
- package/dist/lib/utils/ciOidcProviderHandler.js +2 -13
- package/dist/lib/utils/connections.d.ts +3 -8
- package/dist/lib/utils/connections.js +65 -21
- package/dist/lib/utils/connector.d.ts +62 -27
- package/dist/lib/utils/connector.js +65 -21
- package/dist/lib/utils/constructsOfClass.d.ts +3 -0
- package/dist/lib/utils/constructsOfClass.js +4 -0
- package/dist/lib/utils/costAllocationTags.d.ts +8 -2
- package/dist/lib/utils/costAllocationTags.js +1 -1
- package/dist/lib/utils/databaseTypes.d.ts +2 -1
- package/dist/lib/utils/deployAccount.d.ts +54 -0
- package/dist/lib/utils/deployAccount.js +103 -0
- package/dist/lib/utils/deployedLoadBalancersContext.d.ts +13 -0
- package/dist/lib/utils/deployedLoadBalancersContext.js +18 -0
- package/dist/lib/utils/dnsRecordRegistry.d.ts +27 -5
- package/dist/lib/utils/dnsRecordRegistry.js +149 -35
- package/dist/lib/utils/domainRefusalLabels.d.ts +58 -0
- package/dist/lib/utils/domainRefusalLabels.js +112 -0
- package/dist/lib/utils/domainTypes.d.ts +15 -7
- package/dist/lib/utils/domainTypes.js +51 -19
- package/dist/lib/utils/duplicateNames.d.ts +54 -0
- package/dist/lib/utils/duplicateNames.js +286 -0
- package/dist/lib/utils/engineCompat.d.ts +16 -9
- package/dist/lib/utils/engineCompat.js +25 -16
- package/dist/lib/utils/env.js +3 -3
- package/dist/lib/utils/exportNaming.d.ts +10 -51
- package/dist/lib/utils/exportNaming.js +10 -54
- package/dist/lib/utils/fjallAppRoot.d.ts +9 -0
- package/dist/lib/utils/fjallAppRoot.js +13 -0
- package/dist/lib/utils/getAccountId.d.ts +4 -1
- package/dist/lib/utils/getAccountId.js +8 -4
- package/dist/lib/utils/getConfig.d.ts +0 -1
- package/dist/lib/utils/getConfig.js +24 -27
- package/dist/lib/utils/hostConstructKey.d.ts +25 -0
- package/dist/lib/utils/hostConstructKey.js +44 -0
- package/dist/lib/utils/implicitDescription.d.ts +40 -0
- package/dist/lib/utils/implicitDescription.js +86 -0
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/lib/utils/inlineSource.d.ts +89 -0
- package/dist/lib/utils/inlineSource.js +230 -0
- package/dist/lib/utils/latin1Description.d.ts +16 -0
- package/dist/lib/utils/latin1Description.js +34 -0
- package/dist/lib/utils/lightweightProviderTagsAspect.d.ts +25 -0
- package/dist/lib/utils/lightweightProviderTagsAspect.js +47 -0
- package/dist/lib/utils/logResidual.d.ts +35 -0
- package/dist/lib/utils/logResidual.js +210 -0
- package/dist/lib/utils/managedDomainContext.d.ts +15 -17
- package/dist/lib/utils/managedDomainContext.js +89 -63
- package/dist/lib/utils/manifestWriter.d.ts +46 -18
- package/dist/lib/utils/manifestWriter.js +129 -78
- package/dist/lib/utils/maskedEcho.d.ts +13 -0
- package/dist/lib/utils/maskedEcho.js +31 -0
- package/dist/lib/utils/operatorScope.d.ts +33 -0
- package/dist/lib/utils/operatorScope.js +45 -0
- package/dist/lib/utils/orgConfigParser.d.ts +20 -4
- package/dist/lib/utils/orgConfigParser.js +127 -63
- package/dist/lib/utils/propOwnership.d.ts +20 -0
- package/dist/lib/utils/propOwnership.js +18 -0
- package/dist/lib/utils/records.d.ts +10 -0
- package/dist/lib/utils/records.js +29 -0
- package/dist/lib/utils/removalMarkerAspect.d.ts +51 -0
- package/dist/lib/utils/removalMarkerAspect.js +95 -0
- package/dist/lib/utils/removalMarkerReach.d.ts +69 -0
- package/dist/lib/utils/removalMarkerReach.js +147 -0
- package/dist/lib/utils/removalPolicy.d.ts +161 -1
- package/dist/lib/utils/removalPolicy.js +366 -3
- package/dist/lib/utils/renderedTemplate.d.ts +17 -0
- package/dist/lib/utils/renderedTemplate.js +45 -0
- package/dist/lib/utils/residualLedger.d.ts +47 -0
- package/dist/lib/utils/residualLedger.js +431 -0
- package/dist/lib/utils/resolveAlertsTopic.d.ts +4 -7
- package/dist/lib/utils/resolveAlertsTopic.js +18 -18
- package/dist/lib/utils/resourceNaming.d.ts +35 -6
- package/dist/lib/utils/resourceNaming.js +166 -36
- package/dist/lib/utils/resourceTypeTags.d.ts +10 -8
- package/dist/lib/utils/resourceTypeTags.js +11 -13
- package/dist/lib/utils/sameStackReference.d.ts +108 -0
- package/dist/lib/utils/sameStackReference.js +226 -0
- package/dist/lib/utils/stackLabel.d.ts +26 -0
- package/dist/lib/utils/stackLabel.js +91 -0
- package/dist/lib/utils/stackOutput.d.ts +114 -0
- package/dist/lib/utils/stackOutput.js +345 -0
- package/dist/lib/utils/stackOutputValidation.d.ts +19 -0
- package/dist/lib/utils/stackOutputValidation.js +263 -0
- package/dist/lib/utils/stackRegions.d.ts +7 -0
- package/dist/lib/utils/stackRegions.js +71 -0
- package/dist/lib/utils/stackSingleton.d.ts +8 -0
- package/dist/lib/utils/stackSingleton.js +15 -0
- package/dist/lib/utils/standardTagsAspect.d.ts +23 -6
- package/dist/lib/utils/standardTagsAspect.js +33 -11
- package/dist/lib/utils/tagUpdateBehaviour.d.ts +22 -0
- package/dist/lib/utils/tagUpdateBehaviour.js +1261 -0
- package/dist/lib/utils/templateTags.d.ts +19 -0
- package/dist/lib/utils/templateTags.js +59 -0
- package/dist/lib/utils/topLevelStack.d.ts +8 -0
- package/dist/lib/utils/topLevelStack.js +13 -0
- package/dist/lib/utils/validationLogger.d.ts +6 -2
- package/dist/lib/utils/validationLogger.js +20 -10
- package/dist/lib/utils/vpcUtils.d.ts +22 -0
- package/dist/lib/utils/vpcUtils.js +32 -0
- package/package.json +64 -25
- package/dist/lib/lambda-assets/cert-generator/THIRD-PARTY-NOTICES.txt +0 -341
- package/dist/lib/patterns/aws/buildkite/pins.d.ts +0 -69
- package/dist/lib/patterns/aws/buildkite/pins.js +0 -79
- package/dist/lib/patterns/aws/buildkite/schema.d.ts +0 -8
- package/dist/lib/patterns/aws/buildkite/schema.js +0 -8
- package/dist/lib/resources/aws/compute/samApplication.d.ts +0 -15
- package/dist/lib/resources/aws/compute/samApplication.js +0 -27
- package/dist/lib/resources/aws/iam/ciIdentityTrust.d.ts +0 -48
- package/dist/lib/resources/aws/iam/ciIdentityTrust.js +0 -87
- package/dist/lib/resources/aws/iam/instanceProfile.d.ts +0 -5
- package/dist/lib/resources/aws/iam/instanceProfile.js +0 -8
- package/dist/lib/resources/aws/iam/policy.d.ts +0 -5
- package/dist/lib/resources/aws/iam/policy.js +0 -8
- package/dist/lib/resources/aws/monitoring/buildkiteAlarms.d.ts +0 -29
- package/dist/lib/resources/aws/monitoring/buildkiteAlarms.js +0 -90
- package/dist/lib/resources/aws/secrets/alias.d.ts +0 -5
- package/dist/lib/resources/aws/secrets/alias.js +0 -8
- package/dist/lib/resources/aws/utilities/resourceShare.d.ts +0 -5
- package/dist/lib/resources/aws/utilities/resourceShare.js +0 -8
- package/dist/lib/utils/deployTimeWriterMarkerAspect.d.ts +0 -23
- package/dist/lib/utils/deployTimeWriterMarkerAspect.js +0 -35
- package/dist/lib/utils/getAsync.d.ts +0 -10
- package/dist/lib/utils/getAsync.js +0 -32
- package/dist/lib/utils/getStackOutput.d.ts +0 -1
- package/dist/lib/utils/getStackOutput.js +0 -16
- package/dist/lib/utils/stripAndCamelCase.d.ts +0 -1
- package/dist/lib/utils/stripAndCamelCase.js +0 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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 {
|
|
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
|
|
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
|
|
101
|
-
if (
|
|
102
|
-
throw new Error(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
|
121
|
-
const
|
|
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,
|
|
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
|
-
|
|
240
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
490
|
-
`
|
|
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
|
-
|
|
526
|
-
|
|
527
|
-
`
|
|
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
|
|
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
|
|
575
|
-
|
|
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
|
|
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
|
-
|
|
588
|
-
`
|
|
589
|
-
|
|
590
|
-
|
|
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,
|
|
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
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
`
|
|
611
|
-
|
|
612
|
-
|
|
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,
|
|
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
|
|
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
|
-
|
|
641
|
-
|
|
642
|
-
|
|
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
|
-
|
|
653
|
-
|
|
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
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
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
|
|
678
|
-
*
|
|
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(
|
|
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(
|
|
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(
|
|
919
|
-
`
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
-
*
|
|
1252
|
-
*
|
|
1253
|
-
* when the app backup tier encrypts,
|
|
1254
|
-
* cluster resolved for its service and
|
|
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
|
-
|
|
1257
|
-
const
|
|
1258
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
1301
|
-
|
|
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
|
|
1381
|
-
*
|
|
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
|
|
1412
|
-
`
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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
|
-
*
|
|
1487
|
-
*
|
|
1488
|
-
*
|
|
1489
|
-
*
|
|
1490
|
-
*
|
|
1491
|
-
*
|
|
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
|
|
1494
|
-
*
|
|
1495
|
-
*
|
|
1496
|
-
*
|
|
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
|
-
|
|
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
|
-
/**
|
|
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 =
|
|
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
|
-
|
|
1547
|
-
|
|
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:
|
|
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.
|
|
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:
|
|
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
|
|
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:
|
|
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
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
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
|
|
1814
|
-
*
|
|
1815
|
-
* `bucket.grantReadWrite(td.taskRole)`) to the migration task role.
|
|
1816
|
-
* `separateTaskDef`
|
|
1817
|
-
*
|
|
1818
|
-
*
|
|
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.
|
|
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
|
|
1833
|
-
* shared with `awaitMigrationsFrom
|
|
1834
|
-
*
|
|
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);
|