@go-to-k/cdkd 0.296.11 → 0.296.13

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 (31) hide show
  1. package/dist/{asg-provider-HvY_p4Yc.js → asg-provider-DeeIdM5B.js} +20 -9
  2. package/dist/asg-provider-DeeIdM5B.js.map +1 -0
  3. package/dist/cli.js +2 -2
  4. package/dist/{deploy-engine-aXeTL7rk.js → deploy-engine-FDsHckZR.js} +6781 -5372
  5. package/dist/deploy-engine-FDsHckZR.js.map +1 -0
  6. package/dist/{iam-policy-targets-BREzwsG6.js → iam-policy-targets-elNafvpb.js} +116 -10
  7. package/dist/iam-policy-targets-elNafvpb.js.map +1 -0
  8. package/dist/{iam-role-provider-B8gFSZcy.js → iam-role-provider-BuWI_oJp.js} +5 -93
  9. package/dist/iam-role-provider-BuWI_oJp.js.map +1 -0
  10. package/dist/index.d.ts +22 -2
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +3 -3
  13. package/dist/{neptune-provider-xf0xgelu.js → neptune-provider-Bdc1YYxL.js} +21 -10
  14. package/dist/neptune-provider-Bdc1YYxL.js.map +1 -0
  15. package/dist/{program-w_06Pj_g.js → program-1S4fU3m4.js} +387 -60
  16. package/dist/program-1S4fU3m4.js.map +1 -0
  17. package/dist/{provider-classes-4lVceW9g.js → provider-classes-hW6X0dKh.js} +506 -88
  18. package/dist/provider-classes-hW6X0dKh.js.map +1 -0
  19. package/dist/{rds-provider-CUN4EuIb.js → rds-provider-Q1U7N7ee.js} +80 -14
  20. package/dist/rds-provider-Q1U7N7ee.js.map +1 -0
  21. package/dist/{version-BJ10lRpQ.js → version-B9EuX7Oh.js} +2 -2
  22. package/dist/{version-BJ10lRpQ.js.map → version-B9EuX7Oh.js.map} +1 -1
  23. package/package.json +1 -1
  24. package/dist/asg-provider-HvY_p4Yc.js.map +0 -1
  25. package/dist/deploy-engine-aXeTL7rk.js.map +0 -1
  26. package/dist/iam-policy-targets-BREzwsG6.js.map +0 -1
  27. package/dist/iam-role-provider-B8gFSZcy.js.map +0 -1
  28. package/dist/neptune-provider-xf0xgelu.js.map +0 -1
  29. package/dist/program-w_06Pj_g.js.map +0 -1
  30. package/dist/provider-classes-4lVceW9g.js.map +0 -1
  31. package/dist/rds-provider-CUN4EuIb.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { a as runWithStackAwsClients, i as resetAwsClients, o as setAwsClients, t as AwsClients } from "./aws-clients-CnmtbrxD.js";
2
2
  import { A as displayIdent, D as UNRENDERABLE, E as STACK_REF_MAX_CODE_POINTS, F as plainIdentOr, I as safeMsg, L as stringifyJsonPayload, M as displayStackName, N as isPasteableIdent, O as cutMarker, R as truncateCodePoints, S as withStackName, T as SECRET_REF_MAX_CODE_POINTS, d as PATTERN_B_NAME_PROPERTIES, f as PATTERN_B_RESOURCE_TYPES, g as generateResourceName, h as explicitNamePropertyFor, i as reserveStdoutForPayload, j as displaySafe, k as displayAwsMessage, l as getLiveRenderer, m as derivesPatternBName, n as getLogger, o as runStackBuffered, r as isStdoutReservedForPayload, u as PATTERN_B_NAME_OPTIONS, w as SAFE_MSG_ALTERED_CHAR, x as withSkipPrefix } from "./logger-DAaB7GFO.js";
3
- import { An as setPasteableVerbFlags, At as CUSTOM_RESOURCE_RESPONSE_PREFIX, Bt as clientDefaultsFor, Ct as buildForceUnlockCommand, Dn as shellQuote, Dt as formatLockOperation, En as shellBoundedDisplay, Et as formatLockExpiry, F as runDeleteAttempt, Ft as producerRecordKey, G as beginCommandInterruptScope, Gn as retryClassificationText, Ht as AccountIdUnavailableError, It as setPasteableAwsProfile, J as isInterruptedWaitError, Jn as safeStringify, Jt as DeployCancelledError, K as endCommandInterruptScope, Kn as describeAwsFailure, Kt as CrossAccountSecretRefusalError, Lt as withPasteableAwsProfile, Mt as injectiveKey, On as withheldTargetClause, Ot as formatLockOwner, Pt as producerCoordinateKey, Qn as markNonRetryable, Qt as LocalStartServiceError, Rt as ambientClientDefaults, Sn as pasteableCommand, St as UNREPRODUCIBLE_LOCK_CLAUSE, Tn as quotedOrDescribed, Tt as forceQuitRecoveryClause, Un as isRetryableTransientError, V as isAwsCliLiteral, Vn as isAmbiguousOutcomeError, Vt as credentialFingerprint, Wn as isTransientServerError, Wt as CdkdError, Xn as isMarkedNonRetryable, Xt as IntrinsicResolutionRefusalError, Yt as DynamicReferenceRegionAmbiguousError, Zn as isThrottlingError, Zt as LocalInvokeBuildError$1, _ as VALUE_NOT_SHOWN, _n as SHELL_ACTIVE_WHY, an as ResourceTimeoutError, cn as StackTerminationProtectionError, g as assertRegionMatch, h as RESOURCE_NOT_FOUND, hn as TIMEOUT_FLAG_RESOURCE_TYPE, in as ProvisioningError, it as resourceTypeShown, jt as DEFAULT_STATE_PREFIX, kn as setPasteableRunFlags, mn as withErrorHandling, n as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, nn as NestedStackChildDirectDestroyError, nt as logicalIdShown, on as ResourceUpdateNotSupportedError, pn as normalizeAwsError, q as interruptWatchListenerCount, rn as PartialFailureError, s as readRecordedPrincipals, sn as StackHasActiveImportsError, t as IAM_PRINCIPAL_NAME, tn as MalformedProducerRecordRefusalError, un as SynthesisError, w as remedyLogicalId, wn as plainOrDescribed, wt as buildLockContentionMessage, xn as isInertUnquoted, yn as commandHole, zt as ambientCredentialConfig } from "./iam-policy-targets-BREzwsG6.js";
3
+ import { $ as endCommandInterruptScope, $n as retryClassificationText, An as pasteableCommand, At as UNREPRODUCIBLE_LOCK_CLAUSE, Bt as injectiveKey, C as assertRegionMatch, Cn as TIMEOUT_FLAG_RESOURCE_TYPE, Dn as commandHole, Fn as shellQuote, Ft as formatLockOperation, Gt as withPasteableAwsProfile, H as runDeleteAttempt, Ht as producerCoordinateKey, In as withheldTargetClause, It as formatLockOwner, J as isAwsCliLiteral, Jt as clientDefaultsFor, Kt as ambientClientDefaults, Ln as setPasteableRunFlags, Mn as plainOrDescribed, Mt as buildLockContentionMessage, Nn as quotedOrDescribed, Nt as forceQuitRecoveryClause, Pn as shellBoundedDisplay, Pt as formatLockExpiry, Q as beginCommandInterruptScope, Qn as isTransientServerError, Qt as CdkdError, Rn as setPasteableVerbFlags, Rt as CUSTOM_RESOURCE_RESPONSE_PREFIX, S as RESOURCE_NOT_FOUND, Sn as withErrorHandling, Tn as SHELL_ACTIVE_WHY, Ut as producerRecordKey, Wt as setPasteableAwsProfile, Xt as AccountIdUnavailableError, Yn as isAmbiguousOutcomeError, Yt as credentialFingerprint, Zn as isRetryableTransientError, an as LocalInvokeBuildError$1, ar as isThrottlingError, dn as PartialFailureError, dt as resourceTypeShown, en as CrossAccountSecretRefusalError, er as describeAwsFailure, et as interruptWatchListenerCount, fn as ProvisioningError, gn as StackTerminationProtectionError, hn as StackHasActiveImportsError, in as IntrinsicResolutionRefusalError, ir as isMarkedNonRetryable, j as remedyLogicalId, jt as buildForceUnlockCommand, kn as isInertUnquoted, ln as MalformedProducerRecordRefusalError, lt as logicalIdShown, mn as ResourceUpdateNotSupportedError, n as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, nn as DeployCancelledError, nr as safeStringify, on as LocalStartServiceError, or as markNonRetryable, pn as ResourceTimeoutError, qt as ambientCredentialConfig, rn as DynamicReferenceRegionAmbiguousError, s as readRecordedPrincipals, t as IAM_PRINCIPAL_NAME, tt as isInterruptedWaitError, un as NestedStackChildDirectDestroyError, vn as SynthesisError, w as VALUE_NOT_SHOWN, xn as normalizeAwsError, zt as DEFAULT_STATE_PREFIX } from "./iam-policy-targets-elNafvpb.js";
4
4
  import { n as awsClientDefaults, r as getAssumedRoleCredentials, u as formatAuthority } from "./aws-client-defaults-D0q0z4dG.js";
5
- import { $ as resourcesNamingDeclaredParameter, $a as createSecretMasker, $i as repairMalformedOutputsForReadOnly, $n as deleteSkipReason, $o as BOOTSTRAP_MARKER_PREFIX, $r as accountArgs, $s as PARTITION_TABLE, $t as effectiveDeletionPolicy, Ai as refuseMalformedOrphanRecordsForDestroy, Ao as rebuildClientForBucketRegion, As as Synthesizer, At as planRollback, Bi as refuseMalformedResourceEntriesForImport, Bn as CC_BROKEN_REASON, Bo as isReadableBag, Br as AWS_NO_VALUE, Bs as resolveStateBucketWithDefaultAndSource, Bt as updatePartialMessage, C as perType, Ci as malformedResourcesWarning, Cn as findDestructiveChanges, Co as STATE_SOURCED_READBACK_RULES, Cr as callerEnvCredentials, Cs as runDockerForeground, Di as refuseDivergentRecordRegionForDestroy, Dn as ledgerForStack, Do as LockManager, Ds as stripControlChars, Dt as isJournaledOrphan, Ei as previewableOrphanRecords, Eo as isSingleDynamicReferenceToken, Es as escapeRegExp, Et as demoteSupersededOrphans, Fa as templateResourceTypes, Fi as refuseMalformedOutputsForDestroy, Fo as hasReadableExportSet, Fr as isImpossibleEmptyStoredAttribute, Fs as resolveApp, Ft as inheritProducerRegions, G as cyan, Ga as createUnionSecretMasker, Gi as refuseMalformedResourcePropertiesForExport, Go as isSensitiveAttributeName, Gr as withSharedDrainBudget, Gs as CFN_TEMPLATE_BODY_LIMIT, Gt as orphanRecordsPrintingBag, H as formatResourceLine, Ha as TemplateParser, Hi as refuseMalformedResourceEntriesForOrphan, Hn as ccBrokenReason, Ho as orphansCarriedFrom, Hr as isStalePlaceholderArnAttribute, Hs as stateBucketExistenceConfirmed, Ht as completedReplayEntries, Ia as describeTypeWithThrottleRetry, Ii as refuseMalformedResourceAttributesForOrphan, Io as hasReasonlessBaselineRefusal, Ir as carriesDynamicReference, Is as resolveAutoAssetStorage, J as red, Ja as logOnlyValueCount, Ji as refuseMalformedResourcesForDestroy, Jn as slowCcOperationTimeoutMs, Jo as buildAssetRedirectMap, Jr as JSON_LISTING_HOLE_VALUE, Js as findLargeInlineResources, Jt as ATOMIC_FINAL_SNAPSHOT_TYPES, K as gray, Ka as hasMaskableValues, Ki as refuseMalformedResourcePropertiesForOrphan, Kn as withPrintingSecrets, Ko as stringifyValue, Kr as parameterInputsFor, Ks as CFN_TEMPLATE_URL_LIMIT, Kt as secretNamePrintingBag, La as withRetry, Li as refuseMalformedResourceEntries, Lo as hasUnverifiableParameterRefusal, Lr as carriesFetchableDynamicReference, Ls as resolveCaptureObservedState, Mi as refuseMalformedOrphansForDestroy, Mo as acceptedCreateOnlyDropsOf, Mr as isUnboundTemplateParameter, Ms as getDefaultStateBucketName, Mt as resolveReplacementOldType, Ni as refuseMalformedOrphansForOrphan, No as describeRegionValueKind, Nr as parameterTypeMayLoseSecretIdentity, Ns as getLegacyStateBucketName, Nt as findNestedStackTypeChanges, Oo as isLockInfoExpired, Os as AssetManifestLoader, Ot as isReplacementOrphan, Pa as prefetchCreateOnlyPropertyPaths, Pi as refuseMalformedOutputs, Po as exportNamesCarriedFrom, Pr as getAccountInfo, Ps as loadCdkJson, Q as reachableDivergentParameters, Qa as shareLogOnlyValues, Qi as repairMalformedOrphansForReadOnly, Qn as deleteIndeterminateGuards, Qo as AssetModeResolver, Qr as UNREADABLE_RESOURCES_MAP_ROW, Qs as expectedOwnerParam, Qt as createPreDeleteFinalSnapshot, Ri as refuseMalformedResourceEntriesForDeploy, Ro as importableOutputKeys, Rr as isNamelessDynamicReferenceError, Rs as resolveSkipPrefix, S as isProtectionValueActive, Si as malformedResourcePropertiesWarning, Sn as constructPathOf, So as STATE_SOURCED_CROSS_GENERATION_RULES, Sr as applyCallerIdentityCredentials, Ss as redactedDockerCause, St as destroyStackRecordsView, Ti as malformedStateRefusalMessage, Tn as RollbackInlinePolicyWriters, To as WHOLE_DYNAMIC_REFERENCE_PATTERN, Ts as warnFinchArgvExposure, Tt as recordAfterRollbackUpdate, U as createReadOnlyAttributeHealerFactory, Ua as liveMatchesUnresolvedTokenFrame, Ui as refuseMalformedResourcePropertiesForDestroy, Un as wouldReturnToSdkProvider, Uo as shouldRetainResource, Ur as refStateLookupFromResource, Us as warnDeprecatedNoPrefixCliFlag, Ut as journaledOrphanPrintingBag, Va as DagBuilder, Vi as refuseMalformedResourceEntriesForImportSave, Vn as ProviderRegistry, Vo as orphansAfterRollback, Vr as cfnRefValueFromPhysicalId, Vs as resolveUseCdkBootstrapAssets, Vt as updatePartialReason, W as bold, Wa as carryLogOnlyValues, Wi as refuseMalformedResourcePropertiesForDrift, Wn as isCustomResourceType$1, Wo as AssetPublisher, Ws as ssmResolvedValueType, Wt as maskEventTextWithBoundBags, X as computeParameterTaint, Xa as recordLogOnlyParameterValue, Xi as refuseMalformedState, Xo as loadPublishableAssetManifest, Xr as STATE_RESOURCES_MALFORMED, Xs as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Xt as buildFinalSnapshotIdentifier, Y as yellow, Ya as printingCorpusOf, Yi as refuseMalformedResourcesForExport, Yn as ccProtectionRegistryTypes, Yo as createAssetRedirectResolver, Yr as STATE_REGION_DIVERGED, Ys as uploadCfnTemplate, Yt as PRE_DELETE_SNAPSHOT_TYPES, Z as namesAnyDeclaredParameter, Za as recordLogOnlyValue, Zi as repairMalformedOrphanRecordsForReadOnly, Zn as UNSPECIFIED_SKIP_REASON, Zo as rewriteTemplateAssetReferences, Zr as UNREADABLE_ORPHANS_CONTAINER_ROW, Zs as decodeListingKey, Zt as ccRoutedFinalSnapshotError, _ as makeCanonicalizePropertiesFn, _a as isStatefulRecreateTargetSync, _i as malformedOrphansWarning, _n as isExportAliasCollision, _o as recordMaskOnlyValuesIn, _r as assertSendableRoleArn, _s as getDockerCmd, a as findNestedTemplateTreeDefect, aa as unreadableResourceEntries, ac as defineOwnKey, ai as isReadableOrphanRecord, an as extractDeploymentEventError, ao as scrubResourceRecord, as as readBootstrapMarkerBody, at as makeSiblingClaimReader, b as recordedProtectionNote, bi as malformedRenderedContainersWarning, bn as DEFAULT_RESOURCE_WARN_AFTER_MS, bo as wholeStringLeavesOf, br as sendableAssumeRoleCommand, bs as partitionSensitiveEnv, bt as replayRollback, c as renderNestedTemplateTreeDefect, cc as nullPrototypeRecord, ci as malformedExportNamesWarning, cn as exportAliasCollisionScrubWarning, co as isUncertifiedBaselineMaskPosition, cs as buildDenyExternalAccessPolicy, ct as displacedOpClause, d as conditionInputsFrom, da as NO_CC_HANDLERS_REASON, dc as describeFileReadFailure, di as malformedLocalResourceEntriesWarning, dn as secretSafeKeyDisplay, do as recordNestedStackParameterExpressions, dr as IntrinsicFunctionResolver, ds as describeDockerCapturedOutput, ea as repairMalformedResourceEntriesForReadOnly, ec as canonicalizeRegion, ei as deployRefusesOrphanRowsReason, en as isFinalSnapshotError, eo as errorCauseChain, es as assertAssetBucketRegion, et as deleteJournaledOrphans, f as parentSuppliedValues, fa as hasNoCloudControlHandlers, fc as displayAssemblyPath, fi as malformedLocalResourcesWarning, fn as exportNameSecretExposure, fr as classifyReplaySecretRegion, fs as describeDockerExecFailure, ft as nestedChildStackName$1, g as mergeNoChangeOutputs, ga as isStatefulRecreateTargetForReplace, gc as resolveBucketRegion, gi as malformedOrphansRefusalMessage, gn as collectPublishedOutputNames, go as recordMaskOnlyValue, gr as assertFlagRoleArn, gs as formatDockerLoginError, gt as withNestedRevertRun, h as keptWholeReasonText, ha as MULTI_REGION_RECREATE_BLOCKED_TYPES, hi as malformedOrphanRowsKeptWarning, hn as collectDeclaredOutputNames, ho as provenPublicValue, hr as applyRoleArnIfSet, hs as finchSecretArgvRefusal, ht as revertedNestedRowIds, i as childTemplateLoader, ia as unreadableOrphanRecords, ic as processStackMessages, ii as hasReadableResources, in as DeploymentEventsStore, io as redactSecretsForState, is as parseBootstrapMarker, it as sameJournaledOrphans, ji as refuseMalformedOrphans, jo as splitImportedOps, jr as coerceParameterTypedValue, js as synthesisStatusMessage, jt as replacementNeverSwapped, ki as refuseMalformedOrphanRecords, kn as withCreateTokenLedger, ko as S3StateBackend, ks as getDockerImageBySourceHash, kt as planFailedOps, l as templateIdentity, la as unwrittenCreateOnlyReplacement, lc as ownValue, li as malformedExportSourceWarning, ln as secretBearing, lo as pathCrossesDottedKey, lr as DiffCalculator, ls as buildDockerImage, lt as displacedPhysicalIdShown, m as isSecretBearingReferenceString, ma as shownType, mc as resolveAssemblyPath, mi as malformedOrphanRecordsWarning, mn as noEchoParameterValueSeed, mo as carriesSecretMask, mr as regionLessSecretName, ms as dockerSpawnEnvWithSensitive, n as IMPLICIT_DELETE_DEPENDENCIES, na as repairMalformedResourcesForReadOnly, nc as AssemblyReader, ni as hasReadableOrphans, nn as unsupportedFinalSnapshotError, no as maskSecretsInText, ns as getBootstrapMarkerKey, nt as journaledOrphanLines, o as isAbsoluteAssetPath, oa as withheldAccountClause, oc as hasOwnKey, oi as isReadableResourceEntry, on as WITHHELD_NAME_DISPLAY, oo as DYNAMIC_REFERENCE_TOKEN_SCAN, os as validateAssetBucketName, ot as planOrphanAdoption, p as readRecordedConditionVerdicts, pa as findReplacedReadersOfRecreateTargets, pc as renderAssemblyPathEscape, pi as malformedOrphanRecordsRefusalMessage, pn as isWholeDynamicReferenceValue, po as identityKeyFor, pr as producerRegionsFromState, ps as describeDockerFailure, pt as recordDisplacedSkips, q as green, qa as literalSplitDelimitersOf, qi as refuseMalformedResourcesForDeploy, qn as CloudControlProvider, qo as WorkGraph, qs as MIGRATE_TMP_PREFIX, qt as stateSecretNameNeedles, r as computeImplicitDeleteEdges, ra as unpreviewableOrphanRecords, rc as StageLoadError, ri as hasReadableOutputs, rn as DeploymentEventsReader, ro as markSameGenerationBag, rs as isCrossRegionRedirect, rt as loadJournaledOrphans, s as listNestedTemplateRows, sa as findActionableSilentDrops, sc as hasPlainPrototype, si as malformedDriftResourcePropertiesWarning, sn as displayTextOrWithheld, so as dynamicReferenceTokens, ss as validateContainerRepoName, st as NESTED_PENDING_PARENT_REASON, t as DeployEngine, ta as repairMalformedResourcePropertiesForReadOnly, tc as derivePartitionAndUrlSuffix, ti as displayLogicalId, tn as refusesFinalSnapshot, to as maskSecretsInError, tr as isWaitAbandonedError, ts as ensureAssetStorage, tt as isHandledOrphan, u as conditionFingerprint, uc as absoluteAssemblyPathEscape, ui as malformedLocalOutputsWarning, un as secretBearingStateKeyWarning, uo as inheritNestedStackParameterAssociations, ur as INTRINSIC_KEYS, us as resolveDockerContextDirectory, ut as dropSettledNestedJournals, v as withResourceDeadline, va as renderStatefulReason, vi as malformedOutputsRefusalMessage, vn as bindingSkippedOutputs, vo as recordNoEchoAttributeValues, vr as explicitRoleArnOrThrow, vs as isDockerClientEnvKey, vt as withNestedStackContext, w as readProtection, wi as malformedScrubResourceEntriesRefusalMessage, wn as formatDestructiveChange, wo as TEMPLATE_SOURCED_RULES, wr as envCredentialsAreAssumedRole, ws as runDockerStreaming, wt as withStackRecords, x as PROTECTION_PROPERTY_BY_TYPE, xi as malformedResourceEntriesWarning, xn as maskingRetryLogger, xo as STATE_SOURCED_BASELINE_RULES, xr as AWS_CREDENTIAL_ENV_KEYS, xs as redactDockerArgvValues, y as recordedProtectionEvidence, yi as malformedOutputsWarning, yn as DEFAULT_RESOURCE_TIMEOUT_MS, yo as recordProvenPublicExpression, yr as isIamRoleArn, ys as isMalformedEnvKey, yt as replayFailedOperations, zi as refuseMalformedResourceEntriesForDestroy, zo as importableOutputs, zr as keepsSecretReferenceToken, zs as resolveStateBucketWithDefault } from "./deploy-engine-aXeTL7rk.js";
6
- import { t as getCdkdVersion } from "./version-BJ10lRpQ.js";
5
+ import { $ as recordDisplacedSkips, $a as noEchoLeavesOf, $i as refuseMalformedResourcesForDeploy, $n as withPrintingSecrets, $o as importableOutputs, $s as resolveStateBucketWithDefault, $t as secretNamePrintingBag, A as gray, Ac as resolveBucketRegion, Ai as malformedScrubResourceEntriesRefusalMessage, An as findDestructiveChanges, Ao as recordMaskOnlyValue, Ar as envCredentialsAreAssumedRole, As as formatDockerLoginError, At as removeProtectionTypeList, B as isHandledOrphan, Ba as prefetchCreateOnlyPropertyPaths, Bi as refuseMalformedOutputs, Bo as isSingleDynamicReferenceToken, Br as getAccountInfo, Bs as escapeRegExp, Bt as findNestedStackTypeChanges, C as recordedProtectionNote, Ca as isStatefulRecreateTargetSync, Cc as ownValue, Ci as malformedOrphansWarning, Cn as collectPublishedOutputNames, Co as pathCrossesDottedKey, Cr as assertSendableRoleArn, Cs as buildDockerImage, D as createReadOnlyAttributeHealerFactory, Dc as renderAssemblyPathEscape, Di as malformedResourceEntriesWarning, Dn as DEFAULT_RESOURCE_WARN_AFTER_MS, Do as identityKeyFor, Dr as AWS_CREDENTIAL_ENV_KEYS, Ds as describeDockerFailure, E as formatResourceLine, Ec as displayAssemblyPath, Ei as malformedRenderedContainersWarning, En as DEFAULT_RESOURCE_TIMEOUT_MS, Er as sendableAssumeRoleCommand, Es as describeDockerExecFailure, F as namesAnyDeclaredParameter, Fi as refuseMalformedOrphanRecords, Fo as STATE_SOURCED_BASELINE_RULES, Fs as redactDockerArgvValues, Ft as isReplacementOrphan, G as makeSiblingClaimReader, Gi as refuseMalformedResourceEntriesForDestroy, Go as splitImportedOps, Gr as keepsSecretReferenceToken, Gs as synthesisStatusMessage, H as loadJournaledOrphans, Ha as describeTypeWithThrottleRetry, Hi as refuseMalformedResourceAttributesForOrphan, Ho as isLockInfoExpired, Hr as carriesDynamicReference, Hs as AssetManifestLoader, Ht as inheritProducerRegions, I as reachableDivergentParameters, Ii as refuseMalformedOrphanRecordsForDestroy, In as withCreateTokenLedger, Io as STATE_SOURCED_CROSS_GENERATION_RULES, Is as redactedDockerCause, It as planFailedOps, J as displacedOpClause, Ja as TemplateParser, Ji as refuseMalformedResourceEntriesForOrphan, Jn as ProviderRegistry, Jo as exportNamesCarriedFrom, Jr as isStalePlaceholderArnAttribute, Js as loadCdkJson, Jt as updatePartialReason, K as planOrphanAdoption, Ki as refuseMalformedResourceEntriesForImport, Ko as acceptedCreateOnlyDropsOf, Kr as AWS_NO_VALUE, Ks as getDefaultStateBucketName, L as resourcesNamingDeclaredParameter, Li as refuseMalformedOrphans, Lo as STATE_SOURCED_READBACK_RULES, Lr as coerceParameterTypedValue, Ls as runDockerForeground, Lt as planRollback, M as red, Mi as previewableOrphanRecords, Mn as RollbackInlinePolicyWriters, Mo as recordNoEchoAttributeValues, Ms as isDockerClientEnvKey, Mt as recordAfterRollbackUpdate, N as yellow, Ni as refuseDivergentRecordRegionForDestroy, No as recordProvenPublicExpression, Ns as isMalformedEnvKey, Nt as demoteSupersededOrphans, O as bold, Oc as resolveAssemblyPath, Oi as malformedResourcePropertiesWarning, On as maskingRetryLogger, Oo as carriesSecretMask, Or as applyCallerIdentityCredentials, Os as dockerSpawnEnvWithSensitive, P as computeParameterTaint, Pn as ledgerForStack, Po as wholeStringLeavesOf, Ps as partitionSensitiveEnv, Pt as isJournaledOrphan, Q as nestedChildStackName$1, Qa as maskedLeafCoordinatesOf, Qi as refuseMalformedResourcePropertiesForOrphan, Qo as importableOutputKeys, Qr as parameterInputsFor, Qs as resolveSkipPrefix, Qt as orphanRecordsPrintingBag, R as deleteJournaledOrphans, Ri as refuseMalformedOrphansForDestroy, Ro as TEMPLATE_SOURCED_RULES, Rr as isUnboundTemplateParameter, Rs as runDockerStreaming, Rt as replacementNeverSwapped, S as recordedProtectionEvidence, Sa as isStatefulRecreateTargetForReplace, Sc as nullPrototypeRecord, Si as malformedOrphansRefusalMessage, Sn as collectDeclaredOutputNames, So as isUncertifiedBaselineMaskPosition, Sr as assertFlagRoleArn, Ss as buildDenyExternalAccessPolicy, Tc as describeFileReadFailure, Ti as malformedOutputsWarning, Tn as bindingSkippedOutputs, To as recordNestedStackParameterExpressions, Tr as isIamRoleArn, Ts as describeDockerCapturedOutput, U as makeForeignHolderScan, Ua as withRetry, Ui as refuseMalformedResourceEntries, Uo as S3StateBackend, Ur as carriesFetchableDynamicReference, Us as getDockerImageBySourceHash, V as journaledOrphanLines, Va as templateResourceTypes, Vi as refuseMalformedOutputsForDestroy, Vo as LockManager, Vr as isImpossibleEmptyStoredAttribute, Vs as stripControlChars, W as sameJournaledOrphans, Wi as refuseMalformedResourceEntriesForDeploy, Wo as rebuildClientForBucketRegion, Wr as isNamelessDynamicReferenceError, Ws as Synthesizer, X as dropSettledNestedJournals, Xa as maskReadbackAtCoordinates, Xi as refuseMalformedResourcePropertiesForDrift, Xn as wouldReturnToSdkProvider, Xo as hasReasonlessBaselineRefusal, Xs as resolveAutoAssetStorage, Xt as journaledOrphanPrintingBag, Y as displacedPhysicalIdShown, Ya as isMarkedCoordinate, Yi as refuseMalformedResourcePropertiesForDestroy, Yn as ccBrokenReason, Yo as hasReadableExportSet, Yr as refStateLookupFromResource, Ys as resolveApp, Yt as completedReplayEntries, Za as maskWholeValue, Zi as refuseMalformedResourcePropertiesForExport, Zn as isCustomResourceType$1, Zo as hasUnverifiableParameterRefusal, Zr as withSharedDrainBudget, Zs as resolveCaptureObservedState, Zt as maskEventTextWithBoundBags, _ as makeCanonicalizePropertiesFn, _a as NO_CC_HANDLERS_REASON, _c as StageLoadError, _i as malformedLocalResourceEntriesWarning, _n as secretBearingStateKeyWarning, _o as markSameGenerationBag, _r as IntrinsicFunctionResolver, _s as isCrossRegionRedirect, a as findNestedTemplateTreeDefect, aa as repairMalformedOutputsForReadOnly, ac as CFN_TEMPLATE_BODY_LIMIT, ai as accountArgs, an as createPreDeleteFinalSnapshot, ao as createUnionSecretMasker, ar as deleteSkipReason, as as isSensitiveAttributeName, at as replayFailedOperations, b as noEchoParameterNamesOf, ba as shownType, bc as hasOwnKey, bi as malformedOrphanRecordsWarning, bn as isWholeDynamicReferenceValue, bo as DYNAMIC_REFERENCE_TOKEN_SCAN, br as regionLessSecretName, bs as validateAssetBucketName, c as renderNestedTemplateTreeDefect, ca as repairMalformedResourcesForReadOnly, cc as findLargeInlineResources, ci as hasReadableOrphans, cn as refusesFinalSnapshot, co as logOnlyValueCount, cs as buildAssetRedirectMap, ct as destroyStackRecordsView, d as conditionInputsFrom, da as unreadableResourceEntries, dc as decodeListingKey, di as isReadableOrphanRecord, dn as DeploymentEventsStore, do as recordLogOnlyValue, ds as rewriteTemplateAssetReferences, dt as PROTECTION_PROPERTY_BY_TYPE, ea as refuseMalformedResourcesForDestroy, ec as resolveStateBucketWithDefaultAndSource, ei as JSON_LISTING_HOLE_VALUE, en as stateSecretNameNeedles, eo as noEchoOutputsComparison, er as CloudControlProvider, es as isReadableBag, f as parentSuppliedValues, fa as withheldAccountClause, fc as expectedOwnerParam, fi as isReadableResourceEntry, fn as extractDeploymentEventError, fo as shareLogOnlyValues, fs as AssetModeResolver, ft as isProtectionValueActive, g as mergeNoChangeOutputs, gc as AssemblyReader, gi as malformedLocalOutputsWarning, gn as secretBearing, go as maskSecretsInText, gr as INTRINSIC_KEYS, gs as getBootstrapMarkerKey, h as keptWholeReasonText, ha as unwrittenCreateOnlyReplacement, hc as derivePartitionAndUrlSuffix, hi as malformedExportSourceWarning, hn as exportAliasCollisionScrubWarning, ho as maskSecretsInError, hr as DiffCalculator, hs as ensureAssetStorage, i as childTemplateLoader, ia as repairMalformedOrphansForReadOnly, ic as ssmResolvedValueType, ii as UNREADABLE_RESOURCES_MAP_ROW, in as ccRoutedFinalSnapshotError, io as carryLogOnlyValues, ir as deleteIndeterminateGuards, is as AssetPublisher, it as withNestedStackContext, j as green, ji as malformedStateRefusalMessage, jn as formatDestructiveChange, jo as recordMaskOnlyValuesIn, js as getDockerCmd, jt as orphanDeleteNeedsIdentity, k as cyan, ki as malformedResourcesWarning, kn as constructPathOf, ko as provenPublicValue, kr as callerEnvCredentials, ks as finchSecretArgvRefusal, l as templateIdentity, la as unpreviewableOrphanRecords, lc as uploadCfnTemplate, li as hasReadableOutputs, ln as unsupportedFinalSnapshotError, lo as printingCorpusOf, ls as createAssetRedirectResolver, m as isSecretBearingReferenceString, mc as canonicalizeRegion, mi as malformedExportNamesWarning, mn as displayTextOrWithheld, mo as errorCauseChain, ms as assertAssetBucketRegion, mt as readProtection, n as IMPLICIT_DELETE_DEPENDENCIES, na as refuseMalformedState, nc as stateBucketExistenceConfirmed, ni as STATE_RESOURCES_MALFORMED, nn as PRE_DELETE_SNAPSHOT_TYPES, no as readsNoEchoSource, ns as orphansCarriedFrom, nt as withNestedRevertRun, o as isAbsoluteAssetPath, oa as repairMalformedResourceEntriesForReadOnly, oc as CFN_TEMPLATE_URL_LIMIT, oi as deployRefusesOrphanRowsReason, on as effectiveDeletionPolicy, oo as hasMaskableValues, os as stringifyValue, ot as replayRollback, p as readRecordedConditionVerdicts, pa as findActionableSilentDrops, pc as PARTITION_TABLE, pi as malformedDriftResourcePropertiesWarning, pn as WITHHELD_NAME_DISPLAY, po as createSecretMasker, ps as BOOTSTRAP_MARKER_PREFIX, pt as perType, q as NESTED_PENDING_PARENT_REASON, qa as DagBuilder, qi as refuseMalformedResourceEntriesForImportSave, qn as CC_BROKEN_REASON, qo as describeRegionValueKind, qr as cfnRefValueFromPhysicalId, qs as getLegacyStateBucketName, qt as updatePartialMessage, r as computeImplicitDeleteEdges, ra as repairMalformedOrphanRecordsForReadOnly, rc as warnDeprecatedNoPrefixCliFlag, ri as UNREADABLE_ORPHANS_CONTAINER_ROW, rn as buildFinalSnapshotIdentifier, ro as liveMatchesUnresolvedTokenFrame, rr as UNSPECIFIED_SKIP_REASON, rs as shouldRetainResource, s as listNestedTemplateRows, sa as repairMalformedResourcePropertiesForReadOnly, sc as MIGRATE_TMP_PREFIX, si as displayLogicalId, sn as isFinalSnapshotError, so as literalSplitDelimitersOf, sr as isWaitAbandonedError, ss as WorkGraph, t as DeployEngine, ta as refuseMalformedResourcesForExport, tc as resolveUseCdkBootstrapAssets, ti as STATE_REGION_DIVERGED, tn as ATOMIC_FINAL_SNAPSHOT_TYPES, tr as slowCcOperationTimeoutMs, ts as orphansAfterRollback, tt as revertedNestedRowIds, u as conditionFingerprint, ua as unreadableOrphanRecords, uc as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, ui as hasReadableResources, un as DeploymentEventsReader, uo as recordLogOnlyParameterValue, us as loadPublishableAssetManifest, ut as withStackRecords, v as noEchoAttributeNamesOf, va as hasNoCloudControlHandlers, vc as processStackMessages, vi as malformedLocalResourcesWarning, vn as secretSafeKeyDisplay, vo as redactSecretsForState, vr as classifyReplaySecretRegion, vs as parseBootstrapMarker, wa as renderStatefulReason, wc as absoluteAssemblyPathEscape, wi as malformedOutputsRefusalMessage, wn as isExportAliasCollision, wo as inheritNestedStackParameterAssociations, wr as explicitRoleArnOrThrow, ws as resolveDockerContextDirectory, x as withResourceDeadline, xa as MULTI_REGION_RECREATE_BLOCKED_TYPES, xc as hasPlainPrototype, xi as malformedOrphanRowsKeptWarning, xn as noEchoParameterValueSeed, xo as dynamicReferenceTokens, xr as applyRoleArnIfSet, xs as validateContainerRepoName, y as noEchoComparisonForTemplate, ya as findReplacedReadersOfRecreateTargets, yc as defineOwnKey, yi as malformedOrphanRecordsRefusalMessage, yn as exportNameSecretExposure, yo as scrubResourceRecord, yr as producerRegionsFromState, ys as readBootstrapMarkerBody, z as dropFailedHint, zi as refuseMalformedOrphansForOrphan, zo as WHOLE_DYNAMIC_REFERENCE_PATTERN, zr as parameterTypeMayLoseSecretIdentity, zs as warnFinchArgvExposure, zt as resolveReplacementOldType } from "./deploy-engine-FDsHckZR.js";
6
+ import { t as getCdkdVersion } from "./version-B9EuX7Oh.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";
@@ -69,32 +69,6 @@ function describeStateKey(key, suffix = STATE_FILE_SUFFIX, knownPrefix) {
69
69
  }
70
70
  const STATE_KEY_MAX_CODE_POINTS = STACK_REF_MAX_CODE_POINTS + 64;
71
71
 
72
- //#endregion
73
- //#region src/provisioning/remove-protection-types.ts
74
- const SDK_REMOVE_PROTECTION_TYPES = [
75
- "AWS::Logs::LogGroup",
76
- "AWS::RDS::DBInstance",
77
- "AWS::RDS::DBCluster",
78
- "AWS::DocDB::DBCluster",
79
- "AWS::Neptune::DBCluster",
80
- "AWS::Neptune::DBInstance",
81
- "AWS::DynamoDB::Table",
82
- "AWS::DynamoDB::GlobalTable",
83
- "AWS::EC2::Instance",
84
- "AWS::Cognito::UserPool",
85
- "AWS::AutoScaling::AutoScalingGroup",
86
- "AWS::ElasticLoadBalancingV2::LoadBalancer",
87
- "AWS::EMR::Cluster"
88
- ];
89
- function removeProtectionTypes() {
90
- return [...SDK_REMOVE_PROTECTION_TYPES, ...ccProtectionRegistryTypes()];
91
- }
92
- function removeProtectionTypeList() {
93
- const types = removeProtectionTypes();
94
- if (types.length < 2) return types.join("");
95
- return `${types.slice(0, -1).join(", ")}, and ${types[types.length - 1]}`;
96
- }
97
-
98
72
  //#endregion
99
73
  //#region src/cli/options.ts
100
74
  function parseContextOptions(contextArgs) {
@@ -2421,7 +2395,7 @@ function collectCrossStackRefs(node, onRef) {
2421
2395
  //#region src/provisioning/register-providers.ts
2422
2396
  let providerClasses;
2423
2397
  function loadProviderClasses() {
2424
- providerClasses ??= import("./provider-classes-4lVceW9g.js");
2398
+ providerClasses ??= import("./provider-classes-hW6X0dKh.js");
2425
2399
  return providerClasses;
2426
2400
  }
2427
2401
  function registerAllProviders(registry, classes) {
@@ -2943,7 +2917,7 @@ Force-quit: stack locks may not be released. If the next run reports a lock, run
2943
2917
  const syncValidation = validateRecreateTargets({
2944
2918
  template: stackInfo.template,
2945
2919
  state: stateForRecreateCheck?.state ?? {
2946
- version: 10,
2920
+ version: 11,
2947
2921
  stackName: stackInfo.stackName,
2948
2922
  region: stackRegion,
2949
2923
  resources: {},
@@ -2978,7 +2952,7 @@ Force-quit: stack locks may not be released. If the next run reports a lock, run
2978
2952
  const replacedReaders = await findReplacedReadersOfRecreateTargets({
2979
2953
  template: stackInfo.template,
2980
2954
  state: stateForRecreateCheck?.state ?? {
2981
- version: 10,
2955
+ version: 11,
2982
2956
  stackName: stackInfo.stackName,
2983
2957
  region: stackRegion,
2984
2958
  resources: {},
@@ -4233,7 +4207,7 @@ async function loadStateOrEmpty(stackName, region, stateBackend, refusalRecovery
4233
4207
  region,
4234
4208
  resources: {},
4235
4209
  outputs: {},
4236
- version: 10,
4210
+ version: 11,
4237
4211
  lastModified: Date.now()
4238
4212
  },
4239
4213
  unreadable: [],
@@ -4377,7 +4351,8 @@ function maskOutputChangeForDisplay(change, mask, nameCorpus) {
4377
4351
  return changed ? shown : change;
4378
4352
  }
4379
4353
  async function computeStackDiff(currentState, template, region, stackName, stateBackend, diffCalculator, options = {}) {
4380
- const { parameters, canonicalizeProperties, cfnFallback, inheritSecretBearingTemplate, inheritedSecrets, attributeHealer, parentUnresolvedParameters } = options;
4354
+ const { parameters, canonicalizeProperties, cfnFallback, inheritSecretBearingTemplate, inheritedSecrets, attributeHealer, parentUnresolvedParameters, inheritedNoEchoParameters } = options;
4355
+ const noEchoParametersOf = (t) => /* @__PURE__ */ new Set([...noEchoParameterNamesOf(t), ...inheritedNoEchoParameters ?? []]);
4381
4356
  const inheritedForResolver = inheritedSecrets !== void 0 && hasMaskableValues(inheritedSecrets) ? inheritedSecrets : void 0;
4382
4357
  const intrinsicResolver = new IntrinsicFunctionResolver(region, { cfnFallback: cfnFallback ?? true });
4383
4358
  const outputsDigestSource = structuredClone({
@@ -4604,7 +4579,12 @@ async function computeStackDiff(currentState, template, region, stackName, state
4604
4579
  }
4605
4580
  } };
4606
4581
  }
4607
- const changes = await diffCalculator.calculateDiff(stateForDiff, effectiveTemplate, resolveFn, canonicalizeProperties, void 0, void 0, maskForLog, void 0, maskedInputs, options.refusalRecovery);
4582
+ const changes = await diffCalculator.calculateDiff(stateForDiff, effectiveTemplate, resolveFn, canonicalizeProperties, void 0, void 0, maskForLog, void 0, maskedInputs, options.refusalRecovery, noEchoComparisonForTemplate(effectiveTemplate, conditions === void 0 ? void 0 : Object.fromEntries(Object.entries(conditions).filter(([name]) => !stillUnknown.includes(name))), mergedParameters, stateForDiff.resources, /* @__PURE__ */ new Set([region, stackName]), inheritedNoEchoParameters));
4583
+ const noEchoReaders = Object.keys(effectiveTemplate.Resources ?? {}).filter((logicalId) => changes.get(logicalId)?.changeType === "NO_CHANGE" && readsNoEchoSource(effectiveTemplate.Resources?.[logicalId]?.Properties, {
4584
+ parameters: noEchoParametersOf(effectiveTemplate),
4585
+ ...conditions !== void 0 && { conditions: Object.fromEntries(Object.entries(conditions).filter(([name]) => !stillUnknown.includes(name))) }
4586
+ }));
4587
+ if (noEchoReaders.length > 0) logger.info(safeMsg`Stack ${displayStackName(stackName)}: ${String(noEchoReaders.length)} unchanged resource(s) read a NoEcho parameter, whose value state holds only as ***: the deploy compares it with AWS, and updates a resource whose value changed.`);
4608
4588
  const nestedStackTypeChanges = findNestedStackTypeChanges({
4609
4589
  changes,
4610
4590
  stateResources: stateForDiff.resources
@@ -4619,13 +4599,26 @@ async function computeStackDiff(currentState, template, region, stackName, state
4619
4599
  noEchoParameterValues: noEchoParameterValueSeed(effectiveTemplate.Parameters, mergedParameters, inheritedForResolver, parameters)
4620
4600
  });
4621
4601
  const templateHasSecretReference = resolved.templateHasSecretReference || inheritSecretBearingTemplate === true || !everyConditionKnown && templateHasSecretDynamicReference(template);
4622
- const diffOutputsAgainst = (desired, exportNames, forceLegacyRecord = false) => computeOutputsDiff(currentState.outputs, desired, exportNames, resolved.secretSourceKeys, {
4623
- declaredKeys: resolved.declaredKeys,
4624
- templateHasSecretReference,
4625
- forceLegacyRecord,
4626
- secretBearingExportNames: resolved.secretBearingExportNames,
4627
- storedExportNames: Array.isArray(currentState.exportNames) ? currentState.exportNames.filter((name) => typeof name === "string") : void 0
4602
+ const outputTemplateValues = Object.create(null);
4603
+ for (const [name, definition] of Object.entries(effectiveTemplate.Outputs ?? {})) outputTemplateValues[name] = definition?.Value;
4604
+ const compareNoEchoOutputs = noEchoOutputsComparison(outputTemplateValues, {
4605
+ parameters: noEchoParametersOf(effectiveTemplate),
4606
+ attributeIsNoEcho: (logicalId, attribute) => {
4607
+ const names = (Object.hasOwn(stateForDiff.resources, logicalId) ? stateForDiff.resources[logicalId] : void 0)?.noEchoAttributeNames;
4608
+ return Array.isArray(names) && names.includes(attribute);
4609
+ },
4610
+ ...conditions !== void 0 && { conditions: Object.fromEntries(Object.entries(conditions).filter(([name]) => !stillUnknown.includes(name))) }
4628
4611
  });
4612
+ const diffOutputsAgainst = (rawDesired, exportNames, forceLegacyRecord = false) => {
4613
+ const { current: storedOutputs, desired } = compareNoEchoOutputs(currentState.outputs, rawDesired);
4614
+ return computeOutputsDiff(storedOutputs, desired, exportNames, resolved.secretSourceKeys, {
4615
+ declaredKeys: resolved.declaredKeys,
4616
+ templateHasSecretReference,
4617
+ forceLegacyRecord,
4618
+ secretBearingExportNames: resolved.secretBearingExportNames,
4619
+ storedExportNames: Array.isArray(currentState.exportNames) ? currentState.exportNames.filter((name) => typeof name === "string") : void 0
4620
+ });
4621
+ };
4629
4622
  let outputChanges = [];
4630
4623
  if (!resolved.resolutionFailed) outputChanges = diffOutputsAgainst(resolved.outputs, resolved.exportNames);
4631
4624
  else {
@@ -4676,6 +4669,7 @@ async function computeStackDiff(currentState, template, region, stackName, state
4676
4669
  printingSecrets,
4677
4670
  resolvedParameters: mergedParameters,
4678
4671
  conditions,
4672
+ knownConditions: conditions === void 0 ? void 0 : Object.fromEntries(Object.entries(conditions).filter(([name]) => !stillUnknown.includes(name))),
4679
4673
  trust: {
4680
4674
  parameters: trustedParameters,
4681
4675
  conditions: trustedConditions,
@@ -4832,6 +4826,20 @@ function rowValueTrusted(value, parentState, parentConditions, trust) {
4832
4826
  plainObjects: false
4833
4827
  })(value);
4834
4828
  }
4829
+ function noEchoFedChildParameters(parentStackRow, parentNoEchoParameters, parentConditions, parentResources) {
4830
+ const fed = /* @__PURE__ */ new Set();
4831
+ const rawParams = parentStackRow.Properties?.["Parameters"];
4832
+ if (rawParams === null || typeof rawParams !== "object") return fed;
4833
+ for (const [name, value] of Object.entries(rawParams)) if (readsNoEchoSource(value, {
4834
+ parameters: parentNoEchoParameters,
4835
+ attributeIsNoEcho: (logicalId, attribute) => {
4836
+ const names = (Object.hasOwn(parentResources, logicalId) ? parentResources[logicalId] : void 0)?.noEchoAttributeNames;
4837
+ return Array.isArray(names) && names.includes(attribute);
4838
+ },
4839
+ ...parentConditions !== void 0 && { conditions: parentConditions }
4840
+ })) fed.add(name);
4841
+ return fed;
4842
+ }
4835
4843
  async function resolveChildStackParameters(parentStackRow, parentTemplate, parentState, region, parentStackName, stateBackend, parentParameters, parentConditions, cfnFallback, printingSecrets, attributeHealer, unresolvedKeys, trust) {
4836
4844
  const rawParams = parentStackRow.Properties?.["Parameters"];
4837
4845
  if (!rawParams || typeof rawParams !== "object" || Array.isArray(rawParams)) return {};
@@ -4871,7 +4879,7 @@ function recordedTemplateResources(template, state) {
4871
4879
  return recorded;
4872
4880
  }
4873
4881
  async function buildDiffTree(args) {
4874
- const { stackName, displayName, region, template, nestedTemplates, recursive, stateBackend, diffCalculator, parentHasSecretReference, parameters, parentUnresolvedParameters, canonicalizeProperties, assetRedirect, cfnFallback, previewOrphanAdoption, attributeHealerFor, ancestorTemplatePaths, isNestedChild, inheritedSecrets, refusalRecovery } = args;
4882
+ const { stackName, displayName, region, template, nestedTemplates, recursive, stateBackend, diffCalculator, parentHasSecretReference, parameters, parentUnresolvedParameters, canonicalizeProperties, assetRedirect, cfnFallback, previewOrphanAdoption, attributeHealerFor, ancestorTemplatePaths, isNestedChild, inheritedSecrets, inheritedNoEchoParameters, refusalRecovery } = args;
4875
4883
  const attributeHealer = attributeHealerFor?.(stackName, region);
4876
4884
  const { state, unreadable, unreadableContainers, deployRefusals } = await loadStateOrEmpty(stackName, region, stateBackend, refusalRecovery);
4877
4885
  const createOnlyPrefetch = prefetchCreateOnlyPropertyPaths(templateResourceTypes(recordedTemplateResources(template, state)));
@@ -4885,6 +4893,7 @@ async function buildDiffTree(args) {
4885
4893
  ...cfnFallback !== void 0 && { cfnFallback },
4886
4894
  ...previewOrphanAdoption && { previewOrphanAdoption },
4887
4895
  ...inheritedSecrets && { inheritedSecrets },
4896
+ ...inheritedNoEchoParameters && { inheritedNoEchoParameters },
4888
4897
  ...attributeHealer && { attributeHealer },
4889
4898
  ...refusalRecovery && { refusalRecovery },
4890
4899
  inheritSecretBearingTemplate: false,
@@ -4894,7 +4903,7 @@ async function buildDiffTree(args) {
4894
4903
  } finally {
4895
4904
  createOnlyPrefetch.cancel();
4896
4905
  }
4897
- const { changes, outputChanges, adoptedOrphans, adoptedRecords, blocking, unreadableOrphans, deployRefusals: adoptedDeployRefusals, effectiveTemplate, printingSecrets, resolvedParameters, conditions, trust } = stackDiff;
4906
+ const { changes, outputChanges, adoptedOrphans, adoptedRecords, blocking, unreadableOrphans, deployRefusals: adoptedDeployRefusals, effectiveTemplate, printingSecrets, resolvedParameters, conditions, knownConditions, trust } = stackDiff;
4898
4907
  const stateAfterAdoption = Object.keys(adoptedRecords).length > 0 ? {
4899
4908
  ...state,
4900
4909
  resources: {
@@ -4937,6 +4946,7 @@ async function buildDiffTree(args) {
4937
4946
  const grandchildTemplates = indexNestedChildTemplates(childTemplate, childTemplatePath);
4938
4947
  if (assetRedirect) rewriteTemplateAssetReferences(childTemplate, assetRedirect);
4939
4948
  const childUnresolvedParameters = /* @__PURE__ */ new Set();
4949
+ const childNoEchoParameters = noEchoFedChildParameters(resource, /* @__PURE__ */ new Set([...noEchoParameterNamesOf(effectiveTemplate), ...inheritedNoEchoParameters ?? []]), knownConditions, stateAfterAdoption.resources);
4940
4950
  const childParameters = await resolveChildStackParameters(resource, effectiveTemplate, stateAfterAdoption, region, stackName, stateBackend, resolvedParameters, conditions, cfnFallback, printingSecrets, attributeHealer, childUnresolvedParameters, trust);
4941
4951
  node.children.push(await buildDiffTree({
4942
4952
  stackName: childStackName,
@@ -4958,6 +4968,7 @@ async function buildDiffTree(args) {
4958
4968
  isNestedChild: true,
4959
4969
  parentHasSecretReference: secretBearingAbove,
4960
4970
  inheritedSecrets: printingSecrets,
4971
+ ...childNoEchoParameters.size > 0 && { inheritedNoEchoParameters: childNoEchoParameters },
4961
4972
  ...refusalRecovery && { refusalRecovery }
4962
4973
  }));
4963
4974
  }
@@ -7921,6 +7932,33 @@ function equalModuloMask(state, aws, mask) {
7921
7932
  if (aKeys.length !== Object.keys(bObj).length) return false;
7922
7933
  return aKeys.every((key) => Object.prototype.hasOwnProperty.call(bObj, key) && equalModuloMask(aObj[key], bObj[key], mask));
7923
7934
  }
7935
+ function equalModuloMarkedMask(state, aws, mask, coordinate, isMarked) {
7936
+ const a = jsonForm(state);
7937
+ const b = jsonForm(aws);
7938
+ if (isMarked(coordinate) && isWhollyMask(a, mask)) return b !== void 0 && b !== null;
7939
+ if (a === mask && typeof b === "string") return true;
7940
+ if (a === b) return true;
7941
+ if (a === null || b === null || a === void 0 || b === void 0) return a === b;
7942
+ if (typeof a !== typeof b || typeof a !== "object") return false;
7943
+ if (Array.isArray(a) || Array.isArray(b)) {
7944
+ if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;
7945
+ return a.every((v, i) => equalModuloMarkedMask(v, b[i], mask, [...coordinate, i], isMarked));
7946
+ }
7947
+ const aObj = a;
7948
+ const bObj = b;
7949
+ const aKeys = Object.keys(aObj);
7950
+ if (aKeys.length !== Object.keys(bObj).length) return false;
7951
+ return aKeys.every((key) => Object.prototype.hasOwnProperty.call(bObj, key) && equalModuloMarkedMask(aObj[key], bObj[key], mask, [...coordinate, key], isMarked));
7952
+ }
7953
+ function isWhollyMask(value, mask) {
7954
+ if (value === mask) return true;
7955
+ if (Array.isArray(value)) return value.length > 0 && value.every((v) => isWhollyMask(v, mask));
7956
+ if (isPlainObject(value)) {
7957
+ const values = Object.values(value);
7958
+ return values.length > 0 && values.every((v) => isWhollyMask(v, mask));
7959
+ }
7960
+ return false;
7961
+ }
7924
7962
  function isPlainObject(value) {
7925
7963
  return typeof value === "object" && value !== null;
7926
7964
  }
@@ -8214,7 +8252,7 @@ function notComparedOutcomes(report) {
8214
8252
  function outcomeExitSignal(outcome) {
8215
8253
  return matchOutcome(outcome, {
8216
8254
  drifted: () => "drifted",
8217
- notCompared: (n) => n.notComparedCause === "unresolvedToken" ? "none" : "incomplete",
8255
+ notCompared: (n) => n.notComparedCause === "unresolvedToken" || n.notComparedCause === "noEchoParameter" ? "none" : "incomplete",
8218
8256
  clean: () => "none",
8219
8257
  unsupported: () => "none",
8220
8258
  skipped: () => "none",
@@ -8254,6 +8292,10 @@ const UNCOMPARED_REASONS = {
8254
8292
  kind: "unknown",
8255
8293
  phrase: "only PARTIALLY compared: their state records a `{{resolve:...}}` spelling cdkd resolves for nobody, which no re-run can clear"
8256
8294
  },
8295
+ noEchoParameter: {
8296
+ kind: "unknown",
8297
+ phrase: "only PARTIALLY compared: their state holds a NoEcho parameter value only as the redaction mask, which no re-run can clear"
8298
+ },
8257
8299
  unsupported: {
8258
8300
  kind: "byDesign",
8259
8301
  phrase: "not compared AT ALL: their provider does not support drift detection yet"
@@ -8267,6 +8309,7 @@ const ANY_OF_IT_COMPARED = {
8267
8309
  refused: true,
8268
8310
  unresolvedToken: true,
8269
8311
  uncertifiedBaseline: true,
8312
+ noEchoParameter: true,
8270
8313
  readFailed: false,
8271
8314
  readAborted: false,
8272
8315
  baselineRefused: false,
@@ -8658,6 +8701,7 @@ function notComparedReason(cause, record) {
8658
8701
  unreadableRecord: "its state record is not readable as a resource — not an object, carrying no resource type, or holding a 'properties' map that is not an object — so there was nothing to compare (repair or re-import the record)",
8659
8702
  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)",
8660
8703
  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}`),
8704
+ 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)`,
8661
8705
  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)"
8662
8706
  }[cause];
8663
8707
  }
@@ -8790,6 +8834,51 @@ async function resolveStateSecretExpressions(props, resolvers, secrets, options)
8790
8834
  };
8791
8835
  return await walk(props, "");
8792
8836
  }
8837
+ function noEchoPathsClause(record) {
8838
+ const marked = record === void 0 ? void 0 : noEchoLeavesOf(record);
8839
+ if (marked === void 0 || marked.length === 0) return "";
8840
+ return ` at ${marked.map((coordinate) => coordinate.map((segment, i) => typeof segment === "number" ? `[${segment}]` : i === 0 ? segment : `.${segment}`).join("")).map((path) => displaySafe(path)).join(", ")}`;
8841
+ }
8842
+ function revertPathSegments(path) {
8843
+ const segments = [];
8844
+ for (const part of path.split(".")) {
8845
+ const match = /^([^[]*)((?:\[\d+\])*)$/.exec(part);
8846
+ if (match === null) {
8847
+ segments.push(part);
8848
+ continue;
8849
+ }
8850
+ if (match[1] !== "") segments.push(match[1]);
8851
+ for (const index of match[2].matchAll(/\[(\d+)\]/g)) segments.push(Number(index[1]));
8852
+ }
8853
+ return segments;
8854
+ }
8855
+ function partitionNoEchoParameterChanges(changes, record, baseline) {
8856
+ const marked = noEchoLeavesOf(record);
8857
+ if (marked === void 0 || marked.length === 0) return {
8858
+ kept: changes,
8859
+ noEchoParameterPaths: []
8860
+ };
8861
+ const properties = record.properties ?? {};
8862
+ const isMarked = (coordinate) => isMarkedCoordinate(coordinate, marked) || marked.some((leaf) => leaf.length > coordinate.length && coordinate.every((segment, i) => String(segment) === String(leaf[i])));
8863
+ const kept = [];
8864
+ const noEchoParameterPaths = [];
8865
+ for (const change of changes) {
8866
+ const coordinate = change.path.split(".");
8867
+ if (marked.some((leaf) => {
8868
+ const n = Math.min(leaf.length, coordinate.length);
8869
+ for (let i = 0; i < n; i++) if (leaf[i] !== coordinate[i]) return false;
8870
+ return true;
8871
+ }) && carriesSecretMask(change.stateValue) && !pathCrossesDottedKey(properties, change.path) && !pathCrossesDottedKey(baseline, change.path) && equalModuloMarkedMask(change.stateValue, change.awsValue, "***", coordinate, isMarked)) {
8872
+ noEchoParameterPaths.push(change.path);
8873
+ continue;
8874
+ }
8875
+ kept.push(change);
8876
+ }
8877
+ return {
8878
+ kept,
8879
+ noEchoParameterPaths
8880
+ };
8881
+ }
8793
8882
  function partitionUncertifiedBaselineChanges(changes, properties, baseline) {
8794
8883
  const kept = [];
8795
8884
  const uncertifiedPaths = [];
@@ -9073,13 +9162,14 @@ async function runDriftForStack(stackName, region, stateBackend, providerRegistr
9073
9162
  } : protocolNormalized;
9074
9163
  const paired = provider.canonicalizeDriftPair ? await provider.canonicalizeDriftPair(resource.resourceType, canonicalized.baseline, canonicalized.aws, resource.properties ?? {}) : canonicalized;
9075
9164
  const nameBaseline = canonicalizeDerivedPatternBName(resource.resourceType, paired.baseline, paired.aws);
9076
- const partitioned = partitionUncertifiedBaselineChanges(calculateResourceDrift(nameBaseline, paired.aws, {
9165
+ const noEchoPartitioned = partitionNoEchoParameterChanges(calculateResourceDrift(nameBaseline, paired.aws, {
9077
9166
  ignorePaths: observedIgnorePaths.length ? [...ignorePaths, ...observedIgnorePaths] : ignorePaths,
9078
9167
  unionWalkObjects: useObserved,
9079
9168
  unorderedPaths
9080
- }), resource.properties ?? {}, baseline);
9169
+ }), resource, baseline);
9170
+ const partitioned = partitionUncertifiedBaselineChanges(noEchoPartitioned.kept, resource.properties ?? {}, baseline);
9081
9171
  const reported = redactDriftChanges(partitioned.kept, secrets, secretResolutionFailed ? seededSecretPaths : secretPaths, maskSecretPaths);
9082
- const notComparedCause = secretResolutionFailed ? "refused" : partitioned.uncertifiedPaths.length > 0 ? "uncertifiedBaseline" : unresolvedTokens.size > 0 ? "unresolvedToken" : void 0;
9172
+ const notComparedCause = secretResolutionFailed ? "refused" : partitioned.uncertifiedPaths.length > 0 ? "uncertifiedBaseline" : unresolvedTokens.size > 0 ? "unresolvedToken" : noEchoPartitioned.noEchoParameterPaths.length > 0 ? "noEchoParameter" : void 0;
9083
9173
  if (reported.changes.length === 0) {
9084
9174
  if (notComparedCause !== void 0) outcomes.push({
9085
9175
  kind: "notCompared",
@@ -9100,6 +9190,7 @@ async function runDriftForStack(stackName, region, stateBackend, providerRegistr
9100
9190
  awsProperties: aws,
9101
9191
  secrets,
9102
9192
  uncertifiedPaths: partitioned.uncertifiedPaths,
9193
+ noEchoParameterPaths: noEchoPartitioned.noEchoParameterPaths,
9103
9194
  secretsIncomplete: secretResolutionFailed || unresolvedTokens.size > 0,
9104
9195
  notComparedCause
9105
9196
  });
@@ -9818,11 +9909,20 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
9818
9909
  let newProperties;
9819
9910
  try {
9820
9911
  if (provider.canonicalizeDriftPair) desiredProperties = (await provider.canonicalizeDriftPair(outcome.resourceType, desiredProperties, outcome.awsProperties, stateResource.properties ?? {})).baseline;
9821
- const certifiedOverlay = overlayLiveAtUncertifiedPaths(buildRevertNewProperties(outcome.changes, desiredProperties, outcome.awsProperties, { preserveUntemplated: stateResource.observedProperties === void 0 }), outcome.uncertifiedPaths, outcome.awsProperties, desiredProperties, secrets, new Set(outcome.changes.map((change) => change.path.split(".", 1)[0] ?? "")));
9912
+ const certifiedOverlay = overlayLiveAtUncertifiedPaths(buildRevertNewProperties(outcome.changes, desiredProperties, outcome.awsProperties, { preserveUntemplated: stateResource.observedProperties === void 0 }), [...outcome.uncertifiedPaths, ...outcome.noEchoParameterPaths ?? []], outcome.awsProperties, desiredProperties, secrets, new Set(outcome.changes.map((change) => change.path.split(".", 1)[0] ?? "")));
9822
9913
  const maskPreserved = preserveLiveValuesAtMaskedLeaves(unresolvedTokens.size > 0 ? preserveLiveValuesAtUnresolvedTokens(certifiedOverlay, outcome.awsProperties, unresolvedTokens, secrets) : certifiedOverlay, outcome.awsProperties, secrets, certifiedOverlay);
9823
9914
  if (maskPreserved.unpreservablePaths.length > 0) {
9824
9915
  totalUnresolvable++;
9825
- logger.error(` ✗ ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): refused to revert ${maskSecretsInText(maskPreserved.unpreservablePaths.join(", "), secrets)} — the recorded baseline holds only the redaction mask there, and AWS reports nothing to preserve, so cdkd has no value it may write. Three causes leave such a mask, and the record does not say which: a NoEcho custom-resource value (force that custom resource to update — change one of its properties, e.g. a nonce — and re-deploy, so its handler runs again and supplies the value); the Fn::Base64 encoding of a secret value, which cdkd never records (deploy a change to this resource, which sends it the encoded value again); or a readback position cdkd could not certify when the baseline was captured (deploy a change to this resource, so its baseline is re-captured). A re-deploy that leaves this resource unchanged sends it nothing, so it resolves this refusal for none of them.`);
9916
+ const marked = noEchoLeavesOf(stateResource);
9917
+ if (marked !== void 0 && maskPreserved.unpreservablePaths.every((path) => isMarkedCoordinate(revertPathSegments(path), marked))) {
9918
+ const refusedPaths = maskSecretsInText(maskPreserved.unpreservablePaths.join(", "), secrets);
9919
+ logger.error(safeMsg` ✗ ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): refused to revert ${refusedPaths} — a NoEcho template parameter feeds it, the recorded baseline holds only the redaction mask there, and AWS reports nothing to preserve, so cdkd has no value it may write. Deploy the stack with the parameter's value to set it.`);
9920
+ return;
9921
+ }
9922
+ const markedRefused = marked === void 0 ? [] : maskPreserved.unpreservablePaths.filter((path) => isMarkedCoordinate(revertPathSegments(path), marked));
9923
+ const markedAmong = markedRefused.length > 0;
9924
+ const markedPaths = maskSecretsInText(markedRefused.join(", "), secrets);
9925
+ logger.error(` ✗ ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): refused to revert ${maskSecretsInText(maskPreserved.unpreservablePaths.join(", "), secrets)} — the recorded baseline holds only the redaction mask there, and AWS reports nothing to preserve, so cdkd has no value it may write. ${markedAmong ? `Where a NoEcho template parameter feeds a path (${markedPaths}), deploy the stack with the parameter's value to set it. For the other paths, three` : "Three"} causes leave such a mask, and the record does not say which: a NoEcho custom-resource value (force that custom resource to update — change one of its properties, e.g. a nonce — and re-deploy, so its handler runs again and supplies the value); the Fn::Base64 encoding of a secret value, which cdkd never records (deploy a change to this resource, which sends it the encoded value again); or a readback position cdkd could not certify when the baseline was captured (deploy a change to this resource, so its baseline is re-captured). A re-deploy that leaves this resource unchanged sends it nothing, so it resolves this refusal for none of them.`);
9826
9926
  return;
9827
9927
  }
9828
9928
  newProperties = maskPreserved.properties;
@@ -9846,7 +9946,7 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
9846
9946
  try {
9847
9947
  if (updateResult?.effectiveProperties) {
9848
9948
  const delta = collectNarrowedTopLevelKeys(newProperties, updateResult.effectiveProperties);
9849
- if (Object.keys(delta).length > 0) narrowedByLogicalId.set(outcome.logicalId, keepBaselineAtUncertifiedPaths(redactSecretsForState(delta, secrets, revertBaseline, stateResource.observedProperties !== void 0 ? STATE_SOURCED_BASELINE_RULES : STATE_SOURCED_READBACK_RULES), outcome.uncertifiedPaths, revertBaseline));
9949
+ if (Object.keys(delta).length > 0) narrowedByLogicalId.set(outcome.logicalId, keepBaselineAtUncertifiedPaths(redactSecretsForState(delta, secrets, revertBaseline, stateResource.observedProperties !== void 0 ? STATE_SOURCED_BASELINE_RULES : STATE_SOURCED_READBACK_RULES), [...outcome.uncertifiedPaths, ...outcome.noEchoParameterPaths ?? []], revertBaseline));
9850
9950
  }
9851
9951
  } catch (captureErr) {
9852
9952
  logger.warn(` ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): reverted, but the provider's reported effective properties could not be read — ${maskSecretsInText(captureErr instanceof Error ? captureErr.message : String(captureErr), secrets)}`);
@@ -9855,7 +9955,9 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
9855
9955
  if (updateResult !== void 0) {
9856
9956
  const noEchoDeclared = recordNoEchoAttributeValues(updateResult, secrets, newProperties);
9857
9957
  const next = recordAfterRollbackUpdate(stateResource, updateResult);
9858
- const attributes = next.attributes === void 0 ? void 0 : keepRecordedAttributesOverMask(redactSecretsForState(next.attributes, secrets), next.attributes, stateResource.attributes, noEchoDeclared);
9958
+ const keptAttributes = next.attributes === void 0 ? void 0 : keepRecordedAttributesOverMask(redactSecretsForState(next.attributes, secrets), next.attributes, stateResource.attributes, noEchoDeclared);
9959
+ const declaredNames = noEchoAttributeNamesOf(stateResource) ?? [];
9960
+ const attributes = keptAttributes === void 0 || declaredNames.length === 0 ? keptAttributes : Object.fromEntries(Object.entries(keptAttributes).map(([name, value]) => [name, declaredNames.includes(name) ? maskWholeValue(value) : value]));
9859
9961
  if (next.physicalId !== stateResource.physicalId || !sameRecordedJson(attributes, stateResource.attributes)) reRecordedByLogicalId.set(outcome.logicalId, {
9860
9962
  physicalId: next.physicalId,
9861
9963
  attributes
@@ -10429,6 +10531,16 @@ function countProtectedResources(state) {
10429
10531
  }
10430
10532
  return count;
10431
10533
  }
10534
+ function countProtectedJournaledOrphans(orphans, region) {
10535
+ let count = 0;
10536
+ for (const { ops } of orphans.segments) for (const op of ops) {
10537
+ if (op.physicalIdRecoveredFromError !== true || op.deletionPolicy === "Retain") continue;
10538
+ if (orphanDeleteNeedsIdentity(op.resourceType) && !op.createdResourceIdentity) continue;
10539
+ const locator = perType(PROTECTION_PROPERTY_BY_TYPE, op.resourceType);
10540
+ if (locator && isProtectionValueActive(op.resourceType, readProtection(op.attemptedProperties, locator, region))) count++;
10541
+ }
10542
+ return count;
10543
+ }
10432
10544
  async function runDestroyForStack(stackName, state, ctx) {
10433
10545
  const providerClasses = await loadProviderClasses();
10434
10546
  const logger = getLogger();
@@ -10503,7 +10615,7 @@ async function runDestroyForStack(stackName, state, ctx) {
10503
10615
  }
10504
10616
  logger.info(`\nResources to be deleted (${resourceCount}):`);
10505
10617
  for (const [logicalId, resource] of Object.entries(state.resources)) logger.info(` - ${displaySafe(logicalId)} (${displaySafe(resource.resourceType)})`);
10506
- const protectedCount = ctx.removeProtection ? countProtectedResources(state) : 0;
10618
+ const protectedCount = ctx.removeProtection ? countProtectedResources(state) + countProtectedJournaledOrphans(journaledOrphans, state.region) : 0;
10507
10619
  const orphansAtDestroy = state.orphans ?? [];
10508
10620
  if (orphansAtDestroy.length > 0) {
10509
10621
  logger.info(`\n${orphansAtDestroy.length} resource(s) are still in AWS from an earlier failed deploy. cdkd left them there because their DeletionPolicy is Retain (CDK's RemovalPolicy.RETAIN), and has been tracking them so a later deploy of this stack could adopt them back instead of colliding with their names.`);
@@ -10667,6 +10779,13 @@ async function runDestroyForStack(stackName, state, ctx) {
10667
10779
  ...ctx.eventRecorder !== void 0 && { recordEvent: (event) => ctx.eventRecorder.record(event) },
10668
10780
  finalSnapshotClients: destroyAwsClients ?? ctx.baseAwsClients,
10669
10781
  skipFinalSnapshot: ctx.skipFinalSnapshot === true,
10782
+ ...ctx.removeProtection === true && {
10783
+ removeProtection: true,
10784
+ foreignHolder: makeForeignHolderScan(ctx.stateBackend)({
10785
+ stackName,
10786
+ region: regionForState
10787
+ })
10788
+ },
10670
10789
  importedProducerRegions: producerRegionsFromState(state),
10671
10790
  ...state.parentStack !== void 0 && { producerRegionsIncomplete: true }
10672
10791
  }, { isInterrupted: () => lock.interrupted });
@@ -10820,6 +10939,7 @@ async function runDestroyForStack(stackName, state, ctx) {
10820
10939
  ...ctx.skipFinalSnapshot === true && { skipFinalSnapshot: true },
10821
10940
  ...secretPrincipalOptIn !== void 0 && { resolveSecretDerivedPrincipals: secretPrincipalOptIn },
10822
10941
  recordedAttributes: resource.attributes,
10942
+ recordedNoEchoLeaves: resource.noEchoLeaves,
10823
10943
  ...ctx.stackDestroy === true && { stackDestroy: true }
10824
10944
  }))) ?? void 0;
10825
10945
  lastDeleteError = null;
@@ -11435,6 +11555,141 @@ function createDestroyCommand() {
11435
11555
  return cmd;
11436
11556
  }
11437
11557
 
11558
+ //#endregion
11559
+ //#region src/cli/commands/rollback-drop-failed.ts
11560
+ function refuseDropFailedConflicts(options) {
11561
+ const conflicting = [
11562
+ ...(options.orphan ?? []).length > 0 ? ["--orphan"] : [],
11563
+ ...options.revertFailed === true ? ["--revert-failed"] : [],
11564
+ ...options.skipFinalSnapshot === true ? ["--skip-final-snapshot"] : []
11565
+ ];
11566
+ if (conflicting.length === 0) return;
11567
+ throw new CdkdError(`--drop-failed cannot be combined with ${conflicting.join(", ")}: it replays nothing, it only removes one entry from the rollback journal. Run the rollback and the drop as separate commands.`, "ROLLBACK_DROP_FAILED_CONFLICT");
11568
+ }
11569
+ function selectDropTarget(segments, logicalId, stackShown) {
11570
+ const named = logicalIdShown(logicalId);
11571
+ const droppable = [];
11572
+ let otherFailed = 0;
11573
+ let completed = 0;
11574
+ const droppableIds = /* @__PURE__ */ new Set();
11575
+ segments.forEach((segment, index) => {
11576
+ const failed = segment.failedOperations ?? [];
11577
+ const replay = segment.reason === "nested-pending-parent" ? [] : splitImportedOps(failed, segment).replay;
11578
+ for (const op of replay) if (isDroppable(op)) droppableIds.add(op.logicalId);
11579
+ for (const op of failed) {
11580
+ if (op.logicalId !== logicalId) continue;
11581
+ if (replay.includes(op) && isDroppable(op)) droppable.push({
11582
+ segment,
11583
+ segmentNumber: index + 1,
11584
+ op,
11585
+ companions: replay.filter((c) => c.changeType === "UPDATE" && replacementNeverSwapped(c, [op]))
11586
+ });
11587
+ else otherFailed++;
11588
+ }
11589
+ completed += segment.operations.filter((op) => op.logicalId === logicalId).length;
11590
+ });
11591
+ if (droppable.length === 1) return droppable[0];
11592
+ if (droppable.length > 1) throw new CdkdError(`The rollback journal of ${stackShown} holds ${droppable.length} entries for ${named} that --drop-failed could drop (segments ${droppable.map((d) => d.segmentNumber).join(", ")}), and it drops exactly one, so it does not choose. Nothing was changed. Remove the entry you mean from the stack's rollback-journal.json (next to its state.json) by hand.`, "ROLLBACK_DROP_FAILED_AMBIGUOUS");
11593
+ if (otherFailed > 0) throw new CdkdError(`The rollback journal of ${stackShown} holds no entry for ${named} that --drop-failed can drop: it drops only a failed CREATE whose resource cdkd proved it made, journaled as its only record, the entry cdkd destroy and cdkd deploy keep retrying. ${named}'s failed operation(s) are of another kind, or one a newer journal entry may own; neither blocks either command. Nothing was changed.`, "ROLLBACK_DROP_FAILED_NOT_ORPHAN");
11594
+ if (completed > 0) throw new CdkdError(`${named} is a completed operation in the rollback journal of ${stackShown}, not a failed one; --drop-failed drops failed operations only. Nothing was changed. To leave a completed operation out of a rollback, pass --orphan with its logical id.`, "ROLLBACK_DROP_FAILED_COMPLETED");
11595
+ const ids = [...droppableIds].map(logicalIdShown);
11596
+ throw new CdkdError(`The rollback journal of ${stackShown} has no entry for ${named}. Nothing was changed. ` + (ids.length === 0 ? "It holds no entry --drop-failed can drop." : `Entries --drop-failed can drop: ${ids.join(", ")}.`), "ROLLBACK_DROP_FAILED_UNKNOWN");
11597
+ }
11598
+ function isDroppable(op) {
11599
+ return isJournaledOrphan(op) && op.physicalIdRecoveredFromError === true;
11600
+ }
11601
+ const POLICY_TARGETS = {
11602
+ "AWS::SQS::QueuePolicy": "Queues",
11603
+ "AWS::SNS::TopicPolicy": "Topics"
11604
+ };
11605
+ function dropTargetLines(target, segmentCount, logger) {
11606
+ const { op } = target;
11607
+ const lines = [` - ${logicalIdShown(op.logicalId)} (${resourceTypeShown(op.resourceType)}) ${displacedPhysicalIdShown(op, logger) ?? "a physical id"} [failed CREATE, segment ${target.segmentNumber}/${segmentCount}]`];
11608
+ const targetsKey = Object.hasOwn(POLICY_TARGETS, op.resourceType) ? POLICY_TARGETS[op.resourceType] : void 0;
11609
+ const targets = targetsKey === void 0 ? void 0 : op.attemptedProperties?.[targetsKey];
11610
+ if (Array.isArray(targets) && targets.length > 0) {
11611
+ lines.push(` ${targetsKey} it was attached to:`);
11612
+ for (const t of targets) lines.push(` - ${typeof t === "string" && t !== "" ? displacedPhysicalIdShown(op, logger, t) ?? "a value" : "a value that is not a string"}`);
11613
+ }
11614
+ if (target.companions.length > 0) lines.push(` (with the failed replacement UPDATE recorded beside it, which names no resource of its own)`);
11615
+ return lines;
11616
+ }
11617
+ async function confirmDrop(question) {
11618
+ return confirmOrRefuse(question, {
11619
+ suffix: " (y/N): ",
11620
+ refusal: "The cdkd rollback --drop-failed confirmation prompt cannot run in a non-interactive environment. Pass --force (or -y / --yes) to confirm the drop, or run the command from a real terminal."
11621
+ });
11622
+ }
11623
+ async function dropFailedJournalEntry(args) {
11624
+ const { stateBackend, lockManager, stackName, region, logicalId, logger } = args;
11625
+ const stackShown = `stack ${plainOrDescribed(stackName, "stack name")} (${plainOrDescribed(region, "region")})`;
11626
+ let interrupted = false;
11627
+ const sigintHandler = () => {
11628
+ process.stderr.write("\nInterrupted — the rollback journal is not changed.\n");
11629
+ interrupted = true;
11630
+ };
11631
+ process.on("SIGINT", sigintHandler);
11632
+ const unforwardSigterm = forwardSigtermToSigint();
11633
+ try {
11634
+ await lockManager.acquireLockWithRetry(stackName, region, void 0, "rollback");
11635
+ } catch (error) {
11636
+ process.removeListener("SIGINT", sigintHandler);
11637
+ unforwardSigterm();
11638
+ throw error;
11639
+ }
11640
+ try {
11641
+ const journal = await stateBackend.loadRollbackJournal(stackName, region);
11642
+ if (!journal || journal.segments.length === 0) throw new CdkdError(`${stackShown.charAt(0).toUpperCase()}${stackShown.slice(1)} has no rollback journal; nothing to drop.`, "ROLLBACK_DROP_FAILED_NO_JOURNAL");
11643
+ let stateData;
11644
+ try {
11645
+ stateData = await stateBackend.getState(stackName, region);
11646
+ } catch (err) {
11647
+ throw new CdkdError(`Could not read the state record of ${stackShown} (${err instanceof Error ? err.name : "an error"}), which the drop needs to mask the entry. Nothing was changed; re-run once it can be read.`, "ROLLBACK_DROP_FAILED_STATE_UNREADABLE");
11648
+ }
11649
+ const resources = stateData ? stateData.state.resources : {};
11650
+ if (!isReadableBag(resources)) throw new CdkdError(`The state record of ${stackShown} holds resources that cannot be read, which the drop needs to mask the entry. Nothing was changed.`, "ROLLBACK_DROP_FAILED_STATE_UNREADABLE");
11651
+ const stateResources = resources;
11652
+ const judged = structuredClone(journal.segments);
11653
+ demoteSupersededOrphans(judged);
11654
+ const target = selectDropTarget(judged, logicalId, stackShown);
11655
+ const drop = [target.op, ...target.companions].map((op) => ({
11656
+ segment: target.segment,
11657
+ op
11658
+ }));
11659
+ if (journal.segments.reduce((n, segment) => n + (segment.failedOperations ?? []).filter((op) => isHandledOrphan(drop, segment, op)).length, 0) !== drop.length) throw new CdkdError(`The rollback journal of ${stackShown} holds another entry identical to ${logicalIdShown(logicalId)}'s, so dropping it by its identity would drop more than one. Nothing was changed. Remove the entry you mean from the stack's rollback-journal.json (next to its state.json) by hand.`, "ROLLBACK_DROP_FAILED_AMBIGUOUS");
11660
+ const printing = journaledOrphanPrintingBag(judged.flatMap((segment) => segment.failedOperations ?? []), stateResources);
11661
+ withPrintingSecrets(printing, () => {
11662
+ logger.info(safeMsg`\nDrop one entry from the rollback journal of ${stackShown}:`);
11663
+ for (const line of dropTargetLines(target, journal.segments.length, logger)) logger.info(line);
11664
+ logger.info("\nThis removes only the journal entry, which is cdkd's last record of that resource. Nothing is deleted in AWS: check the resource above by hand, and delete it yourself if it should not stay. cdkd destroy and cdkd deploy then no longer act on it.\n");
11665
+ });
11666
+ const stopIfInterrupted = () => {
11667
+ if (!interrupted) return;
11668
+ throw new CdkdError("Interrupted before the rollback journal was changed; nothing was dropped.", "ROLLBACK_DROP_FAILED_INTERRUPTED");
11669
+ };
11670
+ stopIfInterrupted();
11671
+ if (!args.skipConfirmation) {
11672
+ if (!await (args.confirm ?? confirmDrop)("Drop this entry from the rollback journal?")) {
11673
+ logger.info("Drop cancelled; the rollback journal is not changed.");
11674
+ return;
11675
+ }
11676
+ }
11677
+ stopIfInterrupted();
11678
+ const removed = await stateBackend.dropRollbackJournalFailedOperations(stackName, region, (op, segment) => isHandledOrphan(drop, segment, op));
11679
+ if (removed !== drop.length) throw new CdkdError(`The rollback journal of ${stackShown} was rewritten with ${removed} entr${removed === 1 ? "y" : "ies"} removed where ${drop.length} ${drop.length === 1 ? "was" : "were"} expected: it changed under the stack lock. Inspect the stack's rollback-journal.json (next to its state.json).`, "ROLLBACK_DROP_FAILED_CHANGED");
11680
+ logger.info(safeMsg`Dropped ${logicalIdShown(logicalId)}'s entry from the rollback journal of ${stackShown}. ` + "Nothing was deleted in AWS; every other entry is kept.");
11681
+ } finally {
11682
+ try {
11683
+ await lockManager.releaseLock(stackName, region).catch((err) => {
11684
+ logger.warn(safeMsg`Failed to release the lock of ${stackShown}: ${err instanceof Error ? err.name : "an error"}`);
11685
+ });
11686
+ } finally {
11687
+ process.removeListener("SIGINT", sigintHandler);
11688
+ unforwardSigterm();
11689
+ }
11690
+ }
11691
+ }
11692
+
11438
11693
  //#endregion
11439
11694
  //#region src/deployment/public-ssm-proof.ts
11440
11695
  var PublicSsmProver = class {
@@ -13956,6 +14211,15 @@ async function buildImportPlan(state, template, cfnClient, parentStackName, opti
13956
14211
  });
13957
14212
  continue;
13958
14213
  }
14214
+ const noEchoLeaves = noEchoLeavesOf(stateEntry);
14215
+ if (noEchoLeaves !== void 0 && noEchoLeaves.length > 0 && carriesSecretMask(stateEntry.properties) && !carriesSecretMask(withoutCoordinates(stateEntry.properties, noEchoLeaves))) {
14216
+ blocked.push({
14217
+ logicalId,
14218
+ resourceType,
14219
+ 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."
14220
+ });
14221
+ continue;
14222
+ }
13959
14223
  if (carriesSecretMask(stateEntry.properties)) {
13960
14224
  blocked.push({
13961
14225
  logicalId,
@@ -15447,6 +15711,29 @@ function createExportCommand() {
15447
15711
  cmd.addOption(deprecatedRegionOption);
15448
15712
  return cmd;
15449
15713
  }
15714
+ function withoutCoordinates(bag, coordinates) {
15715
+ const placeholder = Symbol("noecho-leaf");
15716
+ const marked = coordinates.reduce((current, coordinate) => replaceAtCoordinate(current, coordinate, placeholder), bag);
15717
+ return JSON.parse(JSON.stringify(marked, (_key, value) => value === placeholder ? null : value));
15718
+ }
15719
+ function replaceAtCoordinate(node, coordinate, replacement) {
15720
+ if (coordinate.length === 0) return replacement;
15721
+ const [head, ...rest] = coordinate;
15722
+ if (Array.isArray(node) && typeof head === "number" && head < node.length) {
15723
+ const copy = [...node];
15724
+ copy[head] = replaceAtCoordinate(node[head], rest, replacement);
15725
+ return copy;
15726
+ }
15727
+ if (node !== null && typeof node === "object" && !Array.isArray(node) && typeof head === "string") {
15728
+ const record = node;
15729
+ if (!Object.hasOwn(record, head)) return node;
15730
+ return {
15731
+ ...record,
15732
+ [head]: replaceAtCoordinate(record[head], rest, replacement)
15733
+ };
15734
+ }
15735
+ return node;
15736
+ }
15450
15737
 
15451
15738
  //#endregion
15452
15739
  //#region src/cli/commands/state.ts
@@ -16778,7 +17065,7 @@ async function refreshObservedForStack(stackName, region, stateBackend, lockMana
16778
17065
  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.`);
16779
17066
  return;
16780
17067
  }
16781
- resource.observedProperties = redactSecretsForState(observed, await publicSsmProver.proofBagFor(resource.properties ?? {}), resource.properties ?? {}, STATE_SOURCED_BASELINE_RULES);
17068
+ resource.observedProperties = redactSecretsForState(maskReadbackAtCoordinates(observed, resource.properties ?? {}, [...maskedLeafCoordinatesOf(resource.properties ?? {}), ...noEchoLeavesOf(resource) ?? []]), await publicSsmProver.proofBagFor(resource.properties ?? {}), resource.properties ?? {}, STATE_SOURCED_BASELINE_RULES);
16782
17069
  refreshed++;
16783
17070
  } catch (err) {
16784
17071
  failed++;
@@ -16969,6 +17256,7 @@ async function rollbackCommand(stackArg, options) {
16969
17256
  process.env["CDKD_NO_LIVE"] = "1";
16970
17257
  }
16971
17258
  warnIfDeprecatedRegion(options);
17259
+ if (options.dropFailed !== void 0) refuseDropFailedConflicts(options);
16972
17260
  const setup = await setupStateBackend(options);
16973
17261
  const skipConfirmation = options.force === true || options.yes === true;
16974
17262
  let stackAwsClients;
@@ -16999,6 +17287,18 @@ async function rollbackCommand(stackArg, options) {
16999
17287
  }
17000
17288
  const stackName = ref.stackName;
17001
17289
  const region = ref.region ?? setup.region;
17290
+ if (options.dropFailed !== void 0) {
17291
+ await dropFailedJournalEntry({
17292
+ stateBackend: setup.stateBackend,
17293
+ lockManager: setup.lockManager,
17294
+ stackName,
17295
+ region,
17296
+ logicalId: options.dropFailed,
17297
+ skipConfirmation,
17298
+ logger
17299
+ });
17300
+ return;
17301
+ }
17002
17302
  stackAwsClients = new AwsClients({
17003
17303
  region,
17004
17304
  ...options.profile && { profile: options.profile }
@@ -17098,7 +17398,7 @@ async function rollbackCommand(stackArg, options) {
17098
17398
  }
17099
17399
  logger.info("");
17100
17400
  if (!skipConfirmation) {
17101
- if (!await confirm(`Roll back ${stackRegionShown(stackName, region)}?`)) {
17401
+ if (!await confirm(`Roll back ${stackRegionShown(stackName, region)}` + (options.removeProtection === true ? ", TURNING DELETION PROTECTION OFF on the resources it deletes from this stack?" : "?"))) {
17102
17402
  logger.info("Rollback cancelled");
17103
17403
  return;
17104
17404
  }
@@ -17120,6 +17420,13 @@ async function rollbackCommand(stackArg, options) {
17120
17420
  recordEvent: (e) => eventRecorder.record(maskEventTextWithBoundBags(e)),
17121
17421
  finalSnapshotClients,
17122
17422
  skipFinalSnapshot: options.skipFinalSnapshot === true,
17423
+ ...options.removeProtection === true && {
17424
+ removeProtection: true,
17425
+ foreignHolder: makeForeignHolderScan(setup.stateBackend)({
17426
+ stackName,
17427
+ region
17428
+ })
17429
+ },
17123
17430
  importedProducerRegions: producerRegionsFromState(baseState),
17124
17431
  ...(stackName.includes("~") || baseState.parentStack !== void 0) && { producerRegionsIncomplete: true }
17125
17432
  };
@@ -17129,7 +17436,7 @@ async function rollbackCommand(stackArg, options) {
17129
17436
  const { skippedOutputs: _droppedByRollback, ...carriedState } = baseState;
17130
17437
  const next = () => ({
17131
17438
  ...carriedState,
17132
- version: 10,
17439
+ version: 11,
17133
17440
  region,
17134
17441
  resources: { ...stateResources },
17135
17442
  ...orphansAfterRollback(baseState, mintedOrphans),
@@ -17158,6 +17465,7 @@ async function rollbackCommand(stackArg, options) {
17158
17465
  const oldestInitialDeploy = journal.segments[0]?.initialDeploy === true;
17159
17466
  let totalFailures = 0;
17160
17467
  let totalWarnings = 0;
17468
+ const failedOrphanIds = [];
17161
17469
  const inlinePolicyWriters = new RollbackInlinePolicyWriters();
17162
17470
  const failedOpsPrinting = journaledOrphanPrintingBag(journal.segments.flatMap((s) => s.failedOperations ?? []), stateResources);
17163
17471
  try {
@@ -17202,6 +17510,7 @@ async function rollbackCommand(stackArg, options) {
17202
17510
  })));
17203
17511
  failedOpFailures = failedResult.failures;
17204
17512
  failedOpWarnings = failedResult.warnings;
17513
+ for (const op of failedResult.remainingFailedOps) if (isJournaledOrphan(op) && op.physicalIdRecoveredFromError === true) failedOrphanIds.push(op.logicalId);
17205
17514
  const remaining = [
17206
17515
  ...failedOps.imported,
17207
17516
  ...failedOps.displaced,
@@ -17265,7 +17574,7 @@ async function rollbackCommand(stackArg, options) {
17265
17574
  }
17266
17575
  if (declinedDivergentRewrite) throw new PartialFailureError(`Rollback stopped: ${declinedDivergentReason}.` + (totalFailures > 0 ? ` ${totalFailures} operation(s) also failed.` : "") + " Journal preserved (this segment, any older ones, and their failed operations) — re-run the rollback once the record's region field matches its key.");
17267
17576
  if (interrupted) throw new PartialFailureError(`Rollback interrupted. Journal preserved — re-run the rollback to finish.` + rerunRollback(stackName));
17268
- if (totalFailures > 0) throw new PartialFailureError(`Rollback completed with ${totalFailures} failed operation(s). Journal preserved — re-run the rollback to retry.` + rerunRollback(stackName));
17577
+ if (totalFailures > 0) throw new PartialFailureError(`Rollback completed with ${totalFailures} failed operation(s). Journal preserved — re-run the rollback to retry.` + dropFailedHint(stackName, region, failedOrphanIds) + rerunRollback(stackName));
17269
17578
  if (totalWarnings > 0) throw new PartialFailureError(`Rollback completed with ${totalWarnings} skipped/unrecoverable operation(s) (see warnings above).`);
17270
17579
  logger.info(`\nRollback of ${stackRegionShown(stackName, region)} complete.`);
17271
17580
  } finally {
@@ -17378,7 +17687,7 @@ function applyFailedPlanToPreview(plan, previewState, skipFinalSnapshot) {
17378
17687
  }
17379
17688
  }
17380
17689
  function createRollbackCommand() {
17381
- const cmd = new Command("rollback").description("Revert a stack to its pre-deploy state after a failed --no-rollback / interrupted deploy or a partially-failed automatic rollback (state-driven, no synth needed).").argument("[stack]", "Stack name to roll back (defaults to the single journaled stack)").addOption(new Option("--force", "Skip the confirmation prompt").default(false)).addOption(new Option("--orphan <logicalId>", "Skip the given resource during replay (repeatable). Mirrors cdk rollback --orphan.").argParser((value, previous) => [...previous ?? [], value])).addOption(new Option("--revert-failed", "Also attempt to revert the resource whose operation FAILED mid-deploy. Off by default: the remote state of the failed resource is unknown, so force-applying its previous state is opt-in.").default(false)).addOption(skipFinalSnapshotOption).addOption(stackRegionOption()).addHelpText("after", [
17690
+ const cmd = new Command("rollback").description("Revert a stack to its pre-deploy state after a failed --no-rollback / interrupted deploy or a partially-failed automatic rollback (state-driven, no synth needed).").argument("[stack]", "Stack name to roll back (defaults to the single journaled stack)").addOption(new Option("--force", "Skip the confirmation prompt").default(false)).addOption(new Option("--orphan <logicalId>", "Skip the given resource during replay (repeatable). Mirrors cdk rollback --orphan.").argParser((value, previous) => [...previous ?? [], value])).addOption(new Option("--revert-failed", "Also attempt to revert the resource whose operation FAILED mid-deploy. Off by default: the remote state of the failed resource is unknown, so force-applying its previous state is opt-in.").default(false)).addOption(new Option("--drop-failed <logicalId>", "Remove ONE journaled failed CREATE (a resource cdkd proved it made, journaled as its only record) from the rollback journal, after checking that resource by hand. Replays nothing and deletes nothing in AWS; every other entry is kept.")).addOption(skipFinalSnapshotOption).addOption(new Option("--remove-protection", `Turn deletion protection off before this stack's rollback deletes a resource the failed deploy left: one its state records from a completed CREATE, or one a failed CREATE left behind (a journaled orphan, or under --revert-failed the failed CREATE itself) when cdkd can prove it is that resource and no other stack holds it. A nested stack it deletes cascades the flag to that child's resources; a resource reverted inside an existing nested stack keeps its protection. Covers ${removeProtectionTypeList()}.`).default(false)).addOption(stackRegionOption()).addHelpText("after", [
17382
17691
  "",
17383
17692
  "Examples:",
17384
17693
  " cdkd rollback MyStack",
@@ -17387,7 +17696,9 @@ function createRollbackCommand() {
17387
17696
  " cdkd rollback MyStack --orphan MyBucket --orphan MyTable",
17388
17697
  " cdkd rollback MyStack --revert-failed # also revert the failed in-flight resource",
17389
17698
  " cdkd rollback MyStack --skip-final-snapshot # DeletionPolicy Snapshot → delete without the snapshot",
17699
+ " cdkd rollback MyStack --remove-protection # also delete protected resources the failed deploy left",
17390
17700
  " cdkd rollback MyStack --stack-region us-west-2",
17701
+ " cdkd rollback MyStack --drop-failed MyQueuePolicy # forget one undeletable failed CREATE",
17391
17702
  "",
17392
17703
  "Exit codes: 0 = clean, 2 = partial (journal kept for re-run), 1 = hard error."
17393
17704
  ].join("\n")).action(withErrorHandling(rollbackCommand));
@@ -19094,6 +19405,19 @@ function reimportedAttributes(row, prior) {
19094
19405
  keptRecordedKeys: keptRecordedKeys.sort()
19095
19406
  };
19096
19407
  }
19408
+ function withDeclaredNoEchoMasked(attributes, declared) {
19409
+ if (!Array.isArray(declared)) return attributes;
19410
+ const names = declared.filter((name) => typeof name === "string" && hasOwnKey(attributes, name) && !carriesSecretMask(attributes[name]) && attributes[name] !== void 0 && attributes[name] !== null);
19411
+ if (names.length === 0) return attributes;
19412
+ const masked = Object.create(Object.getPrototypeOf(attributes));
19413
+ for (const [key, value] of Object.entries(attributes)) defineOwnKey(masked, key, names.includes(key) ? maskWholeValue(value) : value);
19414
+ return masked;
19415
+ }
19416
+ function noEchoAttributeNamesCarried(prior, attributes) {
19417
+ if (!Array.isArray(prior) || attributes === void 0) return {};
19418
+ const kept = prior.filter((name) => typeof name === "string" && hasOwnKey(attributes, name) && carriesSecretMask(attributes[name]));
19419
+ return kept.length > 0 ? { noEchoAttributeNames: kept } : {};
19420
+ }
19097
19421
  function buildStackState(stackName, region, rows, templateParser, template, existingState, selectiveMode) {
19098
19422
  const resources = selectiveMode && existingState ? { ...existingState.resources } : {};
19099
19423
  const parameterNames = new Set(Object.keys(template.Parameters ?? {}));
@@ -19105,7 +19429,9 @@ function buildStackState(stackName, region, rows, templateParser, template, exis
19105
19429
  const deps = [...templateParser.extractDependencies(tmplResource)].filter((dep) => !parameterNames.has(dep));
19106
19430
  const prior = existingState?.resources[row.logicalId];
19107
19431
  const priorAttributes = prior && prior.physicalId === row.physicalId ? prior.attributes : void 0;
19108
- const { attributes, stillMaskedKeys, keptRecordedKeys } = reimportedAttributes(row.attributes, priorAttributes);
19432
+ const reimported = reimportedAttributes(row.attributes, priorAttributes);
19433
+ const { stillMaskedKeys, keptRecordedKeys } = reimported;
19434
+ const attributes = withDeclaredNoEchoMasked(reimported.attributes, prior && prior.physicalId === row.physicalId ? prior.noEchoAttributeNames : void 0);
19109
19435
  if (keptRecordedKeys.length > 0) getLogger().info(safeMsg`${displayIdent(row.logicalId)}: this import recorded ` + safeMsg`${keptRecordedKeys.map((key) => displayIdent(key)).join(", ")} only as the ` + "redaction mask, so the previously recorded value is kept; a deploy that updates the resource rewrites it.");
19110
19436
  if (stillMaskedKeys.length > 0) {
19111
19437
  const keys = stillMaskedKeys.map((key) => displayIdent(key)).join(", ");
@@ -19117,6 +19443,7 @@ function buildStackState(stackName, region, rows, templateParser, template, exis
19117
19443
  resourceType: row.resourceType,
19118
19444
  properties: tmplResource.Properties ?? {},
19119
19445
  attributes,
19446
+ ...noEchoAttributeNamesCarried(prior && prior.physicalId === row.physicalId ? prior.noEchoAttributeNames : void 0, attributes),
19120
19447
  dependencies: deps,
19121
19448
  deletionPolicy: tmplResource.DeletionPolicy,
19122
19449
  updateReplacePolicy: tmplResource.UpdateReplacePolicy,
@@ -19130,7 +19457,7 @@ function buildStackState(stackName, region, rows, templateParser, template, exis
19130
19457
  }
19131
19458
  if (namesParameter?.failedClosed !== void 0) getLogger().debug(`The template's parameter dependence could not be judged (${namesParameter.failedClosed}): every prior observed-baseline refusal recorded without a reason is carried as an unverifiable-parameter refusal.`);
19132
19459
  return {
19133
- version: 10,
19460
+ version: 11,
19134
19461
  stackName,
19135
19462
  region,
19136
19463
  resources,
@@ -26951,4 +27278,4 @@ function collectVerbFlags(program) {
26951
27278
 
26952
27279
  //#endregion
26953
27280
  export { canonicalizeIpProtocolValue as a, buildProgram, resolveSecretDerivedPrincipals as i, runDestroyForStack as n, resolvedResourceTimeoutMs as o, isResolvableSecretPrincipalList as r, canonicalizeIpv4Cidr as t };
26954
- //# sourceMappingURL=program-w_06Pj_g.js.map
27281
+ //# sourceMappingURL=program-1S4fU3m4.js.map