@go-to-k/cdkd 0.296.24 → 0.296.26

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.
@@ -2,8 +2,8 @@ import { a as runWithStackAwsClients, i as resetAwsClients, o as setAwsClients,
2
2
  import { A as UNRENDERABLE, B as stringifyJsonPayload, D as SAFE_MSG_ALTERED_CHAR, F as displayStackName, I as isPasteableIdent, M as displayAwsMessage, N as displayIdent, O as SECRET_REF_MAX_CODE_POINTS, P as displaySafe, R as plainIdentOr, T as withStackName, V as truncateCodePoints, _ as derivesPatternBName, a as getLogger, f as getLiveRenderer, h as PATTERN_B_RESOURCE_TYPES, j as cutMarker, k as STACK_REF_MAX_CODE_POINTS, l as runStackBuffered, m as PATTERN_B_NAME_PROPERTIES, o as isStdoutReservedForPayload, p as PATTERN_B_NAME_OPTIONS, r as safeStringify, s as reserveStdoutForPayload, t as describeAwsFailure, v as explicitNamePropertyFor, w as withSkipPrefix, y as generateResourceName, z as safeMsg } from "./aws-failure-text-BaWeCWRz.js";
3
3
  import { $t as AccountIdUnavailableError, An as commandHole, Bn as setPasteableRunFlags, D as VALUE_NOT_SHOWN, E as assertRegionMatch, En as TIMEOUT_FLAG_RESOURCE_TYPE, Fn as plainOrDescribed, Ft as buildLockContentionMessage, G as runDeleteAttempt, Gt as producerCoordinateKey, Ht as DEFAULT_STATE_PREFIX, In as quotedOrDescribed, It as forceQuitRecoveryClause, Jt as withPasteableAwsProfile, Kt as producerRecordKey, Ln as shellBoundedDisplay, Lt as formatLockExpiry, Mn as isInertUnquoted, Nn as pasteableCommand, Nt as UNREPRODUCIBLE_LOCK_CLAUSE, On as SHELL_ACTIVE_WHY, P as remedyLogicalId, Pt as buildForceUnlockCommand, Qn as isAmbiguousOutcomeError, Qt as credentialFingerprint, Rn as shellQuote, Rt as formatLockOperation, T as RESOURCE_NOT_FOUND, Tn as withErrorHandling, Ut as injectiveKey, Vn as setPasteableVerbFlags, Vt as CUSTOM_RESOURCE_RESPONSE_PREFIX, Xt as ambientCredentialConfig, Yt as ambientClientDefaults, Z as isAwsCliLiteral, Zt as clientDefaultsFor, _n as ResourceUpdateNotSupportedError, an as DeployCancelledError, ar as isThrottlingError, cn as LocalInvokeBuildError$1, er as isRetryableTransientError, fn as MalformedProducerRecordRefusalError, ft as logicalIdShown, gn as ResourceTimeoutError, hn as ProvisioningError, ir as isMarkedNonRetryable, it as isInterruptedWaitError, ln as LocalStartServiceError, mn as PartialFailureError, mt as resourceTypeShown, n as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, nr as retryClassificationText, nt as endCommandInterruptScope, on as DynamicReferenceRegionAmbiguousError, or as markNonRetryable, pn as NestedStackChildDirectDestroyError, qt as setPasteableAwsProfile, rn as CrossAccountSecretRefusalError, rt as interruptWatchListenerCount, s as readRecordedPrincipals, sn as IntrinsicResolutionRefusalError, t as IAM_PRINCIPAL_NAME, tn as CdkdError, tr as isTransientServerError, tt as beginCommandInterruptScope, vn as StackHasActiveImportsError, wn as normalizeAwsError, xn as SynthesisError, yn as StackTerminationProtectionError, zn as withheldTargetClause, zt as formatLockOwner } from "./iam-policy-targets-BoZuWtxK.js";
4
4
  import { n as awsClientDefaults, r as getAssumedRoleCredentials, u as formatAuthority } from "./aws-client-defaults-D0q0z4dG.js";
5
- import { $ as green, $a as describeTypeWithThrottleRetry, $i as refuseMalformedResourceAttributesForOrphan, $o as isLockInfoExpired, $r as carriesDynamicReference, $s as AssetManifestLoader, $t as updatePartialReason, A as readProtection, Aa as findReplacedReadersOfRecreateTargets, Ac as defineOwnKey, Ai as malformedOrphanRecordsRefusalMessage, An as collectPublishedOutputNames, Ao as scrubResourceRecord, Ar as producerRegionsFromState, As as readBootstrapMarkerBody, At as destroyStackRecordsView, Bi as malformedResourcesWarning, Bo as provenPublicValue, Br as callerEnvCredentials, Bs as finchSecretArgvRefusal, Bt as recheckFailedPlan, C as noEchoComparisonForTemplate, Ca as withheldAccountClause, Cc as expectedOwnerParam, Ci as isReadableResourceEntry, Cn as secretSafeKeyDisplay, Co as shareLogOnlyValues, Cs as AssetModeResolver, Ct as journaledOrphanLines, D as PROTECTION_PROPERTY_BY_TYPE, Dc as AssemblyReader, Di as malformedLocalOutputsWarning, Dn as isWholeDynamicReferenceValue, Do as maskSecretsInText, Dr as IntrinsicFunctionResolver, Ds as getBootstrapMarkerKey, Dt as replayFailedOperations, E as recordedProtectionNote, Ea as unwrittenCreateOnlyReplacement, Ec as derivePartitionAndUrlSuffix, Ei as malformedExportSourceWarning, En as exportNameSecretExposure, Eo as maskSecretsInError, Er as INTRINSIC_KEYS, Es as ensureAssetStorage, Et as sameJournaledOrphans, Fa as renderStatefulReason, Fc as absoluteAssemblyPathEscape, Fi as malformedOutputsRefusalMessage, Fn as maskingRetryLogger, Fo as identityKeyFor, Fr as explicitRoleArnOrThrow, Fs as resolveDockerContextDirectory, Ft as demoteSupersededOrphans, Go as wholeStringLeavesOf, Gs as partitionSensitiveEnv, Gt as findNestedStackTypeChanges, Hi as malformedStateRefusalMessage, Ho as recordMaskOnlyValuesIn, Hs as getDockerCmd, Ht as replacementNeverSwapped, Ic as describeFileReadFailure, Ii as malformedOutputsWarning, In as constructPathOf, Io as inheritNestedStackParameterAssociations, Ir as isIamRoleArn, Is as describeDockerCapturedOutput, It as isJournaledOrphan, J as formatResourceLine, Ji as refuseMalformedOrphans, Jo as STATE_SOURCED_READBACK_RULES, Jr as coerceParameterTypedValue, Js as runDockerForeground, Ki as refuseMalformedOrphanRecords, Ko as STATE_SOURCED_BASELINE_RULES, Ks as redactDockerArgvValues, Lc as displayAssemblyPath, Li as malformedRenderedContainersWarning, Ln as findDestructiveChanges, Lo as recordNestedStackParameterExpressions, Lr as sendableAssumeRoleCommand, Ls as describeDockerExecFailure, Lt as isReplacementOrphan, Ma as MULTI_REGION_RECREATE_BLOCKED_TYPES, Mc as hasPlainPrototype, Mi as malformedOrphanRowsKeptWarning, Mn as bindingSkippedOutputs, Mo as dynamicReferenceTokens, Mr as applyRoleArnIfSet, Ms as validateContainerRepoName, Mt as withStackRecords, Na as isStatefulRecreateTargetForReplace, Nc as nullPrototypeRecord, Ni as malformedOrphansRefusalMessage, Nn as DEFAULT_RESOURCE_TIMEOUT_MS, No as isUncertifiedBaselineMaskPosition, Nr as assertFlagRoleArn, Ns as buildDenyExternalAccessPolicy, Nt as removeProtectionTypeList, O as isProtectionValueActive, Oa as NO_CC_HANDLERS_REASON, Oc as StageLoadError, Oi as malformedLocalResourceEntriesWarning, On as noEchoParameterValueSeed, Oo as markSameGenerationBag, Or as poisonRenderedSpellingsCollidingIn, Os as isCrossRegionRedirect, Ot as replayRollback, Pa as isStatefulRecreateTargetSync, Pc as ownValue, Pi as malformedOrphansWarning, Pn as DEFAULT_RESOURCE_WARN_AFTER_MS, Po as pathCrossesDottedKey, Pr as assertSendableRoleArn, Ps as buildDockerImage, Pt as recordAfterRollbackUpdate, Q as gray, Qa as templateResourceTypes, Qi as refuseMalformedOutputsForDestroy, Qo as LockManager, Qr as isImpossibleEmptyStoredAttribute, Qs as stripControlChars, Qt as updatePartialMessage, Rc as renderAssemblyPathEscape, Ri as malformedResourceEntriesWarning, Rn as formatDestructiveChange, Rr as AWS_CREDENTIAL_ENV_KEYS, Rs as describeDockerFailure, Rt as planFailedOps, S as noEchoAttributeNamesOf, Sa as unreadableResourceEntries, Sc as decodeListingKey, Si as isReadableOrphanRecord, Sn as secretBearingStateKeyWarning, So as recordLogOnlyValue, Ss as rewriteTemplateAssetReferences, St as isHandledOrphan, T as recordedProtectionEvidence, Tc as canonicalizeRegion, Ti as malformedExportNamesWarning, Tn as exportNameNoEchoParameters, To as errorCauseChain, Tr as DiffCalculator, Ts as assertAssetBucketRegion, Tt as makeForeignHolderScan, Ui as previewableOrphanRecords, Un as withCreateTokenLedger, Uo as recordNoEchoAttributeValues, Us as isDockerClientEnvKey, Ut as resolveReplacementOldType, Vc as resolveBucketRegion, Vi as malformedScrubResourceEntriesRefusalMessage, Vn as ledgerForStack, Vo as recordMaskOnlyValue, Vr as envCredentialsAreAssumedRole, Vs as formatDockerLoginError, Vt as recordUnderIdIsNotOwn, Wi as refuseDivergentRecordRegionForDestroy, Wo as recordProvenPublicExpression, Ws as isMalformedEnvKey, Wt as orphanDeleteNeedsIdentity, X as bold, Xi as refuseMalformedOrphansForOrphan, Xo as WHOLE_DYNAMIC_REFERENCE_PATTERN, Xr as parameterTypeMayLoseSecretIdentity, Xs as warnFinchArgvExposure, Y as createReadOnlyAttributeHealerFactory, Yi as refuseMalformedOrphansForDestroy, Yo as TEMPLATE_SOURCED_RULES, Yr as isUnboundTemplateParameter, Ys as runDockerStreaming, Z as cyan, Za as prefetchCreateOnlyPropertyPaths, Zi as refuseMalformedOutputs, Zo as isSingleDynamicReferenceToken, Zr as getAccountInfo, Zs as escapeRegExp, _ as makeCanonicalizePropertiesFn, _a as repairMalformedResourceEntriesForReadOnly, _c as CFN_TEMPLATE_URL_LIMIT, _i as deployRefusesOrphanRowsReason, _n as extractDeploymentEventError, _o as hasMaskableValues, _r as isWaitAbandonedError, _s as stringifyValue, _t as withNestedRevertRun, a as findNestedTemplateTreeDefect, aa as refuseMalformedResourceEntriesForOrphan, ac as loadCdkJson, ai as isStalePlaceholderArnAttribute, an as stateSecretNameNeedles, ao as TemplateParser, ar as TemplateNoEchoReresolver, as as exportNamesCarriedFrom, at as resourcesNamingDeclaredParameter, b as serviceTokenBlockingReason, ba as unpreviewableOrphanRecords, bc as uploadCfnTemplate, bi as hasReadableOutputs, bn as exportAliasCollisionScrubWarning, bo as printingCorpusOf, bs as createAssetRedirectResolver, bt as deleteJournaledOrphans, c as renderNestedTemplateTreeDefect, ca as refuseMalformedResourcePropertiesForExport, cc as resolveCaptureObservedState, ci as withSharedDrainBudget, cn as buildFinalSnapshotIdentifier, co as maskWholeValue, cs as hasUnverifiableParameterRefusal, ct as NESTED_PENDING_PARENT_REASON, d as conditionInputsFrom, da as refuseMalformedResourcesForDestroy, dc as resolveStateBucketWithDefaultAndSource, di as JSON_LISTING_HOLE_VALUE, dn as effectiveDeletionPolicy, do as noEchoOutputsComparison, dr as slowCcOperationTimeoutMs, ds as isReadableBag, dt as dropSettledNestedJournals, ea as refuseMalformedResourceEntries, ec as getDockerImageBySourceHash, ei as carriesFetchableDynamicReference, en as completedReplayEntries, eo as withRetry, er as CC_BROKEN_REASON, es as S3StateBackend, et as red, f as parentSuppliedValues, fa as refuseMalformedResourcesForExport, fc as resolveUseCdkBootstrapAssets, fi as STATE_REGION_DIVERGED, fn as isFinalSnapshotError, fs as orphansAfterRollback, g as mergeNoChangeOutputs, ga as repairMalformedOutputsForReadOnly, gc as CFN_TEMPLATE_BODY_LIMIT, gi as accountArgs, gn as DeploymentEventsStore, go as createUnionSecretMasker, gs as isSensitiveAttributeName, gt as revertedNestedRowIds, h as keptWholeReasonText, ha as repairMalformedOrphansForReadOnly, hc as ssmResolvedValueType, hi as UNREADABLE_RESOURCES_MAP_ROW, hn as DeploymentEventsReader, ho as carryLogOnlyValues, hr as deleteSkipReason, hs as AssetPublisher, i as childTemplateLoader, ia as refuseMalformedResourceEntriesForImportSave, ic as getLegacyStateBucketName, ii as cfnRefValueFromPhysicalId, in as secretNamePrintingBag, io as DagBuilder, ir as wouldReturnToSdkProvider, is as describeRegionValueKind, it as reachableDivergentParameters, ja as shownType, jc as hasOwnKey, ji as malformedOrphanRecordsWarning, jn as isExportAliasCollision, jo as DYNAMIC_REFERENCE_TOKEN_SCAN, jr as regionLessSecretName, js as validateAssetBucketName, k as perType, ka as hasNoCloudControlHandlers, kc as processStackMessages, ki as malformedLocalResourcesWarning, kn as collectDeclaredOutputNames, ko as redactSecretsForState, kr as classifyReplaySecretRegion, ks as parseBootstrapMarker, l as templateIdentity, la as refuseMalformedResourcePropertiesForOrphan, lc as resolveSkipPrefix, li as parameterInputsFor, ln as ccRoutedFinalSnapshotError, lo as maskedLeafCoordinatesOf, lr as withPrintingSecrets, ls as importableOutputKeys, lt as displacedOpClause, m as isSecretBearingReferenceString, ma as repairMalformedOrphanRecordsForReadOnly, mc as warnDeprecatedNoPrefixCliFlag, mi as UNREADABLE_ORPHANS_CONTAINER_ROW, mn as unsupportedFinalSnapshotError, mo as liveMatchesUnresolvedTokenFrame, mr as deleteIndeterminateGuards, ms as shouldRetainResource, mt as recordDisplacedSkips, n as IMPLICIT_DELETE_DEPENDENCIES, na as refuseMalformedResourceEntriesForDestroy, nc as synthesisStatusMessage, ni as keepsSecretReferenceToken, nn as maskEventTextWithBoundBags, nr as ccBrokenReason, ns as splitImportedOps, nt as computeParameterTaint, o as isAbsoluteAssetPath, oa as refuseMalformedResourcePropertiesForDestroy, oc as resolveApp, oi as refStateLookupFromResource, on as ATOMIC_FINAL_SNAPSHOT_TYPES, oo as isMarkedCoordinate, or as readsNoEchoDeleteValues, os as hasReadableExportSet, ot as makeSiblingClaimReader, p as readRecordedConditionVerdicts, pa as refuseMalformedState, pc as stateBucketExistenceConfirmed, pi as STATE_RESOURCES_MALFORMED, pn as refusesFinalSnapshot, po as readsNoEchoSource, pr as UNSPECIFIED_SKIP_REASON, ps as orphansCarriedFrom, pt as nestedChildStackName$1, qi as refuseMalformedOrphanRecordsForDestroy, qo as STATE_SOURCED_CROSS_GENERATION_RULES, qs as redactedDockerCause, qt as inheritProducerRegions, r as computeImplicitDeleteEdges, ra as refuseMalformedResourceEntriesForImport, rc as getDefaultStateBucketName, ri as AWS_NO_VALUE, rn as orphanRecordsPrintingBag, rr as isCustomResource, rs as acceptedCreateOnlyDropsOf, rt as namesAnyDeclaredParameter, s as listNestedTemplateRows, sa as refuseMalformedResourcePropertiesForDrift, sc as resolveAutoAssetStorage, sn as PRE_DELETE_SNAPSHOT_TYPES, so as maskReadbackAtCoordinates, sr as isCustomResourceType$1, ss as hasReasonlessBaselineRefusal, st as planOrphanAdoption, t as DeployEngine, ta as refuseMalformedResourceEntriesForDeploy, tc as Synthesizer, ti as isNamelessDynamicReferenceError, tn as journaledOrphanPrintingBag, tr as ProviderRegistry, ts as rebuildClientForBucketRegion, tt as yellow, u as conditionFingerprint, ua as refuseMalformedResourcesForDeploy, uc as resolveStateBucketWithDefault, un as createPreDeleteFinalSnapshot, uo as noEchoLeavesOf, ur as CloudControlProvider, us as importableOutputs, ut as displacedPhysicalIdShown, v as deferredServiceTokenWarning, va as repairMalformedResourcePropertiesForReadOnly, vc as MIGRATE_TMP_PREFIX, vi as displayLogicalId, vn as WITHHELD_NAME_DISPLAY, vo as literalSplitDelimitersOf, vs as WorkGraph, w as noEchoParameterNamesOf, wa as findActionableSilentDrops, wc as PARTITION_TABLE, wi as malformedDriftResourcePropertiesWarning, wn as carriedExportAliasExposure, wo as createSecretMasker, ws as BOOTSTRAP_MARKER_PREFIX, wt as loadJournaledOrphans, x as withResourceDeadline, xa as unreadableOrphanRecords, xc as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, xi as hasReadableResources, xn as secretBearing, xo as recordLogOnlyParameterValue, xs as loadPublishableAssetManifest, xt as dropFailedHint, y as findServiceTokenRefusals, ya as repairMalformedResourcesForReadOnly, yc as findLargeInlineResources, yi as hasReadableOrphans, yn as displayTextOrWithheld, yo as logOnlyValueCount, ys as buildAssetRedirectMap, yt as withNestedStackContext, zc as resolveAssemblyPath, zi as malformedResourcePropertiesWarning, zn as RollbackInlinePolicyWriters, zo as carriesSecretMask, zr as applyCallerIdentityCredentials, zs as dockerSpawnEnvWithSensitive, zt as planRollback } from "./deploy-engine-4vPufRQF.js";
6
- import { t as getCdkdVersion } from "./version-3oP5vNZF.js";
5
+ import { $ as gray, $a as templateResourceTypes, $i as refuseMalformedOutputsForDestroy, $o as STATE_SOURCED_BASELINE_RULES, $r as isImpossibleEmptyStoredAttribute, $s as redactDockerArgvValues, $t as updatePartialMessage, A as perType, Aa as hasNoCloudControlHandlers, Ac as expectedOwnerParam, Ai as malformedLocalResourcesWarning, An as collectDeclaredOutputNames, Ao as createSecretMasker, Ar as classifyReplaySecretRegion, As as AssetModeResolver, Bc as nullPrototypeRecord, Bi as malformedResourcePropertiesWarning, Bn as RollbackInlinePolicyWriters, Bo as pathCrossesDottedKey, Br as applyCallerIdentityCredentials, Bs as buildDenyExternalAccessPolicy, Bt as planRollback, C as noEchoComparisonForTemplate, Ca as unreadableResourceEntries, Cc as CFN_TEMPLATE_BODY_LIMIT, Ci as isReadableOrphanRecord, Cn as secretBearingStateKeyWarning, Co as hasMaskableValues, Cs as isSensitiveAttributeName, Ct as isHandledOrphan, D as recordedProtectionNote, Da as unwrittenCreateOnlyReplacement, Dc as uploadCfnTemplate, Di as malformedExportSourceWarning, Dn as exportNameSecretExposure, Do as recordLogOnlyParameterValue, Dr as INTRINSIC_KEYS, Ds as createAssetRedirectResolver, Dt as sameJournaledOrphans, E as recordedProtectionEvidence, Ec as findLargeInlineResources, Ei as malformedExportNamesWarning, En as exportNameNoEchoParameters, Eo as printingCorpusOf, Er as DiffCalculator, Es as buildAssetRedirectMap, Et as makeForeignHolderScan, Fa as isStatefulRecreateTargetSync, Fc as StageLoadError, Fi as malformedOrphansWarning, Fn as DEFAULT_RESOURCE_WARN_AFTER_MS, Fo as redactSecretsForState, Fr as assertSendableRoleArn, Fs as isCrossRegionRedirect, Ft as recordAfterRollbackUpdate, Gc as renderAssemblyPathEscape, Gi as refuseDivergentRecordRegionForDestroy, Go as carriesSecretMask, Gs as describeDockerFailure, Gt as orphanDeleteNeedsIdentity, Hc as absoluteAssemblyPathEscape, Hi as malformedScrubResourceEntriesRefusalMessage, Hn as ledgerForStack, Ho as inheritNestedStackParameterAssociations, Hr as envCredentialsAreAssumedRole, Hs as resolveDockerContextDirectory, Ht as recordUnderIdIsNotOwn, Ia as renderStatefulReason, Ic as processStackMessages, Ii as malformedOutputsRefusalMessage, In as maskingRetryLogger, Io as scrubResourceRecord, Ir as explicitRoleArnOrThrow, Is as parseBootstrapMarker, It as demoteSupersededOrphans, Jc as resolveBucketRegion, Ji as refuseMalformedOrphanRecordsForDestroy, Jo as recordMaskOnlyValuesIn, Js as formatDockerLoginError, Jt as inheritProducerRegions, Kc as resolveAssemblyPath, Ko as provenPublicValue, Ks as dockerSpawnEnvWithSensitive, Kt as findNestedStackTypeChanges, Lc as defineOwnKey, Li as malformedOutputsWarning, Ln as constructPathOf, Lo as DYNAMIC_REFERENCE_TOKEN_SCAN, Lr as isIamRoleArn, Ls as readBootstrapMarkerBody, Lt as isJournaledOrphan, Ma as shownType, Mc as canonicalizeRegion, Mi as malformedOrphanRecordsWarning, Mn as isExportAliasCollision, Mo as maskSecretsInError, Mr as regionLessSecretName, Ms as assertAssetBucketRegion, Na as MULTI_REGION_RECREATE_BLOCKED_TYPES, Nc as derivePartitionAndUrlSuffix, Ni as malformedOrphanRowsKeptWarning, Nn as bindingSkippedOutputs, No as maskSecretsInText, Nr as applyRoleArnIfSet, Ns as ensureAssetStorage, Nt as withStackRecords, O as PROTECTION_PROPERTY_BY_TYPE, Oc as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Oi as malformedLocalOutputsWarning, On as isWholeDynamicReferenceValue, Oo as recordLogOnlyValue, Or as IntrinsicFunctionResolver, Os as loadPublishableAssetManifest, Ot as replayFailedOperations, Pa as isStatefulRecreateTargetForReplace, Pc as AssemblyReader, Pi as malformedOrphansRefusalMessage, Pn as DEFAULT_RESOURCE_TIMEOUT_MS, Po as markSameGenerationBag, Pr as assertFlagRoleArn, Ps as getBootstrapMarkerKey, Pt as removeProtectionTypeList, Q as cyan, Qa as prefetchCreateOnlyPropertyPaths, Qi as refuseMalformedOutputs, Qo as wholeStringLeavesOf, Qr as getAccountInfo, Qs as partitionSensitiveEnv, Rc as hasOwnKey, Ri as malformedRenderedContainersWarning, Rn as findDestructiveChanges, Ro as dynamicReferenceTokens, Rr as sendableAssumeRoleCommand, Rs as validateAssetBucketName, Rt as isReplacementOrphan, S as noEchoAttributeNamesOf, Sa as unreadableOrphanRecords, Sc as ssmResolvedValueType, Si as hasReadableResources, Sn as secretBearing, So as createUnionSecretMasker, Ss as AssetPublisher, St as dropFailedHint, T as noEchoParameterNamesOf, Ta as findActionableSilentDrops, Tc as MIGRATE_TMP_PREFIX, Ti as malformedDriftResourcePropertiesWarning, Tn as carriedExportAliasExposure, To as logOnlyValueCount, Ts as WorkGraph, Tt as loadJournaledOrphans, Uc as describeFileReadFailure, Ui as malformedStateRefusalMessage, Uo as recordNestedStackParameterExpressions, Us as describeDockerCapturedOutput, Ut as replacementNeverSwapped, Vc as ownValue, Vi as malformedResourcesWarning, Vo as identityKeyFor, Vr as callerEnvCredentials, Vs as buildDockerImage, Vt as recheckFailedPlan, Wc as displayAssemblyPath, Wi as previewableOrphanRecords, Wn as withCreateTokenLedger, Ws as describeDockerExecFailure, Wt as resolveReplacementOldType, X as createReadOnlyAttributeHealerFactory, Xi as refuseMalformedOrphansForDestroy, Xo as recordNoEchoParameterFreshValue, Xr as isUnboundTemplateParameter, Xs as isDockerClientEnvKey, Y as formatResourceLine, Yi as refuseMalformedOrphans, Yo as recordNoEchoAttributeValues, Yr as coerceParameterTypedValue, Ys as getDockerCmd, Z as bold, Zi as refuseMalformedOrphansForOrphan, Zo as recordProvenPublicExpression, Zr as parameterTypeMayLoseSecretIdentity, Zs as isMalformedEnvKey, _ as makeCanonicalizePropertiesFn, _a as repairMalformedOutputsForReadOnly, _c as resolveStateBucketWithDefault, _i as accountArgs, _n as DeploymentEventsStore, _o as readbackPathFor, _s as importableOutputs, _t as revertedNestedRowIds, a as findNestedTemplateTreeDefect, aa as refuseMalformedResourceEntriesForImportSave, ac as stripControlChars, ai as cfnRefValueFromPhysicalId, an as secretNamePrintingBag, ao as DagBuilder, ar as wouldReturnToSdkProvider, as as LockManager, at as reachableDivergentParameters, b as serviceTokenBlockingReason, ba as repairMalformedResourcesForReadOnly, bc as stateBucketExistenceConfirmed, bi as hasReadableOrphans, bn as displayTextOrWithheld, bo as liveMatchesUnresolvedTokenFrame, bs as orphansCarriedFrom, bt as withNestedStackContext, c as renderNestedTemplateTreeDefect, ca as refuseMalformedResourcePropertiesForDrift, cc as Synthesizer, cn as PRE_DELETE_SNAPSHOT_TYPES, co as isMarkedCoordinate, cr as isCustomResourceType$1, cs as rebuildClientForBucketRegion, ct as planOrphanAdoption, d as conditionInputsFrom, da as refuseMalformedResourcesForDeploy, dc as getLegacyStateBucketName, dn as createPreDeleteFinalSnapshot, do as maskWholeValue, dr as CloudControlProvider, ds as describeRegionValueKind, dt as displacedPhysicalIdShown, ea as refuseMalformedResourceAttributesForOrphan, ec as redactedDockerCause, ei as carriesDynamicReference, en as updatePartialReason, eo as describeTypeWithThrottleRetry, es as STATE_SOURCED_CROSS_GENERATION_RULES, et as green, f as parentSuppliedValues, fa as refuseMalformedResourcesForDestroy, fc as loadCdkJson, fi as JSON_LISTING_HOLE_VALUE, fn as effectiveDeletionPolicy, fo as maskedLeafCoordinatesOf, fr as slowCcOperationTimeoutMs, fs as exportNamesCarriedFrom, ft as dropSettledNestedJournals, g as mergeNoChangeOutputs, ga as repairMalformedOrphansForReadOnly, gc as resolveSkipPrefix, gi as UNREADABLE_RESOURCES_MAP_ROW, gn as DeploymentEventsReader, gr as deleteSkipReason, gs as importableOutputKeys, h as keptWholeReasonText, ha as repairMalformedOrphanRecordsForReadOnly, hc as resolveCaptureObservedState, hi as UNREADABLE_ORPHANS_CONTAINER_ROW, hn as unsupportedFinalSnapshotError, ho as noEchoOutputsComparison, hr as deleteIndeterminateGuards, hs as hasUnverifiableParameterRefusal, ht as recordDisplacedSkips, i as childTemplateLoader, ia as refuseMalformedResourceEntriesForImport, ic as escapeRegExp, ii as AWS_NO_VALUE, in as orphanRecordsPrintingBag, ir as isCustomResource, is as isSingleDynamicReferenceToken, it as namesAnyDeclaredParameter, j as readProtection, ja as findReplacedReadersOfRecreateTargets, jc as PARTITION_TABLE, ji as malformedOrphanRecordsRefusalMessage, jn as collectPublishedOutputNames, jo as errorCauseChain, jr as producerRegionsFromState, js as BOOTSTRAP_MARKER_PREFIX, jt as destroyStackRecordsView, k as isProtectionValueActive, ka as NO_CC_HANDLERS_REASON, kc as decodeListingKey, ki as malformedLocalResourceEntriesWarning, kn as noEchoParameterValueSeed, ko as shareLogOnlyValues, kr as poisonRenderedSpellingsCollidingIn, ks as rewriteTemplateAssetReferences, kt as replayRollback, l as templateIdentity, la as refuseMalformedResourcePropertiesForExport, lc as synthesisStatusMessage, li as withSharedDrainBudget, ln as buildFinalSnapshotIdentifier, lo as maskAtCoordinates, ls as splitImportedOps, lt as NESTED_PENDING_PARENT_REASON, m as isSecretBearingReferenceString, ma as refuseMalformedState, mc as resolveAutoAssetStorage, mi as STATE_RESOURCES_MALFORMED, mn as refusesFinalSnapshot, mo as noEchoLeavesOf, mr as UNSPECIFIED_SKIP_REASON, ms as hasReasonlessBaselineRefusal, mt as nestedChildStackName$1, n as IMPLICIT_DELETE_DEPENDENCIES, na as refuseMalformedResourceEntriesForDeploy, nc as runDockerStreaming, ni as isNamelessDynamicReferenceError, nn as journaledOrphanPrintingBag, nr as ProviderRegistry, ns as TEMPLATE_SOURCED_RULES, nt as yellow, o as isAbsoluteAssetPath, oa as refuseMalformedResourceEntriesForOrphan, oc as AssetManifestLoader, oi as isStalePlaceholderArnAttribute, on as stateSecretNameNeedles, oo as TemplateParser, or as TemplateNoEchoReresolver, os as isLockInfoExpired, ot as resourcesNamingDeclaredParameter, p as readRecordedConditionVerdicts, pa as refuseMalformedResourcesForExport, pc as resolveApp, pi as STATE_REGION_DIVERGED, pn as isFinalSnapshotError, po as noEchoCoordinatesOf, ps as hasReadableExportSet, qi as refuseMalformedOrphanRecords, qo as recordMaskOnlyValue, qs as finchSecretArgvRefusal, r as computeImplicitDeleteEdges, ra as refuseMalformedResourceEntriesForDestroy, rc as warnFinchArgvExposure, ri as keepsSecretReferenceToken, rn as maskEventTextWithBoundBags, rr as ccBrokenReason, rs as WHOLE_DYNAMIC_REFERENCE_PATTERN, rt as computeParameterTaint, s as listNestedTemplateRows, sa as refuseMalformedResourcePropertiesForDestroy, sc as getDockerImageBySourceHash, si as refStateLookupFromResource, sn as ATOMIC_FINAL_SNAPSHOT_TYPES, so as canonicalCoordinates, sr as readsNoEchoDeleteValues, ss as S3StateBackend, st as makeSiblingClaimReader, t as DeployEngine, ta as refuseMalformedResourceEntries, tc as runDockerForeground, ti as carriesFetchableDynamicReference, tn as completedReplayEntries, to as withRetry, tr as CC_BROKEN_REASON, ts as STATE_SOURCED_READBACK_RULES, tt as red, u as conditionFingerprint, ua as refuseMalformedResourcePropertiesForOrphan, uc as getDefaultStateBucketName, ui as parameterInputsFor, un as ccRoutedFinalSnapshotError, uo as maskReadbackAtCoordinates, ur as withPrintingSecrets, us as acceptedCreateOnlyDropsOf, ut as displacedOpClause, v as deferredServiceTokenWarning, va as repairMalformedResourceEntriesForReadOnly, vc as resolveStateBucketWithDefaultAndSource, vi as deployRefusesOrphanRowsReason, vn as extractDeploymentEventError, vo as readsNoEchoSource, vr as isWaitAbandonedError, vs as isReadableBag, vt as withNestedRevertRun, w as noEchoExactEchoLeavesOf, wa as withheldAccountClause, wc as CFN_TEMPLATE_URL_LIMIT, wi as isReadableResourceEntry, wn as secretSafeKeyDisplay, wo as literalSplitDelimitersOf, ws as stringifyValue, wt as journaledOrphanLines, x as withResourceDeadline, xa as unpreviewableOrphanRecords, xc as warnDeprecatedNoPrefixCliFlag, xi as hasReadableOutputs, xn as exportAliasCollisionScrubWarning, xo as carryLogOnlyValues, xs as shouldRetainResource, xt as deleteJournaledOrphans, y as findServiceTokenRefusals, ya as repairMalformedResourcePropertiesForReadOnly, yc as resolveUseCdkBootstrapAssets, yi as displayLogicalId, yn as WITHHELD_NAME_DISPLAY, yo as valueAtCoordinate, ys as orphansAfterRollback, zc as hasPlainPrototype, zi as malformedResourceEntriesWarning, zn as formatDestructiveChange, zo as isUncertifiedBaselineMaskPosition, zr as AWS_CREDENTIAL_ENV_KEYS, zs as validateContainerRepoName, zt as planFailedOps } from "./deploy-engine-DsF6NsaQ.js";
6
+ import { t as getCdkdVersion } from "./version-BJxzX87A.js";
7
7
  import { randomBytes, randomUUID } from "node:crypto";
8
8
  import { CopyObjectCommand, CreateBucketCommand, DeleteBucketCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetObjectCommand, HeadBucketCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutBucketVersioningCommand, PutObjectCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
9
9
  import { GetRoleCommand, GetUserCommand } from "@aws-sdk/client-iam";
@@ -2396,7 +2396,7 @@ function collectCrossStackRefs(node, onRef) {
2396
2396
  //#region src/provisioning/register-providers.ts
2397
2397
  let providerClasses;
2398
2398
  function loadProviderClasses() {
2399
- providerClasses ??= import("./provider-classes-BcUBpRO1.js");
2399
+ providerClasses ??= import("./provider-classes-C2uFHLt7.js");
2400
2400
  return providerClasses;
2401
2401
  }
2402
2402
  function registerAllProviders(registry, classes) {
@@ -5621,12 +5621,13 @@ function planExportIndexRepair(entries, stackName, producerRegion, outputs) {
5621
5621
  continue;
5622
5622
  }
5623
5623
  const stateValue = outputs[exportName];
5624
- if (!carriesDynamicReference(stateValue)) continue;
5624
+ if (!carriesDynamicReference(stateValue) && !carriesSecretMask(stateValue)) continue;
5625
5625
  if (JSON.stringify(entry.value) === JSON.stringify(stateValue)) continue;
5626
5626
  findings.push({
5627
5627
  kind: "converge",
5628
5628
  exportName,
5629
- stateValue
5629
+ stateValue,
5630
+ entryValue: entry.value
5630
5631
  });
5631
5632
  }
5632
5633
  return {
@@ -6084,16 +6085,17 @@ async function scrubCommand(stacks, options) {
6084
6085
  const absentNamed = (exportName, entryValue) => /[^A-Za-z0-9]/.test(exportName) ? "(name withheld: an export name, which may carry a secret)" : named(exportName, entryValue);
6085
6086
  const named = (exportName, alsoMask) => renderStateKeyForLine(scrubbed.exportNameDisplay(exportName, alsoMask), "it may carry a secret");
6086
6087
  const unwrittenNames = new Set(repair.unwritten);
6088
+ const entryValueOf = new Map(repair.findings.map((finding) => [finding.exportName, finding.entryValue]));
6087
6089
  for (const exportName of repair.unwritten) indexUnwritten.push({
6088
6090
  region: stackRegion,
6089
- shown: named(exportName)
6091
+ shown: named(exportName, entryValueOf.get(exportName))
6090
6092
  });
6091
6093
  for (const finding of repair.findings) if (finding.kind === "converge") {
6092
6094
  indexConverged++;
6093
- if (!options.dryRun && unwrittenNames.has(finding.exportName)) logger.warn(`Exports index entry ${named(finding.exportName)} (${displayIdent(stackRegion)}) differs from ${shownStack}'s state.outputs and could NOT be written — it keeps the value it holds.`);
6095
+ if (!options.dryRun && unwrittenNames.has(finding.exportName)) logger.warn(`Exports index entry ${named(finding.exportName, finding.entryValue)} (${displayIdent(stackRegion)}) differs from ${shownStack}'s state.outputs and could NOT be written — it keeps the value it holds.`);
6094
6096
  else {
6095
6097
  totalIndexEntriesConverged++;
6096
- logger.info(`${options.dryRun ? "Would converge" : "Converged"} exports index entry ${named(finding.exportName)} (${displayIdent(stackRegion)}) to ${shownStack}'s state.outputs value.`);
6098
+ logger.info(`${options.dryRun ? "Would converge" : "Converged"} exports index entry ${named(finding.exportName, finding.entryValue)} (${displayIdent(stackRegion)}) to ${shownStack}'s state.outputs value.`);
6097
6099
  }
6098
6100
  } else {
6099
6101
  totalIndexEntriesAbsent++;
@@ -7339,6 +7341,10 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
7339
7341
  const collisions = [];
7340
7342
  let outputsSourceUntrusted = false;
7341
7343
  let everyExportAliasReproduced = true;
7344
+ const conditionalNameParameters = new Set(nestedInput?.noEchoConditionalParameters ?? []);
7345
+ const noEchoNameParameters = /* @__PURE__ */ new Set([...noEchoParameterNamesOf(stack.template), ...(nestedInput?.noEchoParameters ?? []).filter((name) => !conditionalNameParameters.has(name))]);
7346
+ const declaredAliasOf = /* @__PURE__ */ new Map();
7347
+ const noEchoNameSeed = noEchoParameterValueSeed(stack.template.Parameters, parameters, inheritedSecrets);
7342
7348
  const nestedRowParameters = /* @__PURE__ */ new Map();
7343
7349
  await withSharedDrainBudget(async () => {
7344
7350
  for (const logicalId of Object.keys(state.resources ?? {})) {
@@ -7470,7 +7476,9 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
7470
7476
  const exportNameUnresolved = declaredExportName !== void 0 && typeof exportName === "string" && isUnresolvedValue(exportName, templateUsesSub(declaredExportName));
7471
7477
  if (typeof exportName === "string" && !exportNameUnresolved) accountedOutputKeys.add(exportName);
7472
7478
  const literalCollision = typeof declaredExportName === "string" && isExportAliasCollision(declaredExportName, name, declaredOutputNames);
7473
- if (declaredExportName !== void 0 && !literalCollision && !(typeof exportName === "string" && !exportNameUnresolved && isReadableBag(state.outputs) && Object.hasOwn(state.outputs, exportName) && (knownExportNamesOf(state.exportNames)?.has(exportName) ?? (typeof declaredExportName === "string" || !declaredOutputNames.has(exportName))))) everyExportAliasReproduced = false;
7479
+ const refusedForNoEcho = declaredExportName !== void 0 && !JSON.stringify(declaredExportName).includes("\"Fn::If\"") && (typeof exportName === "string" && !exportNameUnresolved && carriedExportAliasExposure(exportName, outputSecrets, noEchoNameSeed) !== void 0 || readsNoEchoSource(declaredExportName, { parameters: noEchoNameParameters }));
7480
+ if (typeof exportName === "string" && !exportNameUnresolved) declaredAliasOf.set(name, exportName);
7481
+ if (declaredExportName !== void 0 && !literalCollision && !refusedForNoEcho && !(typeof exportName === "string" && !exportNameUnresolved && isReadableBag(state.outputs) && Object.hasOwn(state.outputs, exportName) && (knownExportNamesOf(state.exportNames)?.has(exportName) ?? (typeof declaredExportName === "string" || !declaredOutputNames.has(exportName))))) everyExportAliasReproduced = false;
7474
7482
  if (exportNameUnresolved) {
7475
7483
  outputsSourceUntrusted = true;
7476
7484
  logger.warn(`Export.Name of output ${maskedIdent(name, outputSecrets)} did not fully resolve during scrub — redacting this stack's outputs by value match instead of by template position, since state may be keyed under a name this run cannot reproduce.`);
@@ -7521,6 +7529,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
7521
7529
  secretBearingKeys.push(key);
7522
7530
  logger.warn(secretBearingStateKeyWarning(stack.stackName, display));
7523
7531
  }
7532
+ const noEchoPlans = planScrubNoEcho(state, stack.template, perResourceTemplateProps, conditions, nestedInput?.noEchoParameters ?? [], nestedInput?.noEchoConditionalParameters ?? []);
7524
7533
  const nestedChildren = [];
7525
7534
  const nestedRowIds = /* @__PURE__ */ new Set();
7526
7535
  for (const [logicalId, resource] of Object.entries(templateResources)) if (resource?.Type === NESTED_STACK_TYPE$1) nestedRowIds.add(logicalId);
@@ -7553,7 +7562,14 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
7553
7562
  stackName: childStackName,
7554
7563
  input: {
7555
7564
  parameters,
7556
- inheritedSecrets: perResourceSecrets.get(logicalId) ?? /* @__PURE__ */ new Map()
7565
+ inheritedSecrets: perResourceSecrets.get(logicalId) ?? /* @__PURE__ */ new Map(),
7566
+ ...(() => {
7567
+ const filled = noEchoFilledRowParameters(templateResources[logicalId]?.Properties, noEchoPlans.sources, noEchoPlans.needleSources);
7568
+ return {
7569
+ noEchoParameters: filled.names,
7570
+ ...filled.conditional.length > 0 && { noEchoConditionalParameters: filled.conditional }
7571
+ };
7572
+ })()
7557
7573
  }
7558
7574
  });
7559
7575
  }
@@ -7586,8 +7602,9 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
7586
7602
  const needles = new Map([...allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets), ...outputSecrets]);
7587
7603
  return JSON.stringify(redactSecretsForState(value, needles)) !== JSON.stringify(value);
7588
7604
  };
7605
+ const noEchoPublicTokens = /* @__PURE__ */ new Set([region, stack.stackName]);
7589
7606
  const totalSecrets = outputSecrets.size + [...perResourceSecrets.values()].reduce((n, m) => n + m.size, 0) + [...orphanSecrets.values()].reduce((n, m) => n + m.size, 0);
7590
- if (totalSecrets === 0) {
7607
+ if (totalSecrets === 0 && !noEchoPlans.changesAny) {
7591
7608
  emitAbandonedScanNotes();
7592
7609
  return {
7593
7610
  ...await purgeExaminedHistory(loaded.migrationPending),
@@ -7621,8 +7638,11 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
7621
7638
  properties: redactSecretsForState(record.properties, ownSecrets, templateProps, TEMPLATE_SOURCED_RULES)
7622
7639
  } : record;
7623
7640
  const scrubbed = secrets || templateProps ? scrubResourceRecord(positioned, ownSecrets, void 0, STATE_SOURCED_CROSS_GENERATION_RULES) : record;
7624
- if (JSON.stringify(scrubbed) !== JSON.stringify(record)) recordsChanged++;
7625
- newResources[logicalId] = scrubbed;
7641
+ const plan = noEchoPlans.byLogicalId.get(logicalId);
7642
+ const migrationNeedles = scrubMigrationNeedles(plan, noEchoPublicTokens);
7643
+ const written = applyScrubNoEcho(migrationNeedles === void 0 ? scrubbed : scrubResourceRecord(scrubbed, migrationNeedles, void 0, STATE_SOURCED_CROSS_GENERATION_RULES), record, plan);
7644
+ if (JSON.stringify(written) !== JSON.stringify(record)) recordsChanged++;
7645
+ newResources[logicalId] = written;
7626
7646
  }
7627
7647
  const newOrphans = (state.orphans ?? []).map((record, orphanIndex) => {
7628
7648
  const own = orphanSecrets.get(String(orphanIndex));
@@ -7667,9 +7687,9 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
7667
7687
  const producer = list === "imports" ? `producer ${displayStackName(maskSecretsInText(entry.sourceStack, crossStackNeedles))}, ` : "";
7668
7688
  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.`);
7669
7689
  }
7670
- const redactedOutputs = redactUnaccountedOutputs(outputSecrets.size > 0 ? redactSecretsForState(state.outputs, outputSecrets, outputsSourceUntrusted ? void 0 : outputsTemplateSource, TEMPLATE_SOURCED_RULES) : state.outputs, state.outputs, accountedOutputKeys, allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets));
7690
+ const noEchoMaskedOutputs = maskScrubNoEchoOutputs(redactUnaccountedOutputs(outputSecrets.size > 0 ? redactSecretsForState(state.outputs, outputSecrets, outputsSourceUntrusted ? void 0 : outputsTemplateSource, TEMPLATE_SOURCED_RULES) : state.outputs, state.outputs, accountedOutputKeys, allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets)), noEchoPlans.outputKeys, new Set(Object.keys(stack.template.Outputs ?? {})), declaredAliasOf);
7671
7691
  emitAbandonedScanNotes();
7672
- let newOutputs = redactedOutputs;
7692
+ let newOutputs = noEchoMaskedOutputs;
7673
7693
  let newExportNames = state.exportNames;
7674
7694
  let droppedOutputKeys = 0;
7675
7695
  let keptReadOutputKeys = 0;
@@ -7677,11 +7697,11 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
7677
7697
  let droppedOutputReadersUnverified = false;
7678
7698
  const droppedDisplayCorpus = /* @__PURE__ */ new Map();
7679
7699
  const withheldOutputKeys = /* @__PURE__ */ new Set();
7680
- if (isReadableBag(state.outputs) && isReadableBag(redactedOutputs)) {
7700
+ if (isReadableBag(state.outputs) && isReadableBag(noEchoMaskedOutputs)) {
7681
7701
  const stored = state.outputs;
7682
7702
  const plan = planUnnamedOutputDrop({
7683
7703
  stored,
7684
- rewritten: redactedOutputs,
7704
+ rewritten: noEchoMaskedOutputs,
7685
7705
  accountedKeys: accountedOutputKeys,
7686
7706
  reportedKeys: new Set(secretBearingKeys),
7687
7707
  exportNames: state.exportNames,
@@ -7715,7 +7735,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
7715
7735
  }
7716
7736
  if (dropping.size > 0) {
7717
7737
  droppedOutputKeys = dropping.size;
7718
- newOutputs = Object.fromEntries(Object.entries(redactedOutputs).filter(([key]) => !dropping.has(key)));
7738
+ newOutputs = Object.fromEntries(Object.entries(noEchoMaskedOutputs).filter(([key]) => !dropping.has(key)));
7719
7739
  if (Array.isArray(state.exportNames)) newExportNames = state.exportNames.filter((name) => !(typeof name === "string" && dropping.has(name)));
7720
7740
  logger.info(safeMsg`${opts.dryRun ? "Would drop" : "Dropped"} ${dropping.size} output key(s) from ` + safeMsg`${shownStack} that its template no longer declares: ${shownKeys(dropping)}. ` + "Their values are not printed: scrub could not identify them as a secret's plaintext, and left beside the references it writes, cdkd diff would print them. A deploy of today's template does not write them either.");
7721
7741
  }
@@ -7798,6 +7818,179 @@ function createScrubCommand() {
7798
7818
  cmd.action(withErrorHandling(scrubCommand));
7799
7819
  return cmd;
7800
7820
  }
7821
+ function planScrubNoEcho(state, template, templateProps, conditions, passedParameters = [], conditionalParameters = []) {
7822
+ const byLogicalId = /* @__PURE__ */ new Map();
7823
+ const parameters = /* @__PURE__ */ new Set([...noEchoParameterNamesOf(template), ...passedParameters]);
7824
+ const resources = state.resources ?? {};
7825
+ const declared = /* @__PURE__ */ new Map();
7826
+ for (const [id, record] of Object.entries(resources)) declared.set(id, new Set(noEchoAttributeNamesOf(record) ?? []));
7827
+ const sources = {
7828
+ parameters,
7829
+ attributeIsNoEcho: (id, attribute) => declared.get(id)?.has(attribute) === true,
7830
+ ...Object.keys(conditions).length > 0 && { conditions }
7831
+ };
7832
+ const persisted = (value) => carriesSecretMask(value) || typeof value === "string" && isSingleDynamicReferenceToken(value);
7833
+ const templateResources = template.Resources ?? {};
7834
+ const eligible = Object.entries(resources).filter(([logicalId, record]) => templateProps.has(logicalId) && Object.hasOwn(templateResources, logicalId) && templateResources[logicalId]?.Type === record.resourceType);
7835
+ const positionFrom = (params, names) => {
7836
+ const from = {
7837
+ ...sources,
7838
+ parameters: params,
7839
+ attributeIsNoEcho: (id, attribute) => names.get(id)?.has(attribute) === true
7840
+ };
7841
+ const leavesOf = /* @__PURE__ */ new Map();
7842
+ for (let round = 0; round <= eligible.length; round++) {
7843
+ let grew = false;
7844
+ for (const [logicalId, record] of eligible) {
7845
+ const own = noEchoLeavesOf(record);
7846
+ const leaves = canonicalCoordinates(own ?? noEchoCoordinatesOf(templateProps.get(logicalId), record.properties, from));
7847
+ leavesOf.set(logicalId, leaves);
7848
+ for (const [name, attribute] of Object.entries(record.attributes ?? {})) {
7849
+ if (attribute === record.physicalId || persisted(attribute)) continue;
7850
+ const echoes = leaves.some((coordinate) => coordinate[0] === name && JSON.stringify(valueAtCoordinate(record.properties, coordinate)) === JSON.stringify(attribute));
7851
+ const recordNames = names.get(logicalId);
7852
+ if (echoes && !recordNames.has(name)) {
7853
+ recordNames.add(name);
7854
+ grew = true;
7855
+ }
7856
+ }
7857
+ }
7858
+ if (!grew) break;
7859
+ }
7860
+ return leavesOf;
7861
+ };
7862
+ const leavesOf = positionFrom(parameters, declared);
7863
+ const conditional = new Set(conditionalParameters);
7864
+ const needleParameters = new Set([...parameters].filter((name) => !conditional.has(name)));
7865
+ const needleDeclared = conditional.size === 0 ? declared : new Map(Object.entries(resources).map(([id, record]) => [id, new Set(noEchoAttributeNamesOf(record) ?? [])]));
7866
+ const needleLeavesOf = conditional.size === 0 ? leavesOf : positionFrom(needleParameters, needleDeclared);
7867
+ let changesAny = false;
7868
+ for (const [logicalId, record] of eligible) {
7869
+ const leaves = leavesOf.get(logicalId) ?? [];
7870
+ const attributeNames = [...declared.get(logicalId) ?? []].sort();
7871
+ if (leaves.length === 0 && attributeNames.length === 0) continue;
7872
+ const stored = [];
7873
+ const needleCoordinates = new Set((needleLeavesOf.get(logicalId) ?? []).map((coordinate) => JSON.stringify(coordinate)));
7874
+ for (const coordinate of leaves) {
7875
+ const value = valueAtCoordinate(record.properties, coordinate);
7876
+ if (value === void 0 || value === null || persisted(value)) continue;
7877
+ stored.push({
7878
+ coordinate,
7879
+ value,
7880
+ needle: needleCoordinates.has(JSON.stringify(coordinate))
7881
+ });
7882
+ }
7883
+ byLogicalId.set(logicalId, {
7884
+ leaves,
7885
+ stored,
7886
+ attributeNames
7887
+ });
7888
+ const unmaskedAttribute = attributeNames.some((name) => Object.hasOwn(record.attributes ?? {}, name) && !persisted(record.attributes[name]));
7889
+ if (stored.length > 0 || unmaskedAttribute || leaves.length > 0 && JSON.stringify(record.noEchoLeaves) !== JSON.stringify(leaves)) changesAny = true;
7890
+ }
7891
+ const outputSources = {
7892
+ parameters,
7893
+ attributeIsNoEcho: sources.attributeIsNoEcho
7894
+ };
7895
+ const outputKeys = [];
7896
+ const stored = state.outputs;
7897
+ if (stored !== null && typeof stored === "object" && !Array.isArray(stored)) for (const [key, output] of Object.entries(template.Outputs ?? {})) {
7898
+ if (!Object.hasOwn(stored, key)) continue;
7899
+ const value = stored[key];
7900
+ if (value === void 0 || value === null || persisted(value)) continue;
7901
+ if (!readsNoEchoSource(output?.Value, outputSources)) continue;
7902
+ outputKeys.push(key);
7903
+ }
7904
+ if (outputKeys.length > 0) changesAny = true;
7905
+ return {
7906
+ byLogicalId,
7907
+ outputKeys,
7908
+ changesAny,
7909
+ parameters,
7910
+ sources: outputSources,
7911
+ needleSources: {
7912
+ parameters: needleParameters,
7913
+ attributeIsNoEcho: (id, attribute) => needleDeclared.get(id)?.has(attribute) === true
7914
+ }
7915
+ };
7916
+ }
7917
+ function scrubMigrationNeedles(plan, publicTokens) {
7918
+ if (plan === void 0 || plan.stored.length === 0) return void 0;
7919
+ const needles = /* @__PURE__ */ new Map();
7920
+ for (const { value, needle } of plan.stored) if (needle) recordNoEchoParameterFreshValue(value, needles, publicTokens);
7921
+ return needles.size > 0 ? needles : void 0;
7922
+ }
7923
+ function maskScrubNoEchoOutputs(outputs, keys, declared, aliasOf) {
7924
+ if (outputs === void 0 || keys.length === 0) return outputs;
7925
+ const ownAliases = new Set(keys.flatMap((key) => aliasOf.has(key) ? [aliasOf.get(key)] : []));
7926
+ const otherAliases = new Set([...aliasOf].filter(([key]) => !keys.includes(key)).map(([, alias]) => alias));
7927
+ const spelled = new Set(keys.filter((key) => Object.hasOwn(outputs, key)).map((key) => JSON.stringify(outputs[key])));
7928
+ const masked = nullPrototypeRecord();
7929
+ for (const [key, value] of Object.entries(outputs)) {
7930
+ const byValue = !declared.has(key) && !otherAliases.has(key) && spelled.has(JSON.stringify(value));
7931
+ masked[key] = keys.includes(key) || ownAliases.has(key) || byValue ? maskWholeValue(value) : value;
7932
+ }
7933
+ return masked;
7934
+ }
7935
+ function applyScrubNoEcho(scrubbed, record, plan) {
7936
+ if (plan === void 0) return scrubbed;
7937
+ const { leaves, attributeNames } = plan;
7938
+ const next = {
7939
+ ...scrubbed,
7940
+ properties: maskAtCoordinates(scrubbed.properties, leaves),
7941
+ ...leaves.length > 0 && { noEchoLeaves: leaves.map((coordinate) => [...coordinate]) },
7942
+ ...scrubbed.observedProperties !== void 0 && { observedProperties: maskReadbackAtCoordinates(scrubbed.observedProperties, record.properties, leaves) }
7943
+ };
7944
+ const marked = new Set(leaves.map((coordinate) => JSON.stringify(coordinate)));
7945
+ const exact = noEchoExactEchoLeavesOf(scrubbed);
7946
+ if (exact !== void 0) {
7947
+ const kept = exact.filter((coordinate) => marked.has(JSON.stringify(coordinate)));
7948
+ if (kept.length > 0) next.noEchoExactEchoLeaves = kept;
7949
+ else delete next.noEchoExactEchoLeaves;
7950
+ }
7951
+ const attributes = next.attributes;
7952
+ if (attributes !== void 0 && attributes !== null && attributeNames.length > 0) {
7953
+ const masked = { ...attributes };
7954
+ for (const name of attributeNames) if (Object.hasOwn(masked, name)) masked[name] = maskWholeValue(masked[name]);
7955
+ next.attributes = masked;
7956
+ next.noEchoAttributeNames = [...attributeNames];
7957
+ }
7958
+ return next;
7959
+ }
7960
+ function withoutFnIf(value) {
7961
+ if (Array.isArray(value)) return value.map(withoutFnIf);
7962
+ if (value === null || typeof value !== "object") return value;
7963
+ if (Object.hasOwn(value, "Fn::If")) return null;
7964
+ const out = nullPrototypeRecord();
7965
+ for (const [key, inner] of Object.entries(value)) out[key] = withoutFnIf(inner);
7966
+ return out;
7967
+ }
7968
+ function noEchoFilledRowParameters(rowProperties, sources, needleSources) {
7969
+ const names = [];
7970
+ const conditional = [];
7971
+ if (rowProperties === null || typeof rowProperties !== "object") return {
7972
+ names,
7973
+ conditional
7974
+ };
7975
+ const passed = rowProperties["Parameters"];
7976
+ if (passed === null || typeof passed !== "object" || Array.isArray(passed)) return {
7977
+ names,
7978
+ conditional
7979
+ };
7980
+ const unconditioned = {
7981
+ parameters: sources.parameters,
7982
+ ...sources.attributeIsNoEcho !== void 0 && { attributeIsNoEcho: sources.attributeIsNoEcho }
7983
+ };
7984
+ for (const [name, value] of Object.entries(passed)) {
7985
+ if (!readsNoEchoSource(value, unconditioned)) continue;
7986
+ names.push(name);
7987
+ if (!readsNoEchoSource(withoutFnIf(value), needleSources)) conditional.push(name);
7988
+ }
7989
+ return {
7990
+ names,
7991
+ conditional
7992
+ };
7993
+ }
7801
7994
 
7802
7995
  //#endregion
7803
7996
  //#region src/analyzer/drift-normalize.ts
@@ -7979,33 +8172,60 @@ function equalModuloMask(state, aws, mask) {
7979
8172
  if (aKeys.length !== Object.keys(bObj).length) return false;
7980
8173
  return aKeys.every((key) => Object.prototype.hasOwnProperty.call(bObj, key) && equalModuloMask(aObj[key], bObj[key], mask));
7981
8174
  }
7982
- function equalModuloMarkedMask(state, aws, mask, coordinate, isMarked) {
8175
+ function equalModuloMarkedMask(state, aws, mask, coordinate, isMarked, isWithinMarked = isMarked) {
7983
8176
  const a = jsonForm(state);
7984
8177
  const b = jsonForm(aws);
7985
- if (isMarked(coordinate) && isWhollyMask(a, mask)) return b !== void 0 && b !== null;
8178
+ if (isMarked(coordinate) && b !== void 0 && b !== null) {
8179
+ if (a === mask) return true;
8180
+ if (isWithinMarked(coordinate) ? isWhollyMask(a, mask) : sameJson(a, wholeMaskOf(b, mask))) return holdsMask(a, mask);
8181
+ }
7986
8182
  if (a === mask && typeof b === "string") return true;
7987
8183
  if (a === b) return true;
7988
8184
  if (a === null || b === null || a === void 0 || b === void 0) return a === b;
7989
8185
  if (typeof a !== typeof b || typeof a !== "object") return false;
7990
8186
  if (Array.isArray(a) || Array.isArray(b)) {
7991
8187
  if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;
7992
- return a.every((v, i) => equalModuloMarkedMask(v, b[i], mask, [...coordinate, i], isMarked));
8188
+ return a.every((v, i) => equalModuloMarkedMask(v, b[i], mask, [...coordinate, i], isMarked, isWithinMarked));
7993
8189
  }
7994
8190
  const aObj = a;
7995
8191
  const bObj = b;
7996
8192
  const aKeys = Object.keys(aObj);
7997
8193
  if (aKeys.length !== Object.keys(bObj).length) return false;
7998
- return aKeys.every((key) => Object.prototype.hasOwnProperty.call(bObj, key) && equalModuloMarkedMask(aObj[key], bObj[key], mask, [...coordinate, key], isMarked));
8194
+ return aKeys.every((key) => Object.prototype.hasOwnProperty.call(bObj, key) && equalModuloMarkedMask(aObj[key], bObj[key], mask, [...coordinate, key], isMarked, isWithinMarked));
8195
+ }
8196
+ function wholeMaskOf(value, mask) {
8197
+ if (value === null || value === void 0) return value;
8198
+ if (Array.isArray(value)) return value.map((v) => wholeMaskOf(v, mask));
8199
+ if (isPlainObject(value)) return Object.fromEntries(Object.entries(value).map(([k, v]) => [k, wholeMaskOf(v, mask)]));
8200
+ return mask;
7999
8201
  }
8000
8202
  function isWhollyMask(value, mask) {
8203
+ const walk = (node) => {
8204
+ if (node === mask || node === null) return true;
8205
+ if (Array.isArray(node)) return node.every(walk);
8206
+ if (isPlainObject(node)) return Object.values(node).every(walk);
8207
+ return false;
8208
+ };
8209
+ return walk(value) && holdsMask(value, mask);
8210
+ }
8211
+ function holdsMask(value, mask) {
8001
8212
  if (value === mask) return true;
8002
- if (Array.isArray(value)) return value.length > 0 && value.every((v) => isWhollyMask(v, mask));
8003
- if (isPlainObject(value)) {
8004
- const values = Object.values(value);
8005
- return values.length > 0 && values.every((v) => isWhollyMask(v, mask));
8006
- }
8213
+ if (Array.isArray(value)) return value.some((v) => holdsMask(v, mask));
8214
+ if (isPlainObject(value)) return Object.values(value).some((v) => holdsMask(v, mask));
8007
8215
  return false;
8008
8216
  }
8217
+ function sameJson(a, b) {
8218
+ if (a === b) return true;
8219
+ if (a === null || b === null || typeof a !== "object" || typeof b !== "object") return false;
8220
+ if (Array.isArray(a) || Array.isArray(b)) {
8221
+ if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;
8222
+ return a.every((v, i) => sameJson(v, b[i]));
8223
+ }
8224
+ const aObj = a;
8225
+ const bObj = b;
8226
+ const keys = Object.keys(aObj);
8227
+ return keys.length === Object.keys(bObj).length && keys.every((k) => Object.prototype.hasOwnProperty.call(bObj, k) && sameJson(aObj[k], bObj[k]));
8228
+ }
8009
8229
  function isPlainObject(value) {
8010
8230
  return typeof value === "object" && value !== null;
8011
8231
  }
@@ -8907,6 +9127,7 @@ function partitionNoEchoParameterChanges(changes, record, baseline) {
8907
9127
  };
8908
9128
  const properties = record.properties ?? {};
8909
9129
  const isMarked = (coordinate) => isMarkedCoordinate(coordinate, marked) || marked.some((leaf) => leaf.length > coordinate.length && coordinate.every((segment, i) => String(segment) === String(leaf[i])));
9130
+ const isWithinMarked = (coordinate) => marked.some((leaf) => leaf.length <= coordinate.length && leaf.every((segment, i) => String(segment) === String(coordinate[i])));
8910
9131
  const kept = [];
8911
9132
  const noEchoParameterPaths = [];
8912
9133
  for (const change of changes) {
@@ -8915,7 +9136,7 @@ function partitionNoEchoParameterChanges(changes, record, baseline) {
8915
9136
  const n = Math.min(leaf.length, coordinate.length);
8916
9137
  for (let i = 0; i < n; i++) if (leaf[i] !== coordinate[i]) return false;
8917
9138
  return true;
8918
- }) && carriesSecretMask(change.stateValue) && !pathCrossesDottedKey(properties, change.path) && !pathCrossesDottedKey(baseline, change.path) && equalModuloMarkedMask(change.stateValue, change.awsValue, "***", coordinate, isMarked)) {
9139
+ }) && carriesSecretMask(change.stateValue) && !pathCrossesDottedKey(properties, change.path) && !pathCrossesDottedKey(baseline, change.path) && equalModuloMarkedMask(change.stateValue, change.awsValue, "***", coordinate, isMarked, isWithinMarked)) {
8919
9140
  noEchoParameterPaths.push(change.path);
8920
9141
  continue;
8921
9142
  }
@@ -9432,12 +9653,14 @@ async function runAccept(reports, stateBackend, stateConfig, awsClients, options
9432
9653
  logger.warn(` ! ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): '${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.`);
9433
9654
  }
9434
9655
  if (recordedChanges > 0) acceptedResourceCount++;
9656
+ const written = maskMarkedNoEchoBaselineWithLeaves(redactedBaseline, existing, hasObserved);
9435
9657
  resources[outcome.logicalId] = hasObserved ? {
9436
9658
  ...existing,
9437
- observedProperties: redactedBaseline
9659
+ observedProperties: written.baseline
9438
9660
  } : {
9439
9661
  ...existing,
9440
- properties: redactedBaseline
9662
+ properties: written.baseline,
9663
+ ...written.noEchoLeaves !== void 0 && { noEchoLeaves: written.noEchoLeaves }
9441
9664
  };
9442
9665
  }
9443
9666
  const { skippedOutputs: _droppedByAccept, ...carriedState } = report.state;
@@ -10047,12 +10270,13 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
10047
10270
  }
10048
10271
  if (!changed) continue;
10049
10272
  recordedCount++;
10273
+ const writtenBaseline = maskMarkedNoEchoBaseline(newBaseline, existing, hasObserved);
10050
10274
  resources[logicalId] = hasObserved ? {
10051
10275
  ...existing,
10052
- observedProperties: newBaseline
10276
+ observedProperties: writtenBaseline
10053
10277
  } : {
10054
10278
  ...existing,
10055
- properties: newBaseline
10279
+ properties: writtenBaseline
10056
10280
  };
10057
10281
  }
10058
10282
  let reRecordedCount = 0;
@@ -10429,6 +10653,35 @@ function createDriftCommand() {
10429
10653
  cmd.addOption(deprecatedRegionOption);
10430
10654
  return cmd;
10431
10655
  }
10656
+ function maskMarkedNoEchoBaseline(baseline, record, observed) {
10657
+ return maskMarkedNoEchoBaselineWithLeaves(baseline, record, observed).baseline;
10658
+ }
10659
+ function maskMarkedNoEchoBaselineWithLeaves(baseline, record, observed) {
10660
+ const marked = noEchoLeavesOf(record) ?? [];
10661
+ if (observed) {
10662
+ const coordinates = [...marked, ...maskedLeafCoordinatesOf(record.properties ?? {})];
10663
+ return { baseline: coordinates.length === 0 ? baseline : maskReadbackAtCoordinates(baseline, record.properties ?? {}, coordinates) };
10664
+ }
10665
+ if (marked.length === 0) return { baseline };
10666
+ const recorded = record.properties ?? {};
10667
+ const listPathOf = (coordinate) => {
10668
+ const list = coordinate.findIndex((segment) => typeof segment === "number");
10669
+ return list < 0 ? void 0 : coordinate.slice(0, list);
10670
+ };
10671
+ const replaced = marked.filter((coordinate) => {
10672
+ const path = listPathOf(coordinate);
10673
+ if (path === void 0) return false;
10674
+ const underList = marked.filter((other) => other.length > path.length && path.every((segment, i) => segment === other[i]));
10675
+ return JSON.stringify(valueAtCoordinate(maskAtCoordinates(baseline, underList), path)) !== JSON.stringify(valueAtCoordinate(maskAtCoordinates(recorded, underList), path));
10676
+ });
10677
+ const byIndex = maskAtCoordinates(baseline, marked.filter((coordinate) => !replaced.includes(coordinate)));
10678
+ if (replaced.length === 0) return { baseline: byIndex };
10679
+ const widened = replaced.map((coordinate) => readbackPathFor(byIndex, recorded, coordinate)).filter((path, i) => path !== void 0 && path.length < replaced[i].length);
10680
+ return {
10681
+ baseline: maskReadbackAtCoordinates(byIndex, recorded, replaced),
10682
+ ...widened.length > 0 && { noEchoLeaves: canonicalCoordinates([...marked, ...widened]) }
10683
+ };
10684
+ }
10432
10685
 
10433
10686
  //#endregion
10434
10687
  //#region src/cli/commands/stack-lock-guard.ts
@@ -14289,15 +14542,16 @@ async function buildImportPlan(state, template, cfnClient, parentStackName, opti
14289
14542
  continue;
14290
14543
  }
14291
14544
  const noEchoLeaves = noEchoLeavesOf(stateEntry);
14292
- if (noEchoLeaves !== void 0 && noEchoLeaves.length > 0 && carriesSecretMask(stateEntry.properties) && !carriesSecretMask(withoutCoordinates(stateEntry.properties, noEchoLeaves))) {
14545
+ const masksOnlyAtNoEchoLeaves = noEchoLeaves !== void 0 && noEchoLeaves.length > 0 && carriesSecretMask(stateEntry.properties) && !carriesSecretMask(withoutCoordinates(stateEntry.properties, noEchoLeaves));
14546
+ if (masksOnlyAtNoEchoLeaves && IMPORT_UNSUPPORTED_RECREATABLE_TYPES.has(resourceType) && noEchoLeaves.some((coordinate) => typeof coordinate[0] === "string" && NOECHO_PRE_DELETE_KEYS.has(coordinate[0]))) {
14293
14547
  blocked.push({
14294
14548
  logicalId,
14295
14549
  resourceType,
14296
- reason: "a NoEcho template parameter feeds at least one property, and cdkd state holds only the redaction mask ('***') there, so the export has no value to declare for it. Export this stack without that resource and adopt it into CloudFormation by hand, passing the parameter value yourself."
14550
+ reason: "a NoEcho template parameter feeds a property this resource's pre-delete reads (its principals or its name), and cdkd state holds only the redaction mask ('***') there, so the export cannot tell what to remove. Export this stack without that resource and adopt it into CloudFormation by hand, passing the parameter value yourself."
14297
14551
  });
14298
14552
  continue;
14299
14553
  }
14300
- if (carriesSecretMask(stateEntry.properties)) {
14554
+ if (!masksOnlyAtNoEchoLeaves && carriesSecretMask(stateEntry.properties)) {
14301
14555
  blocked.push({
14302
14556
  logicalId,
14303
14557
  resourceType,
@@ -14388,6 +14642,14 @@ async function buildImportPlan(state, template, cfnClient, parentStackName, opti
14388
14642
  continue;
14389
14643
  }
14390
14644
  const propertiesOverlay = resolved.propertiesOverlay ?? resolved.resourceIdentifier;
14645
+ if ((JSON.stringify(resolved.resourceIdentifier).includes("***") || JSON.stringify(propertiesOverlay).includes("***")) && !(carriesSecretMask(resolved.resourceIdentifier) || carriesSecretMask(propertiesOverlay))) {
14646
+ blocked.push({
14647
+ logicalId,
14648
+ resourceType,
14649
+ reason: "the CloudFormation import identifier of this resource embeds the redaction mask ('***'): it is built from a value cdkd stores only as the mask (a NoEcho value). Export this stack without that resource and adopt it into CloudFormation by hand, passing the parameter value yourself."
14650
+ });
14651
+ continue;
14652
+ }
14391
14653
  if (carriesSecretMask(resolved.resourceIdentifier) || carriesSecretMask(propertiesOverlay)) {
14392
14654
  blocked.push({
14393
14655
  logicalId,
@@ -15202,28 +15464,31 @@ async function resolveChildImportParameters(parentTemplate, parentResolverContex
15202
15464
  const stillSkipped = [];
15203
15465
  for (const key of base.intrinsicSkipped) {
15204
15466
  const intrinsicValue = rawParams[key];
15467
+ let result;
15205
15468
  try {
15206
- const result = await resolver.resolve(intrinsicValue, parentResolverContext);
15207
- if (result === void 0 || result === null) {
15208
- stillSkipped.push(key);
15209
- continue;
15210
- }
15211
- if (typeof result === "string") resolvedParams.push({
15212
- ParameterKey: key,
15213
- ParameterValue: result
15214
- });
15215
- else if (typeof result === "number" || typeof result === "boolean") resolvedParams.push({
15216
- ParameterKey: key,
15217
- ParameterValue: String(result)
15218
- });
15219
- else if (Array.isArray(result)) resolvedParams.push({
15220
- ParameterKey: key,
15221
- ParameterValue: result.map((e) => String(e)).join(",")
15222
- });
15223
- else stillSkipped.push(key);
15469
+ result = await resolver.resolve(intrinsicValue, parentResolverContext);
15224
15470
  } catch {
15225
15471
  stillSkipped.push(key);
15472
+ continue;
15473
+ }
15474
+ 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");
15475
+ if (result === void 0 || result === null) {
15476
+ stillSkipped.push(key);
15477
+ continue;
15226
15478
  }
15479
+ if (typeof result === "string") resolvedParams.push({
15480
+ ParameterKey: key,
15481
+ ParameterValue: result
15482
+ });
15483
+ else if (typeof result === "number" || typeof result === "boolean") resolvedParams.push({
15484
+ ParameterKey: key,
15485
+ ParameterValue: String(result)
15486
+ });
15487
+ else if (Array.isArray(result)) resolvedParams.push({
15488
+ ParameterKey: key,
15489
+ ParameterValue: result.map((e) => String(e)).join(",")
15490
+ });
15491
+ else stillSkipped.push(key);
15227
15492
  }
15228
15493
  return {
15229
15494
  params: resolvedParams,
@@ -15803,6 +16068,12 @@ function createExportCommand() {
15803
16068
  cmd.addOption(deprecatedRegionOption);
15804
16069
  return cmd;
15805
16070
  }
16071
+ const NOECHO_PRE_DELETE_KEYS = /* @__PURE__ */ new Set([
16072
+ "Roles",
16073
+ "Users",
16074
+ "Groups",
16075
+ "PolicyName"
16076
+ ]);
15806
16077
  function withoutCoordinates(bag, coordinates) {
15807
16078
  const placeholder = Symbol("noecho-leaf");
15808
16079
  const marked = coordinates.reduce((current, coordinate) => replaceAtCoordinate(current, coordinate, placeholder), bag);
@@ -19634,6 +19905,7 @@ async function resolveImportedProperties(stackState, template, region, stateBack
19634
19905
  stateBackend,
19635
19906
  stackName: stackState.stackName
19636
19907
  };
19908
+ const noEchoInputs = /* @__PURE__ */ new Map();
19637
19909
  for (const [logicalId, resource] of entries) {
19638
19910
  const recordedSecretValues = /* @__PURE__ */ new Map();
19639
19911
  const unresolvedProperties = resource.properties ?? {};
@@ -19644,6 +19916,11 @@ async function resolveImportedProperties(stackState, template, region, stateBack
19644
19916
  recordedSecretValues
19645
19917
  });
19646
19918
  resource.properties = recordedSecretValues.size > 0 ? redactSecretsForState(markSameGenerationBag(resolved), recordedSecretValues, unresolvedProperties) : resolved;
19919
+ noEchoInputs.set(logicalId, {
19920
+ template: unresolvedProperties,
19921
+ resolved,
19922
+ attributes: resource.attributes
19923
+ });
19647
19924
  } catch (err) {
19648
19925
  logger.warn(`Failed to resolve intrinsics in Properties for imported resource ${logicalIdShown(logicalId)} (${resourceTypeShown(resource.resourceType)}): ${maskSecretsInText(describeAwsFailure(err).detail, recordedSecretValues)}.\nState will be written with the raw intrinsic shape, which may cause 'cdkd destroy' to fail on this resource — re-import once every referenced sibling is in state, or remove this resource from state with 'cdkd orphan <StackPath>/<Path/To/Resource>'.` + (unboundParameterNames.length > 0 ? ` This template also declares parameter(s) with no 'Default' that an import cannot bind (${unboundParameterNames.map((name) => plainOrDescribed(name, "parameter name")).join(", ")}), and 'cdkd import' accepts no parameter values — if this property was built from one of those, re-importing a sibling will not change it: give the parameter a 'Default' in the template and re-import, or correct the recorded properties before the next 'cdkd deploy'.` : ""));
19649
19926
  threw = true;
@@ -19675,8 +19952,94 @@ async function resolveImportedProperties(stackState, template, region, stateBack
19675
19952
  logger.warn(`${refusedHere.length} resource(s) in ${displayStackName(stackState.stackName)} depend, directly or through another resource's attributes, on template parameter(s) whose deployed CloudFormation value could not be proven equal to the template 'Default' 'cdkd import' binds` + (named.length > 0 ? ` (${named.join(", ")})` : "") + (unreadable.length > 0 ? ` — ${unreadable.length} of them because their properties could not be checked for such a dependence` : "") + ". Their recorded properties hold the 'Default', NOT the deployed value, and no observed drift baseline was captured for them by this import (the live value may be a secret this import cannot position a redaction for). Review 'cdkd diff' before the next 'cdkd deploy'.");
19676
19953
  }
19677
19954
  }
19955
+ positionImportedNoEcho(stackState, noEchoInputs, template, conditions, unsafeObservedBaselineLogicalIds, logger);
19678
19956
  return unsafeObservedBaselineLogicalIds;
19679
19957
  }
19958
+ function positionImportedNoEcho(stackState, inputs, template, conditions, refusals, logger) {
19959
+ if (inputs.size === 0) return;
19960
+ const resources = stackState.resources ?? {};
19961
+ const declared = /* @__PURE__ */ new Map();
19962
+ for (const [id, record] of Object.entries(resources)) {
19963
+ const names = noEchoAttributeNamesOf(record);
19964
+ if (names !== void 0) declared.set(id, new Set(names));
19965
+ }
19966
+ const sources = {
19967
+ parameters: noEchoParametersOrAll(template),
19968
+ attributeIsNoEcho: (id, attribute) => declared.get(id)?.has(attribute) === true,
19969
+ ...Object.keys(conditions).length > 0 && { conditions }
19970
+ };
19971
+ const leavesOf = /* @__PURE__ */ new Map();
19972
+ const failed = /* @__PURE__ */ new Map();
19973
+ for (let round = 0; round <= inputs.size; round++) {
19974
+ let grew = false;
19975
+ for (const [id, input] of inputs) {
19976
+ let leaves = failed.get(id);
19977
+ if (leaves === void 0) try {
19978
+ leaves = canonicalCoordinates(noEchoCoordinatesOf(input.template, input.resolved, sources));
19979
+ } catch (err) {
19980
+ logger.debug(safeMsg`NoEcho position walk failed for imported ${id}: ${err instanceof Error ? err.name : typeof err} — masking each property that reads a NoEcho source whole and refusing its baseline, fail-closed.`);
19981
+ leaves = topLevelNoEchoProperties(input.template, sources);
19982
+ failed.set(id, leaves);
19983
+ refusals.add(id);
19984
+ }
19985
+ leavesOf.set(id, leaves);
19986
+ const physicalId = Object.hasOwn(resources, id) ? resources[id].physicalId : void 0;
19987
+ for (const [name, attribute] of Object.entries(input.attributes ?? {})) {
19988
+ if (attribute === physicalId) continue;
19989
+ if (!leaves.some((coordinate) => coordinate[0] === name && JSON.stringify(valueAtCoordinate(input.resolved, coordinate)) === JSON.stringify(attribute))) continue;
19990
+ let names = declared.get(id);
19991
+ if (names === void 0) {
19992
+ names = /* @__PURE__ */ new Set();
19993
+ declared.set(id, names);
19994
+ }
19995
+ if (!names.has(name)) {
19996
+ names.add(name);
19997
+ grew = true;
19998
+ }
19999
+ }
20000
+ }
20001
+ if (!grew) break;
20002
+ }
20003
+ for (const [id, leaves] of leavesOf) {
20004
+ if (!Object.hasOwn(resources, id)) continue;
20005
+ const resource = resources[id];
20006
+ if (leaves.length > 0) {
20007
+ resource.properties = maskAtCoordinates(resource.properties, leaves);
20008
+ resource.noEchoLeaves = leaves.map((coordinate) => [...coordinate]);
20009
+ }
20010
+ const echoed = [...declared.get(id) ?? []].filter((name) => resource.attributes !== void 0 && Object.hasOwn(resource.attributes, name));
20011
+ if (echoed.length > 0 && resource.attributes !== void 0) {
20012
+ const attributes = { ...resource.attributes };
20013
+ for (const name of echoed) attributes[name] = maskWholeValue(attributes[name]);
20014
+ resource.attributes = attributes;
20015
+ resource.noEchoAttributeNames = [.../* @__PURE__ */ new Set([...noEchoAttributeNamesOf(resource) ?? [], ...echoed])].sort();
20016
+ }
20017
+ }
20018
+ }
20019
+ function topLevelNoEchoProperties(template, sources) {
20020
+ const leaves = [];
20021
+ for (const [key, value] of Object.entries(template)) {
20022
+ let reads;
20023
+ try {
20024
+ reads = readsNoEchoSource(value, sources);
20025
+ } catch {
20026
+ reads = true;
20027
+ }
20028
+ if (reads) leaves.push([key]);
20029
+ }
20030
+ return canonicalCoordinates(leaves);
20031
+ }
20032
+ function noEchoParametersOrAll(template) {
20033
+ try {
20034
+ return noEchoParameterNamesOf(template);
20035
+ } catch {
20036
+ try {
20037
+ return new Set(Object.keys(template.Parameters ?? {}));
20038
+ } catch {
20039
+ return /* @__PURE__ */ new Set();
20040
+ }
20041
+ }
20042
+ }
19680
20043
  const DYNAMIC_REFERENCE_OPENER = "{{resolve:";
19681
20044
  function countDynamicReferenceOpeners(bag) {
19682
20045
  let text;
@@ -19823,7 +20186,10 @@ async function captureObservedForImportedResources(stackState, providerRegistry,
19823
20186
  }).provider;
19824
20187
  if (!provider.readCurrentState) return;
19825
20188
  const observed = await provider.readCurrentState(resource.physicalId, logicalId, resource.resourceType, resource.properties ?? {}, buildReadCurrentStateContext(stackState, logicalId));
19826
- if (observed !== void 0 && observed !== RESOURCE_NOT_FOUND) resource.observedProperties = redactSecretsForState(observed, NO_RECORDED_SECRETS, resource.properties ?? {}, STATE_SOURCED_BASELINE_RULES);
20189
+ if (observed !== void 0 && observed !== RESOURCE_NOT_FOUND) {
20190
+ const marked = noEchoLeavesOf(resource) ?? [];
20191
+ resource.observedProperties = redactSecretsForState(marked.length > 0 ? maskReadbackAtCoordinates(observed, resource.properties ?? {}, marked) : observed, NO_RECORDED_SECRETS, resource.properties ?? {}, STATE_SOURCED_BASELINE_RULES);
20192
+ }
19827
20193
  } catch (err) {
19828
20194
  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.`);
19829
20195
  }
@@ -27379,4 +27745,4 @@ function collectVerbFlags(program) {
27379
27745
 
27380
27746
  //#endregion
27381
27747
  export { canonicalizeIpProtocolValue as a, buildProgram, resolveSecretDerivedPrincipals as i, runDestroyForStack as n, resolvedResourceTimeoutMs as o, isResolvableSecretPrincipalList as r, canonicalizeIpv4Cidr as t };
27382
- //# sourceMappingURL=program--_T76pFz.js.map
27748
+ //# sourceMappingURL=program-CXVhqA7j.js.map