@cdkd/cli 0.373.1 → 0.373.3

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 (74) hide show
  1. package/dist/{ambient-client-defaults-BLKND30a.js → ambient-client-defaults-ChOenyD2.js} +18 -4
  2. package/dist/ambient-client-defaults-ChOenyD2.js.map +1 -0
  3. package/dist/{asg-provider-DXL1CE4m.js → asg-provider-Bfinx42n.js} +8 -8
  4. package/dist/{asg-provider-DXL1CE4m.js.map → asg-provider-Bfinx42n.js.map} +1 -1
  5. package/dist/cli.js +3 -3
  6. package/dist/{replacement-rules-BkUZIP44.js → created-resource-sink-D7iM5jwM.js} +1394 -1474
  7. package/dist/created-resource-sink-D7iM5jwM.js.map +1 -0
  8. package/dist/{custom-resource-runtime-DK4-5kRC.js → custom-resource-runtime-9fjsDVrs.js} +6 -6
  9. package/dist/{custom-resource-runtime-DK4-5kRC.js.map → custom-resource-runtime-9fjsDVrs.js.map} +1 -1
  10. package/dist/{db-associated-roles-zv71gI1O.js → db-associated-roles-Bn8HCQ2r.js} +2 -2
  11. package/dist/{db-associated-roles-zv71gI1O.js.map → db-associated-roles-Bn8HCQ2r.js.map} +1 -1
  12. package/dist/{delete-started-E38sSyUX.js → delete-started-CiTP5c3_.js} +4 -4
  13. package/dist/{delete-started-E38sSyUX.js.map → delete-started-CiTP5c3_.js.map} +1 -1
  14. package/dist/{deploy-engine-BDueF79_.js → deploy-engine-D7Iv9v8e.js} +3573 -2888
  15. package/dist/deploy-engine-D7Iv9v8e.js.map +1 -0
  16. package/dist/{ec2-termination-protection-DI-aPxET.js → ec2-termination-protection-BXy91mrW.js} +3 -3
  17. package/dist/{ec2-termination-protection-DI-aPxET.js.map → ec2-termination-protection-BXy91mrW.js.map} +1 -1
  18. package/dist/{ecr-uri-kW_K5U02.js → ecr-uri-DUDwEekn.js} +2 -2
  19. package/dist/{ecr-uri-kW_K5U02.js.map → ecr-uri-DUDwEekn.js.map} +1 -1
  20. package/dist/{emr-cluster-provider-BcqnxYsN.js → emr-cluster-provider-MokUAEGh.js} +11 -11
  21. package/dist/emr-cluster-provider-MokUAEGh.js.map +1 -0
  22. package/dist/{expected-bucket-owner-j5BCLzAB.js → expected-bucket-owner-BrzB1C4p.js} +2 -2
  23. package/dist/{expected-bucket-owner-j5BCLzAB.js.map → expected-bucket-owner-BrzB1C4p.js.map} +1 -1
  24. package/dist/{iam-role-provider-BlUbRjQo.js → iam-role-provider-CB--BYVm.js} +12 -12
  25. package/dist/{iam-role-provider-BlUbRjQo.js.map → iam-role-provider-CB--BYVm.js.map} +1 -1
  26. package/dist/{identity-read-denied-BhnkMyxk.js → identity-read-denied-CoeMBkCz.js} +5 -6
  27. package/dist/identity-read-denied-CoeMBkCz.js.map +1 -0
  28. package/dist/{image-plan-CUvO0Qe2.js → image-plan-RNp8hqc4.js} +8 -8
  29. package/dist/{image-plan-CUvO0Qe2.js.map → image-plan-RNp8hqc4.js.map} +1 -1
  30. package/dist/index.d.ts +13 -1
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +5 -5
  33. package/dist/{logger-B673mhBe.js → logger-Bfz63gW5.js} +2 -2
  34. package/dist/{logger-B673mhBe.js.map → logger-Bfz63gW5.js.map} +1 -1
  35. package/dist/{neptune-provider-BOIjF_i3.js → neptune-provider-BFwovty1.js} +9 -9
  36. package/dist/{neptune-provider-BOIjF_i3.js.map → neptune-provider-BFwovty1.js.map} +1 -1
  37. package/dist/{program-avOxa_7W.js → program-DR3X8-7x.js} +563 -233
  38. package/dist/program-DR3X8-7x.js.map +1 -0
  39. package/dist/{provider-classes-BMrkl7zN.js → provider-classes-BNZGFwNO.js} +375 -129
  40. package/dist/provider-classes-BNZGFwNO.js.map +1 -0
  41. package/dist/{rds-provider-DD8ka8NG.js → rds-provider-evebINWq.js} +13 -13
  42. package/dist/{rds-provider-DD8ka8NG.js.map → rds-provider-evebINWq.js.map} +1 -1
  43. package/dist/{read-replica-Ddvkib9A.js → read-replica-BGoRAh10.js} +3 -3
  44. package/dist/{read-replica-Ddvkib9A.js.map → read-replica-BGoRAh10.js.map} +1 -1
  45. package/dist/{redacted-delete-address-CkcTwr-O.js → redacted-delete-address-rTL8ikg4.js} +5 -5
  46. package/dist/redacted-delete-address-rTL8ikg4.js.map +1 -0
  47. package/dist/replacement-rules-roVU6gYR.js +1967 -0
  48. package/dist/replacement-rules-roVU6gYR.js.map +1 -0
  49. package/dist/{resource-deadline-B2z0yyKo.js → resource-deadline-B4Rp-3f7.js} +2 -2
  50. package/dist/{resource-deadline-B2z0yyKo.js.map → resource-deadline-B4Rp-3f7.js.map} +1 -1
  51. package/dist/{restore-source-guard-1UD7ucv5.js → restore-source-guard-Dz_vQPiM.js} +5 -5
  52. package/dist/restore-source-guard-Dz_vQPiM.js.map +1 -0
  53. package/dist/{run-cli-Dm2l-FUd.js → run-cli-vKsR6JeT.js} +2 -2
  54. package/dist/{run-cli-Dm2l-FUd.js.map → run-cli-vKsR6JeT.js.map} +1 -1
  55. package/dist/{secret-reference-immutable-Bk60ZfqH.js → secret-reference-immutable-BF02Wobz.js} +108 -10
  56. package/dist/{secret-reference-immutable-Bk60ZfqH.js.map → secret-reference-immutable-BF02Wobz.js.map} +1 -1
  57. package/dist/{settle-own-write-members-YQxWAEvB.js → settle-own-write-members-CF-RPYMD.js} +10 -10
  58. package/dist/{settle-own-write-members-YQxWAEvB.js.map → settle-own-write-members-CF-RPYMD.js.map} +1 -1
  59. package/dist/{tag-list-C8pMq_W3.js → tag-list-DbmXev9Z.js} +4 -4
  60. package/dist/{tag-list-C8pMq_W3.js.map → tag-list-DbmXev9Z.js.map} +1 -1
  61. package/dist/{version-D2qdiEuf.js → version-CP9RYTCy.js} +2 -2
  62. package/dist/{version-D2qdiEuf.js.map → version-CP9RYTCy.js.map} +1 -1
  63. package/package.json +1 -1
  64. package/dist/ambient-client-defaults-BLKND30a.js.map +0 -1
  65. package/dist/created-resource-sink-DlVo2nqB.js +0 -1397
  66. package/dist/created-resource-sink-DlVo2nqB.js.map +0 -1
  67. package/dist/deploy-engine-BDueF79_.js.map +0 -1
  68. package/dist/emr-cluster-provider-BcqnxYsN.js.map +0 -1
  69. package/dist/identity-read-denied-BhnkMyxk.js.map +0 -1
  70. package/dist/program-avOxa_7W.js.map +0 -1
  71. package/dist/provider-classes-BMrkl7zN.js.map +0 -1
  72. package/dist/redacted-delete-address-CkcTwr-O.js.map +0 -1
  73. package/dist/replacement-rules-BkUZIP44.js.map +0 -1
  74. package/dist/restore-source-guard-1UD7ucv5.js.map +0 -1
@@ -1,23 +1,23 @@
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-D2qdiEuf.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-CUvO0Qe2.js";
3
- import { $t as buildLockContentionMessage, At as resourceTypeShown, C as VALUE_NOT_SHOWN, It as maskDeep, M as remedyLogicalId, Ot as logicalIdShown, P as isMarkedNotGone, Q as runDeleteAttempt, Qt as buildForceUnlockCommand, St as isInterruptedWaitError, Zt as UNREPRODUCIBLE_LOCK_CLAUSE, at as isAwsCliLiteral, b as assertRegionMatch, bt as endCommandInterruptScope, cn as WAIT_CONDITION_SIGNAL_PREFIX, ct as renderDisableCommand, dn as withPasteableAwsProfile, en as forceQuitRecoveryClause, fn as injectiveKey, gt as readRecordedPrincipals, hn as producerRecordKey, ln as setPasteableAwsCaBundle, lt as IAM_PRINCIPAL_NAME, mn as producerCoordinateKey, nn as formatLockOperation, on as CUSTOM_RESOURCE_RESPONSE_PREFIX, rn as formatLockOwner, sn as DEFAULT_STATE_PREFIX, tn as formatLockExpiry, un as setPasteableAwsProfile, ut as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, v as DriftReadRefusedError, xt as interruptWatchListenerCount, y as RESOURCE_NOT_FOUND, yt as beginCommandInterruptScope } from "./created-resource-sink-DlVo2nqB.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-CP9RYTCy.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-RNp8hqc4.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-D7iM5jwM.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-B673mhBe.js";
6
- import { A as stripControlChars, B as retryClassificationText, F as isAmbiguousOutcomeError, H as isMarkedNonRetryable, J as DynamicReferenceRegionAmbiguousError, Q as AccountIdUnavailableError, R as isRetryableTransientError, U as isThrottlingError, V as THROTTLING_ERROR_NAMES, W as markNonRetryable, X as MalformedProducerRecordRefusalError, Y as IntrinsicResolutionRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, at as ProvisioningError, ct as SynthesisError, et as CdkdError, g as PartialFailureError, h as NestedStackChildDirectDestroyError, i as credentialFingerprint, j as stripForDisplay, k as escapeRegExp, l as withErrorHandling, n as ambientCredentialConfig, o as formatError, ot as ResourceTimeoutError, q as CrossAccountSecretRefusalError, r as clientDefaultsFor, rt as LocalInvokeBuildError$1, s as handleError, st as StateError, t as ambientClientDefaults, tt as DeployCancelledError, u as LocalStartServiceError, v as StackHasActiveImportsError, y as StackTerminationProtectionError, z as isTransientServerError } from "./ambient-client-defaults-BLKND30a.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-Bfz63gW5.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-ChOenyD2.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-YQxWAEvB.js";
9
- import { $a as orphanRecordsPrintingBag, $d as loadPublishableAssetManifest, $i as computeParameterTaint, $l as malformedLocalResourceEntriesWarning, $r as sgSiblingDecidedById, $s as regionLessSecretName, $u as findActionableSdkUnwired, A as planReplaceResourceTargets, Ac as deleteRetiredCloudFormationStack, Ad as findNestedTemplateTreeDefect, Af as describeFileReadFailure, Ai as isReplacementOrphan, Al as getSettledWriteOnlyPropertyPaths, An as refactorMarkerMovesOf, Ar as withMovedTo, As as isSelectOutOfBounds, Au as malformedOutputsWarning, B as isProtectionValueActive, Bc as confirmOrRefuse, Bd as findLargeInlineResources, Bi as segmentCleanupOptions, Bl as deployRefusesOrphanRowsReason, Bn as childStackTags, Bo as reReadUntilSettled, Br as proposeRenames, Bs as assertFlagRoleArn, Bu as refuseMalformedResourcesForDeploy, C as warnLegacySpelling, Ca as isSupersededResourceRecord, Cc as mixedSecretRowKeys, Cd as isNotImplemented, Cf as defineOwnKey, Cr as formatChangeCounts, Cs as deleteSkipReason, Cu as refuseMalformedOrphans, D as slashedSsmNameHealPendingNote, Da as supersededHolderOf, Dc as securityDiffWithPassedSecretWithheld, Dd as isSensitiveAttributeName, Df as ownValue, Di as seedsDeleteFirstGuard, Dl as secretPhysicalIdSegment, Dn as recordRetainedForReadoption, Do as revertStackRecordsView, Dr as hintSidesOf, Du as malformedExportSourceWarning, E as slashedSsmNameHealNote, Ea as supersededHeldByOtherTypeWarning, Ec as recordedValuesOf, Ed as isSecretValuedAttribute, Ef as nullPrototypeRecord, Ei as planRollback, En as keptForRetainedRecord, Er as findRefactorHints, Es as isWaitAbandonedError, Eu as malformedExportNamesWarning, F as serviceTokenBlockingReason, Fc as parseCfnTemplate, Fi as IMPLICIT_DELETE_DEPENDENCIES, Fl as parameterInputsFor, Fn as deleteSignalReceiver, Fo as declaredPolicyDocument, Fr as isPairableType, Ft as declaredTagsReadback, Fu as STATE_REGION_DIVERGED, Ga as noEchoParameterNamesOf, Gc as cyan, Gi as nameGenerationHighWaterOf, Gl as previewableOrphanRecords, Gn as formatResourceLine, Gr as noEchoMacParametersOf, Gs as sendableAssumeRoleCommand, Gu as JSON_LISTING_HOLE_VALUE, H as readProtection, Ha as canonicalizeIpProtocolValue, Hc as serializePrompt, Hd as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Hi as removeProtectionTypes, Hl as malformedOrphanRecordsRefusalMessage, Hn as macWriteOnlyKeys, Hr as NOECHO_MAC_KEY_ALIAS, Hs as explicitRoleArnOrThrow, Hu as refuseMalformedResourcesForExport, I as diffSecurity, Ia as cfnIngressPortValue, Ic as parseCfnTemplateWithFormat, If as resolveBucketRegion, Ii as computeImplicitDeleteEdges, Il as maskedInputProof, In as isReceiver, Io as efsPolicyMatchesDeclared, Ir as looselyEqual, Is as resolveDynamicReferences, Iu as refuseDivergentRecordRegionForDestroy, Ja as createReadOnlyAttributeHealerFactory, Jc as red, Jd as createAssetRedirectResolver, Ji as retiredNameGenerationsAfter, Jl as refuseMalformedOrphansForOrphan, Jn as resolvePendingCloudControlRequests, Jo as ccBrokenReason, Jr as siblingOwnedRevertDesired, Js as callerEnvCredentials, Ju as STATE_RESOURCES_MALFORMED, Ka as withAttemptedItemsMasked, Kc as gray, Ki as nameScopeOf, Kl as refuseMalformedOrphanRecords, Kn as startForceQuitFlushes, Ko as CC_BROKEN_REASON, Kr as noEchoMacVerdict, Ks as AWS_CREDENTIAL_ENV_KEYS, Ku as accountArgs, L as recordedProtectionEvidence, La as recordedSgRuleId, Lc as stringifyCfnTemplate, Ld as ssmResolvedValueType, Li as typesDeletedBefore, Ln as removeSignalReceiverNamed, Lo as lambdaPermissionMatchesDeclared, Lr as mappingPairs, Ls as producerLookupOver, Lu as malformedRenderedContainersWarning, M as renderUnreplacedTarget, Ma as resolveReplacementOldType, Mc as findReplacedCfnResources, Md as listNestedTemplateRows, Mi as recheckFailedPlan, Ml as tryGetTopLevelWriteOnlyProperties, Mn as refuseRefactorMarker, Mr as changedReferencePath, Ms as poisonRenderedSpellingsCollidingIn, Mu as refuseMalformedOutputs, N as deferredServiceTokenWarning, Na as withPreviousPolicies, Nc as getCloudFormationResourceTree, Nd as renderNestedTemplateTreeDefect, Nf as renderAssemblyPathEscape, Ni as recordUnderIdIsNotOwn, Nl as publicReferencesOf, Nn as sameMove, Nr as changedReferenceReason, Ns as stackIdTailOf, Nu as refuseMalformedOutputsForDestroy, O as scanActiveConsumers, Oa as supersededResourcesOf, Oc as taintedNamesOf, Oi as demoteSupersededOrphans, Ol as secretSegmentsOfState, On as readRefactorMarker, Or as movedToHint, Os as DiffCalculator, Ou as malformedLocalOutputsWarning, P as findServiceTokenRefusals, Pa as findNestedStackTypeChanges, Pc as tryGetCloudFormationResourceMap, Pd as templateIdentity, Pf as resolveAssemblyPath, Pi as replacementNeverSwapped, Pl as maskedPropertyFingerprintsOf, Pn as updateRefactorMarker, Po as declaredMemberDocument, Pr as differingRemedy, Pu as repairMalformedOutputsForReadOnly, Qa as namingSecretsWithRecordedNoEcho, Qc as keepHeldTokenProvenance, Qi as inheritProducerRegions, Ql as isReadableResourceEntry, Qn as dropSettledNestedJournals, Qo as classifyHandleUrl, Qr as sgRuleOwnershipIdentity, Qs as producerRegionsFromState, Qu as hasReadableResources, R as recordedProtectionNote, Ra as sgCidrKey, Rc as SUPERSEDED_COPY_HINT, Rd as CFN_TEMPLATE_BODY_LIMIT, Ri as attemptUsesCompletedCreate, Rl as declaresNoEcho, Rn as settleStackTagChildRuns, Ro as memberReadFailure, Rr as parseMappingFile, Rs as refuseUnreadableCdkCrossAccountRefs, Ru as malformedResourcesWarning, S as refusePendingMovesOut, Sa as holdsSupersededResources, Sc as maskPassedSecretReasons, Sd as isAccessDenied, Si as ledgerForStack, Sr as findDestructiveChanges, Ss as deleteLeftInPlace, Su as malformedOrphansWarning, T as slashedSsmNameHealAdoptedNote, Ta as supersededDependentsFirst, Tc as readsTainted, Td as withStackInstanceIdWithheld, Tf as hasPlainPrototype, Tl as displayPhysicalId, Tn as NestedCleanupQueue, To as destroyStackRecordsView, Tr as orphanedLogicalIds, Ts as getReadOnlyPropertyPaths, Tu as repairMalformedOrphansForReadOnly, Ua as noEchoAttributeNamesOf, Uc as NESTED_STACK_RESOURCE_TYPE$1, Ui as orphanNeedsIdentity, Ul as malformedOrphanRecordsWarning, Un as readsOnlyNoEchoParameters, Uo as verbatimEchoDriftKeys, Ur as createNoEchoValueMacs, Us as isIamRoleArn, Uu as refuseMalformedState, V as perType, Va as canonicalizeIpv4Cidr, Vc as promptYesNo, Vd as uploadCfnTemplate, Vi as removeProtectionTypeList, Vl as isReadableOrphanRecord, Vn as literalRowTags, Vr as referencedLogicalIds, Vs as assertSendableRoleArn, Vu as refuseMalformedResourcesForDestroy, Wa as noEchoComparisonForTemplate, Wc as bold, Wd as decodeListingKey, Wi as nameGenerationCarriedFrom, Wl as malformedOrphanRowsKeptWarning, Wr as noEchoMacBinding, Ws as parseIamRoleArn, Wu as repairMalformedResourcesForReadOnly, Xa as journaledOrphanPrintingBag, Xi as withNameGenerationReached, Xl as unpreviewableOrphanRecords, Xn as displacedOpClause, Xo as wouldReturnToSdkProvider, Xr as undeclaredGrantSiblingMembers, Xs as classifyRecordedSecretRegion, Xu as displayLogicalId, Y as readStreamPolicy, Ya as completedReplayEntries, Yc as yellow, Yd as createLazyAssetModeContext, Yi as retiredNameGenerationsLeaving, Yl as repairMalformedOrphanRecordsForReadOnly, Yn as NESTED_PENDING_PARENT_REASON, Yo as isCustomResource, Yr as stripSiblingOwnedParentMembers, Ys as envCredentialsAreAssumedRole, Yu as UNREADABLE_RESOURCES_MAP_ROW, Za as maskEventTextWithBoundBags, Zc as withPrintingSecrets, Zl as unreadableOrphanRecords, Zn as displacedPhysicalIdShown, Zo as WaitConditionSignalStore, Zr as recordedRuleIdOf, Zs as classifyReplaySecretRegion, Zu as hasReadableOutputs, _ as readRecordedConditionVerdicts, _a as bindingSkippedOutputs, _d as rebuildClientForBucketRegion, _f as readBootstrapMarkerBody, _i as updatePartialMessage, _l as MULTI_REGION_RECREATE_BLOCKED_TYPES, _o as buildFinalSnapshotIdentifier, _r as planOrphanAdoption, _s as CloudControlProvider, _u as refuseMalformedResourcePropertiesForOrphan, a as mergeNoChangeOutputs, aa as exportAliasCollisionScrubWarning, ad as hasNoCloudControlHandlers, ai as DELETED_RESOURCE_REMEDY, al as carriesFetchableDynamicReference, ao as stateSecretNameNeedles, ar as collectNestedChildUnaddressed, as as TemplateNoEchoReresolver, au as refuseMalformedResourceEntriesForDeploy, b as pendingMovesOutOf, ba as maskingRetryLogger, bc as maskPassedSecretChanges, bd as applyCrossPrefixScan, bf as BOOTSTRAP_MARKER_PREFIX, bi as replacementCreateRoutesToCloudControl, bl as renderStatefulReason, br as crossStackReadsForPartialSave, bs as UNSPECIFIED_SKIP_REASON, bu as hasReadableOrphans, c as nestedSsmNameRowNote, ca as secretSafeKeyDisplay, cc as coerceParameterTypedValue, ci as earlyDeletedOld, cl as keepsSecretReferenceToken, co as ATOMIC_FINAL_SNAPSHOT_TYPES, cr as deleteJournaledOrphans, cs as NO_LOCAL_CUSTOM_RESOURCES_FLAG, cu as refuseMalformedResourceEntriesForImportSave, d as makeCanonicalizePropertiesFn, da as exportNameSecretExposure, dc as AWS_NO_VALUE, dd as TemplateParser, df as ensureAssetStorage, di as settleUnsettledPrevious, dl as LEGACY_HANDLE_HEAL_REASON, do as ccRoutedInstanceTakesNoSnapshot, dr as isHandledOrphan, ds as customResourcesRunWithoutApp, du as unreadableResourceEntries, ea as namesAnyDeclaredParameter, ec as withoutLapsedStaleShapeStamp, ed as findHandledUnwrittenCreateOnly, el as recordedOutputReferenceRegions, eo as secretNamePrintingBag, er as nestedChildStackName$1, es as isSignalKey, et as streamPolicyMatchesDeclared, eu as malformedLocalResourcesWarning, f as readDbInstanceAvailabilityZone, fa as isWholeDynamicReferenceValue, fc as cfnRefValueFromPhysicalId, fd as S3StateBackend, ff as buildDenyExternalAccessPolicy, fi as withUnprovenUnsettled, fo as effectiveDeletionPolicy, fr as journaledOrphanLines, fs as localCustomResourceCommand, fu as malformedDriftResourcePropertiesWarning, g as parentSuppliedValues, ga as isExportAliasCollision, gc as lacksRecordedTableArn, gd as hasUnverifiableParameterRefusal, gf as parseBootstrapMarker, gi as undeclaredEmptyObservedKeys, gl as shownType, go as createPreDeleteFinalSnapshot, gr as makeSiblingClaimReader, gu as refuseMalformedResourcePropertiesForExport, h as conditionInputsFrom, ha as collectPublishedOutputNames, hc as lacksRecordedRefArn, hd as hasReasonlessBaselineRefusal, hf as getBootstrapMarkerKey, hi as equalModuloMask, hl as refuseStatefulReplacedReaders, ho as unsupportedFinalSnapshotError, hr as makeForeignHolderScan, hs as withCustomResourceStack, hu as refuseMalformedResourcePropertiesForDrift, i as keptWholeReasonText, ia as displayTextOrWithheld, id as NO_CC_HANDLERS_REASON, if as getDockerImageBySourceHash, ii as replayRollback, il as isImpossibleEmptyStoredAttribute, io as stackSecretNamesMasker, ir as withNestedRevertRun, iu as refuseMalformedResourceEntries, j as refuseStatefulReplaceResourceTargets, ja as snapshotSegmentSurvivors, jc as prepareCloudFormationStackRetirement, jd as isAbsoluteAssetPath, jf as displayAssemblyPath, ji as planFailedOps, jl as getTopLevelKeysHoldingUnreadableCreateOnly, jn as refactorMarkerRefusalMessage, jo as LAMBDA_PERMISSION_STATEMENT_KEYS, jr as changedReferenceInDiff, js as isAlwaysLiveAttribute, k as inRunStackKey, ka as withoutSuperseded, kc as templateMixesDynamicReference, ki as isJournaledOrphan, kl as withSecretPhysicalIdsMaskedInState, kn as readRefactorMarkerOnce, ko as withStackRecords, kr as rollbackOrphanIds, ks as IntrinsicFunctionResolver, ku as malformedOutputsRefusalMessage, l as crossStackOutputProvenanceSource, la as carriedExportAliasExposure, lc as isUnboundTemplateParameter, li as buildReadCurrentStateContext, ll as withSharedDrainBudget, lo as PRE_DELETE_SNAPSHOT_TYPES, lr as dropFailedCommands, lu as refuseMalformedResourceEntriesForOrphan, m as conditionFingerprint, ma as collectDeclaredOutputNames, mc as refStateLookupFromResource, md as readOnlyStateVersionOf, mf as isCrossRegionRedirect, mi as equalModuloMarkedMask, ml as findReplacedReadersOfRecreateTargets, mo as refusesFinalSnapshot, mr as sameJournaledOrphans, ms as setLocalCustomResourceRuntimeEnabled, mu as refuseMalformedResourcePropertiesForDestroy, n as applyStackTagsToTemplate, na as resourcesNamingDeclaredParameter, nd as unwrittenCreateOnlyReplacement, nf as rewriteTemplateAssetReferences, nl as withoutVersionAttestation, ns as applyCustomResourceResponseExpiration, nu as malformedScrubResourceEntriesRefusalMessage, o as checkNestedSsmNames, oa as secretBearing, od as PROPERTY_COVERAGE_BY_TYPE, oi as PLANNED_EARLY_DELETE_CONSEQUENCE, ol as isNamelessDynamicReferenceError, oo as storedSecretNameNeedles, or as getCurrentNestedStackContext, os as readsNoEchoDeleteValues, ou as refuseMalformedResourceEntriesForDestroy, p as healZonelessDbInstanceRecords, pa as noEchoParameterValueSeed, pc as isStalePlaceholderArnAttribute, pd as splitImportedOps, pf as assertAssetBucketRegion, pi as calculateResourceDrift, po as isFinalSnapshotError, pr as loadJournaledOrphans, pu as malformedResourcePropertiesWarning, qa as noEchoExactEchoLeavesOf, qc as green, qd as buildAssetRedirectMap, qi as retiredAfterRollback, ql as refuseMalformedOrphanRecordsForDestroy, qn as pendingRequestCount, qo as ProviderRegistry, qr as noEchoValueMacsOf, qs as applyCallerIdentityCredentials, qu as withheldAccountClause, r as isSecretBearingReferenceString, ra as WITHHELD_NAME_DISPLAY, rf as AssetManifestLoader, ri as replayFailedOperations, rl as getAccountInfo, ro as secretNamedRecordNeedles, rr as revertedNestedRowIds, rs as customResourceResponseExpirationWarning, ru as refuseMalformedResourceAttributesForOrphan, s as nestedSsmNameDeferredNote, sa as secretBearingStateKeyWarning, sd as providerReplacementOldDeleted, si as earlyDeleteWhen, sl as carriesDynamicReference, so as extractDeploymentEventError, sr as withNestedStackContext, ss as isCustomResourceType$1, su as refuseMalformedResourceEntriesForImport, t as DeployEngine, ta as reachableDivergentParameters, tc as isUnexposedRecordedIdentity, ti as siblingRecordedSgRuleIds, tl as recordedReferenceRegions, to as secretNamePrintingBags, tr as recordDisplacedSkips, ts as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, tu as malformedResourceEntriesWarning, u as inheritedProvenanceForChildDiff, ua as exportNameNoEchoParameters, uc as parameterTypeMayLoseSecretIdentity, uf as AssetModeResolver, ui as recordAfterRollbackUpdate, ul as INTRINSIC_KEYS, uo as ccRoutedFinalSnapshotError, ur as dropFailedHint, us as customResourcesFailedWithoutApp, uu as repairMalformedResourceEntriesForReadOnly, v as childTemplateLoader, va as DEFAULT_RESOURCE_TIMEOUT_MS, vc as calculatorMaskingPassedSecretLines, vd as CrossPrefixReadError, vf as validateAssetBucketName, vi as updatePartialReason, vl as isStatefulRecreateTargetForReplace, vr as DeploymentEventsReader, vu as repairMalformedResourcePropertiesForReadOnly, w as healSlashedSsmParameterNames, wa as supersededAfterRollback, wc as mixedSecretTagKeys, wd as stackInstanceIdOf, wf as hasOwnKey, wi as withCreateTokenLedger, wr as formatDestructiveChange, wu as refuseMalformedOrphansForDestroy, x as pendingMovesRefusalMessage, xa as deleteSupersededEntry, xc as maskPassedSecretOutputs, xd as crossPrefixDeniedWarning, xr as constructPathOf$1, xs as deleteIndeterminateGuards, xu as malformedOrphansRefusalMessage, y as hasPendingMovesOut, ya as DEFAULT_RESOURCE_WARN_AFTER_MS, yc as crossStackTaintSeeds, yd as CrossPrefixScanCache, yf as validateContainerRepoName, yi as findUpdatePolicyReplacementRefusals, yl as isStatefulRecreateTargetSync, yr as DeploymentEventsStore, ys as RollbackInlinePolicyWriters, yu as UNREADABLE_ORPHANS_CONTAINER_ROW, z as PROTECTION_PROPERTY_BY_TYPE, za as sgProtocolKey, zc as cfnFailureText, zd as CFN_TEMPLATE_URL_LIMIT, zi as readsRegeneratingSecret, zl as maskedPropertyFingerprint, zo as policyDocumentMatchesDeclared, zr as propertiesChangedReason, zs as applyRoleArnIfSet, zt as tagsMatchDeclared, zu as malformedStateRefusalMessage } from "./deploy-engine-BDueF79_.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-CF-RPYMD.js";
9
+ import { $a as orphanRecordsPrintingBag, $c as withPrintingSecrets, $i as computeParameterTaint, $l as unreadableOrphanRecords, $n as displacedPhysicalIdShown, $r as sgSiblingDecidedById, $s as regionLessSecretName, $u as hasReadableOutputs, A as renderUnreplacedTarget, Ac as taintedNamesOf, Ai as isReplacementOrphan, Al as secretSegmentsOfState, An as refuseRefactorMarker, Ar as withMovedTo, As as isSelectOutOfBounds, Au as malformedLocalOutputsWarning, B as readProtection, Bc as SUPERSEDED_COPY_HINT, Bd as CFN_TEMPLATE_BODY_LIMIT, Bi as segmentCleanupOptions, Bl as declaresNoEcho, Bn as childStackTags, Bo as reReadUntilSettled, Br as proposeRenames, Bs as assertFlagRoleArn, Bu as malformedResourcesWarning, C as healSlashedSsmParameterNames, Ca as isSupersededResourceRecord, Cc as maskPassedSecretReasons, Cd as crossPrefixDeniedWarning, Cn as NestedCleanupQueue, Cr as formatChangeCounts, Cs as deleteSkipReason, Cu as malformedOrphansRefusalMessage, D as scanActiveConsumers, Da as supersededHolderOf, Dc as readsTainted, Dd as withStackInstanceIdWithheld, Df as hasPlainPrototype, Di as seedsDeleteFirstGuard, Dl as displayPhysicalId, Dn as readRefactorMarkerOnce, Do as revertStackRecordsView, Dr as hintSidesOf, Du as repairMalformedOrphansForReadOnly, E as slashedSsmNameHealPendingNote, Ea as supersededHeldByOtherTypeWarning, Ec as mixesDynamicReference, Ed as stackInstanceIdOf, Ef as hasOwnKey, Ei as planRollback, En as readRefactorMarker, Er as findRefactorHints, Es as isWaitAbandonedError, Eu as refuseMalformedOrphansForDestroy, F as recordedProtectionEvidence, Fc as getCloudFormationResourceTree, Fd as renderNestedTemplateTreeDefect, Ff as renderAssemblyPathEscape, Fi as IMPLICIT_DELETE_DEPENDENCIES, Fl as publicReferencesOf, Fn as removeSignalReceiverNamed, Fo as declaredPolicyDocument, Fr as isPairableType, Fu as refuseMalformedOutputsForDestroy, Ga as noEchoParameterNamesOf, Gc as NESTED_STACK_RESOURCE_TYPE$1, Gi as nameGenerationHighWaterOf, Gl as malformedOrphanRecordsWarning, Gn as formatResourceLine, Gr as noEchoMacParametersOf, Gs as sendableAssumeRoleCommand, Gu as refuseMalformedState, Ha as canonicalizeIpProtocolValue, Hc as confirmOrRefuse, Hd as findLargeInlineResources, Hi as removeProtectionTypes, Hl as deployRefusesOrphanRowsReason, Hn as macWriteOnlyKeys, Hr as NOECHO_MAC_KEY_ALIAS, Hs as explicitRoleArnOrThrow, Hu as refuseMalformedResourcesForDeploy, I as recordedProtectionNote, Ia as cfnIngressPortValue, Ic as tryGetCloudFormationResourceMap, Id as templateIdentity, If as resolveAssemblyPath, Ii as computeImplicitDeleteEdges, Il as maskedPropertyFingerprintsOf, In as childTemplateLoader, Io as efsPolicyMatchesDeclared, Ir as looselyEqual, Is as resolveDynamicReferences, Iu as repairMalformedOutputsForReadOnly, Ja as createReadOnlyAttributeHealerFactory, Jc as gray, Ji as retiredNameGenerationsAfter, Jl as refuseMalformedOrphanRecords, Jn as resolvePendingCloudControlRequests, Jo as ccBrokenReason, Jr as siblingOwnedRevertDesired, Js as callerEnvCredentials, Ju as accountArgs, Ka as withAttemptedItemsMasked, Kc as bold, Kd as decodeListingKey, Ki as nameScopeOf, Kl as malformedOrphanRowsKeptWarning, Kn as startForceQuitFlushes, Ko as CC_BROKEN_REASON, Kr as noEchoMacVerdict, Ks as AWS_CREDENTIAL_ENV_KEYS, Ku as repairMalformedResourcesForReadOnly, L as PROTECTION_PROPERTY_BY_TYPE, La as recordedSgRuleId, Lc as parseCfnTemplate, Li as typesDeletedBefore, Ll as parameterInputsFor, Ln as inRunStackKey, Lo as lambdaPermissionMatchesDeclared, Lr as mappingPairs, Ls as producerLookupOver, Lt as tagsMatchDeclared, Lu as STATE_REGION_DIVERGED, M as findServiceTokenRefusals, Ma as resolveReplacementOldType, Mc as deleteRetiredCloudFormationStack, Md as findNestedTemplateTreeDefect, Mf as describeFileReadFailure, Mi as recheckFailedPlan, Ml as getSettledWriteOnlyPropertyPaths, Mn as updateRefactorMarker, Mr as changedReferencePath, Ms as poisonRenderedSpellingsCollidingIn, Mu as malformedOutputsWarning, N as serviceTokenBlockingReason, Na as withPreviousPolicies, Nc as prepareCloudFormationStackRetirement, Nd as isAbsoluteAssetPath, Nf as displayAssemblyPath, Ni as recordUnderIdIsNotOwn, Nl as getTopLevelKeysHoldingUnreadableCreateOnly, Nn as deleteSignalReceiver, Nr as changedReferenceReason, Ns as stackIdTailOf, Nt as declaredTagsReadback, O as planReplaceResourceTargets, Oa as supersededResourcesOf, Oc as recordedValuesOf, Od as isSecretValuedAttribute, Of as nullPrototypeRecord, Oi as demoteSupersededOrphans, On as refactorMarkerMovesOf, Or as movedToHint, Os as DiffCalculator, Ou as malformedExportNamesWarning, P as diffSecurity, Pa as findNestedStackTypeChanges, Pc as findReplacedCfnResources, Pd as listNestedTemplateRows, Pi as replacementNeverSwapped, Pl as tryGetTopLevelWriteOnlyProperties, Pn as isReceiver, Po as declaredMemberDocument, Pr as differingRemedy, Pu as refuseMalformedOutputs, Q as streamPolicyMatchesDeclared, Qa as namingSecretsWithRecordedNoEcho, Qi as inheritProducerRegions, Ql as unpreviewableOrphanRecords, Qn as displacedOpClause, Qo as classifyHandleUrl, Qr as sgRuleOwnershipIdentity, Qs as producerRegionsFromState, Qu as displayLogicalId, R as isProtectionValueActive, Ra as sgCidrKey, Rc as parseCfnTemplateWithFormat, Rf as resolveBucketRegion, Ri as attemptUsesCompletedCreate, Rl as maskedInputProof, Rn as settleStackTagChildRuns, Ro as memberReadFailure, Rr as parseMappingFile, Rs as refuseUnreadableCdkCrossAccountRefs, Ru as refuseDivergentRecordRegionForDestroy, S as warnLegacySpelling, Sa as holdsSupersededResources, Sc as maskPassedSecretOutputs, Sd as applyCrossPrefixScan, Sf as BOOTSTRAP_MARKER_PREFIX, Si as ledgerForStack, Sl as renderStatefulReason, Sr as findDestructiveChanges, Ss as deleteLeftInPlace, Su as hasReadableOrphans, T as slashedSsmNameHealNote, Ta as supersededDependentsFirst, Tc as mixedSecretTagKeys, Td as isNotImplemented, Tf as defineOwnKey, Tn as recordRetainedForReadoption, To as destroyStackRecordsView, Tr as orphanedLogicalIds, Ts as getReadOnlyPropertyPaths, Tu as refuseMalformedOrphans, Ua as noEchoAttributeNamesOf, Uc as promptYesNo, Ud as uploadCfnTemplate, Ui as orphanNeedsIdentity, Ul as isReadableOrphanRecord, Un as readsOnlyNoEchoParameters, Uo as verbatimEchoDriftKeys, Ur as createNoEchoValueMacs, Us as isIamRoleArn, Uu as refuseMalformedResourcesForDestroy, Va as canonicalizeIpv4Cidr, Vc as cfnFailureText, Vd as CFN_TEMPLATE_URL_LIMIT, Vi as removeProtectionTypeList, Vl as maskedPropertyFingerprint, Vn as literalRowTags, Vr as referencedLogicalIds, Vs as assertSendableRoleArn, Vu as malformedStateRefusalMessage, Wa as noEchoComparisonForTemplate, Wc as serializePrompt, Wd as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Wi as nameGenerationCarriedFrom, Wl as malformedOrphanRecordsRefusalMessage, Wr as noEchoMacBinding, Ws as parseIamRoleArn, Wu as refuseMalformedResourcesForExport, Xa as journaledOrphanPrintingBag, Xc as red, Xd as createAssetRedirectResolver, Xi as withNameGenerationReached, Xl as refuseMalformedOrphansForOrphan, Xn as planOrphanAdoption, Xo as wouldReturnToSdkProvider, Xr as undeclaredGrantSiblingMembers, Xs as classifyRecordedSecretRegion, Xu as STATE_RESOURCES_MALFORMED, Ya as completedReplayEntries, Yc as green, Yd as buildAssetRedirectMap, Yi as retiredNameGenerationsLeaving, Yl as refuseMalformedOrphanRecordsForDestroy, Yn as makeSiblingClaimReader, Yo as isCustomResource, Yr as stripSiblingOwnedParentMembers, Ys as envCredentialsAreAssumedRole, Yu as withheldAccountClause, Za as maskEventTextWithBoundBags, Zc as yellow, Zd as createLazyAssetModeContext, Zl as repairMalformedOrphanRecordsForReadOnly, Zn as NESTED_PENDING_PARENT_REASON, Zo as WaitConditionSignalStore, Zr as recordedRuleIdOf, Zs as classifyReplaySecretRegion, Zu as UNREADABLE_RESOURCES_MAP_ROW, _ as readRecordedConditionVerdicts, _a as bindingSkippedOutputs, _d as hasReasonlessBaselineRefusal, _f as getBootstrapMarkerKey, _i as updatePartialMessage, _l as refuseStatefulReplacedReaders, _o as buildFinalSnapshotIdentifier, _r as makeForeignHolderScan, _s as CloudControlProvider, _u as refuseMalformedResourcePropertiesForDrift, a as mergeNoChangeOutputs, aa as exportAliasCollisionScrubWarning, af as AssetManifestLoader, ai as DELETED_RESOURCE_REMEDY, al as getAccountInfo, ao as stateSecretNameNeedles, ar as revertedNestedRowIds, as as TemplateNoEchoReresolver, au as refuseMalformedResourceAttributesForOrphan, b as pendingMovesRefusalMessage, ba as maskingRetryLogger, bc as crossStackTaintSeeds, bd as CrossPrefixReadError, bf as validateAssetBucketName, bi as replacementCreateRoutesToCloudControl, bl as isStatefulRecreateTargetForReplace, br as crossStackReadsForPartialSave, bs as UNSPECIFIED_SKIP_REASON, bu as repairMalformedResourcePropertiesForReadOnly, c as nestedSsmNameRowNote, ca as secretSafeKeyDisplay, cc as coerceParameterTypedValue, cd as PROPERTY_COVERAGE_BY_TYPE, ci as earlyDeletedOld, cl as isNamelessDynamicReferenceError, co as ATOMIC_FINAL_SNAPSHOT_TYPES, cr as getCurrentNestedStackContext, cs as NO_LOCAL_CUSTOM_RESOURCES_FLAG, cu as refuseMalformedResourceEntriesForDestroy, d as makeCanonicalizePropertiesFn, da as exportNameSecretExposure, dc as AWS_NO_VALUE, di as settleUnsettledPrevious, dl as withSharedDrainBudget, do as ccRoutedInstanceTakesNoSnapshot, dr as dropFailedCommands, ds as customResourcesRunWithoutApp, du as refuseMalformedResourceEntriesForOrphan, ea as namesAnyDeclaredParameter, ec as withoutLapsedStaleShapeStamp, ed as hasReadableResources, el as keepHeldTokenProvenance, eo as secretNamePrintingBag, er as dropSettledNestedJournals, es as isSignalKey, eu as isReadableResourceEntry, f as readDbInstanceAvailabilityZone, fa as isWholeDynamicReferenceValue, fc as cfnRefValueFromPhysicalId, ff as AssetModeResolver, fi as withUnprovenUnsettled, fl as INTRINSIC_KEYS, fo as effectiveDeletionPolicy, fr as dropFailedHint, fs as localCustomResourceCommand, fu as repairMalformedResourceEntriesForReadOnly, g as parentSuppliedValues, ga as isExportAliasCollision, gc as lacksRecordedTableArn, gd as readOnlyStateVersionOf, gf as isCrossRegionRedirect, gi as undeclaredEmptyObservedKeys, gl as findReplacedReadersOfRecreateTargets, go as createPreDeleteFinalSnapshot, gr as sameJournaledOrphans, gu as refuseMalformedResourcePropertiesForDestroy, h as conditionInputsFrom, ha as collectPublishedOutputNames, hc as lacksRecordedRefArn, hd as splitImportedOps, hf as assertAssetBucketRegion, hi as equalModuloMask, ho as unsupportedFinalSnapshotError, hr as loadJournaledOrphans, hs as withCustomResourceStack, hu as malformedResourcePropertiesWarning, i as keptWholeReasonText, ia as displayTextOrWithheld, id as unwrittenCreateOnlyReplacement, if as rewriteTemplateAssetReferences, ii as replayRollback, il as withoutVersionAttestation, io as stackSecretNamesMasker, iu as malformedScrubResourceEntriesRefusalMessage, j as deferredServiceTokenWarning, ja as snapshotSegmentSurvivors, jc as templateMixesDynamicReference, ji as planFailedOps, jl as withSecretPhysicalIdsMaskedInState, jn as sameMove, jo as LAMBDA_PERMISSION_STATEMENT_KEYS, jr as changedReferenceInDiff, js as isAlwaysLiveAttribute, ju as malformedOutputsRefusalMessage, k as refuseStatefulReplaceResourceTargets, ka as withoutSuperseded, kc as securityDiffWithPassedSecretWithheld, kd as isSensitiveAttributeName, kf as ownValue, ki as isJournaledOrphan, kl as secretPhysicalIdSegment, kn as refactorMarkerRefusalMessage, ko as withStackRecords, kr as rollbackOrphanIds, ks as IntrinsicFunctionResolver, ku as malformedExportSourceWarning, l as crossStackOutputProvenanceSource, la as carriedExportAliasExposure, lc as isUnboundTemplateParameter, ld as providerReplacementOldDeleted, li as buildReadCurrentStateContext, ll as carriesDynamicReference, lo as PRE_DELETE_SNAPSHOT_TYPES, lr as withNestedStackContext, lu as refuseMalformedResourceEntriesForImport, m as conditionFingerprint, ma as collectDeclaredOutputNames, mc as refStateLookupFromResource, md as S3StateBackend, mf as buildDenyExternalAccessPolicy, mi as equalModuloMarkedMask, mo as refusesFinalSnapshot, mr as journaledOrphanLines, ms as setLocalCustomResourceRuntimeEnabled, mu as malformedDriftResourcePropertiesWarning, n as applyStackTagsToTemplate, na as resourcesNamingDeclaredParameter, nd as findHandledUnwrittenCreateOnly, nl as recordedOutputReferenceRegions, nr as nestedChildStackName$1, ns as applyCustomResourceResponseExpiration, nu as malformedLocalResourcesWarning, o as checkNestedSsmNames, oa as secretBearing, od as NO_CC_HANDLERS_REASON, of as getDockerImageBySourceHash, oi as PLANNED_EARLY_DELETE_CONSEQUENCE, ol as isImpossibleEmptyStoredAttribute, oo as storedSecretNameNeedles, or as withNestedRevertRun, os as readsNoEchoDeleteValues, ou as refuseMalformedResourceEntries, p as healZonelessDbInstanceRecords, pa as noEchoParameterValueSeed, pc as isStalePlaceholderArnAttribute, pd as TemplateParser, pf as ensureAssetStorage, pi as calculateResourceDrift, pl as LEGACY_HANDLE_HEAL_REASON, po as isFinalSnapshotError, pr as isHandledOrphan, pu as unreadableResourceEntries, q as readStreamPolicy, qa as noEchoExactEchoLeavesOf, qc as cyan, qi as retiredAfterRollback, ql as previewableOrphanRecords, qn as pendingRequestCount, qo as ProviderRegistry, qr as noEchoValueMacsOf, qs as applyCallerIdentityCredentials, qu as JSON_LISTING_HOLE_VALUE, r as isSecretBearingReferenceString, ra as WITHHELD_NAME_DISPLAY, ri as replayFailedOperations, rl as recordedReferenceRegions, ro as secretNamedRecordNeedles, rr as recordDisplacedSkips, rs as customResourceResponseExpirationWarning, ru as malformedResourceEntriesWarning, s as nestedSsmNameDeferredNote, sa as secretBearingStateKeyWarning, sd as hasNoCloudControlHandlers, si as earlyDeleteWhen, sl as carriesFetchableDynamicReference, so as extractDeploymentEventError, sr as collectNestedChildUnaddressed, ss as isCustomResourceType$1, su as refuseMalformedResourceEntriesForDeploy, t as DeployEngine, ta as reachableDivergentParameters, tc as isUnexposedRecordedIdentity, td as findActionableSdkUnwired, tf as loadPublishableAssetManifest, ti as siblingRecordedSgRuleIds, to as secretNamePrintingBags, ts as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, tu as malformedLocalResourceEntriesWarning, u as inheritedProvenanceForChildDiff, ua as exportNameNoEchoParameters, uc as parameterTypeMayLoseSecretIdentity, ui as recordAfterRollbackUpdate, ul as keepsSecretReferenceToken, uo as ccRoutedFinalSnapshotError, ur as deleteJournaledOrphans, us as customResourcesFailedWithoutApp, uu as refuseMalformedResourceEntriesForImportSave, v as hasPendingMovesOut, va as DEFAULT_RESOURCE_TIMEOUT_MS, vc as SECURITY_TABLE_WITHHELD, vd as hasUnverifiableParameterRefusal, vf as parseBootstrapMarker, vi as updatePartialReason, vl as shownType, vr as DeploymentEventsReader, vu as refuseMalformedResourcePropertiesForExport, w as slashedSsmNameHealAdoptedNote, wa as supersededAfterRollback, wc as mixedSecretRowKeys, wd as isAccessDenied, wi as withCreateTokenLedger, wn as keptForRetainedRecord, wr as formatDestructiveChange, wu as malformedOrphansWarning, x as refusePendingMovesOut, xa as deleteSupersededEntry, xc as maskPassedSecretChanges, xd as CrossPrefixScanCache, xf as validateContainerRepoName, xl as isStatefulRecreateTargetSync, xr as constructPathOf$1, xs as deleteIndeterminateGuards, xu as UNREADABLE_ORPHANS_CONTAINER_ROW, y as pendingMovesOutOf, ya as DEFAULT_RESOURCE_WARN_AFTER_MS, yc as calculatorMaskingPassedSecretLines, yd as rebuildClientForBucketRegion, yf as readBootstrapMarkerBody, yi as findUpdatePolicyReplacementRefusals, yl as MULTI_REGION_RECREATE_BLOCKED_TYPES, yr as DeploymentEventsStore, ys as RollbackInlinePolicyWriters, yu as refuseMalformedResourcePropertiesForOrphan, z as perType, za as sgProtocolKey, zc as stringifyCfnTemplate, zd as ssmResolvedValueType, zi as readsRegeneratingSecret, zo as policyDocumentMatchesDeclared, zr as propertiesChangedReason, zs as applyRoleArnIfSet, zu as malformedRenderedContainersWarning } from "./deploy-engine-D7Iv9v8e.js";
10
10
  import { n as canonicalizeRegion, r as derivePartitionAndUrlSuffix, t as PARTITION_TABLE } from "./aws-partition-DA0r2sr-.js";
11
- import { A as utf8ByteLength, C as renderPhaseTimings, E as describeJsonParseFailure, O as parseFailureDebugDetail, _ as withRetry, a as getCreateOnlyPropertyPaths, c as templateResourceTypes, d as describeTypeWithThrottleRetry, s as prefetchCreateOnlyPropertyPaths, w as timePhase, y as PhaseClock } from "./secret-reference-immutable-Bk60ZfqH.js";
12
- import { l as setResolvedResourceTimeouts } from "./ec2-termination-protection-DI-aPxET.js";
13
- import { t as expectedOwnerParam } from "./expected-bucket-owner-j5BCLzAB.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-E38sSyUX.js";
15
- import { $n as WHOLE_DYNAMIC_REFERENCE_PATTERN, An as splitGetAttStringForm, C as maskedLeafCoordinatesOf, Cn as dynamicReferenceTokens, Ct as errorCauseChain, D as noEchoOutputsComparison, E as noEchoLeavesOf, Et as maskSecretsInText, Gt as identityKeyFor, Ht as spelledKeysOf, I as valueAtCoordinate, Jn as recordNoEchoAttributeValues, Kn as recordMaskOnlyValue, Lt as scrubResourceRecord, M as readsNoEchoSource, P as recordedNoEchoValuesOf, Q as redactForState, Qt as inheritNestedStackParameterAssociations, R as liveMatchesUnresolvedTokenFrame, Rt as withPhysicalNameCopies, S as maskWholeValue, St as createSecretMasker, T as noEchoCoordinatesOf, Tt as maskSecretsInError, Un as provenPublicValue, Ut as pathCrossesDottedKey, Vt as isUncertifiedBaselineMaskPosition, Xn as recordProvenPublicExpression, Yn as recordNoEchoParameterFreshValue, Zn as wholeStringLeavesOf, _n as physicalNameCopiesOf, _t as recordLogOnlyParameterValue, b as maskAtCoordinates, bt as shareLogOnlyValues, ct as carryLogOnlyValues, ft as hasMaskableValues, g as canonicalCoordinates, gt as printingCorpusOf, hn as keepTemplateLiteralLeaves, jn as carriesSecretMask, mt as logOnlyValueCount, pt as literalSplitDelimitersOf, qn as recordMaskOnlyValuesIn, tr as isSingleDynamicReferenceToken, un as recordNestedStackParameterExpressions, ut as createUnionSecretMasker, v as isMarkedCoordinate, x as maskReadbackAtCoordinates, xn as DYNAMIC_REFERENCE_TOKEN_SCAN, xt as unionOfSecretBags, yn as recordPhysicalNameCopy, yt as recordLogOnlyValue } from "./replacement-rules-BkUZIP44.js";
16
- import { S as unsettledPropertiesOf, T as withoutUnsettledProperties, b as unsettledItemsOf, w as withUnsettledProperties, y as unsettledItemsField } from "./restore-source-guard-1UD7ucv5.js";
17
- import { u as differingIdentityWarning } from "./identity-read-denied-BhnkMyxk.js";
18
- import { n as isRedactedRecordedValue } from "./redacted-delete-address-CkcTwr-O.js";
19
- import { a as withResourceDeadline } from "./resource-deadline-B2z0yyKo.js";
20
- import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-kW_K5U02.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-BF02Wobz.js";
12
+ import { l as setResolvedResourceTimeouts } from "./ec2-termination-protection-BXy91mrW.js";
13
+ import { t as expectedOwnerParam } from "./expected-bucket-owner-BrzB1C4p.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-CiTP5c3_.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-roVU6gYR.js";
16
+ import { S as unsettledPropertiesOf, T as withoutUnsettledProperties, b as unsettledItemsOf, w as withUnsettledProperties, y as unsettledItemsField } from "./restore-source-guard-Dz_vQPiM.js";
17
+ import { u as differingIdentityWarning } from "./identity-read-denied-CoeMBkCz.js";
18
+ import { n as isRedactedRecordedValue } from "./redacted-delete-address-rTL8ikg4.js";
19
+ import { a as withResourceDeadline } from "./resource-deadline-B4Rp-3f7.js";
20
+ import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-DUDwEekn.js";
21
21
  import { t as cdkdCacheHome } from "./cache-home-BVYKj3de.js";
22
22
  import { randomBytes, randomUUID } from "node:crypto";
23
23
  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 +1561,7 @@ function collectCrossStackRefs(node, onRef, unconditional) {
1561
1561
  // src/provisioning/register-providers.ts
1562
1562
  let providerClasses;
1563
1563
  function loadProviderClasses() {
1564
- providerClasses ??= import("./provider-classes-BMrkl7zN.js");
1564
+ providerClasses ??= import("./provider-classes-BNZGFwNO.js");
1565
1565
  return providerClasses;
1566
1566
  }
1567
1567
  function registerAllProviders(registry, classes) {
@@ -2948,7 +2948,7 @@ async function probeAndRevalidateStateful(input) {
2948
2948
 
2949
2949
  // src/cli/commands/recreate-downstream-consumers.ts
2950
2950
  function producerNameIsUnresolved(sourceStack) {
2951
- return sourceStack.includes("{{resolve:") || sourceStack.includes("***");
2951
+ return mentionsDynamicReference(sourceStack) || mentionsMask(sourceStack);
2952
2952
  }
2953
2953
  async function findDownstreamConsumers(input) {
2954
2954
  const logger = getLogger().child("recreate-downstream");
@@ -3969,7 +3969,7 @@ var CrossStackPreview = class {
3969
3969
  this.taintedOutputs.add(outputKey);
3970
3970
  if (exportName === null) this.everyExportTainted = true;
3971
3971
  else if (exportName !== void 0) this.taintedExports.add(exportName);
3972
- for (const value of values) if (isScalar$1(value) && value !== "" && value !== "***") this.taintedTexts.add(String(value));
3972
+ for (const value of values) if (isScalar$1(value) && value !== "" && !isMaskLeaf(value)) this.taintedTexts.add(String(value));
3973
3973
  return added;
3974
3974
  }
3975
3975
  exportValue(region, name) {
@@ -3996,7 +3996,7 @@ function previewProducerValues(input) {
3996
3996
  for (const change of input.changes.values()) if (change.changeType === "CREATE" || change.changeType === "UPDATE" && (change.resourceType === "AWS::CloudFormation::Stack" || (change.propertyChanges ?? []).some((p) => p.requiresReplacement))) renewed.add(change.logicalId);
3997
3997
  const producerStack = input.stackName;
3998
3998
  const stored = input.storedOutputs ?? {};
3999
- const verdict = (desired) => isScalar$1(desired) && desired !== "***" && !String(desired).includes("{{resolve:") && !input.holdsSecret(String(desired)) ? {
3999
+ const verdict = (desired) => isScalar$1(desired) && !isMaskLeaf(desired) && !mentionsDynamicReference(String(desired)) && !input.holdsSecret(String(desired)) ? {
4000
4000
  kind: "known",
4001
4001
  value: desired,
4002
4002
  producerStack
@@ -4020,7 +4020,7 @@ function previewProducerValues(input) {
4020
4020
  };
4021
4021
  else if (Object.hasOwn(input.desiredOutputs, outputName)) {
4022
4022
  const desired = input.desiredOutputs[outputName];
4023
- if (stored[outputName] === "***" || desired === void 0) continue;
4023
+ if (isMaskLeaf(stored[outputName]) || desired === void 0) continue;
4024
4024
  if (JSON.stringify(desired) !== JSON.stringify(stored[outputName])) previewed = verdict(desired);
4025
4025
  else if (exportName !== void 0 && !Object.hasOwn(stored, exportName)) {
4026
4026
  exports.set(exportName, verdict(desired));
@@ -4600,7 +4600,7 @@ async function resolveTemplateOutputs(template, resolveFn, conditions, storedOut
4600
4600
  let resolutionFailed = false;
4601
4601
  let passResolvesSecret = false;
4602
4602
  const spellsToken = (raw) => {
4603
- if (typeof raw === "string") return raw.includes("{{resolve:");
4603
+ if (typeof raw === "string") return mentionsDynamicReference(raw);
4604
4604
  if (Array.isArray(raw)) return raw.some(spellsToken);
4605
4605
  if (raw !== null && typeof raw === "object") return Object.values(raw).some(spellsToken);
4606
4606
  return false;
@@ -4933,7 +4933,7 @@ function makeTrustClassifier(options) {
4933
4933
  if (dot > 0) return resourceLeaf(name.slice(0, dot), name.slice(dot + 1));
4934
4934
  return resourceLeaf(name, void 0);
4935
4935
  };
4936
- const literalTrusted = (text) => !text.includes("{{resolve:ssm:");
4936
+ const literalTrusted = (text) => !mentionsDynamicReferenceTo(text, "ssm");
4937
4937
  const subTrusted = (template, locals) => {
4938
4938
  if (typeof template !== "string" || !literalTrusted(template)) return false;
4939
4939
  for (const match of template.matchAll(/\$\{([^}]*)\}/g)) {
@@ -5922,6 +5922,58 @@ async function computeStackDiff(loadedState, template, region, stackName, stateB
5922
5922
  };
5923
5923
  }
5924
5924
 
5925
+ // src/cli/commands/diff-recursive/deleted-subtree-taint.ts
5926
+ function deletedRowRecordTainted(record, preview) {
5927
+ const parameters = record.properties?.["Parameters"];
5928
+ if (parameters === null || typeof parameters !== "object" || Array.isArray(parameters)) return false;
5929
+ const tainted = preview?.taintedValues() ?? /* @__PURE__ */ new Set();
5930
+ return Object.values(parameters).some((value) => {
5931
+ if (typeof value !== "string") return false;
5932
+ if (mixesDynamicReference(value)) return true;
5933
+ for (const text of tainted) {
5934
+ if (text === "" || isMaskLeaf(text)) continue;
5935
+ if (value === text || text.length >= 4 && value.includes(text)) return true;
5936
+ }
5937
+ return false;
5938
+ });
5939
+ }
5940
+ function maskLeaves(value) {
5941
+ if (typeof value === "string") return "***";
5942
+ if (Array.isArray(value)) return value.map(maskLeaves);
5943
+ if (value !== null && typeof value === "object") {
5944
+ const out = Object.create(null);
5945
+ for (const [key, leaf] of Object.entries(value)) out[key] = maskLeaves(leaf);
5946
+ return out;
5947
+ }
5948
+ return value;
5949
+ }
5950
+ function maskDeletedSubtree(node) {
5951
+ for (const [logicalId, change] of node.changes) node.changes.set(logicalId, {
5952
+ ...change,
5953
+ ...change.currentProperties && { currentProperties: maskLeaves(change.currentProperties) },
5954
+ ...change.desiredProperties && { desiredProperties: maskLeaves(change.desiredProperties) },
5955
+ ...change.propertyChanges && { propertyChanges: change.propertyChanges.map((pc) => ({
5956
+ ...pc,
5957
+ oldValue: maskLeaves(pc.oldValue),
5958
+ newValue: maskLeaves(pc.newValue)
5959
+ })) }
5960
+ });
5961
+ node.outputChanges = node.outputChanges.map((oc) => ({
5962
+ ...oc,
5963
+ ..."oldValue" in oc && { oldValue: maskLeaves(oc.oldValue) },
5964
+ ..."newValue" in oc && { newValue: maskLeaves(oc.newValue) }
5965
+ }));
5966
+ const securityDiff = node.securityDiff;
5967
+ if (securityDiff !== void 0) node.securityDiff = async () => {
5968
+ const shown = await securityDiff();
5969
+ return shown.rendered === "" ? shown : {
5970
+ ...shown,
5971
+ rendered: SECURITY_TABLE_WITHHELD
5972
+ };
5973
+ };
5974
+ for (const child of node.children) maskDeletedSubtree(child);
5975
+ }
5976
+
5925
5977
  // src/cli/commands/diff-recursive/load-state.ts
5926
5978
  async function loadStateOrEmpty(stackName, region, stateBackend, refusalRecovery) {
5927
5979
  const refactorMarker = readRefactorMarkerOnce(stateBackend);
@@ -6212,7 +6264,9 @@ async function buildDiffTree(args) {
6212
6264
  for (const [logicalId, resource] of Object.entries(state.resources ?? {})) {
6213
6265
  if (resource.resourceType !== "AWS::CloudFormation::Stack") continue;
6214
6266
  if (templateChildIds.has(logicalId)) continue;
6215
- node.children.push(await buildDeletedSubtree(`${stackName}~${logicalId}`, region, stateBackend, diffCalculator, secretBearingAbove, printingSecrets, refusalRecovery, diffPrintingSecrets([nodeDerivedNames, nodeStateNames])));
6267
+ const deleted = await buildDeletedSubtree(`${stackName}~${logicalId}`, region, stateBackend, diffCalculator, secretBearingAbove, printingSecrets, refusalRecovery, diffPrintingSecrets([nodeDerivedNames, nodeStateNames]));
6268
+ if (deletedRowRecordTainted(resource, crossStackPreview)) maskDeletedSubtree(deleted);
6269
+ node.children.push(deleted);
6216
6270
  }
6217
6271
  return node;
6218
6272
  }
@@ -7185,7 +7239,7 @@ function planExportIndexRepair(entries, stackName, producerRegion, outputs) {
7185
7239
  continue;
7186
7240
  }
7187
7241
  const stateValue = outputs[exportName];
7188
- if (!carriesDynamicReference(stateValue) && !carriesSecretMask(stateValue)) continue;
7242
+ if (!carriesDynamicReference(stateValue) && !holdsMaskLeaf(stateValue)) continue;
7189
7243
  if (JSON.stringify(entry.value) === JSON.stringify(stateValue)) continue;
7190
7244
  findings.push({
7191
7245
  kind: "converge",
@@ -7555,20 +7609,19 @@ function regionAmbiguousScrubSecretError(origin, stackName, secretName, foreignP
7555
7609
  function unresolvableForeignScrubSecretError(origin, stackName, secretName, region, cause, secrets, recorded = false) {
7556
7610
  return new ScrubRefusalError(`Scrub of ${displayStackName(stackName)} could not resolve the secret reference ${maskedIdent(secretName, secrets)} in ${origin} in ${recorded ? "the region its state record names" : "the region its ARN names"} (${displayIdent(region)}): ${maskSecretsInText(describeAwsFailure(cause).detail, secrets)}. Refusing rather than resolving it in the stack's own region, which would look for a different secret's value and report the stack clean over state that still holds the plaintext.`, "SCRUB_CROSS_REGION_SECRET_UNRESOLVED");
7557
7611
  }
7558
- const DYNAMIC_REFERENCE_OPENING = "{{resolve:";
7559
- const SECRET_REFERENCE_OPENINGS = [
7560
- `${DYNAMIC_REFERENCE_OPENING}secretsmanager:`,
7561
- `${DYNAMIC_REFERENCE_OPENING}ssm:`,
7562
- `${DYNAMIC_REFERENCE_OPENING}ssm-secure:`
7612
+ const SECRET_REFERENCE_SERVICES = [
7613
+ "secretsmanager",
7614
+ "ssm",
7615
+ "ssm-secure"
7563
7616
  ];
7564
7617
  const SUB_PLACEHOLDER_OPENING = "${";
7565
7618
  function countSecretReferenceOpenings(leaf) {
7566
7619
  let count = 0;
7567
- for (const opening of SECRET_REFERENCE_OPENINGS) count += leaf.split(opening).length - 1;
7620
+ for (const service of SECRET_REFERENCE_SERVICES) count += countDynamicReferenceOpenings(leaf, service);
7568
7621
  return count;
7569
7622
  }
7570
7623
  function isSecretReferenceToken(token) {
7571
- return SECRET_REFERENCE_OPENINGS.some((opening) => token.startsWith(opening));
7624
+ return SECRET_REFERENCE_SERVICES.some((service) => opensDynamicReferenceTo(token, service));
7572
7625
  }
7573
7626
  function isAssembledSecretReference(leaf, secretTokens) {
7574
7627
  return countSecretReferenceOpenings(leaf) !== secretTokens.length || secretTokens.some((token) => token.includes(SUB_PLACEHOLDER_OPENING));
@@ -7621,7 +7674,7 @@ async function resolveForeignRegionTokens(leaf, stackName, ctx) {
7621
7674
  async function pinCrossRegionSecrets(bag, stackName, ctx) {
7622
7675
  const walk = async (v) => {
7623
7676
  if (typeof v === "string") {
7624
- if (!v.includes("{{resolve:")) return v;
7677
+ if (!mentionsDynamicReference(v)) return v;
7625
7678
  return await resolveForeignRegionTokens(v, stackName, ctx);
7626
7679
  }
7627
7680
  if (Array.isArray(v)) {
@@ -7819,7 +7872,7 @@ function producerPublishesSecretExpression(templates, exportOwners, producerStac
7819
7872
  } else continue;
7820
7873
  for (const rawSubject of subjects) {
7821
7874
  const subject = selectTakenConditionalBranches(rawSubject);
7822
- if (JSON.stringify(subject ?? null).includes("{{resolve:")) {
7875
+ if (valueMentionsDynamicReference(subject ?? null)) {
7823
7876
  if (widened) return {
7824
7877
  kind: "widened",
7825
7878
  via: frame.via
@@ -8230,9 +8283,18 @@ async function scrubStackResolvePass({ stack, region, logger, newBag, perResourc
8230
8283
  const nestedParameters = nestedRowParameters.get(logicalId);
8231
8284
  if (isNestedRow && nestedParameters?.complete === true) recordNestedStackParameterExpressions(recordedSecretValues, NESTED_STACK_TYPE$3, resolvedRowProps, templateResource.Properties);
8232
8285
  }
8233
- for (const [orphanIndex, record] of (state.orphans ?? []).entries()) {
8286
+ const droppedRecords = [...(state.orphans ?? []).map((record, index) => ({
8287
+ key: String(index),
8288
+ kind: "orphan record",
8289
+ record
8290
+ })), ...(Array.isArray(state.supersededResources) ? state.supersededResources : []).flatMap((record, index) => isSupersededResourceRecord(record) ? [{
8291
+ key: `superseded:${index}`,
8292
+ kind: "superseded record",
8293
+ record
8294
+ }] : [])];
8295
+ for (const { key, kind, record } of droppedRecords) {
8234
8296
  const recordedSecretValues = newBag();
8235
- orphanSecrets.set(String(orphanIndex), recordedSecretValues);
8297
+ orphanSecrets.set(key, recordedSecretValues);
8236
8298
  const resolveInput = await pinCrossRegionSecrets({
8237
8299
  properties: record.state.properties,
8238
8300
  attributes: record.state.attributes ?? {},
@@ -8242,7 +8304,7 @@ async function scrubStackResolvePass({ stack, region, logger, newBag, perResourc
8242
8304
  producerRegions,
8243
8305
  resolvers,
8244
8306
  recordedSecretValues,
8245
- origin: `orphan record ${maskedIdent(record.logicalId, recordedSecretValues)}`,
8307
+ origin: `${kind} ${maskedIdent(record.logicalId, recordedSecretValues)}`,
8246
8308
  recordedRegions: recordedReferenceRegions(record.state)
8247
8309
  });
8248
8310
  const orphanContext = resolverContext(recordedSecretValues);
@@ -8253,16 +8315,16 @@ async function scrubStackResolvePass({ stack, region, logger, newBag, perResourc
8253
8315
  ...orphanContext,
8254
8316
  abandonedResolutions: abandoned
8255
8317
  });
8256
- reportAbandonedBag(abandoned, `orphan record ${maskedIdent(record.logicalId, recordedSecretValues)} ${bagName}`, recordedSecretValues, `orphan record ${maskedIdent(record.logicalId, recordedSecretValues)} ${bagName}`);
8318
+ reportAbandonedBag(abandoned, `${kind} ${maskedIdent(record.logicalId, recordedSecretValues)} ${bagName}`, recordedSecretValues, `${kind} ${maskedIdent(record.logicalId, recordedSecretValues)} ${bagName}`);
8257
8319
  } catch (err) {
8258
8320
  if (isRegionAmbiguousRefusal(err) || isNamelessDynamicReferenceFailure(err)) throw err;
8259
8321
  const leafVerdict = abandonedScanVerdict(bagValue, err);
8260
8322
  if (leafVerdict !== "silent") {
8261
8323
  if (leafVerdict === "count") unverifiableLeaves++;
8262
8324
  else ungateableAbandonedScans++;
8263
- logger.warn(maskSecretsInText(abandonedScanWarning(`orphan record ${maskedIdent(record.logicalId, recordedSecretValues)} ${bagName}`, leafVerdict), recordedSecretValues));
8325
+ logger.warn(maskSecretsInText(abandonedScanWarning(`${kind} ${maskedIdent(record.logicalId, recordedSecretValues)} ${bagName}`, leafVerdict), recordedSecretValues));
8264
8326
  }
8265
- logger.debug(maskSecretsInText(`Resolution of orphan record ${maskedIdent(record.logicalId, recordedSecretValues)} ${bagName} during scrub was partial: ${describeAwsFailure(err).detail}`, recordedSecretValues));
8327
+ logger.debug(maskSecretsInText(`Resolution of ${kind} ${maskedIdent(record.logicalId, recordedSecretValues)} ${bagName} during scrub was partial: ${describeAwsFailure(err).detail}`, recordedSecretValues));
8266
8328
  }
8267
8329
  }
8268
8330
  }
@@ -8360,6 +8422,86 @@ async function scrubStackResolvePass({ stack, region, logger, newBag, perResourc
8360
8422
  };
8361
8423
  }
8362
8424
 
8425
+ // src/cli/commands/scrub/twin-references.ts
8426
+ function withObservedTwinsPositioned(walked, stored, positionedProperties, secrets) {
8427
+ if (positionedProperties === void 0) return walked;
8428
+ if (stored.observedProperties === void 0 || walked.observedProperties === void 0) return walked;
8429
+ const observed = positionTwinReferences(stored.observedProperties, walked.observedProperties, positionedProperties, secrets);
8430
+ return observed === walked.observedProperties ? walked : {
8431
+ ...walked,
8432
+ observedProperties: observed
8433
+ };
8434
+ }
8435
+ function positionTwinReferences(stored, positioned, template, secrets) {
8436
+ if (secrets.size === 0) return positioned;
8437
+ const plaintexts = [...secrets.keys()].filter((p) => p !== "");
8438
+ const walk = (s, p, t) => {
8439
+ if (typeof t === "string") {
8440
+ if (typeof s !== "string" || typeof p !== "string" || p === t) return p;
8441
+ return provenTemplateText(s, t, secrets, plaintexts) ? t : p;
8442
+ }
8443
+ if (Array.isArray(t)) {
8444
+ if (!Array.isArray(s) || !Array.isArray(p) || s.length !== t.length || p.length !== t.length) return p;
8445
+ let changed = false;
8446
+ const out = p.map((item, i) => {
8447
+ if (!corroborates(s[i], t[i])) return item;
8448
+ const next = walk(s[i], item, t[i]);
8449
+ if (next !== item) changed = true;
8450
+ return next;
8451
+ });
8452
+ return changed ? out : p;
8453
+ }
8454
+ if (!isPlainRecord$4(t) || !isPlainRecord$4(s) || !isPlainRecord$4(p)) return p;
8455
+ let out;
8456
+ for (const key of Object.keys(t)) {
8457
+ if (!Object.hasOwn(s, key) || !Object.hasOwn(p, key)) continue;
8458
+ const next = walk(s[key], p[key], t[key]);
8459
+ if (next !== p[key]) {
8460
+ out ??= copyOwnKeys(p);
8461
+ defineOwnKey(out, key, next);
8462
+ }
8463
+ }
8464
+ return out ?? p;
8465
+ };
8466
+ return walk(stored, positioned, template);
8467
+ }
8468
+ function corroborates(s, t) {
8469
+ if (typeof t === "string") return typeof s === "string" && (dynamicReferenceSpans(t).length > 0 || s === t);
8470
+ if (Array.isArray(t)) return Array.isArray(s) && s.length === t.length && t.every((item, i) => corroborates(s[i], item));
8471
+ if (isPlainRecord$4(t)) {
8472
+ if (!isPlainRecord$4(s)) return false;
8473
+ const keys = Object.keys(t);
8474
+ return keys.length === Object.keys(s).length && keys.every((key) => Object.hasOwn(s, key) && corroborates(s[key], t[key]));
8475
+ }
8476
+ return Object.is(s, t);
8477
+ }
8478
+ function provenTemplateText(value, text, secrets, plaintexts) {
8479
+ const spans = dynamicReferenceSpans(text);
8480
+ let resolved = "";
8481
+ let cursor = 0;
8482
+ for (const { start, end } of spans) {
8483
+ const literal = text.slice(cursor, start);
8484
+ if (plaintexts.some((p) => literal.includes(p))) return false;
8485
+ const plaintext = resolvedPlaintextOf(secrets, text.slice(start, end));
8486
+ if (plaintext === void 0 || !secrets.has(plaintext)) return false;
8487
+ resolved += literal + plaintext;
8488
+ cursor = end;
8489
+ }
8490
+ const tail = text.slice(cursor);
8491
+ if (plaintexts.some((p) => tail.includes(p))) return false;
8492
+ return resolved + tail === value;
8493
+ }
8494
+ function copyOwnKeys(bag) {
8495
+ const copy = Object.getPrototypeOf(bag) === null ? nullPrototypeRecord() : {};
8496
+ for (const key of Object.keys(bag)) defineOwnKey(copy, key, bag[key]);
8497
+ return copy;
8498
+ }
8499
+ function isPlainRecord$4(value) {
8500
+ if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
8501
+ const proto = Object.getPrototypeOf(value);
8502
+ return proto === Object.prototype || proto === null;
8503
+ }
8504
+
8363
8505
  // src/cli/commands/scrub/cross-stack-findings.ts
8364
8506
  function literalParts(value, tokens) {
8365
8507
  const parts = [];
@@ -8445,6 +8587,50 @@ function findUnrepairedCrossStackReadNames(stored, performed, redact) {
8445
8587
  return found;
8446
8588
  }
8447
8589
 
8590
+ // src/cli/commands/scrub/cross-stack-read-names.ts
8591
+ function repairCrossStackReadNames({ state, outputSecrets, perResourceSecrets, orphanSecrets, prePassFindings, logger, shownStack }) {
8592
+ let changed = 0;
8593
+ const crossStackNeedles = allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets);
8594
+ const redactCrossStackName = (name) => redactForState(name, {
8595
+ provenance: "value-scan",
8596
+ secrets: crossStackNeedles
8597
+ });
8598
+ const newImports = state.imports?.map((entry) => {
8599
+ const exportName = redactCrossStackName(entry.exportName);
8600
+ if (exportName === entry.exportName) return entry;
8601
+ changed++;
8602
+ return {
8603
+ ...entry,
8604
+ exportName
8605
+ };
8606
+ });
8607
+ const newOutputReads = state.outputReads?.map((entry) => {
8608
+ const sourceStack = redactCrossStackName(entry.sourceStack);
8609
+ const outputName = redactCrossStackName(entry.outputName);
8610
+ if (sourceStack === entry.sourceStack && outputName === entry.outputName) return entry;
8611
+ changed++;
8612
+ return {
8613
+ ...entry,
8614
+ sourceStack,
8615
+ outputName
8616
+ };
8617
+ });
8618
+ const unrepairedReadNames = findUnrepairedCrossStackReadNames({
8619
+ imports: newImports,
8620
+ outputReads: newOutputReads
8621
+ }, prePassFindings.performedReads, redactCrossStackName);
8622
+ for (const { list, index, entry } of unrepairedReadNames) {
8623
+ const producer = list === "imports" ? `producer ${displayStackName(maskSecretsInText(entry.sourceStack, crossStackNeedles))}, ` : "";
8624
+ logger.warn(safeMsg`Scrub of ${shownStack}: state.${list}[${index}] (${producer}${displayIdent(String(entry.sourceRegion))}) ` + "holds a cross-stack read name in plaintext that has the shape of a secret-bearing read in today's template but not the secret's current value — most likely a value from before the secret was ROTATED. Scrub cannot repair it (it matches only the current value) and does not print it; treat that earlier value as exposed. A deploy " + safeMsg`that updates ${shownStack} rewrites this list from the reads it performs.`);
8625
+ }
8626
+ return {
8627
+ newImports,
8628
+ newOutputReads,
8629
+ unrepairedReadNames,
8630
+ changed
8631
+ };
8632
+ }
8633
+
8448
8634
  // src/cli/commands/scrub/noecho.ts
8449
8635
  function planScrubNoEcho(state, template, templateProps, conditions, passedParameters = [], conditionalParameters = []) {
8450
8636
  const byLogicalId = /* @__PURE__ */ new Map();
@@ -8457,7 +8643,7 @@ function planScrubNoEcho(state, template, templateProps, conditions, passedParam
8457
8643
  attributeIsNoEcho: (id, attribute) => declared.get(id)?.has(attribute) === true,
8458
8644
  ...Object.keys(conditions).length > 0 && { conditions }
8459
8645
  };
8460
- const persisted = (value) => carriesSecretMask(value) || typeof value === "string" && isSingleDynamicReferenceToken(value);
8646
+ const persisted = (value) => holdsMaskLeaf(value) || typeof value === "string" && isSingleDynamicReferenceToken(value);
8461
8647
  const templateResources = template.Resources ?? {};
8462
8648
  const eligible = Object.entries(resources).filter(([logicalId, record]) => templateProps.has(logicalId) && Object.hasOwn(templateResources, logicalId) && templateResources[logicalId]?.Type === record.resourceType);
8463
8649
  const positionFrom = (params, names) => {
@@ -8715,6 +8901,7 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
8715
8901
  })) !== JSON.stringify(value);
8716
8902
  };
8717
8903
  const noEchoPublicTokens = /* @__PURE__ */ new Set([region, stack.stackName]);
8904
+ const finishStored = storedRecordFinisher(stack.template, noEchoPublicTokens);
8718
8905
  const totalSecrets = outputSecrets.size + [...perResourceSecrets.values()].reduce((n, m) => n + m.size, 0) + [...orphanSecrets.values()].reduce((n, m) => n + m.size, 0);
8719
8906
  if (totalSecrets === 0 && !noEchoPlans.changesAny) {
8720
8907
  emitAbandonedScanNotes();
@@ -8747,18 +8934,18 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
8747
8934
  const ownSecrets = secrets ?? /* @__PURE__ */ new Map();
8748
8935
  const positioned = templateProps ? {
8749
8936
  ...record,
8750
- properties: redactForState(record.properties, {
8937
+ properties: positionTwinReferences(record.properties, redactForState(record.properties, {
8751
8938
  provenance: "template-sourced",
8752
8939
  secrets: ownSecrets,
8753
8940
  source: templateProps,
8754
8941
  generation: "unproven"
8755
- })
8942
+ }), templateProps, ownSecrets)
8756
8943
  } : record;
8757
- const walked = secrets || templateProps ? scrubResourceRecord(positioned, ownSecrets, void 0, "state-cross-generation", {
8944
+ const walked = secrets || templateProps ? withObservedTwinsPositioned(scrubResourceRecord(positioned, ownSecrets, void 0, "state-cross-generation", {
8758
8945
  properties: "unproven",
8759
8946
  observed: "unproven",
8760
8947
  propertiesPositioned: templateProps !== void 0
8761
- }) : record;
8948
+ }), record, templateProps && positioned.properties, ownSecrets) : record;
8762
8949
  const scrubbed = templateProps && record.observedProperties && walked.observedProperties ? {
8763
8950
  ...walked,
8764
8951
  observedProperties: keepTemplateLiteralLeaves(walked.observedProperties, record.observedProperties, templateProps, ownSecrets)
@@ -8769,7 +8956,10 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
8769
8956
  properties: "unproven",
8770
8957
  observed: "unproven"
8771
8958
  });
8772
- const rewritten = keepHeldTokenProvenance(applyScrubNoEcho(migrated, record, plan));
8959
+ const rewritten = finishStored(keepHeldTokenProvenance(applyScrubNoEcho(migrated, record, plan)), new Map([...ownSecrets, ...migrationNeedles ?? []]), {
8960
+ logicalId,
8961
+ state: record
8962
+ });
8773
8963
  const written = JSON.stringify(rewritten) === JSON.stringify(record) ? rewritten : withoutLapsedStaleShapeStamp(rewritten);
8774
8964
  if (JSON.stringify(written) !== JSON.stringify(record)) recordsChanged++;
8775
8965
  newResources[logicalId] = written;
@@ -8779,10 +8969,10 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
8779
8969
  const needles = new Map(allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets));
8780
8970
  for (const [plaintext, expression] of own ?? []) needles.set(plaintext, expression);
8781
8971
  if (needles.size === 0) return record;
8782
- const scrubbed = keepHeldTokenProvenance(scrubResourceRecord(record.state, needles, void 0, "state-cross-generation", {
8972
+ const scrubbed = finishStored(keepHeldTokenProvenance(scrubResourceRecord(record.state, needles, void 0, "state-cross-generation", {
8783
8973
  properties: "unproven",
8784
8974
  observed: "unproven"
8785
- }));
8975
+ })), needles, record);
8786
8976
  if (JSON.stringify(scrubbed) === JSON.stringify(record.state)) return record;
8787
8977
  recordsChanged++;
8788
8978
  return {
@@ -8790,14 +8980,16 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
8790
8980
  state: withoutLapsedStaleShapeStamp(scrubbed)
8791
8981
  };
8792
8982
  });
8793
- const newSuperseded = Array.isArray(state.supersededResources) ? state.supersededResources.map((entry) => {
8983
+ const newSuperseded = Array.isArray(state.supersededResources) ? state.supersededResources.map((entry, supersededIndex) => {
8794
8984
  if (!isSupersededResourceRecord(entry)) return entry;
8985
+ const own = orphanSecrets.get(`superseded:${supersededIndex}`);
8795
8986
  const needles = new Map(allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets));
8987
+ for (const [plaintext, expression] of own ?? []) needles.set(plaintext, expression);
8796
8988
  if (needles.size === 0) return entry;
8797
- const scrubbed = keepHeldTokenProvenance(scrubResourceRecord(entry.state, needles, void 0, "state-cross-generation", {
8989
+ const scrubbed = finishStored(keepHeldTokenProvenance(scrubResourceRecord(entry.state, needles, void 0, "state-cross-generation", {
8798
8990
  properties: "unproven",
8799
8991
  observed: "unproven"
8800
- }));
8992
+ })), needles, entry);
8801
8993
  if (JSON.stringify(scrubbed) === JSON.stringify(entry.state)) return entry;
8802
8994
  recordsChanged++;
8803
8995
  return {
@@ -8805,39 +8997,16 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
8805
8997
  state: withoutLapsedStaleShapeStamp(scrubbed)
8806
8998
  };
8807
8999
  }) : void 0;
8808
- const crossStackNeedles = allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets);
8809
- const redactCrossStackName = (name) => redactForState(name, {
8810
- provenance: "value-scan",
8811
- secrets: crossStackNeedles
8812
- });
8813
- const newImports = state.imports?.map((entry) => {
8814
- const exportName = redactCrossStackName(entry.exportName);
8815
- if (exportName === entry.exportName) return entry;
8816
- recordsChanged++;
8817
- return {
8818
- ...entry,
8819
- exportName
8820
- };
8821
- });
8822
- const newOutputReads = state.outputReads?.map((entry) => {
8823
- const sourceStack = redactCrossStackName(entry.sourceStack);
8824
- const outputName = redactCrossStackName(entry.outputName);
8825
- if (sourceStack === entry.sourceStack && outputName === entry.outputName) return entry;
8826
- recordsChanged++;
8827
- return {
8828
- ...entry,
8829
- sourceStack,
8830
- outputName
8831
- };
9000
+ const { newImports, newOutputReads, unrepairedReadNames, changed } = repairCrossStackReadNames({
9001
+ state,
9002
+ outputSecrets,
9003
+ perResourceSecrets,
9004
+ orphanSecrets,
9005
+ prePassFindings,
9006
+ logger,
9007
+ shownStack
8832
9008
  });
8833
- const unrepairedReadNames = findUnrepairedCrossStackReadNames({
8834
- imports: newImports,
8835
- outputReads: newOutputReads
8836
- }, prePassFindings.performedReads, redactCrossStackName);
8837
- for (const { list, index, entry } of unrepairedReadNames) {
8838
- const producer = list === "imports" ? `producer ${displayStackName(maskSecretsInText(entry.sourceStack, crossStackNeedles))}, ` : "";
8839
- logger.warn(safeMsg`Scrub of ${shownStack}: state.${list}[${index}] (${producer}${displayIdent(String(entry.sourceRegion))}) ` + "holds a cross-stack read name in plaintext that has the shape of a secret-bearing read in today's template but not the secret's current value — most likely a value from before the secret was ROTATED. Scrub cannot repair it (it matches only the current value) and does not print it; treat that earlier value as exposed. A deploy " + safeMsg`that updates ${shownStack} rewrites this list from the reads it performs.`);
8840
- }
9009
+ recordsChanged += changed;
8841
9010
  const positionedOutputs = outputSecrets.size > 0 ? redactForState(state.outputs, outputsSourceUntrusted ? {
8842
9011
  provenance: "value-scan",
8843
9012
  secrets: outputSecrets
@@ -8913,7 +9082,7 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
8913
9082
  for (const key of Object.keys(after)) {
8914
9083
  const was = before[key];
8915
9084
  const now = after[key];
8916
- if (typeof was === "string" && typeof now === "string" && now.includes("{{resolve:") && !was.includes("{{resolve:")) outputRewrites.set(now, was);
9085
+ if (typeof was === "string" && typeof now === "string" && mentionsDynamicReference(now) && !mentionsDynamicReference(was)) outputRewrites.set(now, was);
8917
9086
  }
8918
9087
  }
8919
9088
  if (outputsChanged) recordsChanged++;
@@ -9724,7 +9893,7 @@ function notComparedOutcomes(report) {
9724
9893
  function outcomeExitSignal(outcome) {
9725
9894
  return matchOutcome(outcome, {
9726
9895
  drifted: () => "drifted",
9727
- notCompared: (n) => n.notComparedCause === "unresolvedToken" || n.notComparedCause === "noEchoParameter" ? "none" : "incomplete",
9896
+ notCompared: (n) => n.notComparedCause === "unresolvedToken" || n.notComparedCause === "noEchoParameter" || n.notComparedCause === "maskedEcho" ? "none" : "incomplete",
9728
9897
  clean: () => "none",
9729
9898
  unsupported: () => "incomplete",
9730
9899
  skipped: () => "none",
@@ -9772,6 +9941,10 @@ const UNCOMPARED_REASONS = {
9772
9941
  kind: "unknown",
9773
9942
  phrase: "only PARTIALLY compared: their state holds a NoEcho parameter value only as the redaction mask, which no re-run can clear"
9774
9943
  },
9944
+ maskedEcho: {
9945
+ kind: "unknown",
9946
+ phrase: "only PARTIALLY compared: AWS echoes a secret into a property the template does not set, which their state holds only as the redaction mask, so no re-run can clear it"
9947
+ },
9775
9948
  skipped: {
9776
9949
  kind: "byDesign",
9777
9950
  phrase: "not compared AT ALL: cdkd does not drift-check the type"
@@ -9782,6 +9955,7 @@ const ANY_OF_IT_COMPARED = {
9782
9955
  unresolvedToken: true,
9783
9956
  uncertifiedBaseline: true,
9784
9957
  noEchoParameter: true,
9958
+ maskedEcho: true,
9785
9959
  readFailed: false,
9786
9960
  readAborted: false,
9787
9961
  baselineRefused: false,
@@ -10845,7 +11019,11 @@ const OWN_WRITE_MEMBERS = new Map(Object.entries({
10845
11019
  }
10846
11020
  }],
10847
11021
  "AWS::Events::EventBus": [documentHeal("Policy")],
10848
- "AWS::EC2::SecurityGroup": [sgRulesHeal("SecurityGroupIngress", "ingress"), sgRulesHeal("SecurityGroupEgress", "egress")]
11022
+ "AWS::EC2::SecurityGroup": [sgRulesHeal("SecurityGroupIngress", "ingress"), sgRulesHeal("SecurityGroupEgress", "egress")],
11023
+ "AWS::AppSync::GraphQLSchema": [{
11024
+ key: "Definition",
11025
+ liveIsDeclared: (properties, aws) => typeof properties["Definition"] === "string" && properties["Definition"] !== "" && aws["Definition"] === properties["Definition"]
11026
+ }]
10849
11027
  }));
10850
11028
  function staleTablePolicyBaseline(observed, properties, aws) {
10851
11029
  const recorded = readStreamPolicy(observed);
@@ -10938,7 +11116,7 @@ function declaredTrueProperties(properties) {
10938
11116
 
10939
11117
  // src/cli/commands/drift/secret-resolution.ts
10940
11118
  function containsDynamicReference$1(value) {
10941
- if (typeof value === "string") return value.includes("{{resolve:");
11119
+ if (typeof value === "string") return mentionsDynamicReference(value);
10942
11120
  if (Array.isArray(value)) return value.some(containsDynamicReference$1);
10943
11121
  if (value !== null && typeof value === "object") return Object.values(value).some(containsDynamicReference$1);
10944
11122
  return false;
@@ -10955,7 +11133,7 @@ function survivingDynamicReferences(value) {
10955
11133
  }
10956
11134
  function collectDynamicReferencePaths(value, into, path = "") {
10957
11135
  if (typeof value === "string") {
10958
- if (value.includes("{{resolve:")) into.add(path);
11136
+ if (mentionsDynamicReference(value)) into.add(path);
10959
11137
  return;
10960
11138
  }
10961
11139
  if (Array.isArray(value)) {
@@ -10966,7 +11144,7 @@ function collectDynamicReferencePaths(value, into, path = "") {
10966
11144
  }
10967
11145
  function collectSecretMaskPaths(value, into, path = "") {
10968
11146
  if (typeof value === "string") {
10969
- if (value === "***") into.add(path);
11147
+ if (isMaskLeaf(value)) into.add(path);
10970
11148
  return;
10971
11149
  }
10972
11150
  if (Array.isArray(value)) {
@@ -11095,7 +11273,7 @@ async function resolveStateSecretExpressions(props, resolvers, secrets, options)
11095
11273
  };
11096
11274
  const walk = async (v, path) => {
11097
11275
  if (typeof v === "string") {
11098
- if (!v.includes("{{resolve:")) return v;
11276
+ if (!mentionsDynamicReference(v)) return v;
11099
11277
  refuseUnprovenDriftSecret(v, path, logicalId, consumerRegion, producerRegions, recordedRegions);
11100
11278
  const resolved = await resolveDriftLeafByRegion(v, path, logicalId, consumerRegion, producerRegions.regions, resolvers, ctx, recordedRegions);
11101
11279
  const survivors = survivingDynamicReferences(resolved).filter((t) => v.includes(t));
@@ -11139,7 +11317,12 @@ function refusedBaselineRemedy(record) {
11139
11317
 
11140
11318
  // src/cli/commands/drift/redaction.ts
11141
11319
  function noEchoPathsClause(record) {
11142
- const marked = record === void 0 ? void 0 : noEchoLeavesOf(record);
11320
+ return pathsClause(record === void 0 ? void 0 : noEchoLeavesOf(record));
11321
+ }
11322
+ function maskedEchoPathsClause(record) {
11323
+ return pathsClause(record === void 0 ? void 0 : observedMaskedLeavesOf(record));
11324
+ }
11325
+ function pathsClause(marked) {
11143
11326
  if (marked === void 0 || marked.length === 0) return "";
11144
11327
  return ` at ${marked.map((coordinate) => coordinate.map((segment, i) => typeof segment === "number" ? `[${segment}]` : i === 0 ? segment : `.${segment}`).join("")).map((path) => displaySafe(path)).join(", ")}`;
11145
11328
  }
@@ -11157,38 +11340,62 @@ function revertPathSegments(path) {
11157
11340
  return segments;
11158
11341
  }
11159
11342
  function partitionNoEchoParameterChanges(changes, record, baseline) {
11160
- const marked = noEchoLeavesOf(record);
11343
+ const { kept, paths } = partitionMarkedMaskChanges(changes, noEchoLeavesOf(record), record.properties ?? {}, baseline);
11344
+ return {
11345
+ kept,
11346
+ noEchoParameterPaths: paths
11347
+ };
11348
+ }
11349
+ function partitionMaskedEchoChanges(changes, record, baseline) {
11350
+ const { kept, paths } = partitionMarkedMaskChanges(changes, observedMaskedLeavesOf(record), record.properties ?? {}, baseline, true);
11351
+ return {
11352
+ kept,
11353
+ maskedEchoPaths: paths
11354
+ };
11355
+ }
11356
+ function segmentsOf(path, marked) {
11357
+ for (const leaf of marked) {
11358
+ let spelled = "";
11359
+ for (let k = 0; k < leaf.length; k++) {
11360
+ const segment = leaf[k];
11361
+ if (typeof segment === "number") break;
11362
+ spelled = k === 0 ? segment : `${spelled}.${segment}`;
11363
+ if (spelled === path) return leaf.slice(0, k + 1);
11364
+ }
11365
+ }
11366
+ }
11367
+ function partitionMarkedMaskChanges(changes, marked, properties, baseline, bySegments = false) {
11161
11368
  if (marked === void 0 || marked.length === 0) return {
11162
11369
  kept: changes,
11163
- noEchoParameterPaths: []
11370
+ paths: []
11164
11371
  };
11165
- const properties = record.properties ?? {};
11166
11372
  const isMarked = (coordinate) => isMarkedCoordinate(coordinate, marked) || marked.some((leaf) => leaf.length > coordinate.length && coordinate.every((segment, i) => String(segment) === String(leaf[i])));
11167
11373
  const isWithinMarked = (coordinate) => marked.some((leaf) => leaf.length <= coordinate.length && leaf.every((segment, i) => String(segment) === String(coordinate[i])));
11168
11374
  const kept = [];
11169
- const noEchoParameterPaths = [];
11375
+ const paths = [];
11170
11376
  for (const change of changes) {
11171
- const coordinate = change.path.split(".");
11172
- if (marked.some((leaf) => {
11377
+ const segmented = bySegments ? segmentsOf(change.path, marked) : void 0;
11378
+ const coordinate = segmented ?? change.path.split(".");
11379
+ if ((segmented !== void 0 || !bySegments && marked.some((leaf) => {
11173
11380
  const n = Math.min(leaf.length, coordinate.length);
11174
11381
  for (let i = 0; i < n; i++) if (leaf[i] !== coordinate[i]) return false;
11175
11382
  return true;
11176
- }) && carriesSecretMask(change.stateValue) && !pathCrossesDottedKey(properties, change.path) && !pathCrossesDottedKey(baseline, change.path) && equalModuloMarkedMask(change.stateValue, change.awsValue, "***", coordinate, isMarked, isWithinMarked)) {
11177
- noEchoParameterPaths.push(change.path);
11383
+ })) && holdsMaskLeaf(change.stateValue) && (bySegments || !pathCrossesDottedKey(properties, change.path) && !pathCrossesDottedKey(baseline, change.path)) && equalModuloMarkedMask(change.stateValue, change.awsValue, "***", coordinate, isMarked, isWithinMarked)) {
11384
+ paths.push(change.path);
11178
11385
  continue;
11179
11386
  }
11180
11387
  kept.push(change);
11181
11388
  }
11182
11389
  return {
11183
11390
  kept,
11184
- noEchoParameterPaths
11391
+ paths
11185
11392
  };
11186
11393
  }
11187
11394
  function partitionUncertifiedBaselineChanges(changes, properties, baseline) {
11188
11395
  const kept = [];
11189
11396
  const uncertifiedPaths = [];
11190
11397
  for (const change of changes) {
11191
- if (carriesSecretMask(change.stateValue) && isUncertifiedBaselineMaskPosition(properties, change.path) && !pathCrossesDottedKey(baseline, change.path) && equalModuloMask(change.stateValue, change.awsValue, "***")) {
11398
+ if (holdsMaskLeaf(change.stateValue) && isUncertifiedBaselineMaskPosition(properties, change.path) && !pathCrossesDottedKey(baseline, change.path) && equalModuloMask(change.stateValue, change.awsValue, "***")) {
11192
11399
  uncertifiedPaths.push(change.path);
11193
11400
  continue;
11194
11401
  }
@@ -11216,13 +11423,13 @@ function redactDriftValue(value, secrets, secretBearing) {
11216
11423
  }
11217
11424
  function acceptRefusalReason(change, maskedPaths) {
11218
11425
  if (!maskedPaths.has(change.path)) return void 0;
11219
- if (change.path.includes("***")) return "its property NAME came back carrying a secret value, so cdkd cannot name the key to write — and no redaction pass can clear it either, since they all walk values and never keys. ROTATE the secret; that is the only remedy";
11426
+ if (mentionsMask(change.path)) return "its property NAME came back carrying a secret value, so cdkd cannot name the key to write — and no redaction pass can clear it either, since they all walk values and never keys. ROTATE the secret; that is the only remedy";
11220
11427
  if (change.awsValue === void 0) return "AWS no longer reports it, and accepting an absence DELETES the key — which at or above a secret dynamic reference would erase the reference out of cdkd state. Use --revert to push it back, or re-deploy";
11221
- if (change.stateValue === "***") return "the value that belongs at this position is unknown to cdkd — the baseline holds only the redaction mask, so accepting would write AWS-held plaintext over a deliberate redaction. Where cdkd wrote that mask because it could not pair the readback with a secret reference, a deploy that CHANGES this resource re-captures the baseline, and a deploy that changes nothing replaces the mask only when the resource still reads back as its baseline records, the resource's own secret reference resolves to the value AWS holds there, and nothing in the resource's recorded properties is masked. Where the mask stands for a NoEcho custom-resource value or for the Fn::Base64 encoding of a secret value, cdkd never records the value, so no deploy replaces the mask";
11428
+ if (isMaskLeaf(change.stateValue)) return "the value that belongs at this position is unknown to cdkd — the baseline holds only the redaction mask, so accepting would write AWS-held plaintext over a deliberate redaction. Where cdkd wrote that mask because it could not pair the readback with a secret reference, a deploy that CHANGES this resource re-captures the baseline, and a deploy that changes nothing replaces the mask only when the resource still reads back as its baseline records, the resource's own secret reference resolves to the value AWS holds there, and nothing in the resource's recorded properties is masked. Where the mask stands for a NoEcho custom-resource value or for the Fn::Base64 encoding of a secret value, cdkd never records the value, so no deploy replaces the mask";
11222
11429
  return "it carries a secret dynamic reference and the value AWS currently holds is not the one the reference resolves to";
11223
11430
  }
11224
11431
  function redactDriftChanges(changes, secrets, secretPaths, maskPaths) {
11225
- if (!hasMaskableValues(secrets) && secretPaths.size === 0 && maskPaths.size === 0 && !changes.some((change) => carriesSecretMask(change.stateValue))) return {
11432
+ if (!hasMaskableValues(secrets) && secretPaths.size === 0 && maskPaths.size === 0 && !changes.some((change) => holdsMaskLeaf(change.stateValue))) return {
11226
11433
  changes,
11227
11434
  maskedPaths: /* @__PURE__ */ new Set()
11228
11435
  };
@@ -11232,12 +11439,12 @@ function redactDriftChanges(changes, secrets, secretPaths, maskPaths) {
11232
11439
  const maskedPath = maskSecretsInText(change.path, secrets);
11233
11440
  const positionIsSecret = isSecretBearingPath(change.path, secretPaths) || isSecretBearingPath(change.path, maskPaths);
11234
11441
  const nameCarriesSecret = maskedPath !== change.path;
11235
- const stateValueIsMask = carriesSecretMask(change.stateValue);
11442
+ const stateValueIsMask = holdsMaskLeaf(change.stateValue);
11236
11443
  const secretBearing = positionIsSecret || nameCarriesSecret || stateValueIsMask;
11237
11444
  if (secretPaths.has(change.path) && change.awsValue === void 0) continue;
11238
11445
  const stateValue = redactDriftValue(change.stateValue, secrets, secretBearing);
11239
11446
  const awsValue = redactDriftValue(change.awsValue, secrets, secretBearing);
11240
- if (maskedPath !== change.path || secretBearing && awsValue === "***" || secretBearing && change.awsValue === void 0) maskedPaths.add(maskedPath);
11447
+ if (maskedPath !== change.path || secretBearing && isMaskLeaf(awsValue) || secretBearing && change.awsValue === void 0) maskedPaths.add(maskedPath);
11241
11448
  redacted.push({
11242
11449
  path: maskedPath,
11243
11450
  stateValue,
@@ -11249,11 +11456,30 @@ function redactDriftChanges(changes, secrets, secretPaths, maskPaths) {
11249
11456
  maskedPaths
11250
11457
  };
11251
11458
  }
11252
- function maskMarkedNoEchoBaseline(baseline, record, observed) {
11459
+ function maskMarkedNoEchoBaseline(baseline, record, observed, live) {
11253
11460
  const marked = noEchoLeavesOf(record) ?? [];
11254
11461
  if (observed) {
11255
11462
  const coordinates = [...marked, ...maskedLeafCoordinatesOf(record.properties ?? {})];
11256
- return coordinates.length === 0 ? baseline : maskReadbackAtCoordinates(baseline, record.properties ?? {}, coordinates);
11463
+ const positioned = coordinates.length === 0 ? baseline : maskReadbackAtCoordinates(baseline, record.properties ?? {}, coordinates);
11464
+ const named = observedMaskedLeavesOf(record) ?? [];
11465
+ const learnedLeaves = live === void 0 || named.length === 0 ? [] : maskOffTemplateEchoes({
11466
+ bag: positioned,
11467
+ readback: live,
11468
+ properties: record.properties ?? {},
11469
+ noEchoLeaves: record.noEchoLeaves,
11470
+ physicalId: record.physicalId
11471
+ }).leaves;
11472
+ const valueMasked = maskAtCoordinates(positioned, learnedLeaves);
11473
+ const byIndex = maskAtCoordinates(valueMasked, named);
11474
+ const remaining = named.map((coordinate) => {
11475
+ const list = coordinate.findIndex((segment) => typeof segment === "number");
11476
+ if (list < 0) return coordinate;
11477
+ const path = coordinate.slice(0, list);
11478
+ const recorded = valueAtCoordinate(record.observedProperties, path);
11479
+ if (JSON.stringify(valueAtCoordinate(byIndex, path)) === JSON.stringify(recorded)) return coordinate;
11480
+ return learnedLeaves.some((leaf) => leaf.length > path.length && path.every((segment, i) => segment === leaf[i])) ? void 0 : path;
11481
+ }).filter((c) => c !== void 0);
11482
+ return maskAtCoordinates(valueMasked, remaining);
11257
11483
  }
11258
11484
  if (marked.length === 0) return baseline;
11259
11485
  const recorded = record.properties ?? {};
@@ -11284,6 +11510,7 @@ function notComparedReason(cause, record) {
11284
11510
  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)",
11285
11511
  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}`),
11286
11512
  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)`,
11513
+ 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)`,
11287
11514
  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)"
11288
11515
  }[cause];
11289
11516
  }
@@ -11965,6 +12192,21 @@ function setAtPath(target, path, value) {
11965
12192
  }
11966
12193
  defineOwnKey(cursor, segments[segments.length - 1], value);
11967
12194
  }
12195
+ async function stillReportedAfterAccept(provider, resourceType, newBaseline, aws, properties, acceptedPaths) {
12196
+ if (!provider.canonicalizeDriftPair || acceptedPaths.length === 0) return [];
12197
+ const side = (bag) => provider.canonicalizeDriftProperties ? provider.canonicalizeDriftProperties(resourceType, bag) : bag;
12198
+ try {
12199
+ const baseline = side(newBaseline);
12200
+ const pair = await provider.canonicalizeDriftPair(resourceType, baseline, side(aws), properties);
12201
+ if (pair.baseline === baseline) return [];
12202
+ return acceptedPaths.filter((path) => {
12203
+ const rewritten = getAtPath(pair.baseline, path);
12204
+ return !deepEqualUnordered(rewritten, getAtPath(baseline, path)) && !deepEqualUnordered(rewritten, getAtPath(pair.aws, path));
12205
+ });
12206
+ } catch {
12207
+ return [];
12208
+ }
12209
+ }
11968
12210
  async function runAccept(reports, regionScope, stateBackend, stateConfig, awsClients, options) {
11969
12211
  const logger = getLogger();
11970
12212
  const out = humanTextSink(options.json);
@@ -12038,15 +12280,19 @@ async function runAccept(reports, regionScope, stateBackend, stateConfig, awsCli
12038
12280
  logger.warn(` ! ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): '${displayDriftPath(outcome, change.path)}' was NOT recorded — after redaction cdkd state holds a different value at that property. Usually an unresolved '{{resolve:...}}' reference sits there and wins over an accepted value (change the template if that reference is wrong); a readback value cdkd cannot compare is never called recorded.`);
12039
12281
  }
12040
12282
  if (recordedChanges > 0) acceptedResourceCount++;
12041
- const written = maskMarkedNoEchoBaseline(redactedBaseline, existing, true);
12283
+ for (const path of await stillReportedAfterAccept(regionScope(report.region).registry.getProviderFor({
12284
+ resourceType: outcome.resourceType,
12285
+ provisionedBy: existing.provisionedBy
12286
+ }).provider, outcome.resourceType, newBaseline, outcome.awsProperties, existing.properties ?? {}, accepted.map((change) => change.path))) logger.warn(safeMsg` ! ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): ` + safeMsg`'${displayDriftPath(outcome, path)}' was recorded, but cdkd drift will keep reporting it: ` + `this property is compared against what the template declares. Only ` + safeMsg`${proseQuoted(cdkdRemedy("cdkd drift", "--revert"))} or a template change clears the report.`);
12287
+ const written = maskMarkedNoEchoBaseline(redactedBaseline, existing, true, outcome.awsProperties);
12042
12288
  const settled = await settleUnsettled(existing, outcome.logicalId, () => regionScope(report.region).registry.getProviderFor({
12043
12289
  resourceType: outcome.resourceType,
12044
12290
  provisionedBy: existing.provisionedBy
12045
12291
  }).provider);
12046
- resources[outcome.logicalId] = {
12292
+ resources[outcome.logicalId] = withOffTemplateEchoesMasked({
12047
12293
  ...settled,
12048
12294
  observedProperties: written
12049
- };
12295
+ }, { readback: outcome.awsProperties }, /* @__PURE__ */ new Set([report.region, report.stackName]));
12050
12296
  }
12051
12297
  const { skippedOutputs: _droppedByAccept, ...carriedState } = report.state;
12052
12298
  const newState = {
@@ -12068,7 +12314,7 @@ async function runAccept(reports, regionScope, stateBackend, stateConfig, awsCli
12068
12314
  }
12069
12315
 
12070
12316
  // src/cli/commands/drift/revert-live-values.ts
12071
- function pairedLiveItems(send, live, wildcardLeaf = isMaskLeaf, carriesWildcard = carriesSecretMask, acceptForcedSingleton = false) {
12317
+ function pairedLiveItems(send, live, wildcardLeaf = isMaskLeaf, carriesWildcard = holdsMaskLeaf, acceptForcedSingleton = false) {
12072
12318
  if (!Array.isArray(live)) return void 0;
12073
12319
  if (acceptForcedSingleton && send.length === 1 && live.length === 1) return live;
12074
12320
  const key = identityKeyFor(send, live);
@@ -12092,12 +12338,9 @@ function pairedLiveItems(send, live, wildcardLeaf = isMaskLeaf, carriesWildcard
12092
12338
  if (wildcardSlots > 1 || compared === 0) return void 0;
12093
12339
  return live;
12094
12340
  }
12095
- function isMaskLeaf(leaf) {
12096
- return leaf === "***";
12097
- }
12098
12341
  function isTokenOrMaskLeaf(leaf) {
12099
- if (leaf === "***") return true;
12100
- return typeof leaf === "string" && leaf.includes("{{resolve:") && isSingleDynamicReferenceToken(leaf);
12342
+ if (isMaskLeaf(leaf)) return true;
12343
+ return typeof leaf === "string" && mentionsDynamicReference(leaf) && isSingleDynamicReferenceToken(leaf);
12101
12344
  }
12102
12345
  function carriesTokenOrMask(value) {
12103
12346
  const seen = /* @__PURE__ */ new Set();
@@ -12151,7 +12394,7 @@ function overlayLiveAtUncertifiedPaths(send, uncertifiedPaths, awsProperties, ba
12151
12394
  }
12152
12395
  const needles = [];
12153
12396
  const collect = (b, l) => {
12154
- if (b === "***") {
12397
+ if (isMaskLeaf(b)) {
12155
12398
  if (typeof l === "string") needles.push(l);
12156
12399
  else recordMaskOnlyLiveSubtree(l, secrets, spelledKeys);
12157
12400
  return;
@@ -12218,14 +12461,14 @@ function withValueAtPath(bag, path, value) {
12218
12461
  return out;
12219
12462
  }
12220
12463
  function preserveLiveValuesAtMaskedLeaves(send, awsProperties, secrets, corroborationSource = send, spelledKeys) {
12221
- if (!carriesSecretMask(send)) return {
12464
+ if (!holdsMaskLeaf(send)) return {
12222
12465
  properties: send,
12223
12466
  unpreservablePaths: []
12224
12467
  };
12225
12468
  const unpreservablePaths = [];
12226
12469
  let changed = false;
12227
12470
  const walk = (value, corr, live, path) => {
12228
- if (value === "***") {
12471
+ if (isMaskLeaf(value)) {
12229
12472
  if (live === void 0) {
12230
12473
  unpreservablePaths.push(path);
12231
12474
  return value;
@@ -12242,7 +12485,7 @@ function preserveLiveValuesAtMaskedLeaves(send, awsProperties, secrets, corrobor
12242
12485
  }
12243
12486
  if (value !== null && typeof value === "object") {
12244
12487
  if (!hasPlainPrototype(value)) {
12245
- if (carriesSecretMask(value)) unpreservablePaths.push(path);
12488
+ if (holdsMaskLeaf(value)) unpreservablePaths.push(path);
12246
12489
  return value;
12247
12490
  }
12248
12491
  const liveObject = isPlainRecord$2(live) ? live : void 0;
@@ -12384,7 +12627,7 @@ function mergeUntemplatedValue(awsValue, desiredValue) {
12384
12627
  }
12385
12628
  function preserveLiveValuesAtUnresolvedTokens(send, awsProperties, unresolvedTokens, secrets) {
12386
12629
  const walk = (value, live) => {
12387
- if (typeof value === "string" && value.includes("{{resolve:")) {
12630
+ if (typeof value === "string" && mentionsDynamicReference(value)) {
12388
12631
  if (!isSingleDynamicReferenceToken(value)) return typeof live === "string" && liveMatchesUnresolvedTokenFrame(value, live, unresolvedTokens, secrets) ? live : value;
12389
12632
  if (live === void 0) return value;
12390
12633
  return typeof live === "string" ? live : value;
@@ -12494,8 +12737,8 @@ function keepRecordedAttributesOverMask(redacted, plaintext, recorded, noEchoDec
12494
12737
  const out = { ...redacted };
12495
12738
  for (const key of Object.keys(redacted)) {
12496
12739
  if (noEchoDeclared?.has(key)) continue;
12497
- if (!hasOwnKey(recorded, key) || !carriesSecretMask(redacted[key])) continue;
12498
- if (carriesSecretMask(recorded[key])) continue;
12740
+ if (!hasOwnKey(recorded, key) || !holdsMaskLeaf(redacted[key])) continue;
12741
+ if (holdsMaskLeaf(recorded[key])) continue;
12499
12742
  if (sameRecordedJson(plaintext[key], recorded[key])) defineOwnKey(out, key, recorded[key]);
12500
12743
  }
12501
12744
  return out;
@@ -12507,7 +12750,10 @@ function sameRecordedJson(candidate, recorded) {
12507
12750
  // src/cli/commands/drift/compare.ts
12508
12751
  async function compareDriftReadback(args) {
12509
12752
  const { region, resolvePrincipalUniqueId, outcomes, logger, secretResolvers, producerRegions, stackSecretNames, resource, logicalId, provider, secrets, printing, aws, readContext, readOnlyPathsLookup, writeOnlyPathsLookup, notComparedPolicyArns } = args;
12510
- const ignorePaths = provider.getDriftUnknownPaths ? provider.getDriftUnknownPaths(resource.resourceType, resource.properties ?? {}) : [];
12753
+ const ignorePaths = provider.getDriftUnknownPaths ? provider.getDriftUnknownPaths(resource.resourceType, resource.properties ?? {}, {
12754
+ noEchoLeaves: resource.noEchoLeaves,
12755
+ maskedPropertyFingerprints: resource.maskedPropertyFingerprints
12756
+ }) : [];
12511
12757
  const unorderedPaths = provider.getDriftUnorderedPaths ? provider.getDriftUnorderedPaths(resource.resourceType) : [];
12512
12758
  const useObserved = resource.observedProperties !== void 0;
12513
12759
  const baseline = useObserved ? resource.observedProperties : resource.properties ?? {};
@@ -12586,10 +12832,14 @@ async function compareDriftReadback(args) {
12586
12832
  resourceType: resource.resourceType
12587
12833
  });
12588
12834
  const noEchoPartitioned = partitionNoEchoParameterChanges(changes, resource, baseline);
12589
- const partitioned = partitionUncertifiedBaselineChanges(noEchoPartitioned.kept, resource.properties ?? {}, baseline);
12835
+ const echoPartitioned = useObserved ? partitionMaskedEchoChanges(noEchoPartitioned.kept, resource, baseline) : {
12836
+ kept: noEchoPartitioned.kept,
12837
+ maskedEchoPaths: []
12838
+ };
12839
+ const partitioned = partitionUncertifiedBaselineChanges(echoPartitioned.kept, resource.properties ?? {}, baseline);
12590
12840
  if (provider.getDriftSecretPathAliases) for (const alias of provider.getDriftSecretPathAliases(resource.resourceType, resource.properties ?? {}, /* @__PURE__ */ new Set([...secretResolutionFailed ? seededSecretPaths : secretPaths, ...maskSecretPaths]))) maskSecretPaths.add(alias);
12591
12841
  const reported = redactDriftChanges(partitioned.kept, secrets, secretResolutionFailed ? seededSecretPaths : secretPaths, maskSecretPaths);
12592
- const notComparedCause = secretResolutionFailed ? "refused" : partitioned.uncertifiedPaths.length > 0 ? "uncertifiedBaseline" : unresolvedTokens.size > 0 ? "unresolvedToken" : noEchoPartitioned.noEchoParameterPaths.length > 0 ? "noEchoParameter" : void 0;
12842
+ const notComparedCause = secretResolutionFailed ? "refused" : partitioned.uncertifiedPaths.length > 0 ? "uncertifiedBaseline" : unresolvedTokens.size > 0 ? "unresolvedToken" : noEchoPartitioned.noEchoParameterPaths.length > 0 ? "noEchoParameter" : echoPartitioned.maskedEchoPaths.length > 0 ? "maskedEcho" : void 0;
12593
12843
  if (reported.changes.length === 0) {
12594
12844
  if (notComparedCause !== void 0) outcomes.push({
12595
12845
  kind: "notCompared",
@@ -12612,6 +12862,7 @@ async function compareDriftReadback(args) {
12612
12862
  printingNeedles: unionOfSecretBags([printing, stackSecretNames]),
12613
12863
  uncertifiedPaths: partitioned.uncertifiedPaths,
12614
12864
  noEchoParameterPaths: noEchoPartitioned.noEchoParameterPaths,
12865
+ maskedEchoPaths: echoPartitioned.maskedEchoPaths,
12615
12866
  secretsIncomplete: secretResolutionFailed || unresolvedTokens.size > 0,
12616
12867
  notComparedCause
12617
12868
  });
@@ -12994,7 +13245,7 @@ function revertWriteOnlyResendNames(resourceType, properties, writeOnlyNames) {
12994
13245
  if (!hasOwnKey(properties, name) || unreadableCreateOnly.has(name)) continue;
12995
13246
  const value = properties[name];
12996
13247
  if (value === void 0 || value === null) continue;
12997
- if (carriesSecretMask(value) || carriesIntrinsicObject(value)) continue;
13248
+ if (holdsMaskLeaf(value) || carriesIntrinsicObject(value)) continue;
12998
13249
  names.push(name);
12999
13250
  }
13000
13251
  return names;
@@ -13029,7 +13280,7 @@ function withDeclaredWriteOnlyValues(send, resolvedProperties, names, paths) {
13029
13280
  wholesale.push(name);
13030
13281
  }
13031
13282
  }
13032
- if (carriesDynamicReference(next) || carriesSecretMask(next)) {
13283
+ if (carriesDynamicReference(next) || holdsMaskLeaf(next)) {
13033
13284
  skipped.push(name);
13034
13285
  const at = wholesale.indexOf(name);
13035
13286
  if (at !== -1) wholesale.splice(at, 1);
@@ -13904,7 +14155,7 @@ async function revertDriftedOutcome(args) {
13904
14155
  logger.error(` ✗ ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): ` + (isDriftSecretRefusal(err) ? `refused to re-resolve a dynamic reference this resource's state records — ` : `could not re-resolve the dynamic reference(s) this resource's state records — `) + `${maskSecretsInText(describeAwsFailure(err).detail, secrets)}`);
13905
14156
  return;
13906
14157
  }
13907
- const unrevertablePaths = outcome.changes.map((c) => c.path).filter((path) => (path.split(".", 1)[0] ?? "").includes("***"));
14158
+ const unrevertablePaths = outcome.changes.map((c) => c.path).filter((path) => mentionsMask(path.split(".", 1)[0] ?? ""));
13908
14159
  if (stateResource.observedProperties === void 0) {
13909
14160
  const driftedTopLevelKeys = /* @__PURE__ */ new Set();
13910
14161
  for (const change of outcome.changes) {
@@ -14096,6 +14347,8 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
14096
14347
  settledCount++;
14097
14348
  }
14098
14349
  let recordedCount = 0;
14350
+ const liveByLogicalId = /* @__PURE__ */ new Map();
14351
+ for (const o of report.outcomes) if (o.kind === "drifted") liveByLogicalId.set(o.logicalId, o.awsProperties);
14099
14352
  for (const [logicalId, delta] of narrowedByLogicalId) {
14100
14353
  const existing = resources[logicalId];
14101
14354
  if (!existing) continue;
@@ -14116,7 +14369,8 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
14116
14369
  }
14117
14370
  if (!changed) continue;
14118
14371
  recordedCount++;
14119
- const writtenBaseline = maskMarkedNoEchoBaseline(newBaseline, existing, hasObserved);
14372
+ const live = liveByLogicalId.get(logicalId);
14373
+ const writtenBaseline = maskMarkedNoEchoBaseline(newBaseline, existing, hasObserved, live);
14120
14374
  resources[logicalId] = hasObserved ? {
14121
14375
  ...existing,
14122
14376
  observedProperties: writtenBaseline
@@ -14124,6 +14378,7 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
14124
14378
  ...existing,
14125
14379
  properties: writtenBaseline
14126
14380
  };
14381
+ if (hasObserved) resources[logicalId] = withOffTemplateEchoesMasked(resources[logicalId], live === void 0 ? {} : { readback: live }, /* @__PURE__ */ new Set([report.region, report.stackName]));
14127
14382
  }
14128
14383
  let reRecordedCount = 0;
14129
14384
  for (const [logicalId, identity] of reRecordedByLogicalId) {
@@ -18206,7 +18461,13 @@ async function resolveIdentifierValue(entry, ctx, deps) {
18206
18461
  return entry.resolve(ctx);
18207
18462
  } catch (stateOnlyError) {
18208
18463
  if (entry.backfill && deps) return await entry.backfill(ctx, deps);
18209
- if (carriesSecretMask(ctx.attributes[entry.field])) throw new RepairableRefusal(maskedIdentifierAttributeReason(entry.field, ctx.logicalId), importRepairCommand(ctx.logicalId));
18464
+ if (recordedSecrecyOf({
18465
+ attributes: ctx.attributes,
18466
+ noEchoAttributeNames: ctx.noEchoAttributeNames
18467
+ }, {
18468
+ field: "attributes",
18469
+ key: entry.field
18470
+ }) !== "clear") throw new RepairableRefusal(maskedIdentifierAttributeReason(entry.field, ctx.logicalId), importRepairCommand(ctx.logicalId));
18210
18471
  throw stateOnlyError;
18211
18472
  }
18212
18473
  }
@@ -18603,7 +18864,7 @@ const COMPOSITE_ID_SPLITTERS = {
18603
18864
  };
18604
18865
 
18605
18866
  // src/cli/commands/export/type-schema.ts
18606
- async function resolveResourceIdentifier(resourceType, logicalId, physicalId, properties, attributes, entry, backfillDeps) {
18867
+ async function resolveResourceIdentifier(resourceType, logicalId, physicalId, properties, attributes, entry, backfillDeps, noEchoAttributeNames) {
18607
18868
  const registered = Object.hasOwn(COMPOSITE_PHYSICAL_ID_IDENTIFIERS, resourceType) ? COMPOSITE_PHYSICAL_ID_IDENTIFIERS[resourceType] : void 0;
18608
18869
  const compositeIdentifier = registered && entry.fields.length === 1 && registered.physicalIdIsIdentifierFor?.includes(entry.fields[0]) && !physicalId.trim().startsWith("arn:") ? void 0 : registered;
18609
18870
  if (compositeIdentifier) {
@@ -18611,7 +18872,8 @@ async function resolveResourceIdentifier(resourceType, logicalId, physicalId, pr
18611
18872
  const value = await resolveIdentifierValue(compositeIdentifier, {
18612
18873
  logicalId,
18613
18874
  physicalId,
18614
- attributes
18875
+ attributes,
18876
+ noEchoAttributeNames
18615
18877
  }, backfillDeps);
18616
18878
  return {
18617
18879
  resourceIdentifier: { [compositeIdentifier.field]: value },
@@ -18823,7 +19085,7 @@ async function resolveChildImportParameters(parentTemplate, parentResolverContex
18823
19085
  stillSkipped.push(key);
18824
19086
  continue;
18825
19087
  }
18826
- if (JSON.stringify(result ?? null).includes("***")) throw new CdkdError(`Cannot export the nested stack row ${quotedOrNotShown(childLogicalId)}: its parameter ${quotedOrNotShown(key)} resolves from a value cdkd stores only as the redaction mask (***), a NoEcho value, so the export has no value to pass to the child. Export the stack without that nested stack and adopt it into CloudFormation by hand, passing the parameter value yourself.`, "EXPORT_MASKED_CHILD_PARAMETER");
19088
+ if (mentionsMask(result ?? null)) throw new CdkdError(`Cannot export the nested stack row ${quotedOrNotShown(childLogicalId)}: its parameter ${quotedOrNotShown(key)} resolves from a value cdkd stores only as the redaction mask (***), a NoEcho value, so the export has no value to pass to the child. Export the stack without that nested stack and adopt it into CloudFormation by hand, passing the parameter value yourself.`, "EXPORT_MASKED_CHILD_PARAMETER");
18827
19089
  if (result === void 0 || result === null) {
18828
19090
  stillSkipped.push(key);
18829
19091
  continue;
@@ -19434,7 +19696,7 @@ async function buildImportPlan(state, template, cfnClient, parentStackName, opti
19434
19696
  continue;
19435
19697
  }
19436
19698
  const noEchoLeaves = noEchoLeavesOf(stateEntry);
19437
- const masksOnlyAtNoEchoLeaves = noEchoLeaves !== void 0 && noEchoLeaves.length > 0 && carriesSecretMask(stateEntry.properties) && !carriesSecretMask(withoutCoordinates(stateEntry.properties, noEchoLeaves));
19699
+ const masksOnlyAtNoEchoLeaves = noEchoLeaves !== void 0 && noEchoLeaves.length > 0 && holdsMaskLeaf(stateEntry.properties) && !holdsMaskLeaf(withoutCoordinates(stateEntry.properties, noEchoLeaves));
19438
19700
  if (masksOnlyAtNoEchoLeaves && IMPORT_UNSUPPORTED_RECREATABLE_TYPES.has(resourceType) && noEchoLeaves.some((coordinate) => typeof coordinate[0] === "string" && NOECHO_PRE_DELETE_KEYS.has(coordinate[0]))) {
19439
19701
  blocked.push({
19440
19702
  logicalId,
@@ -19443,7 +19705,7 @@ async function buildImportPlan(state, template, cfnClient, parentStackName, opti
19443
19705
  });
19444
19706
  continue;
19445
19707
  }
19446
- if (!masksOnlyAtNoEchoLeaves && carriesSecretMask(stateEntry.properties)) {
19708
+ if (!masksOnlyAtNoEchoLeaves && holdsMaskLeaf(stateEntry.properties)) {
19447
19709
  blocked.push({
19448
19710
  logicalId,
19449
19711
  resourceType,
@@ -19528,7 +19790,7 @@ async function buildImportPlan(state, template, cfnClient, parentStackName, opti
19528
19790
  });
19529
19791
  continue;
19530
19792
  }
19531
- resolved = await resolveResourceIdentifier(resourceType, logicalId, stateEntry.physicalId, stateEntry.properties, stateEntry.attributes ?? {}, schemaInfo, backfillDeps);
19793
+ resolved = await resolveResourceIdentifier(resourceType, logicalId, stateEntry.physicalId, stateEntry.properties, stateEntry.attributes ?? {}, schemaInfo, backfillDeps, stateEntry.noEchoAttributeNames);
19532
19794
  } catch (err) {
19533
19795
  blocked.push({
19534
19796
  logicalId,
@@ -19539,7 +19801,7 @@ async function buildImportPlan(state, template, cfnClient, parentStackName, opti
19539
19801
  continue;
19540
19802
  }
19541
19803
  const propertiesOverlay = resolved.propertiesOverlay ?? resolved.resourceIdentifier;
19542
- if ((JSON.stringify(resolved.resourceIdentifier).includes("***") || JSON.stringify(propertiesOverlay).includes("***")) && !(carriesSecretMask(resolved.resourceIdentifier) || carriesSecretMask(propertiesOverlay))) {
19804
+ if ((mentionsMask(resolved.resourceIdentifier) || mentionsMask(propertiesOverlay)) && !(holdsMaskLeaf(resolved.resourceIdentifier) || holdsMaskLeaf(propertiesOverlay))) {
19543
19805
  blocked.push({
19544
19806
  logicalId,
19545
19807
  resourceType,
@@ -19547,7 +19809,7 @@ async function buildImportPlan(state, template, cfnClient, parentStackName, opti
19547
19809
  });
19548
19810
  continue;
19549
19811
  }
19550
- if (carriesSecretMask(resolved.resourceIdentifier) || carriesSecretMask(propertiesOverlay)) {
19812
+ if (holdsMaskLeaf(resolved.resourceIdentifier) || holdsMaskLeaf(propertiesOverlay)) {
19551
19813
  blocked.push({
19552
19814
  logicalId,
19553
19815
  resourceType,
@@ -20300,7 +20562,7 @@ function exportedStackTagsByStack(plans, rootStackName, rootStackTags, warn) {
20300
20562
  if (plan === void 0) return;
20301
20563
  for (const row of plan.nestedStackRows) {
20302
20564
  let rowTags = literalRowTags(rowTagsProperty(plan.template, row.logicalId));
20303
- if (rowTags !== void 0 && Object.values(rowTags).some((v) => v.includes("{{resolve:"))) rowTags = void 0;
20565
+ if (rowTags !== void 0 && Object.values(rowTags).some((v) => mentionsDynamicReference(v))) rowTags = void 0;
20304
20566
  if (rowTags === void 0) {
20305
20567
  warn(`The Tags of nested stack row ${rowIdent(row.logicalId)} in ${quotedOrNotShown(cdkdName)} are not literal, so its exported CloudFormation stack gets only its parent's stack tags; the next 'cdk deploy' of the root stack applies the rest.`);
20306
20568
  rowTags = {};
@@ -21070,8 +21332,43 @@ function unsplicableCachedAttribute(resourceType, attribute, cached) {
21070
21332
  if (carriesDynamicReference(cached)) return "an unresolved dynamic reference";
21071
21333
  if (carriesSensitiveNamedLeaf(cached)) return "a value with a credential-named field";
21072
21334
  }
21335
+ function recordedAttributeValue(orphan, attributes, attribute) {
21336
+ if (Object.hasOwn(attributes, attribute)) {
21337
+ const stored = attributes[attribute];
21338
+ if (isImpossibleEmptyStoredAttribute(orphan.resourceType, attribute, stored)) return void 0;
21339
+ if (stored !== void 0 && isStalePlaceholderArnAttribute(orphan.resourceType, attribute, stored)) return;
21340
+ return stored;
21341
+ }
21342
+ if (!attribute.includes(".")) return void 0;
21343
+ let cursor = attributes;
21344
+ for (const part of attribute.split(".")) {
21345
+ if (cursor === null || typeof cursor !== "object" || !Object.hasOwn(cursor, part)) return;
21346
+ cursor = cursor[part];
21347
+ }
21348
+ return cursor;
21349
+ }
21350
+ function namesAnything(field) {
21351
+ if (Array.isArray(field)) return field.length > 0;
21352
+ return field !== null && typeof field === "object" && Object.keys(field).length > 0;
21353
+ }
21354
+ function secretDerivedLiveAttribute(orphan, attribute) {
21355
+ if (secretPhysicalIdSegment(orphan.resourceType, orphan.physicalId) !== void 0) return "an attribute of a resource whose identifier is a credential";
21356
+ if (isSensitiveAttributeName(attribute)) return "a credential-named attribute";
21357
+ if (isCustomResourceType$1(orphan.resourceType)) return "a custom resource's attribute";
21358
+ if (isSecretValuedAttribute(orphan.resourceType, attribute)) return "a secret-valued attribute";
21359
+ const top = attribute.split(".")[0];
21360
+ const declared = (field) => Array.isArray(field) && field.some((name) => name === attribute || name === top);
21361
+ if (declared(orphan.noEchoAttributeNames)) return "an attribute its provider declared NoEcho";
21362
+ if (declared(orphan.secretNamedAttributes)) return "an attribute holding a secret-derived name";
21363
+ const bag = orphan.attributes;
21364
+ const recorded = isReadableBag(bag) ? recordedAttributeValue(orphan, bag, attribute) : void 0;
21365
+ const secretIn = (value) => carriesSecretMask(value) || containsSecretDynamicReference(value);
21366
+ if (recorded !== void 0) return secretIn(recorded) || carriesSensitiveNamedLeaf(recorded) ? "an attribute state recorded as secret-derived" : void 0;
21367
+ if (secretIn(orphan.properties) || secretIn(orphan.attributes) || secretIn(orphan.observedProperties) || namesAnything(orphan.noEchoLeaves) || namesAnything(orphan.noEchoAttributeNames) || namesAnything(orphan.secretNamedAttributes) || namesAnything(orphan.maskedPropertyFingerprints) || namesAnything(orphan.noEchoValueMacs)) return "an attribute of a secret-carrying record that does not record it";
21368
+ }
21073
21369
 
21074
21370
  // src/analyzer/orphan-rewriter/attribute-fetcher.ts
21371
+ const SECRET_DERIVED_REMEDY = "Remove the reference from the referring resource in the template (or pass the value in another way, such as a parameter) and deploy, then orphan again; --force leaves the reference in place.";
21075
21372
  var AttributeFetcher = class {
21076
21373
  cache = /* @__PURE__ */ new Map();
21077
21374
  logger = getLogger().child("OrphanRewriter");
@@ -21099,6 +21396,10 @@ var AttributeFetcher = class {
21099
21396
  ok: false,
21100
21397
  reason: `state records no usable '${healedAttribute}' for this resource, the value CloudFormation's Ref returns, and the physical id is NOT that value`
21101
21398
  };
21399
+ if (secretPhysicalIdSegment(o.resourceType, o.physicalId) !== void 0) return {
21400
+ ok: false,
21401
+ reason: `the Ref value of ${displayIdent(orphanLogicalId)} carries a credential, so cdkd does not write it into the referring resource's state. ${SECRET_DERIVED_REMEDY}`
21402
+ };
21102
21403
  let maskedKey;
21103
21404
  const value = cfnRefValueFromPhysicalId(o.resourceType, o.physicalId, refStateLookupFromResource(o, (key) => {
21104
21405
  maskedKey = key;
@@ -21133,6 +21434,11 @@ var AttributeFetcher = class {
21133
21434
  reason: `CloudFormation does not expose ${displaySafe(attribute, { asciiOnly: true })} as an attribute of ${displaySafe(orphan.resourceType, { asciiOnly: true })}; cdkd records it for its own identity checks only`
21134
21435
  };
21135
21436
  const recorded = servableRecordedAttribute(orphan, attribute);
21437
+ const secretDerived = secretDerivedLiveAttribute(orphan, attribute);
21438
+ if (secretDerived !== void 0) return {
21439
+ ok: false,
21440
+ reason: `the value of ${displayIdent(orphanLogicalId)}.${displayIdent(attribute)} is ${secretDerived}, so cdkd does not write it into the referring resource's state. Remove the reference from the referring resource in the template (or pass the value in another way, such as a parameter) and deploy, then orphan again; --force leaves the reference in place.`
21441
+ };
21136
21442
  let provider;
21137
21443
  try {
21138
21444
  provider = this.providerRegistry.getProviderFor({
@@ -21558,7 +21864,7 @@ async function orphanCommand(pathArgs, options) {
21558
21864
  printRewriteSummary(result.rewrites, orphanLogicalIds);
21559
21865
  if (result.unresolvable.length > 0 && !options.force) {
21560
21866
  printUnresolvable(result.unresolvable);
21561
- throw new Error(`Orphan aborted: ${result.unresolvable.length} reference(s) could not be resolved.\nRe-run with --force to fall back to cached attribute values from state, or fix the underlying provider/AWS issue and retry.`);
21867
+ throw new Error(`Orphan aborted: ${result.unresolvable.length} reference(s) could not be resolved.\nRe-run with --force to fall back to cached attribute values from state, or fix the underlying provider/AWS issue and retry. A reference refused as secret-derived stays in place under --force too.`);
21562
21868
  }
21563
21869
  if (result.unresolvable.length > 0) {
21564
21870
  printUnresolvable(result.unresolvable);
@@ -21896,7 +22202,7 @@ async function stateOrphanResources(stackName, requested, options) {
21896
22202
  printRewriteSummary(result.rewrites, logicalIds);
21897
22203
  if (result.unresolvable.length > 0 && !options.force) {
21898
22204
  printUnresolvable(result.unresolvable);
21899
- throw new Error(`Orphan aborted: ${result.unresolvable.length} reference(s) could not be resolved.\nRe-run with --force to fall back to cached attribute values from state, or fix the underlying provider/AWS issue and retry.`);
22205
+ throw new Error(`Orphan aborted: ${result.unresolvable.length} reference(s) could not be resolved.\nRe-run with --force to fall back to cached attribute values from state, or fix the underlying provider/AWS issue and retry. A reference refused as secret-derived stays in place under --force too.`);
21900
22206
  }
21901
22207
  if (result.unresolvable.length > 0) {
21902
22208
  printUnresolvable(result.unresolvable);
@@ -22811,11 +23117,28 @@ async function refreshObservedForStack(stackName, region, stateBackend, lockMana
22811
23117
  logger.warn(safeMsg` ✗ ${displayStackName(stackName)}/${displayIdent(logicalId)} ` + safeMsg`(${displayIdent(resource.resourceType)}): ` + `not found in AWS — it was deleted outside cdkd; 'cdkd drift' reports it as deleted.`);
22812
23118
  return;
22813
23119
  }
22814
- resource.observedProperties = redactForState(maskReadbackAtCoordinates(observed, resource.properties ?? {}, [...maskedLeafCoordinatesOf(resource.properties ?? {}), ...noEchoLeavesOf(resource) ?? []]), {
23120
+ const publicSsmProof = await publicSsmProver.proofBagFor(resource.properties ?? {});
23121
+ const redacted = redactForState(maskReadbackAtCoordinates(observed, resource.properties ?? {}, [...maskedLeafCoordinatesOf(resource.properties ?? {}), ...noEchoLeavesOf(resource) ?? []]), {
23122
+ provenance: "state-baseline",
23123
+ secrets: publicSsmProof,
23124
+ source: resource.properties ?? {}
23125
+ });
23126
+ const echoes = maskOffTemplateEchoes({
23127
+ bag: redacted,
23128
+ readback: observed,
23129
+ properties: resource.properties ?? {},
23130
+ noEchoLeaves: resource.noEchoLeaves,
23131
+ physicalId: resource.physicalId,
23132
+ publicTokens: /* @__PURE__ */ new Set([region, stackName]),
23133
+ provenPublic: (token) => provenPublicValue(publicSsmProof, token)
23134
+ });
23135
+ resource.observedProperties = redactForState(echoes.bag, {
22815
23136
  provenance: "state-baseline",
22816
- secrets: await publicSsmProver.proofBagFor(resource.properties ?? {}),
23137
+ secrets: publicSsmProof,
22817
23138
  source: resource.properties ?? {}
22818
23139
  });
23140
+ if (echoes.leaves.length > 0) resource.observedMaskedLeaves = echoes.leaves;
23141
+ else delete resource.observedMaskedLeaves;
22819
23142
  if (logicalId === acceptId) {
22820
23143
  delete resource.observedBaselineRefused;
22821
23144
  delete resource.observedBaselineRefusalReason;
@@ -26859,81 +27182,6 @@ function collectImportableResources(template) {
26859
27182
  return out;
26860
27183
  }
26861
27184
 
26862
- // src/cli/commands/import/discarded-subtree.ts
26863
- const DYNAMIC_REFERENCE_OPENER$1 = "{{resolve:";
26864
- function countDynamicReferenceOpeners(bag) {
26865
- let text;
26866
- try {
26867
- text = JSON.stringify(bag ?? {}) ?? "";
26868
- } catch {
26869
- return;
26870
- }
26871
- let count = 0;
26872
- for (let from = 0;;) {
26873
- const at = text.indexOf(DYNAMIC_REFERENCE_OPENER$1, from);
26874
- if (at === -1) return count;
26875
- count++;
26876
- from = at + 10;
26877
- }
26878
- }
26879
- function isIntrinsicShapedKey(key) {
26880
- return key === "Ref" || key.startsWith("Fn::");
26881
- }
26882
- function isInertDiscardedSubtree(node) {
26883
- if (typeof node === "string") return !node.includes(DYNAMIC_REFERENCE_OPENER$1);
26884
- if (node === null || typeof node !== "object") return true;
26885
- if (Array.isArray(node)) return node.every((element) => isInertDiscardedSubtree(element));
26886
- const record = node;
26887
- const keys = Object.keys(record);
26888
- if (keys.length === 1 && keys[0] === "Ref" && record["Ref"] === "AWS::NoValue") return true;
26889
- return Object.entries(record).every(([key, value]) => !isIntrinsicShapedKey(key) && isInertDiscardedSubtree(value));
26890
- }
26891
- function isStaticSelectIndex(value) {
26892
- if (typeof value === "number") return Number.isInteger(value) && value >= 0;
26893
- return typeof value === "string" && /^(0|[1-9]\d*)$/.test(value);
26894
- }
26895
- function isStaticLookupKey(value) {
26896
- if (typeof value === "string") return !value.includes(DYNAMIC_REFERENCE_OPENER$1);
26897
- return typeof value === "number" || typeof value === "boolean";
26898
- }
26899
- function resolveDiscardsNonInertSubtree(node, conditions, mappings) {
26900
- if (node === null || typeof node !== "object") return false;
26901
- if (Array.isArray(node)) return node.some((element) => resolveDiscardsNonInertSubtree(element, conditions, mappings));
26902
- const record = node;
26903
- const keys = Object.keys(record);
26904
- if (keys.length === 1 && keys[0] === "Fn::If") {
26905
- const args = record["Fn::If"];
26906
- if (!Array.isArray(args) || args.length !== 3 || typeof args[0] !== "string") return true;
26907
- const [conditionName, valueIfTrue, valueIfFalse] = args;
26908
- if (!Object.hasOwn(conditions, conditionName)) return !isInertDiscardedSubtree(valueIfTrue) || !isInertDiscardedSubtree(valueIfFalse);
26909
- const selected = conditions[conditionName] ? valueIfTrue : valueIfFalse;
26910
- if (!isInertDiscardedSubtree(conditions[conditionName] ? valueIfFalse : valueIfTrue)) return true;
26911
- return resolveDiscardsNonInertSubtree(selected, conditions, mappings);
26912
- }
26913
- if (keys.length === 1 && keys[0] === "Fn::FindInMap") {
26914
- const args = record["Fn::FindInMap"];
26915
- if (!Array.isArray(args) || args.length < 3 || args.length > 4) return true;
26916
- if (args.length > 3) {
26917
- if (!isInertDiscardedSubtree(args[3])) return true;
26918
- }
26919
- if (!args.slice(0, 3).every((key) => isStaticLookupKey(key))) {
26920
- if (!isInertDiscardedSubtree(typeof args[0] === "string" && mappings !== null && typeof mappings === "object" && Object.hasOwn(mappings, args[0]) ? mappings[args[0]] : mappings)) return true;
26921
- }
26922
- return args.some((arg) => resolveDiscardsNonInertSubtree(arg, conditions, mappings));
26923
- }
26924
- if (keys.length === 1 && keys[0] === "Fn::Select") {
26925
- const args = record["Fn::Select"];
26926
- if (!Array.isArray(args) || args.length !== 2) return true;
26927
- if (!(isStaticSelectIndex(args[0]) && (!Array.isArray(args[1]) || Number(args[0]) < args[1].length)) && !isInertDiscardedSubtree(args[1])) return true;
26928
- return args.some((arg) => resolveDiscardsNonInertSubtree(arg, conditions, mappings));
26929
- }
26930
- if (keys.length > 1 && keys.some((key) => isIntrinsicShapedKey(key))) {
26931
- if (keys.filter((key) => isIntrinsicShapedKey(key)).length > 1) return true;
26932
- return !keys.every((key) => isInertDiscardedSubtree(record[key]));
26933
- }
26934
- return keys.some((key) => resolveDiscardsNonInertSubtree(record[key], conditions, mappings));
26935
- }
26936
-
26937
27185
  // src/cli/commands/import/pseudo-parameters.ts
26938
27186
  const IMPORT_PREPASS_PSEUDO_PARAMETERS = /* @__PURE__ */ new Set([
26939
27187
  "AWS::AccountId",
@@ -27037,7 +27285,7 @@ async function resolvePseudoParameterIntrinsics(value, region) {
27037
27285
  values.set("AWS::AccountId", accountId);
27038
27286
  }
27039
27287
  const resolved = evaluatePseudoParameterClosure(obj, values);
27040
- return resolved.includes("{{resolve:") ? node : resolved;
27288
+ return mentionsDynamicReference(resolved) ? node : resolved;
27041
27289
  }
27042
27290
  const result = {};
27043
27291
  for (const [k, v] of Object.entries(obj)) defineOwnKey(result, k, await walk(v));
@@ -27191,11 +27439,26 @@ async function captureObservedForImportedResources(stackState, providerRegistry,
27191
27439
  const observed = await provider.readCurrentState(resource.physicalId, logicalId, resource.resourceType, resource.properties ?? {}, buildReadCurrentStateContext(stackState, logicalId));
27192
27440
  if (observed !== void 0 && observed !== RESOURCE_NOT_FOUND) {
27193
27441
  const marked = noEchoLeavesOf(resource) ?? [];
27194
- resource.observedProperties = redactForState(marked.length > 0 ? maskReadbackAtCoordinates(observed, resource.properties ?? {}, marked) : observed, {
27442
+ const redacted = redactForState(marked.length > 0 ? maskReadbackAtCoordinates(observed, resource.properties ?? {}, marked) : observed, {
27443
+ provenance: "state-baseline",
27444
+ secrets: NO_RECORDED_SECRETS,
27445
+ source: resource.properties ?? {}
27446
+ });
27447
+ const echoes = maskOffTemplateEchoes({
27448
+ bag: redacted,
27449
+ readback: observed,
27450
+ properties: resource.properties ?? {},
27451
+ noEchoLeaves: resource.noEchoLeaves,
27452
+ physicalId: resource.physicalId,
27453
+ publicTokens: new Set([stackState.region, stackState.stackName].filter((token) => typeof token === "string" && token !== ""))
27454
+ });
27455
+ resource.observedProperties = redactForState(echoes.bag, {
27195
27456
  provenance: "state-baseline",
27196
27457
  secrets: NO_RECORDED_SECRETS,
27197
27458
  source: resource.properties ?? {}
27198
27459
  });
27460
+ if (echoes.leaves.length > 0) resource.observedMaskedLeaves = echoes.leaves;
27461
+ else delete resource.observedMaskedLeaves;
27199
27462
  }
27200
27463
  } catch (err) {
27201
27464
  logger.debug(`observedProperties capture for imported ${logicalId} (${resource.resourceType}) failed: ${err instanceof Error ? err.name : typeof err} — drift will fall back to template properties for this resource until the next successful deploy.`);
@@ -27203,6 +27466,74 @@ async function captureObservedForImportedResources(stackState, providerRegistry,
27203
27466
  })));
27204
27467
  }
27205
27468
 
27469
+ // src/cli/commands/import/discarded-subtree.ts
27470
+ function countDynamicReferenceOpeners(bag) {
27471
+ let text;
27472
+ try {
27473
+ text = JSON.stringify(bag ?? {}) ?? "";
27474
+ } catch {
27475
+ return;
27476
+ }
27477
+ return countDynamicReferenceOpenings(text);
27478
+ }
27479
+ function isIntrinsicShapedKey(key) {
27480
+ return key === "Ref" || key.startsWith("Fn::");
27481
+ }
27482
+ function isInertDiscardedSubtree(node) {
27483
+ if (typeof node === "string") return !mentionsDynamicReference(node);
27484
+ if (node === null || typeof node !== "object") return true;
27485
+ if (Array.isArray(node)) return node.every((element) => isInertDiscardedSubtree(element));
27486
+ const record = node;
27487
+ const keys = Object.keys(record);
27488
+ if (keys.length === 1 && keys[0] === "Ref" && record["Ref"] === "AWS::NoValue") return true;
27489
+ return Object.entries(record).every(([key, value]) => !isIntrinsicShapedKey(key) && isInertDiscardedSubtree(value));
27490
+ }
27491
+ function isStaticSelectIndex(value) {
27492
+ if (typeof value === "number") return Number.isInteger(value) && value >= 0;
27493
+ return typeof value === "string" && /^(0|[1-9]\d*)$/.test(value);
27494
+ }
27495
+ function isStaticLookupKey(value) {
27496
+ if (typeof value === "string") return !mentionsDynamicReference(value);
27497
+ return typeof value === "number" || typeof value === "boolean";
27498
+ }
27499
+ function resolveDiscardsNonInertSubtree(node, conditions, mappings) {
27500
+ if (node === null || typeof node !== "object") return false;
27501
+ if (Array.isArray(node)) return node.some((element) => resolveDiscardsNonInertSubtree(element, conditions, mappings));
27502
+ const record = node;
27503
+ const keys = Object.keys(record);
27504
+ if (keys.length === 1 && keys[0] === "Fn::If") {
27505
+ const args = record["Fn::If"];
27506
+ if (!Array.isArray(args) || args.length !== 3 || typeof args[0] !== "string") return true;
27507
+ const [conditionName, valueIfTrue, valueIfFalse] = args;
27508
+ if (!Object.hasOwn(conditions, conditionName)) return !isInertDiscardedSubtree(valueIfTrue) || !isInertDiscardedSubtree(valueIfFalse);
27509
+ const selected = conditions[conditionName] ? valueIfTrue : valueIfFalse;
27510
+ if (!isInertDiscardedSubtree(conditions[conditionName] ? valueIfFalse : valueIfTrue)) return true;
27511
+ return resolveDiscardsNonInertSubtree(selected, conditions, mappings);
27512
+ }
27513
+ if (keys.length === 1 && keys[0] === "Fn::FindInMap") {
27514
+ const args = record["Fn::FindInMap"];
27515
+ if (!Array.isArray(args) || args.length < 3 || args.length > 4) return true;
27516
+ if (args.length > 3) {
27517
+ if (!isInertDiscardedSubtree(args[3])) return true;
27518
+ }
27519
+ if (!args.slice(0, 3).every((key) => isStaticLookupKey(key))) {
27520
+ if (!isInertDiscardedSubtree(typeof args[0] === "string" && mappings !== null && typeof mappings === "object" && Object.hasOwn(mappings, args[0]) ? mappings[args[0]] : mappings)) return true;
27521
+ }
27522
+ return args.some((arg) => resolveDiscardsNonInertSubtree(arg, conditions, mappings));
27523
+ }
27524
+ if (keys.length === 1 && keys[0] === "Fn::Select") {
27525
+ const args = record["Fn::Select"];
27526
+ if (!Array.isArray(args) || args.length !== 2) return true;
27527
+ if (!(isStaticSelectIndex(args[0]) && (!Array.isArray(args[1]) || Number(args[0]) < args[1].length)) && !isInertDiscardedSubtree(args[1])) return true;
27528
+ return args.some((arg) => resolveDiscardsNonInertSubtree(arg, conditions, mappings));
27529
+ }
27530
+ if (keys.length > 1 && keys.some((key) => isIntrinsicShapedKey(key))) {
27531
+ if (keys.filter((key) => isIntrinsicShapedKey(key)).length > 1) return true;
27532
+ return !keys.every((key) => isInertDiscardedSubtree(record[key]));
27533
+ }
27534
+ return keys.some((key) => resolveDiscardsNonInertSubtree(record[key], conditions, mappings));
27535
+ }
27536
+
27206
27537
  // src/cli/commands/import/noecho-position.ts
27207
27538
  function positionImportedNoEcho(stackState, inputs, template, conditions, refusals, logger) {
27208
27539
  if (inputs.size === 0) return;
@@ -27604,7 +27935,7 @@ function nestedChildStackTags(parentStackTags, parentDeployedTemplate, rowLogica
27604
27935
  if (entry === null || typeof entry !== "object" || Array.isArray(entry)) continue;
27605
27936
  const { Key: key, Value: value } = entry;
27606
27937
  if (typeof key !== "string") continue;
27607
- if (typeof value === "string" && !value.includes("{{resolve:")) defineOwnKey(tags, key, value);
27938
+ if (typeof value === "string" && !mentionsDynamicReference(value)) defineOwnKey(tags, key, value);
27608
27939
  else delete tags[key];
27609
27940
  }
27610
27941
  return tags;
@@ -27718,11 +28049,10 @@ function collectNames(value, out) {
27718
28049
  }
27719
28050
  for (const child of Object.values(obj)) collectNames(child, out);
27720
28051
  }
27721
- const DYNAMIC_REFERENCE_OPENER = "{{resolve:";
27722
28052
  function dynamicReferenceDowngradePath(synth, deployed, path) {
27723
28053
  if (typeof synth === "string") {
27724
- if (!synth.includes(DYNAMIC_REFERENCE_OPENER)) return void 0;
27725
- return typeof deployed === "string" && deployed.includes(DYNAMIC_REFERENCE_OPENER) ? void 0 : path || "(the whole bag)";
28054
+ if (!mentionsDynamicReference(synth)) return void 0;
28055
+ return typeof deployed === "string" && mentionsDynamicReference(deployed) ? void 0 : path || "(the whole bag)";
27726
28056
  }
27727
28057
  if (synth === null || typeof synth !== "object") return void 0;
27728
28058
  const deployedNode = deployed !== null && typeof deployed === "object" ? deployed : {};
@@ -27879,13 +28209,13 @@ function reimportedAttributes(row, prior) {
27879
28209
  else {
27880
28210
  attributes = Object.create(Object.getPrototypeOf(row));
27881
28211
  for (const [key, value] of Object.entries(row)) {
27882
- const keepRecorded = carriesSecretMask(value) && hasOwnKey(prior, key) && !carriesSecretMask(prior[key]);
28212
+ const keepRecorded = holdsMaskLeaf(value) && hasOwnKey(prior, key) && !holdsMaskLeaf(prior[key]);
27883
28213
  if (keepRecorded) keptRecordedKeys.push(key);
27884
28214
  defineOwnKey(attributes, key, keepRecorded ? prior[key] : value);
27885
28215
  }
27886
- for (const [key, value] of Object.entries(prior)) if (!hasOwnKey(attributes, key) && carriesSecretMask(value)) defineOwnKey(attributes, key, value);
28216
+ for (const [key, value] of Object.entries(prior)) if (!hasOwnKey(attributes, key) && holdsMaskLeaf(value)) defineOwnKey(attributes, key, value);
27887
28217
  }
27888
- const stillMaskedKeys = prior === void 0 ? [] : Object.keys(prior).filter((key) => carriesSecretMask(prior[key]) && hasOwnKey(attributes, key) && carriesSecretMask(attributes[key])).sort();
28218
+ const stillMaskedKeys = prior === void 0 ? [] : Object.keys(prior).filter((key) => holdsMaskLeaf(prior[key]) && hasOwnKey(attributes, key) && holdsMaskLeaf(attributes[key])).sort();
27889
28219
  return {
27890
28220
  attributes,
27891
28221
  stillMaskedKeys,
@@ -27894,7 +28224,7 @@ function reimportedAttributes(row, prior) {
27894
28224
  }
27895
28225
  function withDeclaredNoEchoMasked(attributes, declared) {
27896
28226
  if (!Array.isArray(declared)) return attributes;
27897
- const names = declared.filter((name) => typeof name === "string" && hasOwnKey(attributes, name) && !carriesSecretMask(attributes[name]) && attributes[name] !== void 0 && attributes[name] !== null);
28227
+ const names = declared.filter((name) => typeof name === "string" && hasOwnKey(attributes, name) && !holdsMaskLeaf(attributes[name]) && attributes[name] !== void 0 && attributes[name] !== null);
27898
28228
  if (names.length === 0) return attributes;
27899
28229
  const masked = Object.create(Object.getPrototypeOf(attributes));
27900
28230
  for (const [key, value] of Object.entries(attributes)) defineOwnKey(masked, key, names.includes(key) ? maskWholeValue(value) : value);
@@ -27902,7 +28232,7 @@ function withDeclaredNoEchoMasked(attributes, declared) {
27902
28232
  }
27903
28233
  function noEchoAttributeNamesCarried(prior, attributes) {
27904
28234
  if (!Array.isArray(prior) || attributes === void 0) return {};
27905
- const kept = prior.filter((name) => typeof name === "string" && hasOwnKey(attributes, name) && carriesSecretMask(attributes[name]));
28235
+ const kept = prior.filter((name) => typeof name === "string" && hasOwnKey(attributes, name) && holdsMaskLeaf(attributes[name]));
27906
28236
  return kept.length > 0 ? { noEchoAttributeNames: kept } : {};
27907
28237
  }
27908
28238
  const READS_EVERY_KEY = Symbol("reads every key");
@@ -37487,4 +37817,4 @@ function collectVerbFlags(program) {
37487
37817
  }
37488
37818
 
37489
37819
  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 };
37490
- //# sourceMappingURL=program-avOxa_7W.js.map
37820
+ //# sourceMappingURL=program-DR3X8-7x.js.map