@cdkd/cli 0.373.4 → 0.373.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/{ambient-client-defaults-DtG0A5aG.js → ambient-client-defaults-BqOg0I6e.js} +3 -3
  2. package/dist/{ambient-client-defaults-DtG0A5aG.js.map → ambient-client-defaults-BqOg0I6e.js.map} +1 -1
  3. package/dist/{asg-provider-BmCui3zx.js → asg-provider-DkhAcikX.js} +31 -14
  4. package/dist/{asg-provider-BmCui3zx.js.map → asg-provider-DkhAcikX.js.map} +1 -1
  5. package/dist/cli.js +3 -3
  6. package/dist/{custom-resource-runtime-pm6t9jBv.js → custom-resource-runtime-CLjuWVBC.js} +6 -6
  7. package/dist/{custom-resource-runtime-pm6t9jBv.js.map → custom-resource-runtime-CLjuWVBC.js.map} +1 -1
  8. package/dist/{db-associated-roles-C607MnbC.js → db-associated-roles-CCgL0Loo.js} +2 -2
  9. package/dist/{db-associated-roles-C607MnbC.js.map → db-associated-roles-CCgL0Loo.js.map} +1 -1
  10. package/dist/{delete-started-C_hilY_A.js → delete-started-C9z4Yf_c.js} +4 -4
  11. package/dist/{delete-started-C_hilY_A.js.map → delete-started-C9z4Yf_c.js.map} +1 -1
  12. package/dist/{deploy-engine-BEzzfllj.js → deploy-engine-DNEAZMj7.js} +828 -320
  13. package/dist/deploy-engine-DNEAZMj7.js.map +1 -0
  14. package/dist/{ec2-termination-protection-BeYoGs66.js → ec2-termination-protection-zaan5pi0.js} +3 -3
  15. package/dist/{ec2-termination-protection-BeYoGs66.js.map → ec2-termination-protection-zaan5pi0.js.map} +1 -1
  16. package/dist/{ecr-uri-DcNB-WSe.js → ecr-uri-CrQgKKRC.js} +2 -2
  17. package/dist/{ecr-uri-DcNB-WSe.js.map → ecr-uri-CrQgKKRC.js.map} +1 -1
  18. package/dist/{emr-cluster-provider-TaiGpHEX.js → emr-cluster-provider-Dkg4vDao.js} +80 -16
  19. package/dist/emr-cluster-provider-Dkg4vDao.js.map +1 -0
  20. package/dist/{expected-bucket-owner-DASdeJRs.js → expected-bucket-owner-DIMD36_h.js} +2 -2
  21. package/dist/{expected-bucket-owner-DASdeJRs.js.map → expected-bucket-owner-DIMD36_h.js.map} +1 -1
  22. package/dist/{iam-role-provider-ob3lrDNI.js → iam-role-provider-CkIQ7vmu.js} +12 -12
  23. package/dist/{iam-role-provider-ob3lrDNI.js.map → iam-role-provider-CkIQ7vmu.js.map} +1 -1
  24. package/dist/{identity-read-denied-CGR1hIyA.js → identity-read-denied-DU0YqxNk.js} +4 -4
  25. package/dist/{identity-read-denied-CGR1hIyA.js.map → identity-read-denied-DU0YqxNk.js.map} +1 -1
  26. package/dist/{image-plan-BWFMyIRS.js → image-plan-B1CAuiek.js} +10 -10
  27. package/dist/{image-plan-BWFMyIRS.js.map → image-plan-B1CAuiek.js.map} +1 -1
  28. package/dist/index.d.ts +19 -3
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +5 -5
  31. package/dist/{logger-8a4raAC-.js → logger-IjQ12QWZ.js} +2 -2
  32. package/dist/{logger-8a4raAC-.js.map → logger-IjQ12QWZ.js.map} +1 -1
  33. package/dist/{neptune-provider-C8fiHA_U.js → neptune-provider-2O6bzLTH.js} +9 -9
  34. package/dist/{neptune-provider-C8fiHA_U.js.map → neptune-provider-2O6bzLTH.js.map} +1 -1
  35. package/dist/{program-BCit4cJS.js → program-DnMYJ4--.js} +613 -143
  36. package/dist/program-DnMYJ4--.js.map +1 -0
  37. package/dist/{provider-classes-BydpQUFi.js → provider-classes-BuCH49t_.js} +647 -139
  38. package/dist/provider-classes-BuCH49t_.js.map +1 -0
  39. package/dist/{rds-provider-Dv0lcb0m.js → rds-provider-BSeLwUR8.js} +13 -13
  40. package/dist/{rds-provider-Dv0lcb0m.js.map → rds-provider-BSeLwUR8.js.map} +1 -1
  41. package/dist/{read-replica-BQ87f_Oe.js → read-replica-FMRYAHg6.js} +3 -3
  42. package/dist/{read-replica-BQ87f_Oe.js.map → read-replica-FMRYAHg6.js.map} +1 -1
  43. package/dist/{redacted-delete-address-BrPnoyD9.js → redacted-delete-address-DGHv9GNm.js} +4 -4
  44. package/dist/{redacted-delete-address-BrPnoyD9.js.map → redacted-delete-address-DGHv9GNm.js.map} +1 -1
  45. package/dist/{replacement-rules-HtPsWZIV.js → replacement-rules-BAJWgr5f.js} +144 -53
  46. package/dist/replacement-rules-BAJWgr5f.js.map +1 -0
  47. package/dist/{created-resource-sink-DVzNDZ-N.js → resource-deadline-DB1HaWnD.js} +115 -5
  48. package/dist/resource-deadline-DB1HaWnD.js.map +1 -0
  49. package/dist/{restore-source-guard-BIaZBr57.js → restore-source-guard-BL2O_O6r.js} +4 -4
  50. package/dist/{restore-source-guard-BIaZBr57.js.map → restore-source-guard-BL2O_O6r.js.map} +1 -1
  51. package/dist/{run-cli-OPPhPXxz.js → run-cli-CtrPRsbm.js} +2 -2
  52. package/dist/{run-cli-OPPhPXxz.js.map → run-cli-CtrPRsbm.js.map} +1 -1
  53. package/dist/{secret-reference-immutable-OIvSuvpM.js → secret-reference-immutable-XFEdCfNg.js} +6 -6
  54. package/dist/{secret-reference-immutable-OIvSuvpM.js.map → secret-reference-immutable-XFEdCfNg.js.map} +1 -1
  55. package/dist/{settle-own-write-members-fY5JNYhA.js → settle-own-write-members-DzUentwR.js} +10 -10
  56. package/dist/{settle-own-write-members-fY5JNYhA.js.map → settle-own-write-members-DzUentwR.js.map} +1 -1
  57. package/dist/{tag-list-CmpwQ18R.js → tag-list-Bye2zxAF.js} +4 -4
  58. package/dist/{tag-list-CmpwQ18R.js.map → tag-list-Bye2zxAF.js.map} +1 -1
  59. package/dist/update-removal-BpxPxmQR.js +82 -0
  60. package/dist/update-removal-BpxPxmQR.js.map +1 -0
  61. package/dist/{version-DwQIlsjN.js → version-nXXjUmZl.js} +2 -2
  62. package/dist/{version-DwQIlsjN.js.map → version-nXXjUmZl.js.map} +1 -1
  63. package/package.json +1 -1
  64. package/dist/created-resource-sink-DVzNDZ-N.js.map +0 -1
  65. package/dist/deploy-engine-BEzzfllj.js.map +0 -1
  66. package/dist/emr-cluster-provider-TaiGpHEX.js.map +0 -1
  67. package/dist/program-BCit4cJS.js.map +0 -1
  68. package/dist/provider-classes-BydpQUFi.js.map +0 -1
  69. package/dist/replacement-rules-HtPsWZIV.js.map +0 -1
  70. package/dist/resource-deadline-nSheE7zd.js +0 -186
  71. package/dist/resource-deadline-nSheE7zd.js.map +0 -1
@@ -1,23 +1,22 @@
1
- import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, E as cutMarker, F as stringifyJsonPayload, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, b as setPasteableVerbFlags, c as deployReplaceCommand, d as pasteableCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE, x as SAFE_MSG_ALTERED_CHAR, y as setPasteableRunFlags } from "./version-DwQIlsjN.js";
2
- import { $ as renderStacksNoLongerSelected, $t as contextOptions, A as followContainerLogs, An as parseStateKey, At as namedEnvAwsRegion, B as resolveRuntimeCodeMountPath, Bt as regionNeedsReconciliation, C as waitForRieReady, Cn as parsePositiveIntegerOption, Ct as resolveContainerRegion, Dn as describeStateKey, Dt as warnAwsEmulatorStateSourceHint, E as SENSITIVE_ENV_KEYS, En as STATE_KEY_MAX_CODE_POINTS, Et as taskRoleAssumedInRealAws, F as removeContainer, Ft as legacyStateBucketFallbackRegion, G as nestedOwnerOfLogicalId, Gt as withOtherIndexRemoval, H as resolveRuntimeImage, Ht as resolveEffectiveRegion, It as namedCliRegion, J as renderAllLeftOutStageStacks, Jt as annotationMessageOptions, K as partitionTopLevel, Kt as strandedProfileCredentialsNotice, L as runDetached, Lt as rawCliRegion, M as killAndDrainContainerLogs, Mt as adoptRegionFlag, N as pickFreePort, Nt as exportInferredRegionForSdk, O as ensureDockerAvailable, On as listAllLockKeys, Ot as workloadGetsEmulatorKeysOnly, P as pullImage, Pt as foldRegionOption, Q as renderNotInAppWarning, Qt as commonOptions, Rt as reconcileExportIndexRegion, S as invokeRie, Sn as cliArgParser, St as realAwsException, T as DockerRunnerError, Tn as STATE_FILE_SUFFIX, Tt as stateRoleRecordIsEmulatorSide, U as describeStack, Ut as stackRegionResolver, V as resolveRuntimeFileExtension, Vt as regionShown, W as matchStacks, Wt as stateWithRegion, X as renderAmbiguousTargetStack, Xt as applyWaitFlagEnv, Y as renderAllNoTopLevelStacks, Yt as appOptions, Z as renderNoStackMatch, Zt as collectRepeated, _ as probeHostGatewaySupport, _n as allowUnsupportedTypesOption, _t as localAwsEmulatorCredentials, a as materializeLayerFromArn, an as noCfnFallbackOption, at as unmatchedPatterns, b as substituteImagePlaceholders, bn as resourceTimeoutOptions, bt as prepareLocalLoopbackForwarder, cn as parseStackRegion, ct as resolveCdkPathToLogicalIds, d as resolveAssetCodeDirectory, dn as stackOptions, dt as activateLocalAwsAndRoleArn, en as deployOptions, et as renderUnmatchedPatternsWarning, f as architectureToPlatform, fn as stateOptions, ft as assertAwsEmulatorValue, g as HOST_GATEWAY_MIN_VERSION, gn as parseAssumeRoleToken, gt as localAwsEmulatorActive, h as layerAssetDirectory, hn as normalizeStartApiAssumeRole, ht as keepEmulatorIssuedCredentials, i as resolveInlineCodeFilePath, in as guardStackRegionOptions, it as stacksNoLongerSelected, jt as recordEmulatorDefaultRegion, k as flushStdio, kn as listAllStateKeys, kt as emulatorDefaultRegion, l as resolveLambdaLayers, ln as regionOption, lt as stackForConstructPath, m as copyLayerTreeLastWins, mn as effectiveAssumeRoleArn, mt as getActiveWorkloadAwsWiring$1, n as resolveTmpfsForLambda, nn as diffUpdatePolicyOptions, nt as stackMatchesPattern, o as resolveLambdaTarget, on as noLocalCustomResourcesOption, ot as buildCdkPathIndex, p as buildContainerImage$1, pn as useCdkBootstrapAssetsOption, pt as attachLocalLoopbackForwarder, q as refuseStackNameRegionCollisions, qt as writeProfileCredentialsFile, r as resolveZipImagePlan, rn as exclusivelyOption, rt as stacksForDependency, s as extractEphemeralStorageMb, sn as parseContextOptions, st as readCdkPathOrUndefined, t as resolveLocalBuildPlan$1, tn as destroyOptions, tt as selectTargetStack, u as assetPathDirs, un as skipFinalSnapshotOption, ut as stackForPathFormTarget, v as resolveHostGatewayExtraHosts, vn as diffReplaceResourceOption, vt as mixedModeActive, w as CONTAINER_LOG_DRAIN_TIMEOUT_MS, wn as LOCK_FILE_SUFFIX, wt as setContainerRegion, x as tryResolveImageFnJoin, xn as validateResourceTimeouts, xt as profileCredentialsForWorkload, y as derivePseudoParametersFromRegion$1, yn as parseDuration, yt as mixedModeEmulatorOverride, z as streamLogs, zt as reconcileMarkerRegionWithLegacyDefault } from "./image-plan-BWFMyIRS.js";
3
- import { At as resourceTypeShown, Bi as CUSTOM_RESOURCE_RESPONSE_PREFIX, Bn as logOnlyValueCount, C as VALUE_NOT_SHOWN, Ci as recordProvenPublicExpression, Ei as WHOLE_DYNAMIC_REFERENCE_PATTERN, Fi as formatLockExpiry, Gi as withPasteableAwsProfile, Gn as recordLogOnlyValue, Hi as WAIT_CONDITION_SIGNAL_PREFIX, Hn as printingCorpusOf, Hr as keepTemplateLiteralLeaves, Ii as formatLockOperation, In as createUnionSecretMasker, It as maskDeep, Ji as producerCoordinateKey, Jn as createSecretMasker, Jr as DYNAMIC_REFERENCE_TOKEN_SCAN, Ki as injectiveKey, Kn as shareLogOnlyValues, Kr as recordPhysicalNameCopy, Li as formatLockOwner, Lr as recordNestedStackParameterExpressions, M as remedyLogicalId, Mi as buildForceUnlockCommand, Ni as buildLockContentionMessage, Ot as logicalIdShown, P as isMarkedNotGone, Pi as forceQuitRecoveryClause, Pn as carryLogOnlyValues, Q as runDeleteAttempt, Qn as maskSecretsInText, Rn as hasMaskableValues, Si as recordNoEchoParameterFreshValue, St as isInterruptedWaitError, Tr as inheritNestedStackParameterAssociations, Ui as setPasteableAwsCaBundle, Un as recordLogOnlyParameterValue, Vi as DEFAULT_STATE_PREFIX, Wi as setPasteableAwsProfile, Wr as physicalNameCopiesOf, Xr as dynamicReferenceTokens, Yi as producerRecordKey, Yn as errorCauseChain, Yr as dynamicReferenceSpans, Zn as maskSecretsInError, Zt as countDynamicReferenceOpenings, an as mentionsMask, at as isAwsCliLiteral, b as assertRegionMatch, bi as recordMaskOnlyValuesIn, bn as resolvedPlaintextOf, bt as endCommandInterruptScope, cn as recordedSecrecyOf, ct as renderDisableCommand, en as holdsMaskLeaf, gi as provenPublicValue, gr as pathCrossesDottedKey, gt as readRecordedPrincipals, hr as spelledKeysOf, ii as carriesSecretMask, in as mentionsDynamicReferenceTo, ji as UNREPRODUCIBLE_LOCK_CLAUSE, ki as isSingleDynamicReferenceToken, lr as scrubResourceRecord, lt as IAM_PRINCIPAL_NAME, mr as isUncertifiedBaselineMaskPosition, qn as unionOfSecretBags, ri as splitGetAttStringForm, rn as mentionsDynamicReference, sn as opensDynamicReferenceTo, tn as isMaskLeaf, un as valueMentionsDynamicReference, ur as withPhysicalNameCopies, ut as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, v as DriftReadRefusedError, vr as identityKeyFor, wi as wholeStringLeavesOf, wn as redactForState, xi as recordNoEchoAttributeValues, xt as interruptWatchListenerCount, y as RESOURCE_NOT_FOUND, yi as recordMaskOnlyValue, yt as beginCommandInterruptScope, zn as literalSplitDelimitersOf } from "./created-resource-sink-DVzNDZ-N.js";
1
+ import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, E as cutMarker, F as stringifyJsonPayload, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, b as setPasteableVerbFlags, c as deployReplaceCommand, d as pasteableCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE, x as SAFE_MSG_ALTERED_CHAR, y as setPasteableRunFlags } from "./version-nXXjUmZl.js";
2
+ import { $ as renderStacksNoLongerSelected, $t as contextOptions, A as followContainerLogs, An as parseStateKey, At as namedEnvAwsRegion, B as resolveRuntimeCodeMountPath, Bt as regionNeedsReconciliation, C as waitForRieReady, Cn as parsePositiveIntegerOption, Ct as resolveContainerRegion, Dn as describeStateKey, Dt as warnAwsEmulatorStateSourceHint, E as SENSITIVE_ENV_KEYS, En as STATE_KEY_MAX_CODE_POINTS, Et as taskRoleAssumedInRealAws, F as removeContainer, Ft as legacyStateBucketFallbackRegion, G as nestedOwnerOfLogicalId, Gt as withOtherIndexRemoval, H as resolveRuntimeImage, Ht as resolveEffectiveRegion, It as namedCliRegion, J as renderAllLeftOutStageStacks, Jt as annotationMessageOptions, K as partitionTopLevel, Kt as strandedProfileCredentialsNotice, L as runDetached, Lt as rawCliRegion, M as killAndDrainContainerLogs, Mt as adoptRegionFlag, N as pickFreePort, Nt as exportInferredRegionForSdk, O as ensureDockerAvailable, On as listAllLockKeys, Ot as workloadGetsEmulatorKeysOnly, P as pullImage, Pt as foldRegionOption, Q as renderNotInAppWarning, Qt as commonOptions, Rt as reconcileExportIndexRegion, S as invokeRie, Sn as cliArgParser, St as realAwsException, T as DockerRunnerError, Tn as STATE_FILE_SUFFIX, Tt as stateRoleRecordIsEmulatorSide, U as describeStack, Ut as stackRegionResolver, V as resolveRuntimeFileExtension, Vt as regionShown, W as matchStacks, Wt as stateWithRegion, X as renderAmbiguousTargetStack, Xt as applyWaitFlagEnv, Y as renderAllNoTopLevelStacks, Yt as appOptions, Z as renderNoStackMatch, Zt as collectRepeated, _ as probeHostGatewaySupport, _n as allowUnsupportedTypesOption, _t as localAwsEmulatorCredentials, a as materializeLayerFromArn, an as noCfnFallbackOption, at as unmatchedPatterns, b as substituteImagePlaceholders, bn as resourceTimeoutOptions, bt as prepareLocalLoopbackForwarder, cn as parseStackRegion, ct as resolveCdkPathToLogicalIds, d as resolveAssetCodeDirectory, dn as stackOptions, dt as activateLocalAwsAndRoleArn, en as deployOptions, et as renderUnmatchedPatternsWarning, f as architectureToPlatform, fn as stateOptions, ft as assertAwsEmulatorValue, g as HOST_GATEWAY_MIN_VERSION, gn as parseAssumeRoleToken, gt as localAwsEmulatorActive, h as layerAssetDirectory, hn as normalizeStartApiAssumeRole, ht as keepEmulatorIssuedCredentials, i as resolveInlineCodeFilePath, in as guardStackRegionOptions, it as stacksNoLongerSelected, jt as recordEmulatorDefaultRegion, k as flushStdio, kn as listAllStateKeys, kt as emulatorDefaultRegion, l as resolveLambdaLayers, ln as regionOption, lt as stackForConstructPath, m as copyLayerTreeLastWins, mn as effectiveAssumeRoleArn, mt as getActiveWorkloadAwsWiring$1, n as resolveTmpfsForLambda, nn as diffUpdatePolicyOptions, nt as stackMatchesPattern, o as resolveLambdaTarget, on as noLocalCustomResourcesOption, ot as buildCdkPathIndex, p as buildContainerImage$1, pn as useCdkBootstrapAssetsOption, pt as attachLocalLoopbackForwarder, q as refuseStackNameRegionCollisions, qt as writeProfileCredentialsFile, r as resolveZipImagePlan, rn as exclusivelyOption, rt as stacksForDependency, s as extractEphemeralStorageMb, sn as parseContextOptions, st as readCdkPathOrUndefined, t as resolveLocalBuildPlan$1, tn as destroyOptions, tt as selectTargetStack, u as assetPathDirs, un as skipFinalSnapshotOption, ut as stackForPathFormTarget, v as resolveHostGatewayExtraHosts, vn as diffReplaceResourceOption, vt as mixedModeActive, w as CONTAINER_LOG_DRAIN_TIMEOUT_MS, wn as LOCK_FILE_SUFFIX, wt as setContainerRegion, x as tryResolveImageFnJoin, xn as validateResourceTimeouts, xt as profileCredentialsForWorkload, y as derivePseudoParametersFromRegion$1, yn as parseDuration, yt as mixedModeEmulatorOverride, z as streamLogs, zt as reconcileMarkerRegionWithLegacyDefault } from "./image-plan-B1CAuiek.js";
3
+ import { $n as unionOfSecretBags, Ai as wholeStringLeavesOf, An as redactForState, B as isMarkedNotGone, Bi as forceQuitRecoveryClause, Bn as carryLogOnlyValues, Di as recordNoEchoAttributeValues, Dt as interruptWatchListenerCount, E as assertRegionMatch, Ei as recordMaskOnlyValuesIn, En as resolvedPlaintextOf, Et as endCommandInterruptScope, Fi as isSingleDynamicReferenceToken, Gn as literalSplitDelimitersOf, Hi as formatLockOperation, Hn as createUnionSecretMasker, Ht as maskDeep, It as resourceTypeShown, Ji as WAIT_CONDITION_SIGNAL_PREFIX, Jn as printingCorpusOf, Jr as keepTemplateLiteralLeaves, Ki as CUSTOM_RESOURCE_RESPONSE_PREFIX, Kn as logOnlyValueCount, Li as UNREPRODUCIBLE_LOCK_CLAUSE, Mi as WHOLE_DYNAMIC_REFERENCE_PATTERN, Oi as recordNoEchoParameterFreshValue, Ot as isInterruptedWaitError, Pi as isPlainObject$1, Pt as logicalIdShown, Qi as injectiveKey, Qn as shareLogOnlyValues, Qr as recordPhysicalNameCopy, R as remedyLogicalId, Ri as buildForceUnlockCommand, Si as provenPublicValue, Sr as pathCrossesDottedKey, St as readRecordedPrincipals, T as RESOURCE_NOT_FOUND, Ti as recordMaskOnlyValue, Tt as beginCommandInterruptScope, Ui as formatLockOwner, Ur as recordNestedStackParameterExpressions, Vi as formatLockExpiry, Wn as hasMaskableValues, Xi as setPasteableAwsProfile, Xr as physicalNameCopiesOf, Yi as setPasteableAwsCaBundle, Yn as recordLogOnlyParameterValue, Zi as withPasteableAwsProfile, Zn as recordLogOnlyValue, br as isUncertifiedBaselineMaskPosition, dn as mentionsMask, dt as isAwsCliLiteral, ea as producerCoordinateKey, ei as DYNAMIC_REFERENCE_TOKEN_SCAN, er as createSecretMasker, gn as valueMentionsDynamicReference, gr as withPhysicalNameCopies, gt as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, hr as scrubResourceRecord, ht as IAM_PRINCIPAL_NAME, ir as maskSecretsInText, it as runDeleteAttempt, jr as inheritNestedStackParameterAssociations, k as VALUE_NOT_SHOWN, ki as recordProvenPublicExpression, li as splitGetAttStringForm, ln as mentionsDynamicReference, mn as recordedSecrecyOf, mt as renderDisableCommand, ni as dynamicReferenceTokens, o as withResourceDeadline, on as holdsMaskLeaf, pn as opensDynamicReferenceTo, qi as DEFAULT_STATE_PREFIX, r as formatWarnElapsed, rn as countDynamicReferenceOpenings, rr as maskSecretsInError, sn as isMaskLeaf, ta as producerRecordKey, ti as dynamicReferenceSpans, tr as errorCauseChain, ui as carriesSecretMask, un as mentionsDynamicReferenceTo, w as DriftReadRefusedError, wr as identityKeyFor, xr as spelledKeysOf, zi as buildLockContentionMessage } from "./resource-deadline-DB1HaWnD.js";
4
4
  import { a as runWithStackAwsClients, i as resetAwsClients, l as s3ClientDefaults, o as setAwsClients, s as resolveS3ClientDefaults, t as AwsClients, u as setS3ClientDefaultsDebugLog } from "./aws-clients-DOkPjjAW.js";
5
- import { $ as withStackScope, A as configStringRefusal, B as generateResourceName, E as coerceCfnBoolean, F as requireConfigString, I as PATTERN_B_NAME_OPTIONS, L as PATTERN_B_NAME_PROPERTIES, N as requireConfigArray, O as configBooleanRefusal, P as requireConfigObject, Q as withSkipPrefix, R as PATTERN_B_RESOURCE_TYPES, S as explicitNamePropertyFor, X as isNameGeneration, a as reserveStdoutForPayload, f as isAwsAuthoredFailure, i as releaseStdoutForPayload, m as verboseAwareText, n as getLogger, p as safeStringify, r as isStdoutReservedForPayload, s as runStackBuffered, u as describeAwsFailure, y as getLiveRenderer, z as derivesPatternBName } from "./logger-8a4raAC-.js";
6
- import { $ as AccountIdUnavailableError, A as stripControlChars, B as isTransientServerError, F as isAmbiguousOutcomeError, G as markNonRetryable, H as THROTTLING_ERROR_NAMES, J as CrossAccountSecretRefusalError, U as isMarkedNonRetryable, V as retryClassificationText, W as isThrottlingError, X as IntrinsicResolutionRefusalError, Y as DynamicReferenceRegionAmbiguousError, Z as MalformedProducerRecordRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, ct as StateError, g as PartialFailureError, h as NestedStackChildDirectDestroyError, i as credentialFingerprint, it as LocalInvokeBuildError$1, j as stripForDisplay, k as escapeRegExp, l as withErrorHandling, lt as SynthesisError, n as ambientCredentialConfig, nt as DeployCancelledError, o as formatError, ot as ProvisioningError, r as clientDefaultsFor, s as handleError, st as ResourceTimeoutError, t as ambientClientDefaults, tt as CdkdError, u as LocalStartServiceError, v as StackHasActiveImportsError, y as StackTerminationProtectionError, z as isRetryableTransientError } from "./ambient-client-defaults-DtG0A5aG.js";
5
+ import { $ as withStackScope, A as configStringRefusal, B as generateResourceName, E as coerceCfnBoolean, F as requireConfigString, I as PATTERN_B_NAME_OPTIONS, L as PATTERN_B_NAME_PROPERTIES, N as requireConfigArray, O as configBooleanRefusal, P as requireConfigObject, Q as withSkipPrefix, R as PATTERN_B_RESOURCE_TYPES, S as explicitNamePropertyFor, X as isNameGeneration, a as reserveStdoutForPayload, f as isAwsAuthoredFailure, i as releaseStdoutForPayload, m as verboseAwareText, n as getLogger, p as safeStringify, r as isStdoutReservedForPayload, s as runStackBuffered, u as describeAwsFailure, y as getLiveRenderer, z as derivesPatternBName } from "./logger-IjQ12QWZ.js";
6
+ import { $ as AccountIdUnavailableError, A as stripControlChars, B as isTransientServerError, F as isAmbiguousOutcomeError, G as markNonRetryable, H as THROTTLING_ERROR_NAMES, J as CrossAccountSecretRefusalError, U as isMarkedNonRetryable, V as retryClassificationText, W as isThrottlingError, X as IntrinsicResolutionRefusalError, Y as DynamicReferenceRegionAmbiguousError, Z as MalformedProducerRecordRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, ct as StateError, g as PartialFailureError, h as NestedStackChildDirectDestroyError, i as credentialFingerprint, it as LocalInvokeBuildError$1, j as stripForDisplay, k as escapeRegExp, l as withErrorHandling, lt as SynthesisError, n as ambientCredentialConfig, nt as DeployCancelledError, o as formatError, ot as ProvisioningError, r as clientDefaultsFor, s as handleError, st as ResourceTimeoutError, t as ambientClientDefaults, tt as CdkdError, u as LocalStartServiceError, v as StackHasActiveImportsError, y as StackTerminationProtectionError, z as isRetryableTransientError } from "./ambient-client-defaults-BqOg0I6e.js";
7
7
  import { a as getAssumedRoleCredentials, c as setAssumedRoleCredentials, h as formatAuthority, l as setAwsEndpointOverrideSource, m as runInStackAwsScope, n as awsClientDefaults, r as awsEndpointOverrideActive, s as runWithRealAws } from "./aws-client-defaults-DAebi99J.js";
8
- import { $ as createLegacyAssetParameterBinder, A as runDockerForeground, B as resolveCaptureObservedState, C as finchSecretArgvRefusal, D as isMalformedEnvKey, E as isDockerClientEnvKey, F as getDefaultStateBucketName, G as resolveUpdatePolicy, H as resolveStateBucketWithDefault, I as getLegacyStateBucketName, J as warnDeprecatedNoPrefixCliFlag, K as resolveUseCdkBootstrapAssets, L as loadCdkJson, M as abortInFlightMultipartUploads, N as Synthesizer, O as formatDockerLoginError, P as synthesisStatusMessage, Q as bindLegacyStackAssetParameters, R as resolveApp, S as dockerSpawnEnvWithSensitive, T as warnFinchArgvExposure, U as resolveStateBucketWithDefaultAndSource, V as resolveSkipPrefix, W as resolveStateBucketWithSource, X as AssemblyReader, Y as refuseFailedLookups, Z as StageLoadError, _ as describeDockerExecFailure, at as setChildProcessAwsEnv, b as redactedDockerCause, d as isLockInfoExpired, et as legacyPlanAssetCount, f as AssetPublisher, h as resolveDockerContextDirectory, i as mergeDeclaredEntries, it as processStackMessages, j as runDockerStreaming, k as getDockerCmd, l as DagBuilder, m as buildDockerImage, n as declaredStringList, nt as prepareLegacyStackAssets, p as WorkGraph, q as stateBucketExistenceConfirmed, r as inlinePoliciesAreDeclared, rt as CdkToolkitBucketMissingError, s as stringListIsDeclared, t as declaredInlinePolicies, tt as predictedAutoCreatedAssetMode, u as LockManager, v as describeDockerFailure, w as partitionSensitiveEnv, x as redactDockerArgvValues, y as redactedCause, z as resolveAutoAssetStorage } from "./settle-own-write-members-fY5JNYhA.js";
9
- import { $a as maskEventTextWithBoundBags, $c as yellow, $d as createLazyAssetModeContext, $l as repairMalformedOrphanRecordsForReadOnly, $n as NESTED_PENDING_PARENT_REASON, $o as WaitConditionSignalStore, $r as recordedRuleIdOf, $s as classifyReplaySecretRegion, $u as UNREADABLE_RESOURCES_MAP_ROW, A as renderUnreplacedTarget, Aa as supersededResourcesOf, Ac as recordedValuesOf, Ad as isSecretValuedAttribute, Af as nullPrototypeRecord, Ai as demoteSupersededOrphans, An as refactorMarkerMovesOf, Ar as movedToHint, As as DiffCalculator, Au as malformedExportNamesWarning, B as readProtection, Ba as sgCidrKey, Bc as parseCfnTemplateWithFormat, Bf as resolveBucketRegion, Bi as attemptUsesCompletedCreate, Bl as maskedInputProof, Bn as settleStackTagChildRuns, Bo as memberReadFailure, Br as parseMappingFile, Bs as refuseUnreadableCdkCrossAccountRefs, Bu as refuseDivergentRecordRegionForDestroy, C as healSlashedSsmParameterNames, Ca as deleteSupersededEntry, Cc as maskPassedSecretChanges, Cd as CrossPrefixScanCache, Cf as validateContainerRepoName, Cl as isStatefulRecreateTargetSync, Cr as constructPathOf$1, Cs as deleteIndeterminateGuards, Cu as UNREADABLE_ORPHANS_CONTAINER_ROW, D as scanActiveConsumers, Da as supersededDependentsFirst, Dc as mixedSecretTagKeys, Dd as isNotImplemented, Df as defineOwnKey, Dn as recordRetainedForReadoption, Do as destroyStackRecordsView, Dr as orphanedLogicalIds, Ds as getReadOnlyPropertyPaths, Du as refuseMalformedOrphans, E as slashedSsmNameHealPendingNote, Ea as supersededAfterRollback, Ec as mixedSecretRowKeys, Ed as isAccessDenied, Ei as withCreateTokenLedger, En as keptForRetainedRecord, Er as formatDestructiveChange, Eu as malformedOrphansWarning, F as recordedProtectionEvidence, Fa as withPreviousPolicies, Fc as prepareCloudFormationStackRetirement, Fd as isAbsoluteAssetPath, Ff as displayAssemblyPath, Fi as recordUnderIdIsNotOwn, Fl as getTopLevelKeysHoldingUnreadableCreateOnly, Fn as deleteSignalReceiver, Fr as changedReferenceReason, Fs as stackIdTailOf, Ga as noEchoAttributeNamesOf, Gc as promptYesNo, Gd as uploadCfnTemplate, Gi as orphanNeedsIdentity, Gl as isReadableOrphanRecord, Gn as readsOnlyNoEchoParameters, Go as verbatimEchoDriftKeys, Gr as createNoEchoValueMacs, Gs as isIamRoleArn, Gu as refuseMalformedResourcesForDestroy, Hc as SUPERSEDED_COPY_HINT, Hd as CFN_TEMPLATE_BODY_LIMIT, Hi as segmentCleanupOptions, Hl as declaresNoEcho, Hn as childStackTags, Ho as reReadUntilSettled, Hr as proposeRenames, Hs as assertFlagRoleArn, Hu as malformedResourcesWarning, I as recordedProtectionNote, Ia as findNestedStackTypeChanges, Ic as findReplacedCfnResources, Id as listNestedTemplateRows, Ii as replacementNeverSwapped, Il as tryGetTopLevelWriteOnlyProperties, In as isReceiver, Io as declaredMemberDocument, Ir as differingRemedy, Iu as refuseMalformedOutputs, Ja as withAttemptedItemsMasked, Jc as bold, Jd as decodeListingKey, Ji as nameScopeOf, Jl as malformedOrphanRowsKeptWarning, Jn as startForceQuitFlushes, Jo as CC_BROKEN_REASON, Jr as noEchoMacVerdict, Js as AWS_CREDENTIAL_ENV_KEYS, Ju as repairMalformedResourcesForReadOnly, Ka as noEchoComparisonForTemplate, Kc as serializePrompt, Kd as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Ki as nameGenerationCarriedFrom, Kl as malformedOrphanRecordsRefusalMessage, Kr as noEchoMacBinding, Ks as parseIamRoleArn, Ku as refuseMalformedResourcesForExport, L as PROTECTION_PROPERTY_BY_TYPE, Lc as getCloudFormationResourceTree, Ld as renderNestedTemplateTreeDefect, Lf as renderAssemblyPathEscape, Li as IMPLICIT_DELETE_DEPENDENCIES, Ll as publicReferencesOf, Ln as removeSignalReceiverNamed, Lo as declaredPolicyDocument, Lr as isPairableType, Lt as tagsMatchDeclared, Lu as refuseMalformedOutputsForDestroy, M as findServiceTokenRefusals, Mc as taintedNamesOf, Mi as isReplacementOrphan, Ml as secretSegmentsOfState, Mn as refuseRefactorMarker, Mr as withMovedTo, Ms as isSelectOutOfBounds, Mu as malformedLocalOutputsWarning, N as serviceTokenBlockingReason, Na as snapshotSegmentSurvivors, Nc as templateMixesDynamicReference, Ni as planFailedOps, Nl as withSecretPhysicalIdsMaskedInState, Nn as sameMove, No as LAMBDA_PERMISSION_STATEMENT_KEYS, Nr as changedReferenceInDiff, Ns as isAlwaysLiveAttribute, Nt as declaredTagsReadback, Nu as malformedOutputsRefusalMessage, O as planReplaceResourceTargets, Oa as supersededHeldByOtherTypeWarning, Oc as mixesDynamicReference, Od as stackInstanceIdOf, Of as hasOwnKey, Oi as planRollback, On as readRefactorMarker, Or as findRefactorHints, Os as isWaitAbandonedError, Ou as refuseMalformedOrphansForDestroy, P as diffSecurity, Pa as resolveReplacementOldType, Pc as deleteRetiredCloudFormationStack, Pd as findNestedTemplateTreeDefect, Pf as describeFileReadFailure, Pi as recheckFailedPlan, Pl as getSettledWriteOnlyPropertyPaths, Pn as updateRefactorMarker, Pr as changedReferencePath, Ps as poisonRenderedSpellingsCollidingIn, Pu as malformedOutputsWarning, Q as streamPolicyMatchesDeclared, Qa as journaledOrphanPrintingBag, Qc as red, Qd as createAssetRedirectResolver, Qi as withNameGenerationReached, Ql as refuseMalformedOrphansForOrphan, Qn as planOrphanAdoption, Qo as wouldReturnToSdkProvider, Qr as undeclaredGrantSiblingMembers, Qs as classifyRecordedSecretRegion, Qu as STATE_RESOURCES_MALFORMED, R as isProtectionValueActive, Ra as cfnIngressPortValue, Rc as tryGetCloudFormationResourceMap, Rd as templateIdentity, Rf as resolveAssemblyPath, Ri as computeImplicitDeleteEdges, Rl as maskedPropertyFingerprintsOf, Rn as childTemplateLoader, Ro as efsPolicyMatchesDeclared, Rr as looselyEqual, Rs as resolveDynamicReferences, Ru as repairMalformedOutputsForReadOnly, S as warnLegacySpelling, Sa as maskingRetryLogger, Sc as crossStackTaintSeeds, Sd as CrossPrefixReadError, Sf as validateAssetBucketName, Si as replacementCreateRoutesToCloudControl, Sl as isStatefulRecreateTargetForReplace, Sr as crossStackReadsForPartialSave, Ss as UNSPECIFIED_SKIP_REASON, Su as repairMalformedResourcePropertiesForReadOnly, T as slashedSsmNameHealNote, Ta as isSupersededResourceRecord, Tc as maskPassedSecretReasons, Td as crossPrefixDeniedWarning, Tn as NestedCleanupQueue, Tr as formatChangeCounts, Ts as deleteSkipReason, Tu as malformedOrphansRefusalMessage, Ua as canonicalizeIpv4Cidr, Uc as cfnFailureText, Ud as CFN_TEMPLATE_URL_LIMIT, Ui as removeProtectionTypeList, Ul as maskedPropertyFingerprint, Un as literalRowTags, Ur as referencedLogicalIds, Us as assertSendableRoleArn, Uu as malformedStateRefusalMessage, Va as sgProtocolKey, Vc as stringifyCfnTemplate, Vd as ssmResolvedValueType, Vi as readsRegeneratingSecret, Vo as policyDocumentMatchesDeclared, Vr as propertiesChangedReason, Vs as applyRoleArnIfSet, Vu as malformedRenderedContainersWarning, Wa as canonicalizeIpProtocolValue, Wc as confirmOrRefuse, Wd as findLargeInlineResources, Wi as removeProtectionTypes, Wl as deployRefusesOrphanRowsReason, Wn as macWriteOnlyKeys, Wr as NOECHO_MAC_KEY_ALIAS, Ws as explicitRoleArnOrThrow, Wu as refuseMalformedResourcesForDeploy, Xa as createReadOnlyAttributeHealerFactory, Xc as gray, Xi as retiredNameGenerationsAfter, Xl as refuseMalformedOrphanRecords, Xn as resolvePendingCloudControlRequests, Xo as ccBrokenReason, Xr as siblingOwnedRevertDesired, Xs as callerEnvCredentials, Xu as accountArgs, Ya as noEchoExactEchoLeavesOf, Yc as cyan, Yi as retiredAfterRollback, Yl as previewableOrphanRecords, Yn as pendingRequestCount, Yo as ProviderRegistry, Yr as noEchoValueMacsOf, Ys as applyCallerIdentityCredentials, Yu as JSON_LISTING_HOLE_VALUE, Za as completedReplayEntries, Zc as green, Zd as buildAssetRedirectMap, Zi as retiredNameGenerationsLeaving, Zl as refuseMalformedOrphanRecordsForDestroy, Zn as makeSiblingClaimReader, Zo as isCustomResource, Zr as stripSiblingOwnedParentMembers, Zs as envCredentialsAreAssumedRole, Zu as withheldAccountClause, _ as readRecordedConditionVerdicts, _a as collectPublishedOutputNames, _c as lacksRecordedRefArn, _d as splitImportedOps, _f as assertAssetBucketRegion, _i as equalModuloMask, _o as unsupportedFinalSnapshotError, _r as loadJournaledOrphans, _s as withCustomResourceStack, _u as malformedResourcePropertiesWarning, a as mergeNoChangeOutputs, aa as WITHHELD_NAME_DISPLAY, ai as replayFailedOperations, al as recordedReferenceRegions, ao as secretNamedRecordNeedles, ar as recordDisplacedSkips, as as customResourceResponseExpirationWarning, au as malformedResourceEntriesWarning, b as pendingMovesRefusalMessage, ba as DEFAULT_RESOURCE_TIMEOUT_MS, bc as SECURITY_TABLE_WITHHELD, bd as hasUnverifiableParameterRefusal, bf as parseBootstrapMarker, bi as updatePartialReason, bl as shownType, br as DeploymentEventsReader, bu as refuseMalformedResourcePropertiesForExport, c as nestedSsmNameRowNote, ca as secretBearing, cd as NO_CC_HANDLERS_REASON, cf as getDockerImageBySourceHash, ci as PLANNED_EARLY_DELETE_CONSEQUENCE, cl as isImpossibleEmptyStoredAttribute, co as storedSecretNameNeedles, cr as withNestedRevertRun, cs as readsNoEchoDeleteValues, cu as refuseMalformedResourceEntries, d as makeCanonicalizePropertiesFn, da as carriedExportAliasExposure, dc as isUnboundTemplateParameter, dd as providerReplacementOldDeleted, di as buildReadCurrentStateContext, dl as carriesDynamicReference, do as PRE_DELETE_SNAPSHOT_TYPES, dr as withNestedStackContext, du as refuseMalformedResourceEntriesForImport, ea as inheritProducerRegions, ec as producerRegionsFromState, ed as displayLogicalId, ei as sgRuleOwnershipIdentity, eo as namingSecretsWithRecordedNoEcho, er as displacedOpClause, es as classifyHandleUrl, eu as unpreviewableOrphanRecords, f as readDbInstanceAvailabilityZone, fa as exportNameNoEchoParameters, fc as parameterTypeMayLoseSecretIdentity, fi as recordAfterRollbackUpdate, fl as keepsSecretReferenceToken, fo as ccRoutedFinalSnapshotError, fr as deleteJournaledOrphans, fs as customResourcesFailedWithoutApp, fu as refuseMalformedResourceEntriesForImportSave, g as parentSuppliedValues, ga as collectDeclaredOutputNames, gc as refStateLookupFromResource, gd as S3StateBackend, gf as buildDenyExternalAccessPolicy, gi as equalModuloMarkedMask, go as refusesFinalSnapshot, gr as journaledOrphanLines, gs as setLocalCustomResourceRuntimeEnabled, gu as malformedDriftResourcePropertiesWarning, h as conditionInputsFrom, ha as noEchoParameterValueSeed, hc as isStalePlaceholderArnAttribute, hd as TemplateParser, hf as ensureAssetStorage, hi as calculateResourceDrift, hl as LEGACY_HANDLE_HEAL_REASON, ho as isFinalSnapshotError, hr as isHandledOrphan, hu as unreadableResourceEntries, i as keptWholeReasonText, ia as resourcesNamingDeclaredParameter, id as findHandledUnwrittenCreateOnly, il as recordedOutputReferenceRegions, ir as nestedChildStackName$1, is as applyCustomResourceResponseExpiration, iu as malformedLocalResourcesWarning, j as deferredServiceTokenWarning, ja as withoutSuperseded, jc as securityDiffWithPassedSecretWithheld, jd as isSensitiveAttributeName, jf as ownValue, ji as isJournaledOrphan, jl as secretPhysicalIdSegment, jn as refactorMarkerRefusalMessage, jo as withStackRecords, jr as rollbackOrphanIds, js as IntrinsicFunctionResolver, ju as malformedExportSourceWarning, k as refuseStatefulReplaceResourceTargets, ka as supersededHolderOf, kc as readsTainted, kd as withStackInstanceIdWithheld, kf as hasPlainPrototype, ki as seedsDeleteFirstGuard, kl as displayPhysicalId, kn as readRefactorMarkerOnce, ko as revertStackRecordsView, kr as hintSidesOf, ku as repairMalformedOrphansForReadOnly, l as crossStackOutputProvenanceSource, la as secretBearingStateKeyWarning, ld as hasNoCloudControlHandlers, li as earlyDeleteWhen, ll as carriesFetchableDynamicReference, lo as extractDeploymentEventError, lr as collectNestedChildUnaddressed, ls as isCustomResourceType$1, lu as refuseMalformedResourceEntriesForDeploy, m as conditionFingerprint, ma as isWholeDynamicReferenceValue, mc as cfnRefValueFromPhysicalId, mf as AssetModeResolver, mi as withUnprovenUnsettled, ml as INTRINSIC_KEYS, mo as effectiveDeletionPolicy, mr as dropFailedHint, ms as localCustomResourceCommand, mu as repairMalformedResourceEntriesForReadOnly, n as applyStackTagsToTemplate, na as namesAnyDeclaredParameter, nc as withoutLapsedStaleShapeStamp, nd as hasReadableResources, nl as keepHeldTokenProvenance, no as secretNamePrintingBag, nr as dropSettledNestedJournals, ns as isSignalKey, nu as isReadableResourceEntry, o as checkNestedSsmNames, oa as displayTextOrWithheld, od as unwrittenCreateOnlyReplacement, of as rewriteTemplateAssetReferences, oi as replayRollback, ol as withoutVersionAttestation, oo as stackSecretNamesMasker, ou as malformedScrubResourceEntriesRefusalMessage, p as healZonelessDbInstanceRecords, pa as exportNameSecretExposure, pc as AWS_NO_VALUE, pi as settleUnsettledPrevious, pl as withSharedDrainBudget, po as ccRoutedInstanceTakesNoSnapshot, pr as dropFailedCommands, ps as customResourcesRunWithoutApp, pu as refuseMalformedResourceEntriesForOrphan, q as readStreamPolicy, qa as noEchoParameterNamesOf, qc as NESTED_STACK_RESOURCE_TYPE$1, qi as nameGenerationHighWaterOf, ql as malformedOrphanRecordsWarning, qn as formatResourceLine, qr as noEchoMacParametersOf, qs as sendableAssumeRoleCommand, qu as refuseMalformedState, r as isSecretBearingReferenceString, ra as reachableDivergentParameters, rc as isUnexposedRecordedIdentity, rd as findActionableSdkUnwired, rf as loadPublishableAssetManifest, ri as siblingRecordedSgRuleIds, ro as secretNamePrintingBags, rs as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, ru as malformedLocalResourceEntriesWarning, s as nestedSsmNameDeferredNote, sa as exportAliasCollisionScrubWarning, sf as AssetManifestLoader, si as DELETED_RESOURCE_REMEDY, sl as getAccountInfo, so as stateSecretNameNeedles, sr as revertedNestedRowIds, ss as TemplateNoEchoReresolver, su as refuseMalformedResourceAttributesForOrphan, t as DeployEngine, ta as computeParameterTaint, tc as regionLessSecretName, td as hasReadableOutputs, ti as sgSiblingDecidedById, tl as withPrintingSecrets, to as orphanRecordsPrintingBag, tr as displacedPhysicalIdShown, tu as unreadableOrphanRecords, u as inheritedProvenanceForChildDiff, ua as secretSafeKeyDisplay, uc as coerceParameterTypedValue, ud as PROPERTY_COVERAGE_BY_TYPE, ui as earlyDeletedOld, ul as isNamelessDynamicReferenceError, uo as ATOMIC_FINAL_SNAPSHOT_TYPES, ur as getCurrentNestedStackContext, us as NO_LOCAL_CUSTOM_RESOURCES_FLAG, uu as refuseMalformedResourceEntriesForDestroy, v as hasPendingMovesOut, va as isExportAliasCollision, vc as lacksRecordedTableArn, vd as readOnlyStateVersionOf, vf as isCrossRegionRedirect, vi as undeclaredEmptyObservedKeys, vl as findReplacedReadersOfRecreateTargets, vo as createPreDeleteFinalSnapshot, vr as sameJournaledOrphans, vu as refuseMalformedResourcePropertiesForDestroy, w as slashedSsmNameHealAdoptedNote, wa as holdsSupersededResources, wc as maskPassedSecretOutputs, wd as applyCrossPrefixScan, wf as BOOTSTRAP_MARKER_PREFIX, wi as ledgerForStack, wl as renderStatefulReason, wr as findDestructiveChanges, ws as deleteLeftInPlace, wu as hasReadableOrphans, x as refusePendingMovesOut, xa as DEFAULT_RESOURCE_WARN_AFTER_MS, xc as calculatorMaskingPassedSecretLines, xd as rebuildClientForBucketRegion, xf as readBootstrapMarkerBody, xi as findUpdatePolicyReplacementRefusals, xl as MULTI_REGION_RECREATE_BLOCKED_TYPES, xr as DeploymentEventsStore, xs as RollbackInlinePolicyWriters, xu as refuseMalformedResourcePropertiesForOrphan, y as pendingMovesOutOf, ya as bindingSkippedOutputs, yd as hasReasonlessBaselineRefusal, yf as getBootstrapMarkerKey, yi as updatePartialMessage, yl as refuseStatefulReplacedReaders, yo as buildFinalSnapshotIdentifier, yr as makeForeignHolderScan, ys as CloudControlProvider, yu as refuseMalformedResourcePropertiesForDrift, z as perType, za as recordedSgRuleId, zc as parseCfnTemplate, zi as typesDeletedBefore, zl as parameterInputsFor, zn as inRunStackKey, zo as lambdaPermissionMatchesDeclared, zr as mappingPairs, zs as producerLookupOver, zu as STATE_REGION_DIVERGED } from "./deploy-engine-BEzzfllj.js";
8
+ import { $ as createLegacyAssetParameterBinder, A as runDockerForeground, B as resolveCaptureObservedState, C as finchSecretArgvRefusal, D as isMalformedEnvKey, E as isDockerClientEnvKey, F as getDefaultStateBucketName, G as resolveUpdatePolicy, H as resolveStateBucketWithDefault, I as getLegacyStateBucketName, J as warnDeprecatedNoPrefixCliFlag, K as resolveUseCdkBootstrapAssets, L as loadCdkJson, M as abortInFlightMultipartUploads, N as Synthesizer, O as formatDockerLoginError, P as synthesisStatusMessage, Q as bindLegacyStackAssetParameters, R as resolveApp, S as dockerSpawnEnvWithSensitive, T as warnFinchArgvExposure, U as resolveStateBucketWithDefaultAndSource, V as resolveSkipPrefix, W as resolveStateBucketWithSource, X as AssemblyReader, Y as refuseFailedLookups, Z as StageLoadError, _ as describeDockerExecFailure, at as setChildProcessAwsEnv, b as redactedDockerCause, d as isLockInfoExpired, et as legacyPlanAssetCount, f as AssetPublisher, h as resolveDockerContextDirectory, i as mergeDeclaredEntries, it as processStackMessages, j as runDockerStreaming, k as getDockerCmd, l as DagBuilder, m as buildDockerImage, n as declaredStringList, nt as prepareLegacyStackAssets, p as WorkGraph, q as stateBucketExistenceConfirmed, r as inlinePoliciesAreDeclared, rt as CdkToolkitBucketMissingError, s as stringListIsDeclared, t as declaredInlinePolicies, tt as predictedAutoCreatedAssetMode, u as LockManager, v as describeDockerFailure, w as partitionSensitiveEnv, x as redactDockerArgvValues, y as redactedCause, z as resolveAutoAssetStorage } from "./settle-own-write-members-DzUentwR.js";
9
+ import { $a as maskEventTextWithBoundBags, $c as yellow, $d as createLazyAssetModeContext, $i as namesAnyDeclaredParameter, $l as repairMalformedOrphanRecordsForReadOnly, $n as NESTED_PENDING_PARENT_REASON, $o as WaitConditionSignalStore, $r as recordedRuleIdOf, $s as classifyReplaySecretRegion, $u as UNREADABLE_RESOURCES_MAP_ROW, A as renderUnreplacedTarget, Aa as supersededResourcesOf, Ac as recordedValuesOf, Ad as isSecretValuedAttribute, Af as nullPrototypeRecord, Ai as demoteSupersededOrphans, An as refactorMarkerMovesOf, Ar as movedToHint, As as DiffCalculator, Au as malformedExportNamesWarning, B as readProtection, Ba as sgCidrKey, Bc as parseCfnTemplateWithFormat, Bf as resolveBucketRegion, Bi as removeProtectionTypeList, Bl as maskedInputProof, Bn as settleStackTagChildRuns, Bo as memberReadFailure, Br as parseMappingFile, Bs as refuseUnreadableCdkCrossAccountRefs, Bu as refuseDivergentRecordRegionForDestroy, C as healSlashedSsmParameterNames, Ca as deleteSupersededEntry, Cc as maskPassedSecretChanges, Cd as CrossPrefixScanCache, Cf as validateContainerRepoName, Cl as isStatefulRecreateTargetSync, Cr as constructPathOf$1, Cs as deleteIndeterminateGuards, Cu as UNREADABLE_ORPHANS_CONTAINER_ROW, D as scanActiveConsumers, Da as supersededDependentsFirst, Dc as mixedSecretTagKeys, Dd as isNotImplemented, Df as defineOwnKey, Dn as recordRetainedForReadoption, Do as destroyStackRecordsView, Dr as orphanedLogicalIds, Ds as getReadOnlyPropertyPaths, Du as refuseMalformedOrphans, E as slashedSsmNameHealPendingNote, Ea as supersededAfterRollback, Ec as mixedSecretRowKeys, Ed as isAccessDenied, Ei as withCreateTokenLedger, En as keptForRetainedRecord, Er as formatDestructiveChange, Eu as malformedOrphansWarning, F as recordedProtectionEvidence, Fa as withPreviousPolicies, Fc as prepareCloudFormationStackRetirement, Fd as isAbsoluteAssetPath, Ff as displayAssemblyPath, Fi as recordUnderIdIsNotOwn, Fl as getTopLevelKeysHoldingUnreadableCreateOnly, Fn as deleteSignalReceiver, Fr as changedReferenceReason, Fs as stackIdTailOf, Ga as noEchoAttributeNamesOf, Gc as promptYesNo, Gd as uploadCfnTemplate, Gi as nameScopeOf, Gl as isReadableOrphanRecord, Gn as readsOnlyNoEchoParameters, Go as verbatimEchoDriftKeys, Gr as createNoEchoValueMacs, Gs as isIamRoleArn, Gu as refuseMalformedResourcesForDestroy, Hc as SUPERSEDED_COPY_HINT, Hd as CFN_TEMPLATE_BODY_LIMIT, Hi as orphanNeedsIdentity, Hl as declaresNoEcho, Hn as childStackTags, Ho as reReadUntilSettled, Hr as proposeRenames, Hs as assertFlagRoleArn, Hu as malformedResourcesWarning, I as recordedProtectionNote, Ia as findNestedStackTypeChanges, Ic as findReplacedCfnResources, Id as listNestedTemplateRows, Ii as replacementNeverSwapped, Il as tryGetTopLevelWriteOnlyProperties, In as isReceiver, Io as declaredMemberDocument, Ir as differingRemedy, Iu as refuseMalformedOutputs, Ja as withAttemptedItemsMasked, Jc as bold, Jd as decodeListingKey, Ji as retiredNameGenerationsLeaving, Jl as malformedOrphanRowsKeptWarning, Jn as startForceQuitFlushes, Jo as CC_BROKEN_REASON, Jr as noEchoMacVerdict, Js as AWS_CREDENTIAL_ENV_KEYS, Ju as repairMalformedResourcesForReadOnly, Ka as noEchoComparisonForTemplate, Kc as serializePrompt, Kd as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Ki as retiredAfterRollback, Kl as malformedOrphanRecordsRefusalMessage, Kr as noEchoMacBinding, Ks as parseIamRoleArn, Ku as refuseMalformedResourcesForExport, L as PROTECTION_PROPERTY_BY_TYPE, Lc as getCloudFormationResourceTree, Ld as renderNestedTemplateTreeDefect, Lf as renderAssemblyPathEscape, Li as attemptUsesCompletedCreate, Ll as publicReferencesOf, Ln as removeSignalReceiverNamed, Lo as declaredPolicyDocument, Lr as isPairableType, Lt as tagsMatchDeclared, Lu as refuseMalformedOutputsForDestroy, M as findServiceTokenRefusals, Mc as taintedNamesOf, Mi as isReplacementOrphan, Ml as secretSegmentsOfState, Mn as refuseRefactorMarker, Mr as withMovedTo, Ms as isSelectOutOfBounds, Mu as malformedLocalOutputsWarning, N as serviceTokenBlockingReason, Na as snapshotSegmentSurvivors, Nc as templateMixesDynamicReference, Ni as planFailedOps, Nl as withSecretPhysicalIdsMaskedInState, Nn as sameMove, No as LAMBDA_PERMISSION_STATEMENT_KEYS, Nr as changedReferenceInDiff, Ns as isAlwaysLiveAttribute, Nt as declaredTagsReadback, Nu as malformedOutputsRefusalMessage, O as planReplaceResourceTargets, Oa as supersededHeldByOtherTypeWarning, Oc as mixesDynamicReference, Od as stackInstanceIdOf, Of as hasOwnKey, Oi as planRollback, On as readRefactorMarker, Or as findRefactorHints, Os as isWaitAbandonedError, Ou as refuseMalformedOrphansForDestroy, P as diffSecurity, Pa as resolveReplacementOldType, Pc as deleteRetiredCloudFormationStack, Pd as findNestedTemplateTreeDefect, Pf as describeFileReadFailure, Pi as recheckFailedPlan, Pl as getSettledWriteOnlyPropertyPaths, Pn as updateRefactorMarker, Pr as changedReferencePath, Ps as poisonRenderedSpellingsCollidingIn, Pu as malformedOutputsWarning, Q as streamPolicyMatchesDeclared, Qa as journaledOrphanPrintingBag, Qc as red, Qd as createAssetRedirectResolver, Qi as computeParameterTaint, Ql as refuseMalformedOrphansForOrphan, Qn as planOrphanAdoption, Qo as wouldReturnToSdkProvider, Qr as undeclaredGrantSiblingMembers, Qs as classifyRecordedSecretRegion, Qu as STATE_RESOURCES_MALFORMED, R as isProtectionValueActive, Ra as cfnIngressPortValue, Rc as tryGetCloudFormationResourceMap, Rd as templateIdentity, Rf as resolveAssemblyPath, Ri as readsRegeneratingSecret, Rl as maskedPropertyFingerprintsOf, Rn as childTemplateLoader, Ro as efsPolicyMatchesDeclared, Rr as looselyEqual, Rs as resolveDynamicReferences, Ru as repairMalformedOutputsForReadOnly, S as warnLegacySpelling, Sa as typesDeletedBefore, Sc as crossStackTaintSeeds, Sd as CrossPrefixReadError, Sf as validateAssetBucketName, Si as replacementCreateRoutesToCloudControl, Sl as isStatefulRecreateTargetForReplace, Sr as crossStackReadsForPartialSave, Ss as UNSPECIFIED_SKIP_REASON, Su as repairMalformedResourcePropertiesForReadOnly, T as slashedSsmNameHealNote, Ta as isSupersededResourceRecord, Tc as maskPassedSecretReasons, Td as crossPrefixDeniedWarning, Tn as NestedCleanupQueue, Tr as formatChangeCounts, Ts as deleteSkipReason, Tu as malformedOrphansRefusalMessage, Ua as canonicalizeIpv4Cidr, Uc as cfnFailureText, Ud as CFN_TEMPLATE_URL_LIMIT, Ui as nameGenerationCarriedFrom, Ul as maskedPropertyFingerprint, Un as literalRowTags, Ur as referencedLogicalIds, Us as assertSendableRoleArn, Uu as malformedStateRefusalMessage, Va as sgProtocolKey, Vc as stringifyCfnTemplate, Vd as ssmResolvedValueType, Vi as removeProtectionTypes, Vo as policyDocumentMatchesDeclared, Vr as propertiesChangedReason, Vs as applyRoleArnIfSet, Vu as malformedRenderedContainersWarning, Wa as canonicalizeIpProtocolValue, Wc as confirmOrRefuse, Wd as findLargeInlineResources, Wi as nameGenerationHighWaterOf, Wl as deployRefusesOrphanRowsReason, Wn as macWriteOnlyKeys, Wr as NOECHO_MAC_KEY_ALIAS, Ws as explicitRoleArnOrThrow, Wu as refuseMalformedResourcesForDeploy, Xa as createReadOnlyAttributeHealerFactory, Xc as gray, Xl as refuseMalformedOrphanRecords, Xn as resolvePendingCloudControlRequests, Xo as ccBrokenReason, Xr as siblingOwnedRevertDesired, Xs as callerEnvCredentials, Xu as accountArgs, Ya as noEchoExactEchoLeavesOf, Yc as cyan, Yi as withNameGenerationReached, Yl as previewableOrphanRecords, Yn as pendingRequestCount, Yo as ProviderRegistry, Yr as noEchoValueMacsOf, Ys as applyCallerIdentityCredentials, Yu as JSON_LISTING_HOLE_VALUE, Za as completedReplayEntries, Zc as green, Zd as buildAssetRedirectMap, Zi as inheritProducerRegions, Zl as refuseMalformedOrphanRecordsForDestroy, Zn as makeSiblingClaimReader, Zo as isCustomResource, Zr as stripSiblingOwnedParentMembers, Zs as envCredentialsAreAssumedRole, Zu as withheldAccountClause, _ as readRecordedConditionVerdicts, _a as DEFAULT_RESOURCE_TIMEOUT_MS, _c as lacksRecordedRefArn, _d as splitImportedOps, _f as assertAssetBucketRegion, _i as equalModuloMask, _o as unsupportedFinalSnapshotError, _r as loadJournaledOrphans, _s as withCustomResourceStack, _u as malformedResourcePropertiesWarning, a as mergeNoChangeOutputs, aa as secretBearing, ai as replayFailedOperations, al as recordedReferenceRegions, ao as secretNamedRecordNeedles, ar as recordDisplacedSkips, as as customResourceResponseExpirationWarning, au as malformedResourceEntriesWarning, b as pendingMovesRefusalMessage, ba as IMPLICIT_DELETE_DEPENDENCIES, bc as SECURITY_TABLE_WITHHELD, bd as hasUnverifiableParameterRefusal, bf as parseBootstrapMarker, bi as updatePartialReason, bl as shownType, br as DeploymentEventsReader, bu as refuseMalformedResourcePropertiesForExport, c as nestedSsmNameRowNote, ca as carriedExportAliasExposure, cd as NO_CC_HANDLERS_REASON, cf as getDockerImageBySourceHash, ci as PLANNED_EARLY_DELETE_CONSEQUENCE, cl as isImpossibleEmptyStoredAttribute, co as storedSecretNameNeedles, cr as withNestedRevertRun, cs as readsNoEchoDeleteValues, cu as refuseMalformedResourceEntries, d as makeCanonicalizePropertiesFn, da as isWholeDynamicReferenceValue, dc as isUnboundTemplateParameter, dd as providerReplacementOldDeleted, di as buildReadCurrentStateContext, dl as carriesDynamicReference, do as PRE_DELETE_SNAPSHOT_TYPES, dr as withNestedStackContext, du as refuseMalformedResourceEntriesForImport, ea as reachableDivergentParameters, ec as producerRegionsFromState, ed as displayLogicalId, ei as sgRuleOwnershipIdentity, eo as namingSecretsWithRecordedNoEcho, er as displacedOpClause, es as classifyHandleUrl, eu as unpreviewableOrphanRecords, f as readDbInstanceAvailabilityZone, fa as noEchoParameterValueSeed, fc as parameterTypeMayLoseSecretIdentity, fi as recordAfterRollbackUpdate, fl as keepsSecretReferenceToken, fo as ccRoutedFinalSnapshotError, fr as deleteJournaledOrphans, fs as customResourcesFailedWithoutApp, fu as refuseMalformedResourceEntriesForImportSave, g as parentSuppliedValues, ga as bindingSkippedOutputs, gc as refStateLookupFromResource, gd as S3StateBackend, gf as buildDenyExternalAccessPolicy, gi as equalModuloMarkedMask, go as refusesFinalSnapshot, gr as journaledOrphanLines, gs as setLocalCustomResourceRuntimeEnabled, gu as malformedDriftResourcePropertiesWarning, h as conditionInputsFrom, ha as isExportAliasCollision, hc as isStalePlaceholderArnAttribute, hd as TemplateParser, hf as ensureAssetStorage, hi as calculateResourceDrift, hl as LEGACY_HANDLE_HEAL_REASON, ho as isFinalSnapshotError, hr as isHandledOrphan, hu as unreadableResourceEntries, i as keptWholeReasonText, ia as exportAliasCollisionScrubWarning, id as findHandledUnwrittenCreateOnly, il as recordedOutputReferenceRegions, ir as nestedChildStackName$1, is as applyCustomResourceResponseExpiration, iu as malformedLocalResourcesWarning, j as deferredServiceTokenWarning, ja as withoutSuperseded, jc as securityDiffWithPassedSecretWithheld, jd as isSensitiveAttributeName, jf as ownValue, ji as isJournaledOrphan, jl as secretPhysicalIdSegment, jn as refactorMarkerRefusalMessage, jo as withStackRecords, jr as rollbackOrphanIds, js as IntrinsicFunctionResolver, ju as malformedExportSourceWarning, k as refuseStatefulReplaceResourceTargets, ka as supersededHolderOf, kc as readsTainted, kd as withStackInstanceIdWithheld, kf as hasPlainPrototype, ki as seedsDeleteFirstGuard, kl as displayPhysicalId, kn as readRefactorMarkerOnce, ko as revertStackRecordsView, kr as hintSidesOf, ku as repairMalformedOrphansForReadOnly, l as crossStackOutputProvenanceSource, la as exportNameNoEchoParameters, ld as hasNoCloudControlHandlers, li as earlyDeleteWhen, ll as carriesFetchableDynamicReference, lo as extractDeploymentEventError, lr as collectNestedChildUnaddressed, ls as isCustomResourceType$1, lu as refuseMalformedResourceEntriesForDeploy, m as conditionFingerprint, ma as collectPublishedOutputNames, mc as cfnRefValueFromPhysicalId, mf as AssetModeResolver, mi as withUnprovenUnsettled, ml as INTRINSIC_KEYS, mo as effectiveDeletionPolicy, mr as dropFailedHint, ms as localCustomResourceCommand, mu as repairMalformedResourceEntriesForReadOnly, n as applyStackTagsToTemplate, na as WITHHELD_NAME_DISPLAY, nc as withoutLapsedStaleShapeStamp, nd as hasReadableResources, nl as keepHeldTokenProvenance, no as secretNamePrintingBag, nr as dropSettledNestedJournals, ns as isSignalKey, nu as isReadableResourceEntry, o as checkNestedSsmNames, oa as secretBearingStateKeyWarning, od as unwrittenCreateOnlyReplacement, of as rewriteTemplateAssetReferences, oi as replayRollback, ol as withoutVersionAttestation, oo as stackSecretNamesMasker, ou as malformedScrubResourceEntriesRefusalMessage, p as healZonelessDbInstanceRecords, pa as collectDeclaredOutputNames, pc as AWS_NO_VALUE, pi as settleUnsettledPrevious, pl as withSharedDrainBudget, po as ccRoutedInstanceTakesNoSnapshot, pr as dropFailedCommands, ps as customResourcesRunWithoutApp, pu as refuseMalformedResourceEntriesForOrphan, q as readStreamPolicy, qa as noEchoParameterNamesOf, qc as NESTED_STACK_RESOURCE_TYPE$1, qi as retiredNameGenerationsAfter, ql as malformedOrphanRecordsWarning, qn as formatResourceLine, qr as noEchoMacParametersOf, qs as sendableAssumeRoleCommand, qu as refuseMalformedState, r as isSecretBearingReferenceString, ra as displayTextOrWithheld, rc as isUnexposedRecordedIdentity, rd as findActionableSdkUnwired, rf as loadPublishableAssetManifest, ri as siblingRecordedSgRuleIds, ro as secretNamePrintingBags, rs as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, ru as malformedLocalResourceEntriesWarning, s as nestedSsmNameDeferredNote, sa as secretSafeKeyDisplay, sf as AssetManifestLoader, si as DELETED_RESOURCE_REMEDY, sl as getAccountInfo, so as stateSecretNameNeedles, sr as revertedNestedRowIds, ss as TemplateNoEchoReresolver, su as refuseMalformedResourceAttributesForOrphan, t as DeployEngine, ta as resourcesNamingDeclaredParameter, tc as regionLessSecretName, td as hasReadableOutputs, ti as sgSiblingDecidedById, tl as withPrintingSecrets, to as orphanRecordsPrintingBag, tr as displacedPhysicalIdShown, tu as unreadableOrphanRecords, u as inheritedProvenanceForChildDiff, ua as exportNameSecretExposure, uc as coerceParameterTypedValue, ud as PROPERTY_COVERAGE_BY_TYPE, ui as earlyDeletedOld, ul as isNamelessDynamicReferenceError, uo as ATOMIC_FINAL_SNAPSHOT_TYPES, ur as getCurrentNestedStackContext, us as NO_LOCAL_CUSTOM_RESOURCES_FLAG, uu as refuseMalformedResourceEntriesForDestroy, v as hasPendingMovesOut, va as DEFAULT_RESOURCE_WARN_AFTER_MS, vc as lacksRecordedTableArn, vd as readOnlyStateVersionOf, vf as isCrossRegionRedirect, vi as undeclaredEmptyObservedKeys, vl as findReplacedReadersOfRecreateTargets, vo as createPreDeleteFinalSnapshot, vr as sameJournaledOrphans, vu as refuseMalformedResourcePropertiesForDestroy, w as slashedSsmNameHealAdoptedNote, wa as holdsSupersededResources, wc as maskPassedSecretOutputs, wd as applyCrossPrefixScan, wf as BOOTSTRAP_MARKER_PREFIX, wi as ledgerForStack, wl as renderStatefulReason, wr as findDestructiveChanges, ws as deleteLeftInPlace, wu as hasReadableOrphans, x as refusePendingMovesOut, xa as computeImplicitDeleteEdges, xc as calculatorMaskingPassedSecretLines, xd as rebuildClientForBucketRegion, xf as readBootstrapMarkerBody, xi as findUpdatePolicyReplacementRefusals, xl as MULTI_REGION_RECREATE_BLOCKED_TYPES, xr as DeploymentEventsStore, xs as RollbackInlinePolicyWriters, xu as refuseMalformedResourcePropertiesForOrphan, y as pendingMovesOutOf, ya as maskingRetryLogger, yd as hasReasonlessBaselineRefusal, yf as getBootstrapMarkerKey, yi as updatePartialMessage, yl as refuseStatefulReplacedReaders, yo as buildFinalSnapshotIdentifier, yr as makeForeignHolderScan, ys as CloudControlProvider, yu as refuseMalformedResourcePropertiesForDrift, z as perType, za as recordedSgRuleId, zc as parseCfnTemplate, zi as segmentCleanupOptions, zl as parameterInputsFor, zn as inRunStackKey, zo as lambdaPermissionMatchesDeclared, zr as mappingPairs, zs as producerLookupOver, zu as STATE_REGION_DIVERGED } from "./deploy-engine-DNEAZMj7.js";
10
10
  import { n as canonicalizeRegion, r as derivePartitionAndUrlSuffix, t as PARTITION_TABLE } from "./aws-partition-DA0r2sr-.js";
11
- import { D as describeJsonParseFailure, T as timePhase, a as getCreateOnlyPropertyPaths, b as PhaseClock, c as templateResourceTypes, f as describeTypeWithThrottleRetry, j as utf8ByteLength, k as parseFailureDebugDetail, s as prefetchCreateOnlyPropertyPaths, v as withRetry, w as renderPhaseTimings } from "./secret-reference-immutable-OIvSuvpM.js";
12
- import { l as setResolvedResourceTimeouts } from "./ec2-termination-protection-BeYoGs66.js";
13
- import { t as expectedOwnerParam } from "./expected-bucket-owner-DASdeJRs.js";
14
- import { Ct as isReadableBag, Et as shouldRetainResource, Ot as stackInstanceIdCarriedFrom, St as importableOutputs, Tt as orphansCarriedFrom, _t as acceptedCreateOnlyDropsOf, bt as hasReadableExportSet, gt as slowCcOperationTimeoutMs, vt as describeRegionValueKind, wt as orphansAfterRollback, xt as importableOutputKeys, yt as exportNamesCarriedFrom } from "./delete-started-C_hilY_A.js";
15
- import { A as maskWholeValue, B as readsNoEchoSource, E as isMarkedCoordinate, F as noEchoOutputsComparison, H as recordedNoEchoValuesOf, K as liveMatchesUnresolvedTokenFrame, N as noEchoCoordinatesOf, O as maskAtCoordinates, P as noEchoLeavesOf, S as withOffTemplateEchoesMasked, W as valueAtCoordinate, _ as storedRecordFinisher, b as maskOffTemplateEchoes, j as maskedLeafCoordinatesOf, k as maskReadbackAtCoordinates, w as canonicalCoordinates, x as observedMaskedLeavesOf } from "./replacement-rules-HtPsWZIV.js";
16
- import { S as unsettledPropertiesOf, T as withoutUnsettledProperties, b as unsettledItemsOf, w as withUnsettledProperties, y as unsettledItemsField } from "./restore-source-guard-BIaZBr57.js";
17
- import { u as differingIdentityWarning } from "./identity-read-denied-CGR1hIyA.js";
18
- import { n as isRedactedRecordedValue } from "./redacted-delete-address-BrPnoyD9.js";
19
- import { a as withResourceDeadline } from "./resource-deadline-nSheE7zd.js";
20
- import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-DcNB-WSe.js";
11
+ import { D as describeJsonParseFailure, T as timePhase, a as getCreateOnlyPropertyPaths, b as PhaseClock, c as templateResourceTypes, f as describeTypeWithThrottleRetry, j as utf8ByteLength, k as parseFailureDebugDetail, s as prefetchCreateOnlyPropertyPaths, v as withRetry, w as renderPhaseTimings } from "./secret-reference-immutable-XFEdCfNg.js";
12
+ import { l as setResolvedResourceTimeouts } from "./ec2-termination-protection-zaan5pi0.js";
13
+ import { t as expectedOwnerParam } from "./expected-bucket-owner-DIMD36_h.js";
14
+ import { Ct as isReadableBag, Et as shouldRetainResource, Ot as stackInstanceIdCarriedFrom, St as importableOutputs, Tt as orphansCarriedFrom, _t as acceptedCreateOnlyDropsOf, bt as hasReadableExportSet, gt as slowCcOperationTimeoutMs, vt as describeRegionValueKind, wt as orphansAfterRollback, xt as importableOutputKeys, yt as exportNamesCarriedFrom } from "./delete-started-C9z4Yf_c.js";
15
+ import { C as observedMaskedLeavesOf, D as canonicalCoordinates, E as noEchoOutputsComparison, H as readsNoEchoSource, I as noEchoCoordinatesOf, J as liveMatchesUnresolvedTokenFrame, K as valueAtCoordinate, L as noEchoLeavesOf, M as maskReadbackAtCoordinates, N as maskWholeValue, P as maskedLeafCoordinatesOf, S as maskOffTemplateEchoes, W as recordedNoEchoValuesOf, _ as storedNoEchoInputsKnown, j as maskAtCoordinates, k as isMarkedCoordinate, v as storedRecordFinisher, w as withOffTemplateEchoesMasked } from "./replacement-rules-BAJWgr5f.js";
16
+ import { m as SURVIVOR_IDENTITY_ATTRIBUTES, u as differingIdentityWarning } from "./identity-read-denied-DU0YqxNk.js";
17
+ import { S as unsettledPropertiesOf, T as withoutUnsettledProperties, b as unsettledItemsOf, w as withUnsettledProperties, y as unsettledItemsField } from "./restore-source-guard-BL2O_O6r.js";
18
+ import { n as isRedactedRecordedValue } from "./redacted-delete-address-DGHv9GNm.js";
19
+ import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-CrQgKKRC.js";
21
20
  import { t as cdkdCacheHome } from "./cache-home-BVYKj3de.js";
22
21
  import { randomBytes, randomUUID } from "node:crypto";
23
22
  import { CopyObjectCommand, CreateBucketCommand, DeleteBucketCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetObjectCommand, HeadBucketCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutBucketVersioningCommand, PutObjectCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
@@ -1561,7 +1560,7 @@ function collectCrossStackRefs(node, onRef, unconditional) {
1561
1560
  // src/provisioning/register-providers.ts
1562
1561
  let providerClasses;
1563
1562
  function loadProviderClasses() {
1564
- providerClasses ??= import("./provider-classes-BydpQUFi.js");
1563
+ providerClasses ??= import("./provider-classes-BuCH49t_.js");
1565
1564
  return providerClasses;
1566
1565
  }
1567
1566
  function registerAllProviders(registry, classes) {
@@ -1757,6 +1756,9 @@ var ConsumerCleanupHold = class ConsumerCleanupHold {
1757
1756
  hasConsumers(producer) {
1758
1757
  return this.consumers.has(producer);
1759
1758
  }
1759
+ consumersOf(producer) {
1760
+ return [...this.consumers.get(producer) ?? []];
1761
+ }
1760
1762
  queueFor(producer) {
1761
1763
  return this.hasConsumers(producer) ? new NestedCleanupQueue() : void 0;
1762
1764
  }
@@ -1796,14 +1798,15 @@ var ConsumerCleanupHold = class ConsumerCleanupHold {
1796
1798
  return release;
1797
1799
  }
1798
1800
  };
1799
- async function runHeldProducerCleanup(hold, queue, producer, logger) {
1801
+ async function runHeldProducerCleanup(hold, queue, producer, logger, concurrency) {
1800
1802
  const notDeployed = await hold.waitForConsumers(producer);
1801
1803
  if (notDeployed.length > 0) {
1802
1804
  logger.info(safeMsg`Keeping the replaced resources of stack ${displayStackName(producer.stackName)}: ${notDeployed.map((c) => displayStackName(c.stackName)).join(", ")} (importing its outputs) did not deploy and may still use them. cdkd keeps them in state, and the next deploy deletes them`);
1803
1805
  queue.abandon("consumer-failed");
1804
1806
  return {
1805
1807
  updatePartial: 0,
1806
- nestedUpdatePartial: 0
1808
+ nestedUpdatePartial: 0,
1809
+ updatedToPartial: 0
1807
1810
  };
1808
1811
  }
1809
1812
  let interrupted = false;
@@ -1812,7 +1815,7 @@ async function runHeldProducerCleanup(hold, queue, producer, logger) {
1812
1815
  };
1813
1816
  process.on("SIGINT", onSigint);
1814
1817
  try {
1815
- return await queue.runAll({ interrupted: () => interrupted }, logger);
1818
+ return await queue.runAll({ interrupted: () => interrupted }, logger, concurrency);
1816
1819
  } finally {
1817
1820
  process.removeListener("SIGINT", onSigint);
1818
1821
  }
@@ -3320,6 +3323,10 @@ async function deployStackInScope(ctx, stackInfo, stackRegion, stackAwsClients)
3320
3323
  });
3321
3324
  let runResult = "SUCCEEDED";
3322
3325
  const consumerCleanupQueue = ctx.consumerHold?.queueFor(stackInfo);
3326
+ const consumerStacks = consumerCleanupQueue === void 0 ? void 0 : ctx.consumerHold.consumersOf(stackInfo).map((consumer) => ({
3327
+ stackName: consumer.stackName,
3328
+ region: ctx.stackRegionOf(consumer)
3329
+ }));
3323
3330
  try {
3324
3331
  const migrationGate = createPrefixMigrationGate({
3325
3332
  stackName: stackInfo.stackName,
@@ -3447,7 +3454,8 @@ async function deployStackInScope(ctx, stackInfo, stackRegion, stackAwsClients)
3447
3454
  ...stackInfo.terminationProtection === true && { terminationProtection: true },
3448
3455
  ...stackTags !== void 0 && { stackTags },
3449
3456
  inRunStacks: ctx.inRunStacks,
3450
- ...consumerCleanupQueue !== void 0 && { consumerCleanupQueue }
3457
+ ...consumerCleanupQueue !== void 0 && { consumerCleanupQueue },
3458
+ ...consumerStacks !== void 0 && { consumerStacks }
3451
3459
  };
3452
3460
  const stackDeployEngine = new DeployEngine(stackStateBackend, stackLockManager, dagBuilder, diffCalculator, stackProviderRegistry, deployEngineOptions, stackRegion, exportIndexStore);
3453
3461
  const deployed = await withNestedStackContext({
@@ -3473,9 +3481,10 @@ async function deployStackInScope(ctx, stackInfo, stackRegion, stackAwsClients)
3473
3481
  ctx.consumerHold?.settle(stackInfo, true);
3474
3482
  let deployResult = deployed;
3475
3483
  if (ctx.consumerHold !== void 0 && (consumerCleanupQueue?.size ?? 0) > 0) {
3476
- const held = await runHeldProducerCleanup(ctx.consumerHold, consumerCleanupQueue, stackInfo, logger);
3484
+ const held = await runHeldProducerCleanup(ctx.consumerHold, consumerCleanupQueue, stackInfo, logger, options.concurrency);
3477
3485
  deployResult = {
3478
3486
  ...deployed,
3487
+ updated: Math.max(0, deployed.updated - held.updatedToPartial),
3479
3488
  updatePartial: deployed.updatePartial + held.updatePartial,
3480
3489
  nestedUpdatePartial: (deployed.nestedUpdatePartial ?? 0) + held.nestedUpdatePartial
3481
3490
  };
@@ -3860,7 +3869,8 @@ async function deployCommand(stacks, options) {
3860
3869
  cancelledStacks++;
3861
3870
  },
3862
3871
  inRunStacks: new Set(targetStacks.map((s) => inRunStackKey(s.stackName, stackRegions.get(s) ?? deployStackRegion(s, baseRegion)))),
3863
- ...consumerHold !== void 0 && { consumerHold }
3872
+ ...consumerHold !== void 0 && { consumerHold },
3873
+ stackRegionOf: (s) => stackRegions.get(s) ?? deployStackRegion(s, baseRegion)
3864
3874
  };
3865
3875
  checkPinCcApiOptions(options, targetStacks, logger);
3866
3876
  checkReplaceResourceOptions(options, targetStacks);
@@ -7292,7 +7302,7 @@ async function repairExportIndexForStack(store, stackName, producerRegion, outpu
7292
7302
  }
7293
7303
 
7294
7304
  // src/cli/commands/scrub/command-report.ts
7295
- async function reportScrubOutcome({ options, logger, stateBackend, totalStacksScrubbed, rewrittenStacks, totalParentAttributesUnmatched, totalStacksWithUnscrubbableKeys, totalStacksWithUnverifiableReads, totalStacksWithUnverifiableLeaves, totalStacksWithUnrepairedReadNames, totalOutputKeysDropped, totalStacksWithReadOutputKeys, droppedReadersUnverifiedStacks, malformedRecords, malformedOutputRecords, malformedOrphanRecords, damagedProducerStacks, failures, exportIndexStores, examinedIndexNames, totalIndexEntriesConverged, historyPurgedStacks, totalIndexEntriesAbsent, totalIndexEntriesAbsentWithSecret, indexUnwritten, indexUnreadable, indexRegionsWritten, work }) {
7305
+ async function reportScrubOutcome({ options, logger, stateBackend, totalStacksScrubbed, rewrittenStacks, totalParentAttributesUnmatched, totalStacksWithUnscrubbableKeys, totalStacksWithUnverifiableReads, totalStacksWithUnverifiableLeaves, totalStacksWithUnrepairedReadNames, totalStacksWithUnverifiableNoEchoRecords = 0, totalOutputKeysDropped, totalStacksWithReadOutputKeys, droppedReadersUnverifiedStacks, malformedRecords, malformedOutputRecords, malformedOrphanRecords, damagedProducerStacks, failures, exportIndexStores, examinedIndexNames, totalIndexEntriesConverged, historyPurgedStacks, totalIndexEntriesAbsent, totalIndexEntriesAbsentWithSecret, indexUnwritten, indexUnreadable, indexRegionsWritten, work }) {
7296
7306
  let totalIndexEntriesUnexamined = 0;
7297
7307
  for (const indexRegion of indexRegionsWritten) await stateBackend.purgeNoncurrentVersions([scrubbedExportIndexKey(stateBackend, indexRegion)], { objectDescription: SCRUBBED_EXPORT_INDEX_OBJECT_DESCRIPTION });
7298
7308
  const historyNote = () => {
@@ -7320,7 +7330,8 @@ async function reportScrubOutcome({ options, logger, stateBackend, totalStacksSc
7320
7330
  totalIndexEntriesUnexamined += unexamined.length;
7321
7331
  logger.info(`Exports index (${displayIdent(indexRegion)}): ${unexamined.length} entr${unexamined.length === 1 ? "y is" : "ies are"} published by a producer this run did not scrub, so nothing here read ${unexamined.length === 1 ? "its" : "their"} value. Coverage composes across the apps sharing this bucket and region — run each app's own cdkd scrub to reach its entries.`);
7322
7332
  }
7323
- if (totalStacksScrubbed === 0 && totalStacksWithUnscrubbableKeys === 0 && totalStacksWithUnverifiableReads === 0 && totalStacksWithUnverifiableLeaves === 0 && totalStacksWithUnrepairedReadNames === 0 && totalStacksWithReadOutputKeys === 0 && totalIndexEntriesAbsentWithSecret === 0 && droppedReadersUnverifiedStacks.length === 0 && totalParentAttributesUnmatched === 0 && totalIndexEntriesConverged === 0 && indexUnwritten.length === 0 && indexUnreadable.length === 0 && malformedRecords.length === 0 && malformedOutputRecords.length === 0 && malformedOrphanRecords.length === 0) {
7333
+ const failingFindingsAbsent = totalStacksScrubbed === 0 && totalStacksWithUnscrubbableKeys === 0 && totalStacksWithUnverifiableReads === 0 && totalStacksWithUnverifiableLeaves === 0 && totalStacksWithUnrepairedReadNames === 0 && totalStacksWithUnverifiableNoEchoRecords === 0 && totalStacksWithReadOutputKeys === 0 && totalIndexEntriesAbsentWithSecret === 0 && droppedReadersUnverifiedStacks.length === 0 && totalParentAttributesUnmatched === 0 && totalIndexEntriesConverged === 0 && indexUnwritten.length === 0 && indexUnreadable.length === 0 && malformedRecords.length === 0 && malformedOutputRecords.length === 0 && malformedOrphanRecords.length === 0;
7334
+ if (failingFindingsAbsent) {
7324
7335
  if (failures.length === 0) {
7325
7336
  logger.info(safeMsg`\nNo plaintext secrets found in any target stack state${SCRUB_CLEAN_SCOPE_NOTE}. Nothing to scrub.${historyNote()}`);
7326
7337
  return;
@@ -7334,6 +7345,7 @@ async function reportScrubOutcome({ options, logger, stateBackend, totalStacksSc
7334
7345
  const unverifiableNote = totalStacksWithUnverifiableReads > 0 ? ` ${totalStacksWithUnverifiableReads} stack(s) carry a cross-stack read that could NOT be verified, so their imported values were not checked — see the warnings above for which read, why, and what to do about it.` : "";
7335
7346
  const outputKeyNote = (totalOutputKeysDropped > 0 ? ` ${totalOutputKeysDropped} output key(s) the template no longer declares ${options.dryRun ? "would be" : "were"} dropped: their values could not be identified, and they are not necessarily secrets (see the lines above).` : "") + (totalStacksWithReadOutputKeys > 0 ? ` ${totalStacksWithReadOutputKeys} stack(s) keep an undeclared output key another stack still reads, or one that may be a live export alias — its value can still be printed by cdkd diff; see the warnings above.` : "");
7336
7347
  const readNameNote = totalStacksWithUnrepairedReadNames > 0 ? ` ${totalStacksWithUnrepairedReadNames} stack(s) hold a cross-stack read name in plaintext that scrub could NOT repair, most likely a secret's value from before a rotation — see the warnings above.` : "";
7348
+ const storedNoEchoNote = totalStacksWithUnverifiableNoEchoRecords > 0 ? ` ${totalStacksWithUnverifiableNoEchoRecords} stack(s) hold an orphan or superseded record whose NoEcho positions scrub could NOT verify — see the warnings above.` : "";
7337
7349
  const parentAttributeNote = totalParentAttributesUnmatched > 0 ? ` ${totalParentAttributesUnmatched} nested-stack output attribute(s) in a parent record hold a plaintext scrub could NOT match to its child's output — see the warnings above.` : "";
7338
7350
  const indexNote = (() => {
7339
7351
  const parts = [];
@@ -7344,24 +7356,24 @@ async function reportScrubOutcome({ options, logger, stateBackend, totalStacksSc
7344
7356
  return parts.join("");
7345
7357
  })();
7346
7358
  if (options.dryRun) {
7347
- if (totalStacksScrubbed > 0) logger.info(`\nPlan: ${totalStacksScrubbed} stack(s) hold plaintext secrets and would be scrubbed (--dry-run, no state written).${keyNote}${unverifiableNote}${readNameNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote} ROTATE any exposed secret in Secrets Manager.`);
7348
- else logger.info(`\nPlan: no state record can be rewritten.${keyNote}${unverifiableNote}${readNameNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote} ROTATE any exposed secret.`);
7359
+ if (totalStacksScrubbed > 0) logger.info(`\nPlan: ${totalStacksScrubbed} stack(s) hold plaintext secrets and would be scrubbed (--dry-run, no state written).${keyNote}${unverifiableNote}${readNameNote}${storedNoEchoNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote} ROTATE any exposed secret in Secrets Manager.`);
7360
+ else logger.info(`\nPlan: no state record can be rewritten.${keyNote}${unverifiableNote}${readNameNote}${storedNoEchoNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote} ROTATE any exposed secret.`);
7349
7361
  if (failures.length > 0) throw scrubStacksFailedError(failures);
7350
7362
  if (indexUnwritten.length > 0 || indexUnreadable.length > 0) throw exportIndexIncompleteError(indexUnwritten, indexUnreadable, true);
7351
7363
  if (malformedRecords.length > 0 || malformedOutputRecords.length > 0 || malformedOrphanRecords.length > 0) throw malformedRecordsAuditedError(malformedRecords, malformedOutputRecords, malformedOrphanRecords);
7352
7364
  if (damagedProducerStacks.length > 0) throw damagedProducerRecordsError(damagedProducerStacks);
7353
7365
  if (droppedReadersUnverifiedStacks.length > 0) throw droppedOutputReadersUnverifiedError(droppedReadersUnverifiedStacks);
7354
- if (options.fail) throw new ScrubNeededError();
7366
+ if (options.fail && !failingFindingsAbsent) throw new ScrubNeededError();
7355
7367
  return;
7356
7368
  }
7357
- if (totalStacksScrubbed > 0) logger.info(`\nDone: scrubbed ${totalStacksScrubbed} stack(s). The rewritten state.json no longer holds the plaintext, and on a VERSIONED state bucket its earlier versions were purged, unless a warning above says otherwise. A value that was ever persisted must still be treated as compromised — ROTATE it in Secrets Manager (scrub matches the current value, so scrub BEFORE rotating); rotation is what makes any copy cdkd cannot reach harmless.${historyNote()}${keyNote}${unverifiableNote}${readNameNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote}`);
7358
- else logger.info(`\nNo state record was rewritten.${historyNote()}${keyNote}${unverifiableNote}${readNameNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote} ROTATE any exposed secret.`);
7369
+ if (totalStacksScrubbed > 0) logger.info(`\nDone: scrubbed ${totalStacksScrubbed} stack(s). The rewritten state.json no longer holds the plaintext, and on a VERSIONED state bucket its earlier versions were purged, unless a warning above says otherwise. A value that was ever persisted must still be treated as compromised — ROTATE it in Secrets Manager (scrub matches the current value, so scrub BEFORE rotating); rotation is what makes any copy cdkd cannot reach harmless.${historyNote()}${keyNote}${unverifiableNote}${readNameNote}${storedNoEchoNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote}`);
7370
+ else logger.info(`\nNo state record was rewritten.${historyNote()}${keyNote}${unverifiableNote}${readNameNote}${storedNoEchoNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote} ROTATE any exposed secret.`);
7359
7371
  if (failures.length > 0) throw scrubStacksFailedError(failures);
7360
7372
  if (indexUnwritten.length > 0 || indexUnreadable.length > 0) throw exportIndexIncompleteError(indexUnwritten, indexUnreadable, false);
7361
7373
  if (malformedRecords.length > 0 || malformedOutputRecords.length > 0 || malformedOrphanRecords.length > 0) throw malformedRecordsAuditedError(malformedRecords, malformedOutputRecords, malformedOrphanRecords);
7362
7374
  if (damagedProducerStacks.length > 0) throw damagedProducerRecordsError(damagedProducerStacks);
7363
7375
  if (droppedReadersUnverifiedStacks.length > 0) throw droppedOutputReadersUnverifiedError(droppedReadersUnverifiedStacks);
7364
- if (options.fail && (totalStacksWithUnscrubbableKeys > 0 || totalStacksWithUnverifiableReads > 0 || totalStacksWithUnrepairedReadNames > 0 || totalStacksWithReadOutputKeys > 0 || totalIndexEntriesAbsentWithSecret > 0 || totalParentAttributesUnmatched > 0 || totalStacksWithUnverifiableLeaves > 0)) throw new ScrubNeededError();
7376
+ if (options.fail && (totalStacksWithUnscrubbableKeys > 0 || totalStacksWithUnverifiableReads > 0 || totalStacksWithUnrepairedReadNames > 0 || totalStacksWithReadOutputKeys > 0 || totalIndexEntriesAbsentWithSecret > 0 || totalParentAttributesUnmatched > 0 || totalStacksWithUnverifiableLeaves > 0 || totalStacksWithUnverifiableNoEchoRecords > 0)) throw new ScrubNeededError();
7365
7377
  }
7366
7378
 
7367
7379
  // src/cli/commands/scrub/outputs.ts
@@ -8201,7 +8213,7 @@ function positionTwinReferences(stored, positioned, template, secrets, resolved)
8201
8213
  });
8202
8214
  return changed ? out : p;
8203
8215
  }
8204
- if (!isPlainRecord$4(t) || !isPlainRecord$4(s) || !isPlainRecord$4(p)) return p;
8216
+ if (!isPlainRecord$5(t) || !isPlainRecord$5(s) || !isPlainRecord$5(p)) return p;
8205
8217
  let out;
8206
8218
  for (const key of Object.keys(t)) {
8207
8219
  if (!Object.hasOwn(s, key) || !Object.hasOwn(p, key)) continue;
@@ -8218,9 +8230,9 @@ function positionTwinReferences(stored, positioned, template, secrets, resolved)
8218
8230
  function corroborates(s, t, r, plaintexts) {
8219
8231
  if (typeof t === "string") return typeof s === "string" && (dynamicReferenceSpans(t).length > 0 || s === t);
8220
8232
  if (Array.isArray(t)) return Array.isArray(s) && s.length === t.length && t.every((item, i) => corroborates(s[i], item, elementOf(r, t, i), plaintexts));
8221
- if (isPlainRecord$4(t)) {
8233
+ if (isPlainRecord$5(t)) {
8222
8234
  if (isIntrinsicNode(t) && certainResolution(r, plaintexts) && sameValue(s, r)) return true;
8223
- if (!isPlainRecord$4(s)) return false;
8235
+ if (!isPlainRecord$5(s)) return false;
8224
8236
  const keys = Object.keys(t);
8225
8237
  return keys.length === Object.keys(s).length && keys.every((key) => Object.hasOwn(s, key) && corroborates(s[key], t[key], memberOf(r, t, key), plaintexts));
8226
8238
  }
@@ -8233,7 +8245,7 @@ function elementOf(r, t, i) {
8233
8245
  return Array.isArray(r) && r.length === t.length ? r[i] : void 0;
8234
8246
  }
8235
8247
  function memberOf(r, t, key) {
8236
- if (isIntrinsicNode(t) || !isPlainRecord$4(r) || !Object.hasOwn(r, key)) return void 0;
8248
+ if (isIntrinsicNode(t) || !isPlainRecord$5(r) || !Object.hasOwn(r, key)) return void 0;
8237
8249
  return r[key];
8238
8250
  }
8239
8251
  function certainResolution(r, plaintexts) {
@@ -8250,13 +8262,13 @@ function jsonLeaves(value, into) {
8250
8262
  if (value === null || typeof value === "boolean") return true;
8251
8263
  if (typeof value === "number") return Number.isFinite(value);
8252
8264
  if (Array.isArray(value)) return value.every((item) => jsonLeaves(item, into));
8253
- if (isPlainRecord$4(value)) return Object.keys(value).every((key) => jsonLeaves(value[key], into));
8265
+ if (isPlainRecord$5(value)) return Object.keys(value).every((key) => jsonLeaves(value[key], into));
8254
8266
  return false;
8255
8267
  }
8256
8268
  function sameValue(a, b) {
8257
8269
  if (Array.isArray(b)) return Array.isArray(a) && a.length === b.length && b.every((item, i) => sameValue(a[i], item));
8258
- if (isPlainRecord$4(b)) {
8259
- if (!isPlainRecord$4(a)) return false;
8270
+ if (isPlainRecord$5(b)) {
8271
+ if (!isPlainRecord$5(a)) return false;
8260
8272
  const keys = Object.keys(b);
8261
8273
  return keys.length === Object.keys(a).length && keys.every((key) => Object.hasOwn(a, key) && sameValue(a[key], b[key]));
8262
8274
  }
@@ -8283,7 +8295,7 @@ function copyOwnKeys(bag) {
8283
8295
  for (const key of Object.keys(bag)) defineOwnKey(copy, key, bag[key]);
8284
8296
  return copy;
8285
8297
  }
8286
- function isPlainRecord$4(value) {
8298
+ function isPlainRecord$5(value) {
8287
8299
  if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
8288
8300
  const proto = Object.getPrototypeOf(value);
8289
8301
  return proto === Object.prototype || proto === null;
@@ -8682,8 +8694,95 @@ function repairCrossStackReadNames({ state, outputSecrets, perResourceSecrets, o
8682
8694
  };
8683
8695
  }
8684
8696
 
8697
+ // src/cli/commands/scrub/noecho-output-exact.ts
8698
+ const MAX_HOLES = 4;
8699
+ const MAX_STORED_LENGTH = 4096;
8700
+ function segmentsOf$1(value, sources, pseudo) {
8701
+ if (!isPlainObject$1(value) || Object.keys(value).length !== 1) return void 0;
8702
+ const hole = (node) => {
8703
+ if (!readsNoEchoSource(node, sources) && isPlainObject$1(node) && Object.keys(node).length === 1 && typeof node["Ref"] === "string" && pseudo.has(node["Ref"])) return { literal: pseudo.get(node["Ref"]) };
8704
+ return { hole: "secret" };
8705
+ };
8706
+ if (Object.hasOwn(value, "Fn::Join")) {
8707
+ const args = value["Fn::Join"];
8708
+ if (!Array.isArray(args) || typeof args[0] !== "string" || !Array.isArray(args[1])) return;
8709
+ const segments = [];
8710
+ args[1].forEach((part, i) => {
8711
+ if (i > 0 && args[0] !== "") segments.push({ literal: args[0] });
8712
+ segments.push(typeof part === "string" ? { literal: part } : hole(part));
8713
+ });
8714
+ return segments;
8715
+ }
8716
+ if (Object.hasOwn(value, "Fn::Sub")) {
8717
+ const args = value["Fn::Sub"];
8718
+ const text = Array.isArray(args) ? args[0] : args;
8719
+ const variables = Array.isArray(args) && isPlainObject$1(args[1]) ? args[1] : {};
8720
+ if (typeof text !== "string") return void 0;
8721
+ const segments = [];
8722
+ let last = 0;
8723
+ for (const match of text.matchAll(/\$\{([^}]*)\}/g)) {
8724
+ segments.push({ literal: text.slice(last, match.index) });
8725
+ const name = match[1] ?? "";
8726
+ if (name.startsWith("!")) segments.push({ literal: `\${${name.slice(1)}}` });
8727
+ else if (Object.hasOwn(variables, name)) segments.push(hole(variables[name]));
8728
+ else if (name.includes(".")) {
8729
+ const dot = name.indexOf(".");
8730
+ segments.push(hole({ "Fn::GetAtt": [name.slice(0, dot), name.slice(dot + 1)] }));
8731
+ } else segments.push(hole({ Ref: name }));
8732
+ last = match.index + match[0].length;
8733
+ }
8734
+ segments.push({ literal: text.slice(last) });
8735
+ return segments;
8736
+ }
8737
+ }
8738
+ function matchesLiterals(stored, segments) {
8739
+ const parts = [];
8740
+ for (const segment of segments) {
8741
+ const last = parts.length - 1;
8742
+ if ("literal" in segment) {
8743
+ if (last >= 0 && parts[last] !== void 0) parts[last] += segment.literal;
8744
+ else parts.push(segment.literal);
8745
+ } else if (last < 0 || parts[last] !== void 0) parts.push(void 0);
8746
+ }
8747
+ let start = 0;
8748
+ let end = stored.length;
8749
+ let first = 0;
8750
+ let lastIndex = parts.length - 1;
8751
+ const head = parts[0];
8752
+ if (head !== void 0) {
8753
+ if (!stored.startsWith(head)) return false;
8754
+ start = head.length;
8755
+ first = 1;
8756
+ }
8757
+ const tail = parts[lastIndex];
8758
+ if (tail !== void 0 && lastIndex >= first) {
8759
+ if (end - start < tail.length || !stored.endsWith(tail)) return false;
8760
+ end -= tail.length;
8761
+ lastIndex -= 1;
8762
+ }
8763
+ for (let i = first; i <= lastIndex; i++) {
8764
+ const literal = parts[i];
8765
+ if (literal === void 0) continue;
8766
+ const at = stored.indexOf(literal, start);
8767
+ if (at < 0 || at + literal.length > end) return false;
8768
+ start = at + literal.length;
8769
+ }
8770
+ return true;
8771
+ }
8772
+ function exactNoEchoOutputMask(stored, templateValue, sources, pseudo) {
8773
+ const whole = maskWholeValue(stored);
8774
+ if (typeof stored !== "string" || stored.length > MAX_STORED_LENGTH) return whole;
8775
+ const segments = segmentsOf$1(templateValue, sources, pseudo)?.filter((segment) => !("literal" in segment) || segment.literal !== "");
8776
+ if (segments === void 0) return whole;
8777
+ const holes = segments.filter((segment) => "hole" in segment);
8778
+ if (holes.length === 0 || holes.length > MAX_HOLES) return whole;
8779
+ for (let i = 1; i < segments.length; i++) if ("hole" in segments[i] && "hole" in segments[i - 1]) return whole;
8780
+ if (!matchesLiterals(stored, segments)) return whole;
8781
+ return segments.map((segment) => "literal" in segment ? segment.literal : "***").join("");
8782
+ }
8783
+
8685
8784
  // src/cli/commands/scrub/noecho.ts
8686
- function planScrubNoEcho(state, template, templateProps, conditions, passedParameters = [], conditionalParameters = []) {
8785
+ function planScrubNoEcho(state, template, templateProps, conditions, passedParameters = [], conditionalParameters = [], pseudo = /* @__PURE__ */ new Map()) {
8687
8786
  const byLogicalId = /* @__PURE__ */ new Map();
8688
8787
  const parameters = /* @__PURE__ */ new Set([...noEchoParameterNamesOf(template), ...passedParameters]);
8689
8788
  const resources = state.resources ?? {};
@@ -8708,7 +8807,7 @@ function planScrubNoEcho(state, template, templateProps, conditions, passedParam
8708
8807
  let grew = false;
8709
8808
  for (const [logicalId, record] of eligible) {
8710
8809
  const own = noEchoLeavesOf(record);
8711
- const leaves = canonicalCoordinates(own ?? noEchoCoordinatesOf(templateProps.get(logicalId), record.properties, from));
8810
+ const leaves = canonicalCoordinates((own !== void 0 && own.length > 0 ? own : void 0) ?? noEchoCoordinatesOf(templateProps.get(logicalId), record.properties, from, void 0, { maskedAt: record.properties }));
8712
8811
  leavesOf.set(logicalId, leaves);
8713
8812
  for (const [name, attribute] of Object.entries(record.attributes ?? {})) {
8714
8813
  if (attribute === record.physicalId || persisted(attribute)) continue;
@@ -8763,7 +8862,10 @@ function planScrubNoEcho(state, template, templateProps, conditions, passedParam
8763
8862
  if (!Object.hasOwn(stored, key)) continue;
8764
8863
  const value = stored[key];
8765
8864
  if (value === void 0 || value === null || persisted(value)) continue;
8766
- if (!readsNoEchoSource(output?.Value, outputSources)) continue;
8865
+ const outputValue = output?.Value;
8866
+ if (!readsNoEchoSource(outputValue, outputSources)) continue;
8867
+ const exact = exactNoEchoOutputMask(value, outputValue, outputSources, pseudo);
8868
+ if (JSON.stringify(exact) === JSON.stringify(value)) continue;
8767
8869
  outputKeys.push(key);
8768
8870
  }
8769
8871
  if (outputKeys.length > 0) changesAny = true;
@@ -8785,15 +8887,30 @@ function scrubMigrationNeedles(plan, publicTokens) {
8785
8887
  for (const { value, needle } of plan.stored) if (needle) recordNoEchoParameterFreshValue(value, needles, publicTokens);
8786
8888
  return needles.size > 0 ? needles : void 0;
8787
8889
  }
8788
- function maskScrubNoEchoOutputs(outputs, keys, declared, aliasOf) {
8890
+ function maskScrubNoEchoOutputs(outputs, keys, declared, aliasOf, exact) {
8789
8891
  if (outputs === void 0 || keys.length === 0) return outputs;
8790
8892
  const ownAliases = new Set(keys.flatMap((key) => aliasOf.has(key) ? [aliasOf.get(key)] : []));
8791
8893
  const otherAliases = new Set([...aliasOf].filter(([key]) => !keys.includes(key)).map(([, alias]) => alias));
8792
- const spelled = new Set(keys.filter((key) => Object.hasOwn(outputs, key)).map((key) => JSON.stringify(outputs[key])));
8894
+ const formOfKey = /* @__PURE__ */ new Map();
8895
+ const formOfSpelling = /* @__PURE__ */ new Map();
8896
+ for (const key of keys) {
8897
+ if (!Object.hasOwn(outputs, key)) continue;
8898
+ const templateValue = (exact?.templateOutputs[key])?.Value;
8899
+ const form = exact === void 0 ? maskWholeValue(outputs[key]) : exactNoEchoOutputMask(outputs[key], templateValue, exact.sources, exact.pseudo);
8900
+ formOfKey.set(key, form);
8901
+ const spelling = JSON.stringify(outputs[key]);
8902
+ const seen = formOfSpelling.get(spelling);
8903
+ formOfSpelling.set(spelling, formOfSpelling.has(spelling) && JSON.stringify(seen) !== JSON.stringify(form) ? maskWholeValue(outputs[key]) : form);
8904
+ }
8793
8905
  const masked = nullPrototypeRecord();
8794
8906
  for (const [key, value] of Object.entries(outputs)) {
8795
- const byValue = !declared.has(key) && !otherAliases.has(key) && spelled.has(JSON.stringify(value));
8796
- masked[key] = keys.includes(key) || ownAliases.has(key) || byValue ? maskWholeValue(value) : value;
8907
+ const spelling = JSON.stringify(value);
8908
+ const byValue = !declared.has(key) && !otherAliases.has(key) && formOfSpelling.has(spelling);
8909
+ if (formOfKey.has(key)) masked[key] = formOfKey.get(key);
8910
+ else if (keys.includes(key)) masked[key] = maskWholeValue(value);
8911
+ else if (ownAliases.has(key)) masked[key] = maskWholeValue(value);
8912
+ else if (byValue) masked[key] = formOfSpelling.get(spelling);
8913
+ else masked[key] = value;
8797
8914
  }
8798
8915
  return masked;
8799
8916
  }
@@ -8865,6 +8982,246 @@ function copiesOfParentRow(bag) {
8865
8982
  return copies === void 0 || copies.size === 0 ? {} : { inheritedPhysicalNameCopies: copies };
8866
8983
  }
8867
8984
 
8985
+ // src/cli/commands/scrub/noecho-stored.ts
8986
+ function storedNoEchoRows(orphans, supersededResources) {
8987
+ const rows = [];
8988
+ const readable = (record) => record !== null && typeof record === "object" && typeof record.resourceType === "string";
8989
+ for (const [index, row] of (Array.isArray(orphans) ? orphans : []).entries()) if (readable(row?.state) && typeof row.logicalId === "string") rows.push({
8990
+ key: String(index),
8991
+ kind: "orphan record",
8992
+ logicalId: row.logicalId,
8993
+ state: row.state
8994
+ });
8995
+ const superseded = Array.isArray(supersededResources) ? supersededResources : [];
8996
+ for (const [index, row] of superseded.entries()) if (isSupersededResourceRecord(row) && readable(row.state)) rows.push({
8997
+ key: `superseded:${index}`,
8998
+ kind: "superseded record",
8999
+ logicalId: row.logicalId,
9000
+ state: row.state
9001
+ });
9002
+ return rows;
9003
+ }
9004
+ const persisted = (value) => holdsMaskLeaf(value) || typeof value === "string" && isSingleDynamicReferenceToken(value);
9005
+ function holdsUnmaskedLeaf(value) {
9006
+ if (Array.isArray(value)) return value.some(holdsUnmaskedLeaf);
9007
+ if (value !== null && typeof value === "object") return Object.values(value).some(holdsUnmaskedLeaf);
9008
+ return typeof value === "string" && value !== "" && !persisted(value);
9009
+ }
9010
+ function planScrubStoredNoEcho(state, rows, template, sources, needleSources) {
9011
+ const byKey = /* @__PURE__ */ new Map();
9012
+ const unverifiable = [];
9013
+ let changesAny = false;
9014
+ if (rows.length === 0) return {
9015
+ byKey,
9016
+ changesAny,
9017
+ unverifiable
9018
+ };
9019
+ const resources = state.resources ?? {};
9020
+ const templateResources = template.Resources ?? {};
9021
+ const recordsHoldEvidence = [...Object.values(resources), ...rows.map((row) => row.state)].some((record) => (noEchoLeavesOf(record ?? {})?.length ?? 0) > 0 || (noEchoAttributeNamesOf(record)?.length ?? 0) > 0);
9022
+ const stackHoldsEvidence = sources.parameters.size > 0 || recordsHoldEvidence;
9023
+ for (const row of rows) {
9024
+ const record = row.state;
9025
+ const own = noEchoLeavesOf(record);
9026
+ const definition = Object.hasOwn(templateResources, row.logicalId) ? templateResources[row.logicalId] : void 0;
9027
+ const live = Object.hasOwn(resources, row.logicalId) ? resources[row.logicalId] : void 0;
9028
+ const liveLeaves = live?.resourceType === record.resourceType ? noEchoLeavesOf(live) : void 0;
9029
+ let leaves;
9030
+ let needleAt;
9031
+ if (own !== void 0 && own.length > 0) leaves = canonicalCoordinates(own);
9032
+ else if (definition?.Type === record.resourceType) {
9033
+ leaves = canonicalCoordinates(noEchoCoordinatesOf(definition.Properties, record.properties, sources, void 0, { maskedAt: record.properties }));
9034
+ const needles = needleCoordinatesOf(definition.Properties, record.properties, needleSources);
9035
+ needleAt = (coordinate) => needles.has(JSON.stringify(coordinate));
9036
+ } else if (liveLeaves !== void 0 && liveLeaves.length > 0) leaves = canonicalCoordinates(liveLeaves);
9037
+ else if (own !== void 0) leaves = [];
9038
+ if (leaves === void 0) {
9039
+ if (stackHoldsEvidence && holdsUnmaskedLeaf(record.properties)) unverifiable.push({
9040
+ key: row.key,
9041
+ kind: row.kind,
9042
+ logicalId: row.logicalId,
9043
+ resourceType: record.resourceType
9044
+ });
9045
+ continue;
9046
+ }
9047
+ const names = new Set(noEchoAttributeNamesOf(record) ?? []);
9048
+ for (const [name, attribute] of Object.entries(record.attributes ?? {})) {
9049
+ if (attribute === record.physicalId || persisted(attribute)) continue;
9050
+ if (leaves.some((coordinate) => coordinate[0] === name && JSON.stringify(valueAtCoordinate(record.properties, coordinate)) === JSON.stringify(attribute))) names.add(name);
9051
+ }
9052
+ const attributeNames = [...names].sort();
9053
+ if (leaves.length === 0 && attributeNames.length === 0) continue;
9054
+ const stored = [];
9055
+ for (const coordinate of leaves) {
9056
+ const value = valueAtCoordinate(record.properties, coordinate);
9057
+ if (value === void 0 || value === null || persisted(value)) continue;
9058
+ stored.push({
9059
+ coordinate,
9060
+ value,
9061
+ needle: needleAt === void 0 || needleAt(coordinate)
9062
+ });
9063
+ }
9064
+ byKey.set(row.key, {
9065
+ leaves,
9066
+ stored,
9067
+ attributeNames
9068
+ });
9069
+ const unmaskedAttribute = attributeNames.some((name) => Object.hasOwn(record.attributes ?? {}, name) && !persisted(record.attributes[name]));
9070
+ if (stored.length > 0 || unmaskedAttribute || leaves.length > 0 && JSON.stringify(record.noEchoLeaves) !== JSON.stringify(leaves)) changesAny = true;
9071
+ }
9072
+ return {
9073
+ byKey,
9074
+ changesAny,
9075
+ unverifiable
9076
+ };
9077
+ }
9078
+ const MAX_NEEDLE_CONDITIONS = 6;
9079
+ function needleCoordinatesOf(properties, stored, sources) {
9080
+ const names = /* @__PURE__ */ new Set();
9081
+ const collapsed = collapseNoValueBranches(properties, names);
9082
+ const keysUnder = (template, conditions) => new Set(canonicalCoordinates(noEchoCoordinatesOf(template, stored, conditions === void 0 ? sources : {
9083
+ ...sources,
9084
+ conditions
9085
+ }, void 0, { maskedAt: stored })).map((coordinate) => JSON.stringify(coordinate)));
9086
+ if (names.size > MAX_NEEDLE_CONDITIONS) return keysUnder(withoutFnIf(collapsed));
9087
+ const list = [...names];
9088
+ let needles;
9089
+ for (let verdicts = 0; verdicts < 2 ** list.length; verdicts++) {
9090
+ const keys = keysUnder(collapsed, Object.fromEntries(list.map((name, i) => [name, (verdicts & 1 << i) !== 0])));
9091
+ needles = needles === void 0 ? keys : new Set([...needles].filter((key) => keys.has(key)));
9092
+ }
9093
+ return needles;
9094
+ }
9095
+ function collapseNoValueBranches(node, names, asValue = true) {
9096
+ if (Array.isArray(node)) return node.map((item) => collapseNoValueBranches(item, names, false));
9097
+ if (node === null || typeof node !== "object") return node;
9098
+ const record = node;
9099
+ const branches = record["Fn::If"];
9100
+ if (Object.keys(record).length === 1 && Array.isArray(branches)) {
9101
+ const [condition, whenTrue, whenFalse] = branches;
9102
+ if (typeof condition !== "string" || branches.length !== 3) return null;
9103
+ const noValue = (branch) => branch !== null && typeof branch === "object" && branch["Ref"] === "AWS::NoValue";
9104
+ if (asValue && noValue(whenFalse)) return collapseNoValueBranches(whenTrue, names);
9105
+ if (asValue && noValue(whenTrue)) return collapseNoValueBranches(whenFalse, names);
9106
+ names.add(condition);
9107
+ return { "Fn::If": [
9108
+ condition,
9109
+ collapseNoValueBranches(whenTrue, names, asValue),
9110
+ collapseNoValueBranches(whenFalse, names, asValue)
9111
+ ] };
9112
+ }
9113
+ const out = nullPrototypeRecord();
9114
+ for (const [key, inner] of Object.entries(record)) out[key] = collapseNoValueBranches(inner, names);
9115
+ return out;
9116
+ }
9117
+ function unverifiableNoEchoRecordWarning(shownStack, record) {
9118
+ return safeMsg`The ${record.kind} ${record.logicalId} (${record.resourceType}) in ${shownStack} names no NoEcho positions, and today's template no longer declares its logical id as that type: if a cdkd older than state schema v11 wrote it, a NoEcho value may sit in its properties in plaintext, and scrub cannot tell which leaf, so this stack is not reported clean and --fail exits non-zero. ${UNPOSITIONED_REMEDY}`;
9119
+ }
9120
+ const UNPOSITIONED_REMEDY = "Re-run scrub with --mask-unpositioned to mask every string value in that record (its properties, observed properties and attributes) and record those positions as NoEcho, which clears this finding. The cost: those values are lost from state, so a later adoption of the record compares and re-sends without them, and a delete that reads its address or payload from the record's properties (a custom resource, a Route 53 record set, a Lambda permission, and others) is skipped, keeping the record while the resource stays in AWS.";
9121
+ function unpositionedMaskPlanNote(shownStack, record, counts) {
9122
+ return safeMsg`--mask-unpositioned would mask, in the ${record.kind} ${record.logicalId} (${record.resourceType}) in ${shownStack}, ${String(counts.properties)} string value(s) in properties, ${String(counts.observed)} in the readback (observed properties) and ${String(counts.attributes)} in attributes (--dry-run, nothing written).`;
9123
+ }
9124
+ function unpositionedMaskDoneNote(shownStack, record, counts) {
9125
+ return safeMsg`--mask-unpositioned: masked, in the ${record.kind} ${record.logicalId} (${record.resourceType}) in ${shownStack}, ${String(counts.properties)} string value(s) in properties, ${String(counts.observed)} in the readback (observed properties) and ${String(counts.attributes)} in attributes, and recorded those positions as NoEcho.`;
9126
+ }
9127
+ function scrubStoredRecord(state, needles, plan, publicTokens, finish) {
9128
+ const migrationNeedles = scrubMigrationNeedles(plan, publicTokens);
9129
+ const walk = (bag, from) => scrubResourceRecord(from, bag, void 0, "state-cross-generation", {
9130
+ properties: "unproven",
9131
+ observed: "unproven"
9132
+ });
9133
+ let next = needles.size === 0 ? state : walk(needles, state);
9134
+ if (migrationNeedles !== void 0) next = walk(migrationNeedles, next);
9135
+ if (plan === void 0) return finish(needles.size > 0 ? keepHeldTokenProvenance(next) : next, needles);
9136
+ const finished = finish(plan.leaves.length > 0 ? {
9137
+ ...next,
9138
+ noEchoLeaves: plan.leaves.map((coordinate) => [...coordinate])
9139
+ } : next, new Map([...needles, ...migrationNeedles ?? []]));
9140
+ const attributeNames = [.../* @__PURE__ */ new Set([...plan.attributeNames, ...noEchoAttributeNamesOf(finished) ?? []])].sort();
9141
+ return keepHeldTokenProvenance(applyScrubNoEcho(finished, state, {
9142
+ ...plan,
9143
+ attributeNames
9144
+ }));
9145
+ }
9146
+
9147
+ // src/cli/commands/scrub/unpositioned.ts
9148
+ function isUnpositionedStringLeaf(value) {
9149
+ return typeof value === "string" && value !== "" && !holdsMaskLeaf(value) && !isSingleDynamicReferenceToken(value);
9150
+ }
9151
+ function maskStringLeaves(value, at, out, values) {
9152
+ if (isUnpositionedStringLeaf(value)) {
9153
+ out.push([...at]);
9154
+ values?.push(value);
9155
+ return "***";
9156
+ }
9157
+ if (Array.isArray(value)) return value.map((item, index) => maskStringLeaves(item, [...at, index], out, values));
9158
+ if (value !== null && typeof value === "object") {
9159
+ const next = {};
9160
+ for (const [key, item] of Object.entries(value)) next[key] = maskStringLeaves(item, [...at, key], out, values);
9161
+ return next;
9162
+ }
9163
+ return value;
9164
+ }
9165
+ function maskUnpositionedRecord(record) {
9166
+ const propertyLeaves = [];
9167
+ const observedLeaves = [];
9168
+ const attributeLeaves = [];
9169
+ const readback = record.observedProperties;
9170
+ const next = {
9171
+ ...record,
9172
+ ...readback !== void 0 && { observedProperties: maskStringLeaves(readback, [], observedLeaves) }
9173
+ };
9174
+ const maskedValues = [];
9175
+ if (record.properties !== void 0) next.properties = maskStringLeaves(record.properties, [], propertyLeaves, maskedValues);
9176
+ if (record.attributes !== void 0) {
9177
+ const identity = SURVIVOR_IDENTITY_ATTRIBUTES[record.resourceType];
9178
+ const kept = identity !== void 0 && Object.hasOwn(record.attributes, identity) ? record.attributes[identity] : void 0;
9179
+ next.attributes = maskStringLeaves(record.attributes, [], attributeLeaves);
9180
+ if (identity !== void 0 && kept !== void 0 && next.attributes !== void 0) {
9181
+ next.attributes[identity] = kept;
9182
+ for (let i = attributeLeaves.length - 1; i >= 0; i--) if (attributeLeaves[i][0] === identity) attributeLeaves.splice(i, 1);
9183
+ }
9184
+ }
9185
+ next.noEchoLeaves = canonicalCoordinates(propertyLeaves).map((coordinate) => [...coordinate]);
9186
+ const marked = new Set(next.noEchoLeaves.map((coordinate) => JSON.stringify(coordinate)));
9187
+ const observedOnly = [...observedMaskedLeavesOf(record) ?? [], ...observedLeaves.filter((coordinate) => !marked.has(JSON.stringify(coordinate)))];
9188
+ if (observedOnly.length > 0) next.observedMaskedLeaves = canonicalCoordinates(observedOnly).map((coordinate) => [...coordinate]);
9189
+ const names = new Set(noEchoAttributeNamesOf(record) ?? []);
9190
+ for (const coordinate of attributeLeaves) if (coordinate.length === 1 && typeof coordinate[0] === "string") names.add(coordinate[0]);
9191
+ if (names.size > 0) next.noEchoAttributeNames = [...names].sort();
9192
+ return {
9193
+ record: withAttemptedItemsMasked(next, maskedValues),
9194
+ counts: {
9195
+ properties: propertyLeaves.length,
9196
+ observed: observedLeaves.length,
9197
+ attributes: attributeLeaves.length
9198
+ }
9199
+ };
9200
+ }
9201
+ function planUnpositionedMasks(rows, unverifiable, opts, logger, shownStack) {
9202
+ const masked = /* @__PURE__ */ new Set();
9203
+ if (opts.maskUnpositioned !== true) {
9204
+ for (const record of unverifiable) logger.warn(unverifiableNoEchoRecordWarning(shownStack, record));
9205
+ return {
9206
+ masked,
9207
+ unverifiable: unverifiable.length
9208
+ };
9209
+ }
9210
+ const byKey = new Map(rows.map((row) => [row.key, row]));
9211
+ for (const record of unverifiable) {
9212
+ const row = byKey.get(record.key);
9213
+ if (row === void 0) continue;
9214
+ const plan = maskUnpositionedRecord(row.state);
9215
+ masked.add(record.key);
9216
+ if (opts.dryRun) logger.info(unpositionedMaskPlanNote(shownStack, record, plan.counts));
9217
+ else logger.info(unpositionedMaskDoneNote(shownStack, record, plan.counts));
9218
+ }
9219
+ return {
9220
+ masked,
9221
+ unverifiable: opts.dryRun ? unverifiable.length : unverifiable.length - masked.size
9222
+ };
9223
+ }
9224
+
8868
9225
  // src/cli/commands/scrub/stack-rewrite.ts
8869
9226
  async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger, shownStack, nestedInput, perResourceSecrets, outputSecrets, orphanSecrets, prePassFindings, unverifiableLeaves, emitAbandonedScanNotes, purgeExaminedHistory, loaded, state, malformedResources, malformedResourceRows, malformedOutputs, malformedOrphans, malformedOrphanRows, perResourceTemplateProps, perResourceResolvedProps, outputsTemplateSource, conditions, templateResources, accountedOutputKeys, collisions, outputsSourceUntrusted, everyExportAliasReproduced, declaredAliasOf, nestedRowParameters }) {
8870
9227
  for (const [name, exportName] of collisions) logger.warn(exportAliasCollisionScrubWarning(name, exportName, outputSecrets));
@@ -8875,7 +9232,11 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
8875
9232
  secretBearingKeys.push(key);
8876
9233
  logger.warn(secretBearingStateKeyWarning(stack.stackName, display));
8877
9234
  }
8878
- const noEchoPlans = planScrubNoEcho(state, stack.template, perResourceTemplateProps, conditions, nestedInput?.noEchoParameters ?? [], nestedInput?.noEchoConditionalParameters ?? []);
9235
+ const pseudoValues = /* @__PURE__ */ new Map([["AWS::Region", region], ["AWS::StackName", stack.stackName]]);
9236
+ const noEchoPlans = planScrubNoEcho(state, stack.template, perResourceTemplateProps, conditions, nestedInput?.noEchoParameters ?? [], nestedInput?.noEchoConditionalParameters ?? [], pseudoValues);
9237
+ const storedRows = storedNoEchoRows(state.orphans, state.supersededResources);
9238
+ const storedNoEcho = planScrubStoredNoEcho(state, storedRows, stack.template, noEchoPlans.sources, noEchoPlans.needleSources);
9239
+ const unpositioned = planUnpositionedMasks(storedRows, storedNoEcho.unverifiable, opts, logger, shownStack);
8879
9240
  const nestedChildren = [];
8880
9241
  const nestedRowIds = /* @__PURE__ */ new Set();
8881
9242
  for (const [logicalId, resource] of Object.entries(templateResources)) if (resource?.Type === "AWS::CloudFormation::Stack") nestedRowIds.add(logicalId);
@@ -8952,9 +9313,26 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
8952
9313
  })) !== JSON.stringify(value);
8953
9314
  };
8954
9315
  const noEchoPublicTokens = /* @__PURE__ */ new Set([region, stack.stackName]);
8955
- const finishStored = storedRecordFinisher(stack.template, noEchoPublicTokens);
9316
+ const finishStored = storedRecordFinisher(stack.template, noEchoPublicTokens, stack.stackName);
9317
+ const storedInput = (logicalId, state) => ({
9318
+ logicalId,
9319
+ state,
9320
+ resolved: perResourceResolvedProps.get(logicalId),
9321
+ templateProps: perResourceTemplateProps.get(logicalId)
9322
+ });
9323
+ const finishRepairsAny = () => [
9324
+ ...Object.entries(state.resources ?? {}).map(([logicalId, record]) => ({
9325
+ logicalId,
9326
+ state: record
9327
+ })),
9328
+ ...state.orphans ?? [],
9329
+ ...Array.isArray(state.supersededResources) ? state.supersededResources.filter(isSupersededResourceRecord) : []
9330
+ ].some((row) => {
9331
+ const stored = storedInput(row.logicalId, row.state);
9332
+ return storedNoEchoInputsKnown(row.state, stored) && finishStored(row.state, void 0, stored) !== row.state;
9333
+ });
8956
9334
  const totalSecrets = outputSecrets.size + [...perResourceSecrets.values()].reduce((n, m) => n + m.size, 0) + [...orphanSecrets.values()].reduce((n, m) => n + m.size, 0);
8957
- if (totalSecrets === 0 && !noEchoPlans.changesAny) {
9335
+ if (totalSecrets === 0 && !noEchoPlans.changesAny && !storedNoEcho.changesAny && unpositioned.masked.size === 0 && !finishRepairsAny()) {
8958
9336
  emitAbandonedScanNotes();
8959
9337
  return {
8960
9338
  ...await purgeExaminedHistory(loaded.migrationPending),
@@ -8965,6 +9343,7 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
8965
9343
  unverifiableProducerRecords: prePassFindings.damagedProducerRecords.length,
8966
9344
  unverifiableLeaves,
8967
9345
  unrepairedReadNames: 0,
9346
+ ...unpositioned.unverifiable > 0 && { unverifiableNoEchoRecords: unpositioned.unverifiable },
8968
9347
  ...malformedResources ? { malformedResources } : {},
8969
9348
  ...malformedResourceRows ? { malformedResourceRows } : {},
8970
9349
  ...malformedOutputs ? { malformedOutputs } : {},
@@ -9007,47 +9386,26 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
9007
9386
  properties: "unproven",
9008
9387
  observed: "unproven"
9009
9388
  });
9010
- const rewritten = finishStored(keepHeldTokenProvenance(applyScrubNoEcho(migrated, record, plan)), new Map([...ownSecrets, ...migrationNeedles ?? []]), {
9011
- logicalId,
9012
- state: record
9013
- });
9389
+ const rewritten = finishStored(keepHeldTokenProvenance(applyScrubNoEcho(migrated, record, plan)), new Map([...ownSecrets, ...migrationNeedles ?? []]), storedInput(logicalId, record));
9014
9390
  const written = JSON.stringify(rewritten) === JSON.stringify(record) ? rewritten : withoutLapsedStaleShapeStamp(rewritten);
9015
9391
  if (JSON.stringify(written) !== JSON.stringify(record)) recordsChanged++;
9016
9392
  newResources[logicalId] = written;
9017
9393
  }
9018
- const newOrphans = (state.orphans ?? []).map((record, orphanIndex) => {
9019
- const own = orphanSecrets.get(String(orphanIndex));
9394
+ const rewriteStoredRecord = (key, row) => {
9020
9395
  const needles = new Map(allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets));
9021
- for (const [plaintext, expression] of own ?? []) needles.set(plaintext, expression);
9022
- if (needles.size === 0) return record;
9023
- const scrubbed = finishStored(keepHeldTokenProvenance(scrubResourceRecord(record.state, needles, void 0, "state-cross-generation", {
9024
- properties: "unproven",
9025
- observed: "unproven"
9026
- })), needles, record);
9027
- if (JSON.stringify(scrubbed) === JSON.stringify(record.state)) return record;
9396
+ for (const [plaintext, expression] of orphanSecrets.get(key) ?? []) needles.set(plaintext, expression);
9397
+ const stored = storedInput(row.logicalId, row.state);
9398
+ const finished = scrubStoredRecord(row.state, needles, storedNoEcho.byKey.get(key), noEchoPublicTokens, (record, bag) => finishStored(record, bag, stored));
9399
+ const scrubbed = unpositioned.masked.has(key) ? maskUnpositionedRecord(finished).record : finished;
9400
+ if (JSON.stringify(scrubbed) === JSON.stringify(row.state)) return row;
9028
9401
  recordsChanged++;
9029
9402
  return {
9030
- ...record,
9403
+ ...row,
9031
9404
  state: withoutLapsedStaleShapeStamp(scrubbed)
9032
9405
  };
9033
- });
9034
- const newSuperseded = Array.isArray(state.supersededResources) ? state.supersededResources.map((entry, supersededIndex) => {
9035
- if (!isSupersededResourceRecord(entry)) return entry;
9036
- const own = orphanSecrets.get(`superseded:${supersededIndex}`);
9037
- const needles = new Map(allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets));
9038
- for (const [plaintext, expression] of own ?? []) needles.set(plaintext, expression);
9039
- if (needles.size === 0) return entry;
9040
- const scrubbed = finishStored(keepHeldTokenProvenance(scrubResourceRecord(entry.state, needles, void 0, "state-cross-generation", {
9041
- properties: "unproven",
9042
- observed: "unproven"
9043
- })), needles, entry);
9044
- if (JSON.stringify(scrubbed) === JSON.stringify(entry.state)) return entry;
9045
- recordsChanged++;
9046
- return {
9047
- ...entry,
9048
- state: withoutLapsedStaleShapeStamp(scrubbed)
9049
- };
9050
- }) : void 0;
9406
+ };
9407
+ const newOrphans = (state.orphans ?? []).map((record, orphanIndex) => rewriteStoredRecord(String(orphanIndex), record));
9408
+ const newSuperseded = Array.isArray(state.supersededResources) ? state.supersededResources.map((entry, supersededIndex) => isSupersededResourceRecord(entry) ? rewriteStoredRecord(`superseded:${supersededIndex}`, entry) : entry) : void 0;
9051
9409
  const { newImports, newOutputReads, unrepairedReadNames, changed } = repairCrossStackReadNames({
9052
9410
  state,
9053
9411
  outputSecrets,
@@ -9068,7 +9426,11 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
9068
9426
  generation: "unproven"
9069
9427
  }) : state.outputs;
9070
9428
  const redactedOutputs = redactUnaccountedOutputs(positionedOutputs, state.outputs, accountedOutputKeys, allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets));
9071
- const noEchoMaskedOutputs = maskScrubNoEchoOutputs(redactedOutputs, noEchoPlans.outputKeys, new Set(Object.keys(stack.template.Outputs ?? {})), declaredAliasOf);
9429
+ const noEchoMaskedOutputs = maskScrubNoEchoOutputs(redactedOutputs, noEchoPlans.outputKeys, new Set(Object.keys(stack.template.Outputs ?? {})), declaredAliasOf, {
9430
+ templateOutputs: stack.template.Outputs ?? {},
9431
+ sources: noEchoPlans.sources,
9432
+ pseudo: pseudoValues
9433
+ });
9072
9434
  emitAbandonedScanNotes();
9073
9435
  let newOutputs = noEchoMaskedOutputs;
9074
9436
  let newExportNames = state.exportNames;
@@ -9166,6 +9528,7 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
9166
9528
  unverifiableProducerRecords: prePassFindings.damagedProducerRecords.length,
9167
9529
  unverifiableLeaves,
9168
9530
  unrepairedReadNames: unrepairedReadNames.length,
9531
+ ...unpositioned.unverifiable > 0 && { unverifiableNoEchoRecords: unpositioned.unverifiable },
9169
9532
  ...malformedResources ? { malformedResources } : {},
9170
9533
  ...malformedOutputs ? { malformedOutputs } : {},
9171
9534
  ...malformedOrphans ? { malformedOrphans } : {},
@@ -9449,6 +9812,7 @@ async function runScrubTargets({ options, logger, effectiveRegion, region, state
9449
9812
  let totalStacksWithUnverifiableReads = 0;
9450
9813
  let totalStacksWithUnverifiableLeaves = 0;
9451
9814
  let totalStacksWithUnrepairedReadNames = 0;
9815
+ let totalStacksWithUnverifiableNoEchoRecords = 0;
9452
9816
  let totalOutputKeysDropped = 0;
9453
9817
  let totalStacksWithReadOutputKeys = 0;
9454
9818
  const droppedReadersUnverifiedStacks = [];
@@ -9516,6 +9880,7 @@ async function runScrubTargets({ options, logger, effectiveRegion, region, state
9516
9880
  scrubbed = await scrubStack(stack, stackRegion, stateBackend, lockManager, {
9517
9881
  dryRun: options.dryRun ?? false,
9518
9882
  purgeHistory: options.purgeHistory ?? false,
9883
+ maskUnpositioned: options.maskUnpositioned ?? false,
9519
9884
  roleArn: options.roleArn,
9520
9885
  logger,
9521
9886
  appStacks: allStacks,
@@ -9619,7 +9984,7 @@ async function runScrubTargets({ options, logger, effectiveRegion, region, state
9619
9984
  if (!rewrittenStacks.has(recordKey)) totalStacksScrubbed++;
9620
9985
  rewrittenStacks.add(recordKey);
9621
9986
  logger.info(`${options.dryRun ? "Would scrub" : "Scrubbed"} ${scrubbed.recordsChanged} resource record(s) in ${shownStack}`);
9622
- } else if (scrubbed.secretBearingKeys === 0 && scrubbed.unverifiableReads === 0 && scrubbed.unverifiableLeaves === 0 && scrubbed.unrepairedReadNames === 0 && (scrubbed.keptReadOutputKeys ?? 0) === 0 && (scrubbed.keptAliasOutputKeys ?? 0) === 0 && !scrubbed.droppedOutputReadersUnverified && indexAbsentWithSecret === 0 && indexConverged === 0) logger.info(scrubbed.nestedChildren.some((child) => Boolean(child.input)) ? `No plaintext secrets found in ${shownStack}'s own records${SCRUB_CLEAN_SCOPE_NOTE}; its nested-stack output attributes are checked after each nested stack` : `No plaintext secrets found in ${shownStack}${SCRUB_CLEAN_SCOPE_NOTE}`);
9987
+ } else if (scrubbed.secretBearingKeys === 0 && scrubbed.unverifiableReads === 0 && scrubbed.unverifiableLeaves === 0 && scrubbed.unrepairedReadNames === 0 && (scrubbed.unverifiableNoEchoRecords ?? 0) === 0 && (scrubbed.keptReadOutputKeys ?? 0) === 0 && (scrubbed.keptAliasOutputKeys ?? 0) === 0 && !scrubbed.droppedOutputReadersUnverified && indexAbsentWithSecret === 0 && indexConverged === 0) logger.info(scrubbed.nestedChildren.some((child) => Boolean(child.input)) ? `No plaintext secrets found in ${shownStack}'s own records${SCRUB_CLEAN_SCOPE_NOTE}; its nested-stack output attributes are checked after each nested stack` : `No plaintext secrets found in ${shownStack}${SCRUB_CLEAN_SCOPE_NOTE}`);
9623
9988
  if (scrubbed.malformedResources || scrubbed.malformedResourceRows) malformedRecords.push(stackName);
9624
9989
  if (scrubbed.malformedOutputs) malformedOutputRecords.push(stackName);
9625
9990
  if (scrubbed.malformedOrphans || scrubbed.malformedOrphanRows) malformedOrphanRecords.push(stackName);
@@ -9636,6 +10001,10 @@ async function runScrubTargets({ options, logger, effectiveRegion, region, state
9636
10001
  totalStacksWithUnrepairedReadNames++;
9637
10002
  logger.warn(safeMsg`${scrubbed.unrepairedReadNames} cross-stack read name(s) in ${shownStack} hold a ` + "plaintext scrub could NOT repair (see the warnings above) — so this stack is not reported clean.");
9638
10003
  }
10004
+ if ((scrubbed.unverifiableNoEchoRecords ?? 0) > 0) {
10005
+ totalStacksWithUnverifiableNoEchoRecords++;
10006
+ logger.warn(safeMsg`${scrubbed.unverifiableNoEchoRecords} orphan or superseded record(s) in ${shownStack} ` + "name no NoEcho positions scrub can verify (see the warnings above) — so this stack is not reported clean.");
10007
+ }
9639
10008
  totalOutputKeysDropped += scrubbed.droppedOutputKeys ?? 0;
9640
10009
  if ((scrubbed.keptReadOutputKeys ?? 0) > 0 || (scrubbed.keptAliasOutputKeys ?? 0) > 0) totalStacksWithReadOutputKeys++;
9641
10010
  if (scrubbed.droppedOutputReadersUnverified) droppedReadersUnverifiedStacks.push(stackName);
@@ -9655,6 +10024,7 @@ async function runScrubTargets({ options, logger, effectiveRegion, region, state
9655
10024
  totalStacksWithUnverifiableReads,
9656
10025
  totalStacksWithUnverifiableLeaves,
9657
10026
  totalStacksWithUnrepairedReadNames,
10027
+ totalStacksWithUnverifiableNoEchoRecords,
9658
10028
  totalOutputKeysDropped,
9659
10029
  totalStacksWithReadOutputKeys,
9660
10030
  droppedReadersUnverifiedStacks,
@@ -9770,7 +10140,7 @@ async function scrubCommand(stacks, options) {
9770
10140
 
9771
10141
  // src/cli/commands/scrub.ts
9772
10142
  function createScrubCommand() {
9773
- const cmd = new Command("scrub").description("Rewrite persisted state so resolved secret dynamic references are stored as their {{resolve:...}} expression, not the plaintext value (no deploy).").argument("[stacks...]", "Stack name(s) to scrub (physical name or display path); the nested stacks under each are scrubbed too").option("--all", "Scrub every stack in the synthesized app", false).option("--dry-run", "Report what would be scrubbed without writing state").addOption(new Option("--purge-history", "Also purge the earlier S3 versions of every examined stack's state.json, not only the ones scrub rewrites (drops their state-recovery history; a record scrub refuses is never purged)").conflicts("dryRun")).option("--fail", "With --dry-run, exit non-zero if a value the template names through a {{resolve:...}} reference is found in plaintext (CI gate). Also exits non-zero on a real run when a leak was found that scrub cannot rewrite.");
10143
+ const cmd = new Command("scrub").description("Rewrite persisted state so resolved secret dynamic references are stored as their {{resolve:...}} expression, not the plaintext value (no deploy).").argument("[stacks...]", "Stack name(s) to scrub (physical name or display path); the nested stacks under each are scrubbed too").option("--all", "Scrub every stack in the synthesized app", false).option("--dry-run", "Report what would be scrubbed without writing state").addOption(new Option("--purge-history", "Also purge the earlier S3 versions of every examined stack's state.json, not only the ones scrub rewrites (drops their state-recovery history; a record scrub refuses is never purged)").conflicts("dryRun")).option("--mask-unpositioned", "Mask every string value of an orphan or superseded record whose NoEcho positions scrub cannot tell (its logical id left the template, no noEchoLeaves recorded) and record those positions as NoEcho; those values are lost from state, so a later adoption of the record compares without them").option("--fail", "With --dry-run, exit non-zero if a value the template names through a {{resolve:...}} reference is found in plaintext (CI gate). Also exits non-zero on a real run when a leak was found that scrub cannot rewrite.");
9774
10144
  [
9775
10145
  ...commonOptions,
9776
10146
  ...appOptions,
@@ -9993,7 +10363,7 @@ const UNCOMPARED_REASONS = {
9993
10363
  },
9994
10364
  noEchoParameter: {
9995
10365
  kind: "unknown",
9996
- phrase: "only PARTIALLY compared: their state holds a NoEcho parameter value only as the redaction mask, which no re-run can clear"
10366
+ phrase: "only PARTIALLY compared: their state holds a NoEcho parameter value, or a custom resource's NoEcho attribute value, only as the redaction mask, which no re-run can clear"
9997
10367
  },
9998
10368
  maskedEcho: {
9999
10369
  kind: "unknown",
@@ -10894,6 +11264,45 @@ function readHadAgreeingCopies(read) {
10894
11264
  return readsWithAgreeingCopies.has(read);
10895
11265
  }
10896
11266
 
11267
+ // src/cli/commands/drift/transitional-read-heals.ts
11268
+ const isBag = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
11269
+ const scalarText = (value) => typeof value === "string" || typeof value === "number" || typeof value === "boolean" ? String(value) : void 0;
11270
+ function instanceMonitoringIsDeclared(properties, aws) {
11271
+ const declared = coerceCfnBoolean(properties["Monitoring"]);
11272
+ return declared !== void 0 && aws["Monitoring"] === declared;
11273
+ }
11274
+ function instanceProfileIsDeclared(properties, aws) {
11275
+ const declared = properties["IamInstanceProfile"];
11276
+ const live = aws["IamInstanceProfile"];
11277
+ if (typeof declared !== "string" || declared === "" || typeof live !== "string") return false;
11278
+ if (live === declared) return true;
11279
+ return live.startsWith("arn:") && live.includes(":instance-profile/") && live.slice(live.lastIndexOf("/") + 1) === declared;
11280
+ }
11281
+ function instanceMetadataOptionsIsDeclared(properties, aws, observed) {
11282
+ const declared = properties["MetadataOptions"];
11283
+ const live = aws["MetadataOptions"];
11284
+ const recorded = observed["MetadataOptions"];
11285
+ if (!isBag(declared) || !isBag(live) || !isBag(recorded)) return false;
11286
+ const declaredKeys = Object.keys(declared);
11287
+ if (declaredKeys.length === 0) return false;
11288
+ for (const key of declaredKeys) {
11289
+ const want = scalarText(declared[key]);
11290
+ if (want === void 0 || scalarText(live[key]) !== want) return false;
11291
+ }
11292
+ for (const key of /* @__PURE__ */ new Set([...Object.keys(live), ...Object.keys(recorded)])) {
11293
+ if (declaredKeys.includes(key)) continue;
11294
+ if (scalarText(live[key]) !== scalarText(recorded[key])) return false;
11295
+ }
11296
+ return true;
11297
+ }
11298
+ function efsBackupPolicyIsDeclared(properties, aws) {
11299
+ const declared = properties["BackupPolicy"];
11300
+ const live = aws["BackupPolicy"];
11301
+ if (!isBag(declared) || !isBag(live)) return false;
11302
+ const status = declared["Status"];
11303
+ return typeof status === "string" && status !== "" && live["Status"] === status;
11304
+ }
11305
+
10897
11306
  // src/cli/commands/drift/baseline-keys.ts
10898
11307
  const UNDECLARED_UNCOMPARED_KEYS = {
10899
11308
  "AWS::S3::Bucket": ["NotificationConfiguration"],
@@ -10932,7 +11341,7 @@ function preFixBaselineKeys(resourceType, observed, properties, aws) {
10932
11341
  if (typeof properties !== "object" || properties === null || Array.isArray(properties)) return [];
10933
11342
  if (resourceType === "AWS::DynamoDB::Table") {
10934
11343
  const bag = properties;
10935
- return [...staleTablePolicyBaseline(observed, bag, aws) ? ["ResourcePolicy"] : [], ...tagsHeal.liveIsDeclared(bag, aws) ? [tagsHeal.key] : []];
11344
+ return [...staleTablePolicyBaseline(observed, bag, aws) ? ["ResourcePolicy"] : [], ...tagsHeal.liveIsDeclared(bag, aws, observed) ? [tagsHeal.key] : []];
10936
11345
  }
10937
11346
  if (resourceType === "AWS::SQS::QueuePolicy" || resourceType === "AWS::SNS::TopicPolicy") {
10938
11347
  const declared = declaredPolicyDocument(properties);
@@ -10943,7 +11352,7 @@ function preFixBaselineKeys(resourceType, observed, properties, aws) {
10943
11352
  return lambdaPermissionMatchesDeclared(aws, declared) && !lambdaPermissionMatchesDeclared(observed, declared) ? [...LAMBDA_PERMISSION_STATEMENT_KEYS] : [];
10944
11353
  }
10945
11354
  const members = OWN_WRITE_MEMBERS.get(resourceType);
10946
- if (members !== void 0) return members.filter((member) => member.liveIsDeclared(properties, aws)).map((member) => member.key);
11355
+ if (members !== void 0) return members.filter((member) => member.liveIsDeclared(properties, aws, observed)).map((member) => member.key);
10947
11356
  if (resourceType !== "AWS::Lambda::EventSourceMapping") return [];
10948
11357
  const declared = hasOwnKey(properties, "Enabled") ? coerceCfnBoolean(properties["Enabled"]) : void 0;
10949
11358
  const recorded = hasOwnKey(observed, "Enabled") ? coerceCfnBoolean(observed["Enabled"]) : void 0;
@@ -11016,7 +11425,24 @@ const OWN_WRITE_MEMBERS = new Map(Object.entries({
11016
11425
  if (declared === void 0) return properties["FileSystemPolicy"] === void 0 && aws["FileSystemPolicy"] === void 0;
11017
11426
  return efsPolicyMatchesDeclared(aws["FileSystemPolicy"], declared);
11018
11427
  }
11428
+ }, {
11429
+ key: "BackupPolicy",
11430
+ liveIsDeclared: efsBackupPolicyIsDeclared
11019
11431
  }],
11432
+ "AWS::EC2::Instance": [
11433
+ {
11434
+ key: "Monitoring",
11435
+ liveIsDeclared: instanceMonitoringIsDeclared
11436
+ },
11437
+ {
11438
+ key: "IamInstanceProfile",
11439
+ liveIsDeclared: instanceProfileIsDeclared
11440
+ },
11441
+ {
11442
+ key: "MetadataOptions",
11443
+ liveIsDeclared: instanceMetadataOptionsIsDeclared
11444
+ }
11445
+ ],
11020
11446
  "AWS::S3::Bucket": [{
11021
11447
  key: "LifecycleConfiguration",
11022
11448
  liveIsDeclared: (properties, aws) => {
@@ -11055,7 +11481,7 @@ const OWN_WRITE_MEMBERS = new Map(Object.entries({
11055
11481
  "AWS::IAM::Policy": [
11056
11482
  {
11057
11483
  key: "PolicyDocument",
11058
- liveIsDeclared: (properties, aws) => readHadAgreeingCopies(aws) && documentHeal("PolicyDocument").liveIsDeclared(properties, aws)
11484
+ liveIsDeclared: (properties, aws, observed) => readHadAgreeingCopies(aws) && documentHeal("PolicyDocument").liveIsDeclared(properties, aws, observed)
11059
11485
  },
11060
11486
  {
11061
11487
  key: "PolicyName",
@@ -11118,23 +11544,36 @@ async function lookUpWriteOnlyDriftPaths(resourceType) {
11118
11544
  return;
11119
11545
  }
11120
11546
  }
11121
- const DERIVED_ECHO_MEMBERS = { "AWS::SecretsManager::RotationSchedule": [{
11122
- parent: "RotationRules",
11123
- source: "ScheduleExpression",
11124
- echo: "AutomaticallyAfterDays"
11125
- }] };
11126
- function stripDerivedEchoMembers(resourceType, bag) {
11547
+ const DERIVED_ECHO_MEMBERS = {
11548
+ "AWS::AutoScaling::ScheduledAction": [{
11549
+ source: "Recurrence",
11550
+ echo: "StartTime",
11551
+ undeclaredOnly: true
11552
+ }],
11553
+ "AWS::SecretsManager::RotationSchedule": [{
11554
+ parent: "RotationRules",
11555
+ source: "ScheduleExpression",
11556
+ echo: "AutomaticallyAfterDays"
11557
+ }]
11558
+ };
11559
+ function stripDerivedEchoMembers(resourceType, bag, declared, options) {
11127
11560
  const rules = DERIVED_ECHO_MEMBERS[resourceType];
11128
11561
  if (!rules) return bag;
11129
11562
  let out = bag;
11130
- for (const { parent, source, echo } of rules) {
11131
- const node = hasOwnKey(out, parent) ? out[parent] : void 0;
11563
+ for (const { parent, source, echo, undeclaredOnly } of rules) {
11564
+ if (options?.undeclaredOnlyRules && !undeclaredOnly) continue;
11565
+ if (undeclaredOnly) {
11566
+ const declaredNode = parent === void 0 ? declared : declared?.[parent];
11567
+ if (typeof declaredNode !== "object" || declaredNode === null) continue;
11568
+ if (hasOwnKey(declaredNode, echo)) continue;
11569
+ }
11570
+ const node = parent === void 0 ? out : hasOwnKey(out, parent) ? out[parent] : void 0;
11132
11571
  if (typeof node !== "object" || node === null || Array.isArray(node)) continue;
11133
11572
  const members = node;
11134
11573
  if (!hasOwnKey(members, echo) || !hasOwnKey(members, source)) continue;
11135
11574
  if (members[source] === void 0 || members[source] === null) continue;
11136
11575
  const { [echo]: _echo, ...rest } = members;
11137
- out = {
11576
+ out = parent === void 0 ? rest : {
11138
11577
  ...out,
11139
11578
  [parent]: rest
11140
11579
  };
@@ -11563,7 +12002,7 @@ function notComparedReason(cause, record) {
11563
12002
  unreadableRecord: "its state record is not readable as a resource — not an object, carrying no resource type, or holding a 'properties' map that is not an object — so there was nothing to compare (repair or re-import the record)",
11564
12003
  unreadableMap: "the record's whole 'resources' map is not a JSON object, so no resource in it could be read or compared (repair or re-import the record)",
11565
12004
  baselineRefused: "a `cdkd import` run refused to capture its observed baseline, so the only baseline available is the recorded properties that refusal already found untrustworthy" + (refusedRemedy === void 0 ? " (deploy a change to this resource to restore one)" : `. ${refusedRemedy}`),
11566
- noEchoParameter: `its state holds a NoEcho parameter's value only as the redaction mask${noEchoPathsClause(record)}, so that value was not compared — every other property was (permanent by design; a deploy compares it with AWS)`,
12005
+ noEchoParameter: `its state holds the value of a NoEcho parameter, or of a custom resource's attribute declared NoEcho, only as the redaction mask${noEchoPathsClause(record)}, so that value was not compared — every other property was (permanent by design)`,
11567
12006
  maskedEcho: `AWS echoes a secret into a property the template does not set${maskedEchoPathsClause(record)}, which its state holds only as the redaction mask, so that value was not compared — every other property was (permanent by design)`,
11568
12007
  uncertifiedBaseline: "its recorded baseline holds the redaction mask at a position cdkd could not pair with the secret reference there, so that position was not compared — every other property was (deploy a change to this resource to re-capture the baseline)"
11569
12008
  }[cause];
@@ -11667,12 +12106,12 @@ const UNDECLARED_GRANT_KEYS = {
11667
12106
  };
11668
12107
  const BOUNDARY_KEY = "PermissionsBoundary";
11669
12108
  const NONE = [];
11670
- function isPlainRecord$3(value) {
12109
+ function isPlainRecord$4(value) {
11671
12110
  return typeof value === "object" && value !== null && !Array.isArray(value);
11672
12111
  }
11673
12112
  function undeclaredGrantDriftKeys(resourceType, properties) {
11674
12113
  if (!hasOwnKey(UNDECLARED_GRANT_KEYS, resourceType)) return NONE;
11675
- if (!isPlainRecord$3(properties)) return NONE;
12114
+ if (!isPlainRecord$4(properties)) return NONE;
11676
12115
  return UNDECLARED_GRANT_KEYS[resourceType].filter((key) => !hasOwnKey(properties, key));
11677
12116
  }
11678
12117
  function isUndeclaredGrantScalarKey(key) {
@@ -11680,7 +12119,7 @@ function isUndeclaredGrantScalarKey(key) {
11680
12119
  }
11681
12120
  function grantMemberIdentity(key, member) {
11682
12121
  if (key === "Policies") {
11683
- const name = isPlainRecord$3(member) ? member["PolicyName"] : void 0;
12122
+ const name = isPlainRecord$4(member) ? member["PolicyName"] : void 0;
11684
12123
  return typeof name === "string" ? name : void 0;
11685
12124
  }
11686
12125
  if (typeof member !== "string") return void 0;
@@ -11752,7 +12191,7 @@ function removedGrantMembers(key, awsValue, stateValue) {
11752
12191
  for (const m of awsValue) {
11753
12192
  const id = grantMemberIdentity(key, m);
11754
12193
  if (id !== void 0 && kept.has(id)) continue;
11755
- const name = key === "Policies" && isPlainRecord$3(m) ? m["PolicyName"] : void 0;
12194
+ const name = key === "Policies" && isPlainRecord$4(m) ? m["PolicyName"] : void 0;
11756
12195
  out.push({
11757
12196
  key,
11758
12197
  member: typeof name === "string" ? name : m
@@ -12420,9 +12859,9 @@ function corroboratedLeafCount(send, live, wildcardLeaf = isMaskLeaf) {
12420
12859
  }
12421
12860
  return total;
12422
12861
  }
12423
- if (isPlainRecord$2(send)) {
12862
+ if (isPlainRecord$3(send)) {
12424
12863
  if (!hasPlainPrototype(send)) return void 0;
12425
- if (!isPlainRecord$2(live) || !hasPlainPrototype(live)) return void 0;
12864
+ if (!isPlainRecord$3(live) || !hasPlainPrototype(live)) return void 0;
12426
12865
  const keys = Object.keys(send);
12427
12866
  if (keys.length !== Object.keys(live).length) return void 0;
12428
12867
  let total = 0;
@@ -12542,8 +12981,8 @@ function preserveLiveValuesAtMaskedLeaves(send, awsProperties, secrets, corrobor
12542
12981
  if (holdsMaskLeaf(value)) unpreservablePaths.push(path);
12543
12982
  return value;
12544
12983
  }
12545
- const liveObject = isPlainRecord$2(live) ? live : void 0;
12546
- const corrObject = isPlainRecord$2(corr) ? corr : void 0;
12984
+ const liveObject = isPlainRecord$3(live) ? live : void 0;
12985
+ const corrObject = isPlainRecord$3(corr) ? corr : void 0;
12547
12986
  const out = Object.create(null);
12548
12987
  for (const [k, v] of Object.entries(value)) out[k] = walk(v, corrObject === void 0 ? void 0 : ownValue(corrObject, k), liveObject === void 0 ? void 0 : ownValue(liveObject, k), path === "" ? k : `${path}.${k}`);
12549
12988
  return out;
@@ -12566,7 +13005,7 @@ function isTagListKey(key) {
12566
13005
  return key === "Tags" || key.endsWith("Tags");
12567
13006
  }
12568
13007
  function isCfnTagList(value) {
12569
- return Array.isArray(value) && value.length > 0 && value.every((t) => isPlainRecord$2(t) && typeof t.Key === "string");
13008
+ return Array.isArray(value) && value.length > 0 && value.every((t) => isPlainRecord$3(t) && typeof t.Key === "string");
12570
13009
  }
12571
13010
  function tagKeys(tags) {
12572
13011
  return tags.map((t) => t["Key"]);
@@ -12633,8 +13072,8 @@ function collectMissingPaths(awsValue, desiredValue, path, out, isPreservedKey)
12633
13072
  }
12634
13073
  return;
12635
13074
  }
12636
- if (!isPlainRecord$2(awsValue)) return;
12637
- if (!isPlainRecord$2(desiredValue)) {
13075
+ if (!isPlainRecord$3(awsValue)) return;
13076
+ if (!isPlainRecord$3(desiredValue)) {
12638
13077
  if (desiredValue === void 0) out.add(path);
12639
13078
  return;
12640
13079
  }
@@ -12650,7 +13089,7 @@ function collectMissingPaths(awsValue, desiredValue, path, out, isPreservedKey)
12650
13089
  function isKeyedList(value) {
12651
13090
  return Array.isArray(value) && value.length > 0 && value.every((e) => typeof e === "object" && e !== null && typeof e.Key === "string");
12652
13091
  }
12653
- function isPlainRecord$2(value) {
13092
+ function isPlainRecord$3(value) {
12654
13093
  return typeof value === "object" && value !== null && !Array.isArray(value);
12655
13094
  }
12656
13095
  function mergeUntemplatedValue(awsValue, desiredValue) {
@@ -12672,7 +13111,7 @@ function mergeUntemplatedValue(awsValue, desiredValue) {
12672
13111
  }
12673
13112
  return merged;
12674
13113
  }
12675
- if (!isPlainRecord$2(awsValue) || !isPlainRecord$2(desiredValue)) return desiredValue;
13114
+ if (!isPlainRecord$3(awsValue) || !isPlainRecord$3(desiredValue)) return desiredValue;
12676
13115
  if (!hasPlainPrototype(awsValue) || !hasPlainPrototype(desiredValue)) return desiredValue;
12677
13116
  const merged = Object.create(null);
12678
13117
  for (const [key, value] of Object.entries(awsValue)) merged[key] = hasOwnKey(desiredValue, key) ? mergeUntemplatedValue(value, desiredValue[key]) : value;
@@ -12692,7 +13131,7 @@ function preserveLiveValuesAtUnresolvedTokens(send, awsProperties, unresolvedTok
12692
13131
  }
12693
13132
  if (value !== null && typeof value === "object") {
12694
13133
  if (!hasPlainPrototype(value)) return value;
12695
- const liveObject = isPlainRecord$2(live) ? live : void 0;
13134
+ const liveObject = isPlainRecord$3(live) ? live : void 0;
12696
13135
  const out = Object.create(null);
12697
13136
  for (const [k, v] of Object.entries(value)) out[k] = walk(v, liveObject === void 0 ? void 0 : ownValue(liveObject, k));
12698
13137
  return out;
@@ -12746,7 +13185,7 @@ function buildRevertNewProperties(drifts, desiredProperties, awsProperties, opti
12746
13185
  return result;
12747
13186
  }
12748
13187
  function driftAbsentMeansDefaultKeys(provider, resourceType, properties) {
12749
- if (provider.getDriftAbsentMeansDefaultKeys === void 0 || !isPlainRecord$2(properties)) return [];
13188
+ if (provider.getDriftAbsentMeansDefaultKeys === void 0 || !isPlainRecord$3(properties)) return [];
12750
13189
  const keys = provider.getDriftAbsentMeansDefaultKeys(resourceType, properties);
12751
13190
  const dotted = keys.filter((key) => key.includes("."));
12752
13191
  if (dotted.length === 0) return keys;
@@ -12861,8 +13300,8 @@ async function compareDriftReadback(args) {
12861
13300
  } : siblingStripped;
12862
13301
  const pairCanonicalized = provider.canonicalizeDriftPair ? await provider.canonicalizeDriftPair(resource.resourceType, canonicalized.baseline, canonicalized.aws, resource.properties ?? {}) : canonicalized;
12863
13302
  const paired = {
12864
- baseline: stripDerivedEchoMembers(resource.resourceType, pairCanonicalized.baseline),
12865
- aws: stripDerivedEchoMembers(resource.resourceType, pairCanonicalized.aws)
13303
+ baseline: stripDerivedEchoMembers(resource.resourceType, pairCanonicalized.baseline, resource.properties ?? {}),
13304
+ aws: stripDerivedEchoMembers(resource.resourceType, pairCanonicalized.aws, resource.properties ?? {})
12866
13305
  };
12867
13306
  const nameBaseline = canonicalizeDerivedPatternBName(resource.resourceType, paired.baseline, paired.aws);
12868
13307
  const absentDefaultBaseline = useObserved ? withAbsentDefaultKeys(nameBaseline, paired.aws, driftAbsentMeansDefaultKeys(provider, resource.resourceType, resource.properties)) : nameBaseline;
@@ -13292,7 +13731,7 @@ async function writeAheadRevertAttestations(report, logicalIds, stateBackend) {
13292
13731
 
13293
13732
  // src/cli/commands/drift/revert-write-only.ts
13294
13733
  function revertWriteOnlyResendNames(resourceType, properties, writeOnlyNames) {
13295
- if (!writeOnlyNames || writeOnlyNames.size === 0 || !isPlainRecord$2(properties)) return [];
13734
+ if (!writeOnlyNames || writeOnlyNames.size === 0 || !isPlainRecord$3(properties)) return [];
13296
13735
  const unreadableCreateOnly = getTopLevelKeysHoldingUnreadableCreateOnly(resourceType, properties);
13297
13736
  const names = [];
13298
13737
  for (const name of writeOnlyNames) {
@@ -13307,7 +13746,7 @@ function revertWriteOnlyResendNames(resourceType, properties, writeOnlyNames) {
13307
13746
  function withDeclaredWriteOnlyValues(send, resolvedProperties, names, paths) {
13308
13747
  const skipped = [];
13309
13748
  const wholesale = [];
13310
- if (names.length === 0 || !isPlainRecord$2(resolvedProperties)) return {
13749
+ if (names.length === 0 || !isPlainRecord$3(resolvedProperties)) return {
13311
13750
  properties: send,
13312
13751
  skipped,
13313
13752
  wholesale
@@ -13380,11 +13819,11 @@ function graftAt(send, declared, path, writeOnly) {
13380
13819
  ok
13381
13820
  };
13382
13821
  }
13383
- if (!isPlainRecord$2(declared) || !hasOwnKey(declared, segment)) return {
13822
+ if (!isPlainRecord$3(declared) || !hasOwnKey(declared, segment)) return {
13384
13823
  value: send,
13385
13824
  ok: true
13386
13825
  };
13387
- if (!isPlainRecord$2(send)) return {
13826
+ if (!isPlainRecord$3(send)) return {
13388
13827
  value: send,
13389
13828
  ok: false
13390
13829
  };
@@ -13415,7 +13854,7 @@ function withoutPaths(value, paths) {
13415
13854
  const inner = paths.filter((p) => p[0] === "*").map((p) => p.slice(1));
13416
13855
  return value.map((item) => withoutPaths(item, inner));
13417
13856
  }
13418
- if (!isPlainRecord$2(value)) return value;
13857
+ if (!isPlainRecord$3(value)) return value;
13419
13858
  const out = {};
13420
13859
  for (const [key, child] of Object.entries(value)) {
13421
13860
  const inner = paths.filter((p) => p[0] === key).map((p) => p.slice(1));
@@ -13425,8 +13864,8 @@ function withoutPaths(value, paths) {
13425
13864
  return out;
13426
13865
  }
13427
13866
  function covers(template, actual) {
13428
- if (isPlainRecord$2(template)) {
13429
- if (!isPlainRecord$2(actual)) return false;
13867
+ if (isPlainRecord$3(template)) {
13868
+ if (!isPlainRecord$3(actual)) return false;
13430
13869
  return Object.entries(template).every(([key, child]) => hasOwnKey(actual, key) && covers(child, actual[key]));
13431
13870
  }
13432
13871
  if (Array.isArray(template)) return Array.isArray(actual) && template.length === actual.length && template.every((child, index) => covers(child, actual[index]));
@@ -13559,7 +13998,7 @@ const INGRESS_IDENTITY_KEYS$1 = [
13559
13998
  "SourcePrefixListId"
13560
13999
  ];
13561
14000
  function comparableIngressIdentity(group, rule) {
13562
- if (!isPlainRecord$1(rule) || typeof group !== "string" || group === "" || isRedactedRecordedValue(group) || !INGRESS_IDENTITY_KEYS$1.every((key) => !isRedactedRecordedValue(rule[key])) || !Number.isFinite(cfnIngressPortValue(rule["FromPort"])) || !Number.isFinite(cfnIngressPortValue(rule["ToPort"]))) return;
14001
+ if (!isPlainRecord$2(rule) || typeof group !== "string" || group === "" || isRedactedRecordedValue(group) || !INGRESS_IDENTITY_KEYS$1.every((key) => !isRedactedRecordedValue(rule[key])) || !Number.isFinite(cfnIngressPortValue(rule["FromPort"])) || !Number.isFinite(cfnIngressPortValue(rule["ToPort"]))) return;
13563
14002
  return ingressRuleIdentity(group, rule);
13564
14003
  }
13565
14004
  function survivingRecordOfRuleId(records, selfLogicalId, ruleId) {
@@ -13576,7 +14015,7 @@ function stackIngressRuleHolder(records, selfLogicalId, groupId, rule, idCheck)
13576
14015
  if (lid === selfLogicalId) continue;
13577
14016
  const props = record.properties;
13578
14017
  if (record.resourceType === "AWS::EC2::SecurityGroupIngress") {
13579
- if (!isPlainRecord$1(props) || comparableIngressIdentity(props["GroupId"], props) !== wanted) continue;
14018
+ if (!isPlainRecord$2(props) || comparableIngressIdentity(props["GroupId"], props) !== wanted) continue;
13580
14019
  const ruleId = recordedSgRuleId(record.attributes);
13581
14020
  if (ruleId !== void 0 && idCheck !== void 0) {
13582
14021
  if ("live" in idCheck && ruleId !== idCheck.live) continue;
@@ -13585,13 +14024,29 @@ function stackIngressRuleHolder(records, selfLogicalId, groupId, rule, idCheck)
13585
14024
  return lid;
13586
14025
  }
13587
14026
  if (record.resourceType === "AWS::EC2::SecurityGroup" && record.physicalId === groupId) {
13588
- const inline = isPlainRecord$1(props) ? props["SecurityGroupIngress"] : void 0;
14027
+ const inline = isPlainRecord$2(props) ? props["SecurityGroupIngress"] : void 0;
13589
14028
  if (Array.isArray(inline) && inline.some((entry) => comparableIngressIdentity(groupId, entry) === wanted)) return lid;
13590
14029
  }
13591
14030
  }
13592
14031
  }
14032
+ function sharedIngressRuleDescriptions(records, groupId, rule, ruleId) {
14033
+ const wanted = comparableIngressIdentity(groupId, rule);
14034
+ const descriptions = [];
14035
+ for (const [, record] of records) {
14036
+ const props = record.properties;
14037
+ if (record.resourceType === "AWS::EC2::SecurityGroupIngress") {
14038
+ const sameId = recordedSgRuleId(record.attributes) === ruleId;
14039
+ const sameIdentity = wanted !== void 0 && isPlainRecord$2(props) && comparableIngressIdentity(props["GroupId"], props) === wanted;
14040
+ if (!sameId && !sameIdentity) continue;
14041
+ if (!sameId || !isPlainRecord$2(props) || props["GroupId"] !== groupId) return void 0;
14042
+ if (isRedactedRecordedValue(props["Description"])) return void 0;
14043
+ descriptions.push(props["Description"]);
14044
+ } else if (record.resourceType === "AWS::EC2::SecurityGroup" && stackIngressRuleHolder([["", record]], "self", groupId, rule) !== void 0) return;
14045
+ }
14046
+ return descriptions;
14047
+ }
13593
14048
  function tagListsMatch(live, declared) {
13594
- const pairs = (list) => list.every((entry) => isPlainRecord$1(entry) && typeof entry["Key"] === "string") ? list.map((entry) => {
14049
+ const pairs = (list) => list.every((entry) => isPlainRecord$2(entry) && typeof entry["Key"] === "string") ? list.map((entry) => {
13595
14050
  const tag = entry;
13596
14051
  return JSON.stringify([tag["Key"], tag["Value"] ?? ""]);
13597
14052
  }).sort() : void 0;
@@ -13599,7 +14054,7 @@ function tagListsMatch(live, declared) {
13599
14054
  const b = pairs(declared);
13600
14055
  return a !== void 0 && b !== void 0 && JSON.stringify(a) === JSON.stringify(b);
13601
14056
  }
13602
- function isPlainRecord$1(value) {
14057
+ function isPlainRecord$2(value) {
13603
14058
  return typeof value === "object" && value !== null && !Array.isArray(value);
13604
14059
  }
13605
14060
  function descriptionKey(value) {
@@ -13713,7 +14168,7 @@ function isDefaultEgressRule(rule) {
13713
14168
  }
13714
14169
 
13715
14170
  // src/provisioning/providers/ec2/sg-rule-by-id.ts
13716
- function isPlainRecord(value) {
14171
+ function isPlainRecord$1(value) {
13717
14172
  return typeof value === "object" && value !== null && !Array.isArray(value);
13718
14173
  }
13719
14174
  const LIST_KEY = {
@@ -13755,7 +14210,7 @@ async function siblingIdOwnedSgRules(provider, groupId, properties, context) {
13755
14210
  const byId = /* @__PURE__ */ new Map();
13756
14211
  for (const [lid, sibling] of records) {
13757
14212
  const props = sibling.properties;
13758
- if (!isPlainRecord(props) || props["GroupId"] !== groupId) continue;
14213
+ if (!isPlainRecord$1(props) || props["GroupId"] !== groupId) continue;
13759
14214
  if (!sgSiblingDecidedById(lid, sibling, records, properties)) continue;
13760
14215
  const id = recordedRuleIdOf(sibling);
13761
14216
  if (id !== void 0) byId.set(id, lid);
@@ -14234,12 +14689,12 @@ async function revertDriftedOutcome(args) {
14234
14689
  desiredProperties = noBoundary.desired;
14235
14690
  desiredProperties = siblingOwnedRevertDesired(outcome.resourceType, stateResource.physicalId, desiredProperties, outcome.awsProperties, stateResource.properties, siblingContext);
14236
14691
  if (provider.canonicalizeDriftPair) desiredProperties = (await provider.canonicalizeDriftPair(outcome.resourceType, desiredProperties, outcome.awsProperties, stateResource.properties ?? {})).baseline;
14237
- desiredProperties = stripDerivedEchoMembers(outcome.resourceType, desiredProperties);
14238
- const overlaid = buildRevertNewProperties(outcome.changes, desiredProperties, outcome.awsProperties, stateResource.observedProperties === void 0 ? {
14692
+ desiredProperties = stripDerivedEchoMembers(outcome.resourceType, desiredProperties, stateResource.properties ?? {});
14693
+ const overlaid = stripDerivedEchoMembers(outcome.resourceType, buildRevertNewProperties(outcome.changes, desiredProperties, outcome.awsProperties, stateResource.observedProperties === void 0 ? {
14239
14694
  preserveUntemplated: true,
14240
14695
  verbatimKeys: verbatimEchoDriftKeys(outcome.resourceType),
14241
14696
  absentMeansDefault: noBoundary.absent
14242
- } : { absentMeansDefault: [...driftAbsentMeansDefaultKeys(provider, outcome.resourceType, stateResource.properties), ...noBoundary.absent] });
14697
+ } : { absentMeansDefault: [...driftAbsentMeansDefaultKeys(provider, outcome.resourceType, stateResource.properties), ...noBoundary.absent] }), stateResource.properties ?? {}, { undeclaredOnlyRules: true });
14243
14698
  const certifiedOverlay = overlayLiveAtUncertifiedPaths(overlaid, [...outcome.uncertifiedPaths, ...outcome.noEchoParameterPaths ?? []], outcome.awsProperties, desiredProperties, secrets, new Set(outcome.changes.map((change) => change.path.split(".", 1)[0] ?? "")), spelledKeysOf(stateResource.properties ?? {}));
14244
14699
  const tokenPreserved = unresolvedTokens.size > 0 ? preserveLiveValuesAtUnresolvedTokens(certifiedOverlay, outcome.awsProperties, unresolvedTokens, secrets) : certifiedOverlay;
14245
14700
  const maskPreserved = preserveLiveValuesAtMaskedLeaves(tokenPreserved, outcome.awsProperties, secrets, certifiedOverlay, spelledKeysOf(stateResource.properties ?? {}));
@@ -15714,10 +16169,10 @@ async function deleteStackResource({ lock, state, ctx, stackName, logger, result
15714
16169
  warnAfterMs,
15715
16170
  timeoutMs,
15716
16171
  onWarn: (elapsedMs) => {
15717
- const minutes = Math.max(1, Math.round(elapsedMs / 6e4));
15718
- renderer.updateTaskLabel(logicalId, `${baseLabel} [taking longer than expected, ${minutes}m+]`);
16172
+ const elapsed = formatWarnElapsed(elapsedMs);
16173
+ renderer.updateTaskLabel(logicalId, `${baseLabel} [taking longer than expected, ${elapsed}+]`);
15719
16174
  renderer.printAbove(() => {
15720
- logger.warn(`${displaySafe(logicalId)} (${displaySafe(resource.resourceType)}) has been deleting for ${minutes}m — still waiting`);
16175
+ logger.warn(`${displaySafe(logicalId)} (${displaySafe(resource.resourceType)}) has been deleting for ${elapsed} — still waiting`);
15721
16176
  });
15722
16177
  },
15723
16178
  onTimeout: (elapsedMs) => new ResourceTimeoutError(logicalId, resource.resourceType, stackRegion, elapsedMs, "DELETE", timeoutMs)
@@ -19749,7 +20204,7 @@ async function buildImportPlan(state, template, cfnClient, parentStackName, opti
19749
20204
  });
19750
20205
  continue;
19751
20206
  }
19752
- const noEchoLeaves = noEchoLeavesOf(stateEntry);
20207
+ const noEchoLeaves = withoutEmbeddedAttributeLeaves(noEchoLeavesOf(stateEntry), stateEntry, raw, template, state);
19753
20208
  const masksOnlyAtNoEchoLeaves = noEchoLeaves !== void 0 && noEchoLeaves.length > 0 && holdsMaskLeaf(stateEntry.properties) && !holdsMaskLeaf(withoutCoordinates(stateEntry.properties, noEchoLeaves));
19754
20209
  if (masksOnlyAtNoEchoLeaves && IMPORT_UNSUPPORTED_RECREATABLE_TYPES.has(resourceType) && noEchoLeaves.some((coordinate) => typeof coordinate[0] === "string" && NOECHO_PRE_DELETE_KEYS.has(coordinate[0]))) {
19755
20210
  blocked.push({
@@ -20000,6 +20455,23 @@ function replaceAtCoordinate(node, coordinate, replacement) {
20000
20455
  }
20001
20456
  return node;
20002
20457
  }
20458
+ function withoutEmbeddedAttributeLeaves(leaves, record, raw, template, state) {
20459
+ if (leaves === void 0 || leaves.length === 0) return leaves;
20460
+ const properties = raw !== null && typeof raw === "object" ? raw["Properties"] : void 0;
20461
+ if (properties === null || typeof properties !== "object") return leaves;
20462
+ const embedded = noEchoCoordinatesOf(properties, record.properties, {
20463
+ parameters: noEchoParameterNamesOf(isPlainRecord(template["Parameters"]) ? { Parameters: template["Parameters"] } : void 0),
20464
+ attributeIsNoEcho: (id, attribute) => Object.hasOwn(state.resources, id) && noEchoAttributeNamesOf(state.resources[id])?.includes(attribute) === true
20465
+ }, void 0, {
20466
+ maskedAt: record.properties,
20467
+ only: true
20468
+ }).map((coordinate) => JSON.stringify(coordinate));
20469
+ if (embedded.length === 0) return leaves;
20470
+ return leaves.filter((coordinate) => !embedded.includes(JSON.stringify(coordinate)));
20471
+ }
20472
+ function isPlainRecord(value) {
20473
+ return value !== null && typeof value === "object" && !Array.isArray(value);
20474
+ }
20003
20475
 
20004
20476
  // src/cli/commands/export/ssm-parameter-preflight.ts
20005
20477
  const CDK_BOOTSTRAP_VERSION_PATH = /^\/cdk-bootstrap\/([A-Za-z0-9_-]+)\/version$/;
@@ -27637,10 +28109,8 @@ function positionImportedNoEcho(stackState, inputs, template, conditions, refusa
27637
28109
  for (const [id, leaves] of leavesOf) {
27638
28110
  if (!Object.hasOwn(resources, id)) continue;
27639
28111
  const resource = resources[id];
27640
- if (leaves.length > 0) {
27641
- resource.properties = maskAtCoordinates(resource.properties, leaves);
27642
- resource.noEchoLeaves = leaves.map((coordinate) => [...coordinate]);
27643
- }
28112
+ if (leaves.length > 0) resource.properties = maskAtCoordinates(resource.properties, leaves);
28113
+ resource.noEchoLeaves = leaves.map((coordinate) => [...coordinate]);
27644
28114
  const echoed = [...declared.get(id) ?? []].filter((name) => resource.attributes !== void 0 && Object.hasOwn(resource.attributes, name));
27645
28115
  if (echoed.length > 0 && resource.attributes !== void 0) {
27646
28116
  const attributes = { ...resource.attributes };
@@ -37870,5 +38340,5 @@ function collectVerbFlags(program) {
37870
38340
  return map;
37871
38341
  }
37872
38342
 
37873
- export { effectiveInventoryItem as $, withRecordedCidrSpelling as A, LIFECYCLE_DEFAULT_STATUS as B, securityGroupReadbackDelays as C, stackIngressRuleHolder as D, singleSecurityGroupRuleId as E, clearLifecycleWritesOf as F, canonicalizeItemList as G, LIFECYCLE_RULE_PATH as H, lifecycleSettleTarget as I, lifecycleUsesFilterForm as J, effectiveLifecycleConfiguration as K, recordLifecycleWrite as L, sgRemovalRuleKey as M, sgRuleListMember as N, survivingRecordOfRuleId as O, LIFECYCLE_BASELINE_REREAD_DELAYS_MS as P, effectiveIntelligentTieringItem as Q, settleLifecycleRead as R, reconcileSgRules as S, sgRuleKey as T, LIFECYCLE_TAG_FILTERS_PATH as U, LIFECYCLE_FILTER_PATH as V, canonicalizeBlock as W, EVENTBRIDGE_CONFIG_PATH as X, parseCfnTimestamp as Y, effectiveAnalyticsItem as Z, ingressRuleIdentity as _, refuseRevertRevokingSiblingRules as a, declaresBucketObjectLock as at, isResendableSocketFailure as b, buildProgram, siblingIdOwnedSgRules as c, isPlainObject as ct, authorizeDefinitelyNotApplied as d, shownLifecycleRuleId as dt, effectiveNotificationConfiguration as et, canonicalizeSgInlineRuleProtocols as f, flattenIpPermissions as g, descriptionKey as h, resolveSecretDerivedPrincipals as i, configItemId as it, markCopiesAgreed as j, tagListsMatch as k, SG_READBACK_RETRY_DELAY_MS as l, manualBucketDeletionClause as lt, comparableIngressIdentity as m, holdsUnprovenSecretPrincipalToken as n, caughtErrorName as nt, sgRuleDiffKey as o, declaresNestedObjectLock as ot, canonicalizeSgRuleProtocol as p, lifecycleRuleScope as q, isResolvableSecretPrincipalList as r, coerceCfnNumber as rt, readSgIngressById as s, describeValue as st, runDestroyForStack as t, eventBridgeEnabledOf as tt, SG_RULE_PAGE_SIZE$1 as u, mergeLegacySingular as ut, isConnectTimeout as v, securityGroupRuleMatchesCfnIngress as w, narrowIngressIpProtocol as x, isDefaultEgressRule as y, takeLifecycleWrite as z };
37874
- //# sourceMappingURL=program-BCit4cJS.js.map
38343
+ export { effectiveIntelligentTieringItem as $, tagListsMatch as A, takeLifecycleWrite as B, securityGroupReadbackDelays as C, singleSecurityGroupRuleId as D, sharedIngressRuleDescriptions as E, LIFECYCLE_BASELINE_REREAD_DELAYS_MS as F, canonicalizeBlock as G, LIFECYCLE_FILTER_PATH as H, clearLifecycleWritesOf as I, lifecycleRuleScope as J, canonicalizeItemList as K, lifecycleSettleTarget as L, markCopiesAgreed as M, sgRemovalRuleKey as N, stackIngressRuleHolder as O, sgRuleListMember as P, effectiveAnalyticsItem as Q, recordLifecycleWrite as R, reconcileSgRules as S, sgRuleKey as T, LIFECYCLE_RULE_PATH as U, LIFECYCLE_DEFAULT_STATUS as V, LIFECYCLE_TAG_FILTERS_PATH as W, parseCfnTimestamp as X, lifecycleUsesFilterForm as Y, EVENTBRIDGE_CONFIG_PATH as Z, ingressRuleIdentity as _, refuseRevertRevokingSiblingRules as a, configItemId as at, isResendableSocketFailure as b, buildProgram, siblingIdOwnedSgRules as c, describeValue as ct, authorizeDefinitelyNotApplied as d, mergeLegacySingular as dt, effectiveInventoryItem as et, canonicalizeSgInlineRuleProtocols as f, shownLifecycleRuleId as ft, flattenIpPermissions as g, descriptionKey as h, resolveSecretDerivedPrincipals as i, coerceCfnNumber as it, withRecordedCidrSpelling as j, survivingRecordOfRuleId as k, SG_READBACK_RETRY_DELAY_MS as l, isPlainObject as lt, comparableIngressIdentity as m, holdsUnprovenSecretPrincipalToken as n, eventBridgeEnabledOf as nt, sgRuleDiffKey as o, declaresBucketObjectLock as ot, canonicalizeSgRuleProtocol as p, effectiveLifecycleConfiguration as q, isResolvableSecretPrincipalList as r, caughtErrorName as rt, readSgIngressById as s, declaresNestedObjectLock as st, runDestroyForStack as t, effectiveNotificationConfiguration as tt, SG_RULE_PAGE_SIZE$1 as u, manualBucketDeletionClause as ut, isConnectTimeout as v, securityGroupRuleMatchesCfnIngress as w, narrowIngressIpProtocol as x, isDefaultEgressRule as y, settleLifecycleRead as z };
38344
+ //# sourceMappingURL=program-DnMYJ4--.js.map