@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
|
@@ -0,0 +1,937 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fjall's handler for `Custom::S3BucketNotifications`, run in the function
|
|
3
|
+
* aws-cdk-lib creates for them (bucketNotificationsGovernance.ts takes it
|
|
4
|
+
* over). It reads a bucket's notification configuration before it writes,
|
|
5
|
+
* keeps every entry it cannot prove this resource wrote, and answers
|
|
6
|
+
* CloudFormation exactly once. CommonJS: inline code lands as index.js.
|
|
7
|
+
*
|
|
8
|
+
* A kind of notification setting the handler does not know is refused
|
|
9
|
+
* before a write rather than erased. That covers only a kind the SDK hands
|
|
10
|
+
* the handler: the Lambda runtime's bundled @aws-sdk/client-s3 drops any XML
|
|
11
|
+
* member it does not model before the handler sees it, so a kind S3 adds
|
|
12
|
+
* that the bundled SDK does not yet model is erased by any write this
|
|
13
|
+
* handler makes. Only the converge-skip (no write when nothing changes)
|
|
14
|
+
* limits that.
|
|
15
|
+
*/
|
|
16
|
+
"use strict";
|
|
17
|
+
|
|
18
|
+
const https = require("node:https");
|
|
19
|
+
const { createHash } = require("node:crypto");
|
|
20
|
+
|
|
21
|
+
// Carried verbatim from @fjall/util, which this file cannot import;
|
|
22
|
+
// bucketNotificationsHandlerContract.test.ts pins them equal.
|
|
23
|
+
const FJALL_CONTRACT_PROPERTY = "FjallContract";
|
|
24
|
+
const FJALL_CONTRACT = "1";
|
|
25
|
+
const OWNER_PROPERTY = "FjallExpectedBucketOwner";
|
|
26
|
+
const EVENTBRIDGE_PROPERTY = "FjallEventBridgeEnabled";
|
|
27
|
+
const ROLE_ARN_ENV = "FJALL_HANDLER_ROLE_ARN";
|
|
28
|
+
const DESTINATION_KEYS = Object.freeze({
|
|
29
|
+
TopicConfigurations: "TopicArn",
|
|
30
|
+
QueueConfigurations: "QueueArn",
|
|
31
|
+
LambdaFunctionConfigurations: "LambdaFunctionArn"
|
|
32
|
+
});
|
|
33
|
+
const KINDS = Object.freeze(Object.keys(DESTINATION_KEYS));
|
|
34
|
+
const EVENTBRIDGE = "EventBridgeConfiguration";
|
|
35
|
+
const KNOWN_LIVE_KEYS = Object.freeze([...KINDS, EVENTBRIDGE, "$metadata"]);
|
|
36
|
+
const PROVENANCE_MARK = ":fjall-eventbridge-";
|
|
37
|
+
const REQUEST_TYPES = Object.freeze(["Create", "Update", "Delete"]);
|
|
38
|
+
const BUCKET_GONE_ERROR_NAMES = Object.freeze([
|
|
39
|
+
"NoSuchBucket",
|
|
40
|
+
"NotFound",
|
|
41
|
+
"404"
|
|
42
|
+
]);
|
|
43
|
+
const READ_RETRY_DELAYS_MS = Object.freeze([2000, 4000, 8000, 16000, 30000]);
|
|
44
|
+
const SDK_CALL_TIMEOUT_MS = 20000;
|
|
45
|
+
const RESPONSE_TIMEOUT_MS = 10000;
|
|
46
|
+
const RESPONSE_MAX_BYTES = 4096;
|
|
47
|
+
const REASON_MAX_CHARS = 2048;
|
|
48
|
+
|
|
49
|
+
const VERDICTS = Object.freeze({
|
|
50
|
+
entry: Object.freeze(["own", "foreign"]),
|
|
51
|
+
eventBridge: Object.freeze(["request", "withdraw", "keep"]),
|
|
52
|
+
provenance: Object.freeze(["preexisting", "requested", "absent"]),
|
|
53
|
+
success: Object.freeze(["written", "unchanged", "retained", "absent"]),
|
|
54
|
+
refused: Object.freeze([
|
|
55
|
+
"unreadable",
|
|
56
|
+
"bucket-absent",
|
|
57
|
+
"rejected",
|
|
58
|
+
"unwritable",
|
|
59
|
+
"unknown-kind",
|
|
60
|
+
"malformed",
|
|
61
|
+
"unknown-contract",
|
|
62
|
+
"internal"
|
|
63
|
+
])
|
|
64
|
+
});
|
|
65
|
+
const OUTCOME_STATUS = Object.freeze({
|
|
66
|
+
written: "SUCCESS",
|
|
67
|
+
unchanged: "SUCCESS",
|
|
68
|
+
retained: "SUCCESS",
|
|
69
|
+
absent: "SUCCESS",
|
|
70
|
+
refused: "FAILED"
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
const LOGICAL_ID = /^[A-Za-z0-9]{1,255}$/;
|
|
74
|
+
const BUCKET_NAME = /^[A-Za-z0-9._-]{1,255}$/;
|
|
75
|
+
const ROLE_ARN = /^arn:[a-z0-9-]{1,32}:iam::\d{12}:role\/[\w+=,.@/-]{1,512}$/;
|
|
76
|
+
const ERROR_NAME = /^[A-Za-z0-9]{1,64}$/;
|
|
77
|
+
const ACCOUNT_ID = /^\d{12}$/;
|
|
78
|
+
const KIND_NAME = /^[A-Za-z]{1,64}$/;
|
|
79
|
+
const REQUEST_ID = /^[A-Za-z0-9/+=-]{1,128}$/;
|
|
80
|
+
// A Reason never names the bucket: S3's naming rules admit a token, and this
|
|
81
|
+
// inline source cannot mask one (FJL-843). It reads this where the name would
|
|
82
|
+
// stand, as its commands read <target>.
|
|
83
|
+
const BUCKET_SHOWN = "<bucket>";
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Every Reason and every log field is identifier-only by construction. A
|
|
87
|
+
* value reaches one only through a gate: a logical id, role ARN, error name,
|
|
88
|
+
* account id or notification kind through `identifierOr(value, pattern,
|
|
89
|
+
* fallback)` with LOGICAL_ID, ROLE_ARN, ERROR_NAME, ACCOUNT_ID or KIND_NAME;
|
|
90
|
+
* the stack name, account and partition through parseStackId's patterns; the
|
|
91
|
+
* request id through REQUEST_ID; or a count, a field name or a verdict the
|
|
92
|
+
* handler itself names. `fillReason` splices only those into fixed text. S3's
|
|
93
|
+
* error message and the notification configuration are never quoted, and
|
|
94
|
+
* neither is a bucket's name: BUCKET_NAME only validates the request, a
|
|
95
|
+
* Reason reads BUCKET_SHOWN where the name would stand, and a log line names
|
|
96
|
+
* the notification resource by its logical id.
|
|
97
|
+
*
|
|
98
|
+
* The denied, transient and bucket-absent reasons are carried verbatim from
|
|
99
|
+
* @fjall/util, which this file cannot import;
|
|
100
|
+
* bucketNotificationsHandlerContract.test.ts pins them equal.
|
|
101
|
+
*/
|
|
102
|
+
const ACTIONS = "s3:GetBucketNotification and s3:PutBucketNotification";
|
|
103
|
+
const CONTINUE_ROLLBACK =
|
|
104
|
+
"fjall aws exec --target <target> -- aws cloudformation continue-update-rollback --stack-name {{stackName}}";
|
|
105
|
+
const READ_FAILED =
|
|
106
|
+
"Fjall could not read the notification configuration of bucket {{bucket}} as role {{roleArn}}, and wrote nothing.";
|
|
107
|
+
const DENIED_TAIL = [
|
|
108
|
+
`The role needs ${ACTIONS} on {{bucketArn}}: lift the deny, then deploy again.`,
|
|
109
|
+
`If this stopped a rollback, continue it with the deploy role, skipping this resource: \`${CONTINUE_ROLLBACK} --resources-to-skip {{logicalId}}\``,
|
|
110
|
+
"Skipping writes nothing: the bucket keeps the notification configuration it has now, and Fjall converges it the next time a deploy updates this resource.",
|
|
111
|
+
"Fjall exempts this role in the policy of every S3Bucket it renders, and writes that exemption before the handler first runs, including after `fjall import`, which records a policy unamended. So the deny is in a service control policy, a permissions boundary, or a policy Fjall does not render: a statement added outside Fjall, or a bucket built with plain CDK."
|
|
112
|
+
];
|
|
113
|
+
const TRANSIENT_ROLLBACK = `If this stopped a rollback, continue it with the deploy role once the failure has passed, which retries {{logicalId}} and skips nothing: \`${CONTINUE_ROLLBACK}\``;
|
|
114
|
+
|
|
115
|
+
const REASON_TEMPLATES = Object.freeze({
|
|
116
|
+
denied: [READ_FAILED, ...DENIED_TAIL].join(" "),
|
|
117
|
+
transient: [
|
|
118
|
+
READ_FAILED,
|
|
119
|
+
"The read failed for a reason other than a denial, and such a failure can pass: deploy again once it has.",
|
|
120
|
+
TRANSIENT_ROLLBACK
|
|
121
|
+
].join(" "),
|
|
122
|
+
"write-denied": [
|
|
123
|
+
"Fjall could not write the notification configuration of bucket {{bucket}} as role {{roleArn}}: S3 denied the write, so nothing changed.",
|
|
124
|
+
...DENIED_TAIL
|
|
125
|
+
].join(" "),
|
|
126
|
+
"write-transient": [
|
|
127
|
+
"Fjall could not confirm its write of the notification configuration of bucket {{bucket}} as role {{roleArn}}.",
|
|
128
|
+
"The write failed for a reason other than a denial, and such a failure can pass: deploy again once it has, and the handler converges the bucket from what it then reads.",
|
|
129
|
+
TRANSIENT_ROLLBACK
|
|
130
|
+
].join(" "),
|
|
131
|
+
rejected:
|
|
132
|
+
"S3 refused the notification configuration Fjall merged for bucket {{bucket}} ({{errorName}}), and nothing was removed. Read it with `fjall aws exec --target <target> -- aws s3api get-bucket-notification-configuration --bucket {{bucket}}`, fix or remove the entry that overlaps one the template renders or names a destination S3 cannot validate, then deploy again.",
|
|
133
|
+
"unknown-kind":
|
|
134
|
+
"Bucket {{bucket}} carries notification settings of a kind this handler does not read ({{kind}}). S3 replaces a bucket's whole notification configuration on every write, so writing would erase them, and Fjall wrote nothing. Upgrade to a Fjall release whose handler reads that kind, or remove those settings from the bucket, then deploy again.",
|
|
135
|
+
"bucket-absent": [
|
|
136
|
+
"Bucket {{bucket}} no longer exists, and the template still holds its notification resource {{logicalId}}. Fjall wrote nothing.",
|
|
137
|
+
"Remove the bucket from the application, or deploy the Fjall release that retires it.",
|
|
138
|
+
`If this stopped a rollback, continue it with the deploy role, skipping this resource: \`${CONTINUE_ROLLBACK} --resources-to-skip {{logicalId}}\``,
|
|
139
|
+
"Skipping is correct here: a bucket that is gone has no notification configuration to keep."
|
|
140
|
+
].join(" "),
|
|
141
|
+
malformed:
|
|
142
|
+
"Fjall's bucket-notification handler refused resource {{logicalId}}: its {{field}} is missing or not in the form CloudFormation sends, so it wrote nothing.",
|
|
143
|
+
"unknown-contract":
|
|
144
|
+
"Resource {{logicalId}} carries a notification contract this handler does not know, so a later Fjall release rendered it. Fjall wrote nothing: deploy with that release or a later one.",
|
|
145
|
+
internal:
|
|
146
|
+
"Fjall's bucket-notification handler stopped on an internal error ({{errorName}}) while serving {{logicalId}}; its log names the step. Deploy again once the cause is fixed."
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
function unknownVerdict(verdict) {
|
|
150
|
+
throw new Error(`Unknown bucket-notification verdict: ${String(verdict)}`);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function isRecord(value) {
|
|
154
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function identifierOr(value, pattern, fallback) {
|
|
158
|
+
return typeof value === "string" && pattern.test(value) ? value : fallback;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function digest(text) {
|
|
162
|
+
return createHash("sha256").update(text).digest("hex");
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function fillReason(kind, values) {
|
|
166
|
+
if (!Object.hasOwn(REASON_TEMPLATES, kind)) return unknownVerdict(kind);
|
|
167
|
+
const filled = REASON_TEMPLATES[kind].replace(
|
|
168
|
+
/\{\{(\w+)\}\}/g,
|
|
169
|
+
(placeholder, name) =>
|
|
170
|
+
Object.hasOwn(values, name) ? String(values[name]) : placeholder
|
|
171
|
+
);
|
|
172
|
+
return filled.length <= REASON_MAX_CHARS
|
|
173
|
+
? filled
|
|
174
|
+
: `${filled.slice(0, REASON_MAX_CHARS - 1)}\u2026`;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function errorName(error) {
|
|
178
|
+
const name =
|
|
179
|
+
isRecord(error) || error instanceof Error ? error.name : undefined;
|
|
180
|
+
return identifierOr(name, ERROR_NAME, "UnnamedError");
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function errorFields(error) {
|
|
184
|
+
const metadata =
|
|
185
|
+
isRecord(error) && isRecord(error.$metadata) ? error.$metadata : {};
|
|
186
|
+
return {
|
|
187
|
+
error: errorName(error),
|
|
188
|
+
httpStatus: Number.isInteger(metadata.httpStatusCode)
|
|
189
|
+
? metadata.httpStatusCode
|
|
190
|
+
: undefined,
|
|
191
|
+
requestId: identifierOr(metadata.requestId, REQUEST_ID, undefined)
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function parseStackId(stackId) {
|
|
196
|
+
if (typeof stackId !== "string") return undefined;
|
|
197
|
+
const parts = stackId.split(":");
|
|
198
|
+
if (parts.length !== 6 || parts[0] !== "arn" || parts[2] !== "cloudformation")
|
|
199
|
+
return undefined;
|
|
200
|
+
const resource = parts[5].split("/");
|
|
201
|
+
const [kind, stackName] = resource;
|
|
202
|
+
if (
|
|
203
|
+
!/^[a-z0-9-]{1,32}$/.test(parts[1]) ||
|
|
204
|
+
!/^\d{12}$/.test(parts[4]) ||
|
|
205
|
+
resource.length !== 3 ||
|
|
206
|
+
kind !== "stack" ||
|
|
207
|
+
!/^[A-Za-z][A-Za-z0-9-]{0,127}$/.test(stackName)
|
|
208
|
+
) {
|
|
209
|
+
return undefined;
|
|
210
|
+
}
|
|
211
|
+
return { partition: parts[1], account: parts[4], stackName };
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function parseFlag(value, fallback) {
|
|
215
|
+
if (value === undefined) return fallback;
|
|
216
|
+
if (value === true || value === false) return value;
|
|
217
|
+
if (typeof value !== "string") return undefined;
|
|
218
|
+
const lowered = value.toLowerCase();
|
|
219
|
+
if (lowered === "true") return true;
|
|
220
|
+
if (lowered === "false") return false;
|
|
221
|
+
return undefined;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function isRenderedEntry(kind, entry) {
|
|
225
|
+
if (!isRecord(entry) || typeof entry[DESTINATION_KEYS[kind]] !== "string")
|
|
226
|
+
return false;
|
|
227
|
+
if (
|
|
228
|
+
!Array.isArray(entry.Events) ||
|
|
229
|
+
!entry.Events.every((e) => typeof e === "string")
|
|
230
|
+
)
|
|
231
|
+
return false;
|
|
232
|
+
if (entry.Filter === undefined) return true;
|
|
233
|
+
const rules =
|
|
234
|
+
isRecord(entry.Filter) && isRecord(entry.Filter.Key)
|
|
235
|
+
? entry.Filter.Key.FilterRules
|
|
236
|
+
: undefined;
|
|
237
|
+
return (
|
|
238
|
+
Array.isArray(rules) &&
|
|
239
|
+
rules.every(
|
|
240
|
+
(rule) =>
|
|
241
|
+
isRecord(rule) &&
|
|
242
|
+
typeof rule.Name === "string" &&
|
|
243
|
+
typeof rule.Value === "string"
|
|
244
|
+
)
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function parseConfiguration(raw) {
|
|
249
|
+
if (raw === undefined) return { lists: {}, eventBridge: false };
|
|
250
|
+
if (!isRecord(raw)) return undefined;
|
|
251
|
+
const lists = {};
|
|
252
|
+
for (const key of Object.keys(raw)) {
|
|
253
|
+
if (key === EVENTBRIDGE) continue;
|
|
254
|
+
if (!KINDS.includes(key)) return undefined;
|
|
255
|
+
const entries = raw[key];
|
|
256
|
+
if (
|
|
257
|
+
!Array.isArray(entries) ||
|
|
258
|
+
!entries.every((entry) => isRenderedEntry(key, entry))
|
|
259
|
+
)
|
|
260
|
+
return undefined;
|
|
261
|
+
lists[key] = entries;
|
|
262
|
+
}
|
|
263
|
+
return { lists, eventBridge: Object.hasOwn(raw, EVENTBRIDGE) };
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
function parseProperties(raw) {
|
|
267
|
+
if (!isRecord(raw))
|
|
268
|
+
return { refused: "malformed", field: "ResourceProperties" };
|
|
269
|
+
const contract = raw[FJALL_CONTRACT_PROPERTY];
|
|
270
|
+
if (contract !== undefined && contract !== FJALL_CONTRACT)
|
|
271
|
+
return { refused: "unknown-contract" };
|
|
272
|
+
const bucket = identifierOr(raw.BucketName, BUCKET_NAME, undefined);
|
|
273
|
+
if (bucket === undefined)
|
|
274
|
+
return { refused: "malformed", field: "BucketName" };
|
|
275
|
+
const configuration = parseConfiguration(raw.NotificationConfiguration);
|
|
276
|
+
if (configuration === undefined)
|
|
277
|
+
return { refused: "malformed", field: "NotificationConfiguration" };
|
|
278
|
+
const managed = parseFlag(raw.Managed, true);
|
|
279
|
+
if (managed === undefined) return { refused: "malformed", field: "Managed" };
|
|
280
|
+
const skipDestinationValidation = parseFlag(
|
|
281
|
+
raw.SkipDestinationValidation,
|
|
282
|
+
false
|
|
283
|
+
);
|
|
284
|
+
if (skipDestinationValidation === undefined)
|
|
285
|
+
return { refused: "malformed", field: "SkipDestinationValidation" };
|
|
286
|
+
const owner = raw[OWNER_PROPERTY];
|
|
287
|
+
if (owner !== undefined && identifierOr(owner, ACCOUNT_ID) === undefined)
|
|
288
|
+
return { refused: "malformed", field: OWNER_PROPERTY };
|
|
289
|
+
const eventBridgeEnabled = parseFlag(raw[EVENTBRIDGE_PROPERTY], true);
|
|
290
|
+
if (eventBridgeEnabled === undefined)
|
|
291
|
+
return { refused: "malformed", field: EVENTBRIDGE_PROPERTY };
|
|
292
|
+
return {
|
|
293
|
+
properties: {
|
|
294
|
+
bucket,
|
|
295
|
+
configuration,
|
|
296
|
+
eventBridgeOff: !eventBridgeEnabled,
|
|
297
|
+
skipDestinationValidation,
|
|
298
|
+
expectedBucketOwner: owner,
|
|
299
|
+
marked: contract === FJALL_CONTRACT,
|
|
300
|
+
configurationPresent: raw.NotificationConfiguration !== undefined
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/** `unknownKinds`: every other key the read carries, which a write would erase. */
|
|
306
|
+
function parseLive(output) {
|
|
307
|
+
const source = isRecord(output) ? output : {};
|
|
308
|
+
const lists = {};
|
|
309
|
+
for (const kind of KINDS) {
|
|
310
|
+
lists[kind] = Array.isArray(source[kind])
|
|
311
|
+
? source[kind].filter(isRecord)
|
|
312
|
+
: [];
|
|
313
|
+
}
|
|
314
|
+
return {
|
|
315
|
+
lists,
|
|
316
|
+
eventBridge:
|
|
317
|
+
source[EVENTBRIDGE] !== undefined && source[EVENTBRIDGE] !== null,
|
|
318
|
+
unknownKinds: Object.keys(source).filter(
|
|
319
|
+
(key) => !KNOWN_LIVE_KEYS.includes(key) && source[key] !== undefined
|
|
320
|
+
)
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
function filterRules(entry) {
|
|
325
|
+
const key =
|
|
326
|
+
isRecord(entry.Filter) && isRecord(entry.Filter.Key)
|
|
327
|
+
? entry.Filter.Key
|
|
328
|
+
: undefined;
|
|
329
|
+
return key !== undefined && Array.isArray(key.FilterRules)
|
|
330
|
+
? key.FilterRules.filter(isRecord)
|
|
331
|
+
: [];
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
function compareRules(a, b) {
|
|
335
|
+
if (a[0] !== b[0]) return a[0] < b[0] ? -1 : 1;
|
|
336
|
+
if (a[1] !== b[1]) return a[1] < b[1] ? -1 : 1;
|
|
337
|
+
return 0;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/** Kind, destination, sorted events and sorted filter rules with lowercased names: never the Id. */
|
|
341
|
+
function canonicalIdentity(kind, entry) {
|
|
342
|
+
const destination = entry[DESTINATION_KEYS[kind]];
|
|
343
|
+
const events = Array.isArray(entry.Events)
|
|
344
|
+
? entry.Events.map(String).sort()
|
|
345
|
+
: [];
|
|
346
|
+
const rules = filterRules(entry)
|
|
347
|
+
.map((rule) => [String(rule.Name).toLowerCase(), String(rule.Value)])
|
|
348
|
+
.sort(compareRules);
|
|
349
|
+
return JSON.stringify([
|
|
350
|
+
kind,
|
|
351
|
+
typeof destination === "string" ? destination : "",
|
|
352
|
+
events,
|
|
353
|
+
rules
|
|
354
|
+
]);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
function ownershipContext(stackId, logicalId, reference) {
|
|
358
|
+
const referenceIdentities = new Set();
|
|
359
|
+
if (reference !== undefined) {
|
|
360
|
+
for (const kind of KINDS) {
|
|
361
|
+
for (const entry of reference.configuration.lists[kind] ?? []) {
|
|
362
|
+
referenceIdentities.add(canonicalIdentity(kind, entry));
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
return {
|
|
367
|
+
idPrefix: `${stackId}-${digest(logicalId).slice(0, 6)}-`,
|
|
368
|
+
reference,
|
|
369
|
+
referenceIdentities
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
function fjallId(context, identity) {
|
|
374
|
+
return `${context.idPrefix}${digest(identity).slice(0, 13)}`;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
function classifyEntry(kind, entry, context) {
|
|
378
|
+
const identity = canonicalIdentity(kind, entry);
|
|
379
|
+
const id = typeof entry.Id === "string" ? entry.Id : "";
|
|
380
|
+
const prefixed = id.startsWith(context.idPrefix);
|
|
381
|
+
if (prefixed && id === fjallId(context, identity)) return "own";
|
|
382
|
+
if (
|
|
383
|
+
context.reference === undefined ||
|
|
384
|
+
!context.referenceIdentities.has(identity)
|
|
385
|
+
)
|
|
386
|
+
return "foreign";
|
|
387
|
+
return !context.reference.marked || prefixed ? "own" : "foreign";
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
function mergeConfiguration(live, incoming, context) {
|
|
391
|
+
const lists = {};
|
|
392
|
+
const counts = { own: 0, foreign: 0 };
|
|
393
|
+
for (const kind of KINDS) {
|
|
394
|
+
const kept = [];
|
|
395
|
+
const foreignIdentities = new Set();
|
|
396
|
+
for (const entry of live.lists[kind]) {
|
|
397
|
+
const verdict = classifyEntry(kind, entry, context);
|
|
398
|
+
switch (verdict) {
|
|
399
|
+
case "own":
|
|
400
|
+
counts.own += 1;
|
|
401
|
+
break;
|
|
402
|
+
case "foreign":
|
|
403
|
+
counts.foreign += 1;
|
|
404
|
+
kept.push(entry);
|
|
405
|
+
foreignIdentities.add(canonicalIdentity(kind, entry));
|
|
406
|
+
break;
|
|
407
|
+
default:
|
|
408
|
+
unknownVerdict(verdict);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
const added = new Set();
|
|
412
|
+
for (const entry of incoming === undefined
|
|
413
|
+
? []
|
|
414
|
+
: (incoming.configuration.lists[kind] ?? [])) {
|
|
415
|
+
const identity = canonicalIdentity(kind, entry);
|
|
416
|
+
if (foreignIdentities.has(identity) || added.has(identity)) continue;
|
|
417
|
+
added.add(identity);
|
|
418
|
+
kept.push({ ...entry, Id: fjallId(context, identity) });
|
|
419
|
+
}
|
|
420
|
+
lists[kind] = kept;
|
|
421
|
+
}
|
|
422
|
+
return { lists, counts };
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
function readProvenance(physicalResourceId) {
|
|
426
|
+
if (typeof physicalResourceId !== "string") return undefined;
|
|
427
|
+
const at = physicalResourceId.lastIndexOf(PROVENANCE_MARK);
|
|
428
|
+
if (at < 0) return undefined;
|
|
429
|
+
const value = physicalResourceId.slice(at + PROVENANCE_MARK.length);
|
|
430
|
+
return VERDICTS.provenance.includes(value) ? value : undefined;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// Publishing goes off only on an Update that keeps its bucket and carries the
|
|
434
|
+
// owner's explicit `eventBridgeEnabled: false`, under `requested`, `absent` or
|
|
435
|
+
// aws-cdk-lib's bare logical id, which records nothing (FJL-1393).
|
|
436
|
+
function decideEventBridge(mode, incoming, provenance, unrecorded) {
|
|
437
|
+
if (incoming !== undefined && incoming.configuration.eventBridge)
|
|
438
|
+
return "request";
|
|
439
|
+
return mode === "update" &&
|
|
440
|
+
incoming.eventBridgeOff &&
|
|
441
|
+
(unrecorded || provenance === "requested" || provenance === "absent")
|
|
442
|
+
? "withdraw"
|
|
443
|
+
: "keep";
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
function eventBridgeAfter(decision, livePresent) {
|
|
447
|
+
switch (decision) {
|
|
448
|
+
case "request":
|
|
449
|
+
return true;
|
|
450
|
+
case "withdraw":
|
|
451
|
+
return false;
|
|
452
|
+
case "keep":
|
|
453
|
+
return livePresent;
|
|
454
|
+
default:
|
|
455
|
+
return unknownVerdict(decision);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
function entryKeys(kind, entries) {
|
|
460
|
+
return entries
|
|
461
|
+
.map(
|
|
462
|
+
(entry) =>
|
|
463
|
+
`${typeof entry.Id === "string" ? entry.Id : ""}\n${canonicalIdentity(kind, entry)}`
|
|
464
|
+
)
|
|
465
|
+
.sort();
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
function sameConfiguration(live, merged) {
|
|
469
|
+
if (live.eventBridge !== merged.eventBridge) return false;
|
|
470
|
+
return KINDS.every((kind) => {
|
|
471
|
+
const a = entryKeys(kind, live.lists[kind]);
|
|
472
|
+
const b = entryKeys(kind, merged.lists[kind]);
|
|
473
|
+
return a.length === b.length && a.every((key, index) => key === b[index]);
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
function renderConfiguration(merged) {
|
|
478
|
+
const rendered = {};
|
|
479
|
+
for (const kind of KINDS) {
|
|
480
|
+
if (merged.lists[kind].length > 0) rendered[kind] = merged.lists[kind];
|
|
481
|
+
}
|
|
482
|
+
if (merged.eventBridge) rendered[EVENTBRIDGE] = {};
|
|
483
|
+
return rendered;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
function verdictOf(outcome, physicalResourceId, refusal, reason) {
|
|
487
|
+
if (!Object.hasOwn(OUTCOME_STATUS, outcome)) return unknownVerdict(outcome);
|
|
488
|
+
if (refusal !== undefined && !VERDICTS.refused.includes(refusal))
|
|
489
|
+
return unknownVerdict(refusal);
|
|
490
|
+
return {
|
|
491
|
+
status: OUTCOME_STATUS[outcome],
|
|
492
|
+
outcome,
|
|
493
|
+
physicalResourceId,
|
|
494
|
+
...(refusal !== undefined && { refusal, reason })
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/** Delete, and an Update rolling back to an unmarked rendering, never fail: they retain. */
|
|
499
|
+
function settle(request, refusal, reasonKind, values) {
|
|
500
|
+
if (request.tolerant) {
|
|
501
|
+
return verdictOf(
|
|
502
|
+
refusal === "bucket-absent" ? "absent" : "retained",
|
|
503
|
+
request.physicalResourceId
|
|
504
|
+
);
|
|
505
|
+
}
|
|
506
|
+
return verdictOf(
|
|
507
|
+
"refused",
|
|
508
|
+
request.physicalResourceId,
|
|
509
|
+
refusal,
|
|
510
|
+
fillReason(reasonKind, values)
|
|
511
|
+
);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
async function readConfiguration(deps, input, logicalId) {
|
|
515
|
+
for (let attempt = 0; ; attempt += 1) {
|
|
516
|
+
try {
|
|
517
|
+
return { ok: true, output: await deps.s3.get(input) };
|
|
518
|
+
} catch (error) {
|
|
519
|
+
if (
|
|
520
|
+
errorName(error) !== "AccessDenied" ||
|
|
521
|
+
attempt >= READ_RETRY_DELAYS_MS.length
|
|
522
|
+
) {
|
|
523
|
+
return { ok: false, error };
|
|
524
|
+
}
|
|
525
|
+
deps.log({
|
|
526
|
+
step: "read-denied-retry",
|
|
527
|
+
logicalId,
|
|
528
|
+
attempt: attempt + 1,
|
|
529
|
+
...errorFields(error)
|
|
530
|
+
});
|
|
531
|
+
await deps.sleep(READ_RETRY_DELAYS_MS[attempt]);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/**
|
|
537
|
+
* An Update from a marked rendering to an unmarked one: a rollback to 39's
|
|
538
|
+
* rendering, whose forward request read first. Read from the raw event, so
|
|
539
|
+
* it holds for a request that does not parse.
|
|
540
|
+
*/
|
|
541
|
+
function rollsBackToUnmarked(event) {
|
|
542
|
+
return (
|
|
543
|
+
event.RequestType === "Update" &&
|
|
544
|
+
isRecord(event.OldResourceProperties) &&
|
|
545
|
+
event.OldResourceProperties[FJALL_CONTRACT_PROPERTY] === FJALL_CONTRACT &&
|
|
546
|
+
isRecord(event.ResourceProperties) &&
|
|
547
|
+
event.ResourceProperties[FJALL_CONTRACT_PROPERTY] === undefined
|
|
548
|
+
);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
// The event's own id, or, where it has none to read (a Create, or an id
|
|
552
|
+
// CloudFormation never sends), one recording `preexisting`: such a request
|
|
553
|
+
// cannot say the bucket did not publish, and a bare logical id would read as
|
|
554
|
+
// aws-cdk-lib's, which records nothing.
|
|
555
|
+
function answeredId(event, name) {
|
|
556
|
+
const unread = `${name}${PROVENANCE_MARK}preexisting`;
|
|
557
|
+
return event.RequestType === "Create"
|
|
558
|
+
? unread
|
|
559
|
+
: identifierOr(event.PhysicalResourceId, /^.{1,1024}$/s, unread);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
function parseRequest(event) {
|
|
563
|
+
const requestType = event.RequestType;
|
|
564
|
+
const logicalId = identifierOr(
|
|
565
|
+
event.LogicalResourceId,
|
|
566
|
+
LOGICAL_ID,
|
|
567
|
+
undefined
|
|
568
|
+
);
|
|
569
|
+
const name = logicalId ?? "(unnamed)";
|
|
570
|
+
const base = {
|
|
571
|
+
requestType,
|
|
572
|
+
logicalId: name,
|
|
573
|
+
physicalResourceId: answeredId(event, name),
|
|
574
|
+
tolerant: requestType === "Delete" || rollsBackToUnmarked(event)
|
|
575
|
+
};
|
|
576
|
+
const malformed = (field) => ({ ...base, refused: "malformed", field });
|
|
577
|
+
if (!REQUEST_TYPES.includes(requestType)) return malformed("RequestType");
|
|
578
|
+
if (logicalId === undefined) return malformed("LogicalResourceId");
|
|
579
|
+
const stack = parseStackId(event.StackId);
|
|
580
|
+
if (stack === undefined) return malformed("StackId");
|
|
581
|
+
const next = parseProperties(event.ResourceProperties);
|
|
582
|
+
if (next.refused !== undefined) return { ...base, ...next };
|
|
583
|
+
const previous =
|
|
584
|
+
requestType === "Update"
|
|
585
|
+
? parseProperties(event.OldResourceProperties)
|
|
586
|
+
: undefined;
|
|
587
|
+
if (previous !== undefined && previous.refused !== undefined) {
|
|
588
|
+
return {
|
|
589
|
+
...base,
|
|
590
|
+
...previous,
|
|
591
|
+
field: previous.field === undefined ? undefined : `old ${previous.field}`
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
const old = previous === undefined ? undefined : previous.properties;
|
|
595
|
+
const renamed = old !== undefined && old.bucket !== next.properties.bucket;
|
|
596
|
+
const mode =
|
|
597
|
+
requestType === "Create" || renamed
|
|
598
|
+
? "create"
|
|
599
|
+
: requestType === "Update"
|
|
600
|
+
? "update"
|
|
601
|
+
: "delete";
|
|
602
|
+
return {
|
|
603
|
+
...base,
|
|
604
|
+
stack,
|
|
605
|
+
next: next.properties,
|
|
606
|
+
renamed,
|
|
607
|
+
mode,
|
|
608
|
+
reference:
|
|
609
|
+
mode === "update" ? old : mode === "delete" ? next.properties : undefined,
|
|
610
|
+
incoming: mode === "delete" ? undefined : next.properties
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
function readFailureVerdict(request, fields, values) {
|
|
615
|
+
if (BUCKET_GONE_ERROR_NAMES.includes(fields.error))
|
|
616
|
+
return settle(request, "bucket-absent", "bucket-absent", values);
|
|
617
|
+
return settle(
|
|
618
|
+
request,
|
|
619
|
+
"unreadable",
|
|
620
|
+
fields.error === "AccessDenied" ? "denied" : "transient",
|
|
621
|
+
values
|
|
622
|
+
);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
function writeFailureVerdict(request, fields, values) {
|
|
626
|
+
if (BUCKET_GONE_ERROR_NAMES.includes(fields.error))
|
|
627
|
+
return settle(request, "bucket-absent", "bucket-absent", values);
|
|
628
|
+
if (fields.error === "AccessDenied")
|
|
629
|
+
return settle(request, "unwritable", "write-denied", values);
|
|
630
|
+
if (fields.httpStatus === 400)
|
|
631
|
+
return settle(request, "rejected", "rejected", {
|
|
632
|
+
...values,
|
|
633
|
+
errorName: fields.error
|
|
634
|
+
});
|
|
635
|
+
return settle(request, "unwritable", "write-transient", values);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
async function govern(event, request, deps) {
|
|
639
|
+
const roleArn = identifierOr(
|
|
640
|
+
deps.env[ROLE_ARN_ENV],
|
|
641
|
+
ROLE_ARN,
|
|
642
|
+
"(the handler's role)"
|
|
643
|
+
);
|
|
644
|
+
if (request.refused !== undefined) {
|
|
645
|
+
const verdict = settle(request, request.refused, request.refused, {
|
|
646
|
+
logicalId: request.logicalId,
|
|
647
|
+
field: request.field
|
|
648
|
+
});
|
|
649
|
+
deps.log({
|
|
650
|
+
step: "parse",
|
|
651
|
+
refused: request.refused,
|
|
652
|
+
field: request.field,
|
|
653
|
+
requestType: REQUEST_TYPES.includes(request.requestType)
|
|
654
|
+
? request.requestType
|
|
655
|
+
: "(unrecognised)",
|
|
656
|
+
outcome: verdict.outcome
|
|
657
|
+
});
|
|
658
|
+
return verdict;
|
|
659
|
+
}
|
|
660
|
+
const { stack, next, mode, reference, incoming } = request;
|
|
661
|
+
const bucket = next.bucket;
|
|
662
|
+
const values = {
|
|
663
|
+
bucket: BUCKET_SHOWN,
|
|
664
|
+
bucketArn: `arn:${stack.partition}:s3:::${BUCKET_SHOWN}`,
|
|
665
|
+
roleArn,
|
|
666
|
+
stackName: stack.stackName,
|
|
667
|
+
logicalId: request.logicalId
|
|
668
|
+
};
|
|
669
|
+
if (request.renamed)
|
|
670
|
+
deps.log({ step: "bucket-renamed", logicalId: request.logicalId });
|
|
671
|
+
const target = {
|
|
672
|
+
Bucket: bucket,
|
|
673
|
+
ExpectedBucketOwner: next.expectedBucketOwner ?? stack.account
|
|
674
|
+
};
|
|
675
|
+
const read = await readConfiguration(deps, target, request.logicalId);
|
|
676
|
+
if (!read.ok) {
|
|
677
|
+
const fields = errorFields(read.error);
|
|
678
|
+
const verdict = readFailureVerdict(request, fields, values);
|
|
679
|
+
deps.log({
|
|
680
|
+
step: "read",
|
|
681
|
+
logicalId: request.logicalId,
|
|
682
|
+
requestType: request.requestType,
|
|
683
|
+
outcome: verdict.outcome,
|
|
684
|
+
configurationPresent: next.configurationPresent,
|
|
685
|
+
...fields
|
|
686
|
+
});
|
|
687
|
+
return verdict;
|
|
688
|
+
}
|
|
689
|
+
const live = parseLive(read.output);
|
|
690
|
+
const context = ownershipContext(event.StackId, request.logicalId, reference);
|
|
691
|
+
const { lists, counts } = mergeConfiguration(live, incoming, context);
|
|
692
|
+
const eventBridge = decideEventBridge(
|
|
693
|
+
mode,
|
|
694
|
+
incoming,
|
|
695
|
+
readProvenance(request.physicalResourceId),
|
|
696
|
+
event.PhysicalResourceId === request.logicalId
|
|
697
|
+
);
|
|
698
|
+
const merged = {
|
|
699
|
+
lists,
|
|
700
|
+
eventBridge: eventBridgeAfter(eventBridge, live.eventBridge)
|
|
701
|
+
};
|
|
702
|
+
const physicalResourceId =
|
|
703
|
+
request.requestType === "Create"
|
|
704
|
+
? `${request.logicalId}${PROVENANCE_MARK}${live.eventBridge ? "preexisting" : next.configuration.eventBridge ? "requested" : "absent"}`
|
|
705
|
+
: request.physicalResourceId;
|
|
706
|
+
const settled = { ...request, physicalResourceId };
|
|
707
|
+
const summary = {
|
|
708
|
+
logicalId: request.logicalId,
|
|
709
|
+
requestType: request.requestType,
|
|
710
|
+
marked: next.marked,
|
|
711
|
+
own: counts.own,
|
|
712
|
+
foreign: counts.foreign,
|
|
713
|
+
eventBridge,
|
|
714
|
+
configurationPresent: next.configurationPresent
|
|
715
|
+
};
|
|
716
|
+
if (sameConfiguration(live, merged)) {
|
|
717
|
+
deps.log({ ...summary, outcome: "unchanged" });
|
|
718
|
+
return verdictOf("unchanged", physicalResourceId);
|
|
719
|
+
}
|
|
720
|
+
if (live.unknownKinds.length > 0) {
|
|
721
|
+
const verdict = settle(settled, "unknown-kind", "unknown-kind", {
|
|
722
|
+
bucket: BUCKET_SHOWN,
|
|
723
|
+
kind: identifierOr(
|
|
724
|
+
live.unknownKinds[0],
|
|
725
|
+
KIND_NAME,
|
|
726
|
+
"under a key that is not a plain name"
|
|
727
|
+
)
|
|
728
|
+
});
|
|
729
|
+
deps.log({
|
|
730
|
+
...summary,
|
|
731
|
+
step: "unknown-kind",
|
|
732
|
+
unknownKinds: live.unknownKinds.length,
|
|
733
|
+
outcome: verdict.outcome
|
|
734
|
+
});
|
|
735
|
+
return verdict;
|
|
736
|
+
}
|
|
737
|
+
try {
|
|
738
|
+
await deps.s3.put({
|
|
739
|
+
...target,
|
|
740
|
+
SkipDestinationValidation: next.skipDestinationValidation,
|
|
741
|
+
NotificationConfiguration: renderConfiguration(merged)
|
|
742
|
+
});
|
|
743
|
+
} catch (error) {
|
|
744
|
+
const fields = errorFields(error);
|
|
745
|
+
const verdict = writeFailureVerdict(settled, fields, values);
|
|
746
|
+
deps.log({
|
|
747
|
+
...summary,
|
|
748
|
+
step: "write",
|
|
749
|
+
outcome: verdict.outcome,
|
|
750
|
+
...fields
|
|
751
|
+
});
|
|
752
|
+
return verdict;
|
|
753
|
+
}
|
|
754
|
+
deps.log({ ...summary, outcome: "written" });
|
|
755
|
+
return verdictOf("written", physicalResourceId);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
/** `request` is the parsed request when parsing got that far; the raw event decides otherwise. */
|
|
759
|
+
function unexpectedVerdict(event, error, request) {
|
|
760
|
+
const logicalId = identifierOr(
|
|
761
|
+
event && event.LogicalResourceId,
|
|
762
|
+
LOGICAL_ID,
|
|
763
|
+
"(unnamed)"
|
|
764
|
+
);
|
|
765
|
+
const requestType = event && event.RequestType;
|
|
766
|
+
const physicalResourceId = answeredId(event, logicalId);
|
|
767
|
+
const tolerant =
|
|
768
|
+
request !== undefined
|
|
769
|
+
? request.tolerant
|
|
770
|
+
: requestType === "Delete" || rollsBackToUnmarked(event);
|
|
771
|
+
if (tolerant) return verdictOf("retained", physicalResourceId);
|
|
772
|
+
return verdictOf(
|
|
773
|
+
"refused",
|
|
774
|
+
physicalResourceId,
|
|
775
|
+
"internal",
|
|
776
|
+
fillReason("internal", { errorName: errorName(error), logicalId })
|
|
777
|
+
);
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* The body stays within RESPONSE_MAX_BYTES when the ids it echoes are within
|
|
782
|
+
* the lengths CloudFormation gives them. Only the Reason is ever cut, from
|
|
783
|
+
* its end; the ids never are.
|
|
784
|
+
*/
|
|
785
|
+
function responseBody(event, verdict) {
|
|
786
|
+
const source = isRecord(event) ? event : {};
|
|
787
|
+
const body = {
|
|
788
|
+
Status: verdict.status,
|
|
789
|
+
PhysicalResourceId: verdict.physicalResourceId,
|
|
790
|
+
StackId: source.StackId,
|
|
791
|
+
RequestId: source.RequestId,
|
|
792
|
+
LogicalResourceId: source.LogicalResourceId,
|
|
793
|
+
NoEcho: false,
|
|
794
|
+
...(verdict.reason !== undefined && { Reason: verdict.reason })
|
|
795
|
+
};
|
|
796
|
+
let text = JSON.stringify(body);
|
|
797
|
+
while (
|
|
798
|
+
Buffer.byteLength(text) > RESPONSE_MAX_BYTES &&
|
|
799
|
+
typeof body.Reason === "string" &&
|
|
800
|
+
body.Reason.length > 1
|
|
801
|
+
) {
|
|
802
|
+
const excess = Buffer.byteLength(text) - RESPONSE_MAX_BYTES;
|
|
803
|
+
body.Reason = `${body.Reason.slice(0, Math.max(0, body.Reason.length - excess - 1))}\u2026`;
|
|
804
|
+
text = JSON.stringify(body);
|
|
805
|
+
}
|
|
806
|
+
return text;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
async function run(event, deps) {
|
|
810
|
+
const source = isRecord(event) ? event : {};
|
|
811
|
+
let request;
|
|
812
|
+
let verdict;
|
|
813
|
+
try {
|
|
814
|
+
request = parseRequest(source);
|
|
815
|
+
verdict = await govern(source, request, deps);
|
|
816
|
+
} catch (error) {
|
|
817
|
+
verdict = unexpectedVerdict(source, error, request);
|
|
818
|
+
deps.log({
|
|
819
|
+
step: "unexpected",
|
|
820
|
+
outcome: verdict.outcome,
|
|
821
|
+
...errorFields(error)
|
|
822
|
+
});
|
|
823
|
+
} finally {
|
|
824
|
+
const body = responseBody(
|
|
825
|
+
event,
|
|
826
|
+
verdict ?? unexpectedVerdict(source, undefined, request)
|
|
827
|
+
);
|
|
828
|
+
await Promise.resolve()
|
|
829
|
+
.then(() => deps.respond(event, body))
|
|
830
|
+
.catch((error) => writeLog({ step: "respond", ...errorFields(error) }));
|
|
831
|
+
}
|
|
832
|
+
return verdict;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
/** Answers CloudFormation's presigned URL; `request` is `https.request` but in a test. */
|
|
836
|
+
function sendResponse(event, body, request = https.request) {
|
|
837
|
+
return new Promise((resolve) => {
|
|
838
|
+
const done = () => resolve();
|
|
839
|
+
try {
|
|
840
|
+
const outgoing = request(
|
|
841
|
+
new URL(event.ResponseURL),
|
|
842
|
+
{
|
|
843
|
+
method: "PUT",
|
|
844
|
+
headers: {
|
|
845
|
+
"content-type": "",
|
|
846
|
+
"content-length": Buffer.byteLength(body)
|
|
847
|
+
},
|
|
848
|
+
timeout: RESPONSE_TIMEOUT_MS
|
|
849
|
+
},
|
|
850
|
+
(response) => {
|
|
851
|
+
response.resume();
|
|
852
|
+
response.on("end", done);
|
|
853
|
+
response.on("error", done);
|
|
854
|
+
}
|
|
855
|
+
);
|
|
856
|
+
outgoing.on("timeout", () =>
|
|
857
|
+
outgoing.destroy(new Error("ResponseTimeout"))
|
|
858
|
+
);
|
|
859
|
+
outgoing.on("error", (error) => {
|
|
860
|
+
writeLog({ step: "respond", ...errorFields(error) });
|
|
861
|
+
done();
|
|
862
|
+
});
|
|
863
|
+
outgoing.end(body);
|
|
864
|
+
} catch (error) {
|
|
865
|
+
writeLog({ step: "respond", ...errorFields(error) });
|
|
866
|
+
done();
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
function createS3(load, callTimeoutMs) {
|
|
872
|
+
let sdk;
|
|
873
|
+
let client;
|
|
874
|
+
const call = (command, input) => {
|
|
875
|
+
if (client === undefined) {
|
|
876
|
+
sdk = load();
|
|
877
|
+
// boto3, which aws-cdk-lib's Python handler used, followed S3's
|
|
878
|
+
// redirect to a bucket's own Region; the JavaScript SDK does so only
|
|
879
|
+
// when asked.
|
|
880
|
+
client = new sdk.S3Client({ followRegionRedirects: true });
|
|
881
|
+
}
|
|
882
|
+
return client.send(new sdk[command](input), {
|
|
883
|
+
abortSignal: AbortSignal.timeout(callTimeoutMs)
|
|
884
|
+
});
|
|
885
|
+
};
|
|
886
|
+
return {
|
|
887
|
+
get: (input) => call("GetBucketNotificationConfigurationCommand", input),
|
|
888
|
+
put: (input) => call("PutBucketNotificationConfigurationCommand", input)
|
|
889
|
+
};
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
function writeLog(fields) {
|
|
893
|
+
console.log(JSON.stringify(fields));
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
exports.handler = async function handler(event) {
|
|
897
|
+
await run(event, {
|
|
898
|
+
s3: createS3(() => require("@aws-sdk/client-s3"), SDK_CALL_TIMEOUT_MS),
|
|
899
|
+
respond: sendResponse,
|
|
900
|
+
sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
|
|
901
|
+
env: process.env,
|
|
902
|
+
log: writeLog
|
|
903
|
+
});
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
exports._internals = {
|
|
907
|
+
BUCKET_SHOWN,
|
|
908
|
+
FJALL_CONTRACT_PROPERTY,
|
|
909
|
+
FJALL_CONTRACT,
|
|
910
|
+
OWNER_PROPERTY,
|
|
911
|
+
EVENTBRIDGE_PROPERTY,
|
|
912
|
+
ROLE_ARN_ENV,
|
|
913
|
+
PROVENANCE_MARK,
|
|
914
|
+
BUCKET_GONE_ERROR_NAMES,
|
|
915
|
+
READ_RETRY_DELAYS_MS,
|
|
916
|
+
SDK_CALL_TIMEOUT_MS,
|
|
917
|
+
RESPONSE_MAX_BYTES,
|
|
918
|
+
REASON_MAX_CHARS,
|
|
919
|
+
RESPONSE_TIMEOUT_MS,
|
|
920
|
+
REASON_TEMPLATES,
|
|
921
|
+
VERDICTS,
|
|
922
|
+
unknownVerdict,
|
|
923
|
+
fillReason,
|
|
924
|
+
canonicalIdentity,
|
|
925
|
+
fjallId,
|
|
926
|
+
ownershipContext,
|
|
927
|
+
classifyEntry,
|
|
928
|
+
mergeConfiguration,
|
|
929
|
+
decideEventBridge,
|
|
930
|
+
eventBridgeAfter,
|
|
931
|
+
readProvenance,
|
|
932
|
+
parseRequest,
|
|
933
|
+
responseBody,
|
|
934
|
+
sendResponse,
|
|
935
|
+
createS3,
|
|
936
|
+
run
|
|
937
|
+
};
|