@cdkd/cli 0.362.0 → 0.364.0

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 (59) hide show
  1. package/dist/{ambient-client-defaults-lvt_quOX.js → ambient-client-defaults-BKnLt9R9.js} +4 -3
  2. package/dist/ambient-client-defaults-BKnLt9R9.js.map +1 -0
  3. package/dist/{asg-provider-fEPlW1VD.js → asg-provider-D-wGQIgg.js} +6 -6
  4. package/dist/{asg-provider-fEPlW1VD.js.map → asg-provider-D-wGQIgg.js.map} +1 -1
  5. package/dist/cli.js +3 -3
  6. package/dist/{custom-resource-runtime-DWIcvRGQ.js → custom-resource-runtime-BDRipTIL.js} +6 -6
  7. package/dist/{custom-resource-runtime-DWIcvRGQ.js.map → custom-resource-runtime-BDRipTIL.js.map} +1 -1
  8. package/dist/{db-associated-roles-bxCMZbZE.js → db-associated-roles-cQd3Zmr5.js} +2 -2
  9. package/dist/{db-associated-roles-bxCMZbZE.js.map → db-associated-roles-cQd3Zmr5.js.map} +1 -1
  10. package/dist/{delete-started-CdhzmNUy.js → delete-started-DHQvQxWa.js} +13 -9
  11. package/dist/delete-started-DHQvQxWa.js.map +1 -0
  12. package/dist/{deploy-engine-XCVGar9z.js → deploy-engine-9rzhYsZc.js} +518 -313
  13. package/dist/deploy-engine-9rzhYsZc.js.map +1 -0
  14. package/dist/{ec2-termination-protection-CprPM9CV.js → ec2-termination-protection-Dttj-XrE.js} +8 -6
  15. package/dist/ec2-termination-protection-Dttj-XrE.js.map +1 -0
  16. package/dist/{ecr-uri-Bco-bZxQ.js → ecr-uri-BYWBRpzv.js} +2 -2
  17. package/dist/{ecr-uri-Bco-bZxQ.js.map → ecr-uri-BYWBRpzv.js.map} +1 -1
  18. package/dist/{expected-bucket-owner-DNrpjI15.js → expected-bucket-owner-DWEAlmAk.js} +2 -2
  19. package/dist/{expected-bucket-owner-DNrpjI15.js.map → expected-bucket-owner-DWEAlmAk.js.map} +1 -1
  20. package/dist/{iam-role-provider-n08e_UqG.js → iam-role-provider-fCKVbuHw.js} +385 -14
  21. package/dist/iam-role-provider-fCKVbuHw.js.map +1 -0
  22. package/dist/{image-plan-PkDml11o.js → image-plan-XyUNOBmz.js} +8 -8
  23. package/dist/{image-plan-PkDml11o.js.map → image-plan-XyUNOBmz.js.map} +1 -1
  24. package/dist/index.d.ts +2 -0
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +5 -5
  27. package/dist/{logger-CS467GaW.js → logger-xueeC0uS.js} +2 -2
  28. package/dist/{logger-CS467GaW.js.map → logger-xueeC0uS.js.map} +1 -1
  29. package/dist/{neptune-provider-B6VK2Cbj.js → neptune-provider-ClN-LvMb.js} +7 -7
  30. package/dist/{neptune-provider-B6VK2Cbj.js.map → neptune-provider-ClN-LvMb.js.map} +1 -1
  31. package/dist/{program-BgTzsbxH.js → program-Dz-HwMKe.js} +253 -85
  32. package/dist/program-Dz-HwMKe.js.map +1 -0
  33. package/dist/{provider-classes-BPg5qXSB.js → provider-classes-Bmipcl6d.js} +397 -201
  34. package/dist/provider-classes-Bmipcl6d.js.map +1 -0
  35. package/dist/{rds-provider-6MbfXMoG.js → rds-provider-X8pB7V-7.js} +10 -10
  36. package/dist/{rds-provider-6MbfXMoG.js.map → rds-provider-X8pB7V-7.js.map} +1 -1
  37. package/dist/{read-replica-Zx5KMOal.js → read-replica-B9F3-d8h.js} +3 -3
  38. package/dist/{read-replica-Zx5KMOal.js.map → read-replica-B9F3-d8h.js.map} +1 -1
  39. package/dist/{replacement-rules-D_XjAts6.js → replacement-rules-TNt9wPax.js} +3 -3
  40. package/dist/{replacement-rules-D_XjAts6.js.map → replacement-rules-TNt9wPax.js.map} +1 -1
  41. package/dist/{resource-deadline-o6RvWixc.js → resource-deadline-CUApArbf.js} +4 -4
  42. package/dist/{resource-deadline-o6RvWixc.js.map → resource-deadline-CUApArbf.js.map} +1 -1
  43. package/dist/{restore-source-guard-ORkhNnNg.js → restore-source-guard-jCM5yJzQ.js} +4 -4
  44. package/dist/{restore-source-guard-ORkhNnNg.js.map → restore-source-guard-jCM5yJzQ.js.map} +1 -1
  45. package/dist/{run-cli-Dp5c7Am8.js → run-cli-BDjbpUsh.js} +2 -2
  46. package/dist/{run-cli-Dp5c7Am8.js.map → run-cli-BDjbpUsh.js.map} +1 -1
  47. package/dist/{settle-own-write-members-SaiOYQGZ.js → settle-own-write-members-CSkozE9A.js} +13 -135
  48. package/dist/settle-own-write-members-CSkozE9A.js.map +1 -0
  49. package/dist/{version-DFX4Mg8N.js → version-BXn3jGiB.js} +2 -2
  50. package/dist/{version-DFX4Mg8N.js.map → version-BXn3jGiB.js.map} +1 -1
  51. package/package.json +3 -3
  52. package/dist/ambient-client-defaults-lvt_quOX.js.map +0 -1
  53. package/dist/delete-started-CdhzmNUy.js.map +0 -1
  54. package/dist/deploy-engine-XCVGar9z.js.map +0 -1
  55. package/dist/ec2-termination-protection-CprPM9CV.js.map +0 -1
  56. package/dist/iam-role-provider-n08e_UqG.js.map +0 -1
  57. package/dist/program-BgTzsbxH.js.map +0 -1
  58. package/dist/provider-classes-BPg5qXSB.js.map +0 -1
  59. package/dist/settle-own-write-members-SaiOYQGZ.js.map +0 -1
@@ -1,15 +1,15 @@
1
- import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, a as UNSHOWABLE_VALUE, c as deployReplaceCommand, d as pasteableCommand, f as physicalIdShownBesideCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE } from "./version-DFX4Mg8N.js";
2
- import { $ as withStackScope, A as configStringRefusal, C as fallbackNamePropertyFor, D as coerceCfnInteger, E as coerceCfnBoolean, F as requireConfigString, G as currentNameGeneration, H as looksLikeCdkdGeneratedName, J as getCurrentStackName, K as getCurrentSkipPrefix, M as replayWarn, O as configBooleanRefusal, P as requireConfigObject, Q as withSkipPrefix, S as explicitNamePropertyFor, T as withoutGeneratedFallbackName, V as generateResourceNameWithFallback, W as stackInstanceNameSuffix, X as isNameGeneration, Z as withNameGeneration, _ as currentLogLineMasker, b as alternateNamePropertiesFor, c as VERBOSE_POINTER, et as withStackScopeBeforeStateRead, g as verbosePointerTail, h as verbosePointerSentence, j as readConfigString, k as configIntegerRefusal, m as verboseAwareText, n as getLogger, p as safeStringify, q as getCurrentStackInstanceId, u as describeAwsFailure, v as installLogLineMaskerSource, w as generatedNameFor, x as applyDefaultNameForFallback, y as getLiveRenderer } from "./logger-CS467GaW.js";
3
- import { A as stripControlChars, C as isNameCooldownError, F as isAmbiguousOutcomeError, G as markRedactedCause, H as isMarkedNonRetryable, J as DynamicReferenceRegionAmbiguousError, K as wrapMaskedAwsError, L as isIamPropagationError, O as relayedNameCollision, P as isAmbiguousCcHandlerErrorCode, Q as AccountIdUnavailableError, R as isRetryableTransientError, S as isNameCollisionErrorFrom, T as isReplayedNameCollisionFrom, U as isThrottlingError, W as markNonRetryable, X as MalformedProducerRecordRefusalError, Y as IntrinsicResolutionRefusalError, Z as SelectOutOfBoundsRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, at as ProvisioningError, b as isUpdateUnsupportedError, et as CdkdError, i as credentialFingerprint, k as escapeRegExp$1, m as ExportInUseError, n as ambientCredentialConfig, nt as DeploymentNotApprovedError, ot as ResourceTimeoutError, q as CrossAccountSecretRefusalError, r as clientDefaultsFor, st as StateError, t as ambientClientDefaults, w as isRecreateRetryableError, z as isTransientServerError } from "./ambient-client-defaults-lvt_quOX.js";
1
+ import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, a as UNSHOWABLE_VALUE, c as deployReplaceCommand, d as pasteableCommand, f as physicalIdShownBesideCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE } from "./version-BXn3jGiB.js";
2
+ import { $ as withStackScope, A as configStringRefusal, C as fallbackNamePropertyFor, D as coerceCfnInteger, E as coerceCfnBoolean, F as requireConfigString, G as currentNameGeneration, H as looksLikeCdkdGeneratedName, J as getCurrentStackName, K as getCurrentSkipPrefix, M as replayWarn, O as configBooleanRefusal, P as requireConfigObject, Q as withSkipPrefix, S as explicitNamePropertyFor, T as withoutGeneratedFallbackName, V as generateResourceNameWithFallback, W as stackInstanceNameSuffix, X as isNameGeneration, Z as withNameGeneration, _ as currentLogLineMasker, b as alternateNamePropertiesFor, c as VERBOSE_POINTER, et as withStackScopeBeforeStateRead, g as verbosePointerTail, h as verbosePointerSentence, j as readConfigString, k as configIntegerRefusal, m as verboseAwareText, n as getLogger, p as safeStringify, q as getCurrentStackInstanceId, u as describeAwsFailure, v as installLogLineMaskerSource, w as generatedNameFor, x as applyDefaultNameForFallback, y as getLiveRenderer } from "./logger-xueeC0uS.js";
3
+ import { A as stripControlChars, C as isNameCooldownError, F as isAmbiguousOutcomeError, G as markRedactedCause, H as isMarkedNonRetryable, J as DynamicReferenceRegionAmbiguousError, K as wrapMaskedAwsError, L as isIamPropagationError, O as relayedNameCollision, P as isAmbiguousCcHandlerErrorCode, Q as AccountIdUnavailableError, R as isRetryableTransientError, S as isNameCollisionErrorFrom, T as isReplayedNameCollisionFrom, U as isThrottlingError, W as markNonRetryable, X as MalformedProducerRecordRefusalError, Y as IntrinsicResolutionRefusalError, Z as SelectOutOfBoundsRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, at as ProvisioningError, b as isUpdateUnsupportedError, et as CdkdError, i as credentialFingerprint, k as escapeRegExp$1, m as ExportInUseError, n as ambientCredentialConfig, nt as DeploymentNotApprovedError, ot as ResourceTimeoutError, q as CrossAccountSecretRefusalError, r as clientDefaultsFor, st as StateError, t as ambientClientDefaults, w as isRecreateRetryableError, z as isTransientServerError } from "./ambient-client-defaults-BKnLt9R9.js";
4
4
  import { a as getAssumedRoleCredentials, c as setAssumedRoleCredentials, d as quietS3Logger, f as ambientRegion, i as awsEndpointOverrideUrl, n as awsClientDefaults, o as getPreAssumeEnvCredentials, r as awsEndpointOverrideActive, t as SECOND_ROLE_PUBLISH_REFUSAL, u as setPreAssumeEnvCredentials } from "./aws-client-defaults-DAebi99J.js";
5
5
  import { l as s3ClientDefaults, r as getAwsClients } from "./aws-clients-DOkPjjAW.js";
6
- import { A as IAM_PROPAGATION_MAX_DELAY_MS, B as phaseScopeForStack, C as prefetchCreateOnlyPropertyPaths, D as hasNoRegistrySchema, E as describeTypeWithThrottleRetry, G as timePhaseSync, H as recordPhase, I as ignoresUnmodifiedGroupSize, J as parseFailureDebugDetail, K as describeJsonParseFailure, L as rollingUpdatePolicy, M as CREATE_ONLY_PATHS_SNAPSHOT, N as INSTANCE_REFRESH_TRIGGER_PROPERTIES, O as isAwsEmulatorRegistryMiss, P as REPLACEMENT_TRIGGER_PROPERTIES, R as willReplaceGroup, S as isIntrinsicShaped, T as parseCreateOnlyPropertyPointers, V as phaseTimingsEnabled, W as timePhase, X as utf8ByteLength, Y as parseJsonNamingNoBody, a as reDisableInstanceApiTermination, c as resolvedResourceTimeoutMs, d as isRefusedBeforeApplying, f as markRefusedBeforeApplying, g as withPriorAttempts, h as provenOrphanIdsInJournal, i as observeThenDisableInstanceApiTermination, j as withRetry, k as reportAwsEmulatorRegistryMiss, m as priorAttemptsInJournal, n as ec2InstanceProtectionSite, o as reEnableInstanceApiTermination, p as priorAttemptLookup, q as jsonParseFailureStandIn, r as isTerminationProtectionPropagationError, v as unchangedBehindSecretReference, w as templateResourceTypes, x as getCreateOnlyPropertyPaths, y as cachedCreateOnlyPropertyPaths, z as PhaseClock } from "./ec2-termination-protection-CprPM9CV.js";
6
+ import { A as IAM_PROPAGATION_MAX_DELAY_MS, B as phaseScopeForStack, C as prefetchCreateOnlyPropertyPaths, D as hasNoRegistrySchema, E as describeTypeWithThrottleRetry, G as timePhaseSync, H as recordPhase, I as ignoresUnmodifiedGroupSize, J as parseFailureDebugDetail, K as describeJsonParseFailure, L as rollingUpdatePolicy, M as CREATE_ONLY_PATHS_SNAPSHOT, N as INSTANCE_REFRESH_TRIGGER_PROPERTIES, O as isAwsEmulatorRegistryMiss, P as REPLACEMENT_TRIGGER_PROPERTIES, R as willReplaceGroup, S as isIntrinsicShaped, T as parseCreateOnlyPropertyPointers, V as phaseTimingsEnabled, W as timePhase, X as utf8ByteLength, Y as parseJsonNamingNoBody, a as reDisableInstanceApiTermination, c as resolvedResourceTimeoutMs, d as isRefusedBeforeApplying, f as markRefusedBeforeApplying, g as withPriorAttempts, h as provenOrphanIdsInJournal, i as observeThenDisableInstanceApiTermination, j as withRetry, k as reportAwsEmulatorRegistryMiss, m as priorAttemptsInJournal, n as ec2InstanceProtectionSite, o as reEnableInstanceApiTermination, p as priorAttemptLookup, q as jsonParseFailureStandIn, r as isTerminationProtectionPropagationError, v as unchangedBehindSecretReference, w as templateResourceTypes, x as getCreateOnlyPropertyPaths, y as cachedCreateOnlyPropertyPaths, z as PhaseClock } from "./ec2-termination-protection-Dttj-XrE.js";
7
7
  import { i as sameRegion, n as canonicalizeRegion, r as derivePartitionAndUrlSuffix } from "./aws-partition-DA0r2sr-.js";
8
- import { $t as markAuxiliaryFailure, A as assertRegionMatch, At as canonicalizeRoute53QueryName, B as resolveExplicitPhysicalId, Bt as createMaskedRetryLogger, D as withoutServerErrorRetries, F as isQuotableImportValue, Gt as RETRY_AUXILIARY_OWNER, H as markNotGone, Ht as maskDeep, I as normalizeAwsTagsToCfn, It as resourceTypeShown, Jt as createdBeforeFailure, K as observeThenDisableProtection, L as quotedRemedyLogicalId, Lt as segmentAfterAnchor, Mt as compositeIdSeparatorRefusal, Pt as logicalIdShown, Qt as isAuxiliaryMarkOf, R as refusalTypeShown, Rt as stateOrphanRecordRemedy, U as compensateProtectionFlip, Ut as maskerOrIdentity, V as isMarkedNotGone, Vt as isSecretDerivedValue, W as deleteWithProtectionCompensation, Wt as withDerivedNameMasks, Yt as createdResourceIdentityBeforeFailure, Zt as isAuxiliaryFailure, _n as withPasteableAwsProfile, at as runDeleteAttempt, bt as startInterruptWatch, ct as monotonicNowMs, d as CreatedResourceSink, dn as sanitizeRecoveryValue, en as markCreatedBeforeFailure, f as clearCreatedReport, fn as CUSTOM_RESOURCE_RESPONSE_PREFIX, g as retractCreatedResource, i as withResourceDeadline, it as protectionFlipKey, k as RESOURCE_NOT_FOUND, kt as withUnchangedSecretPrincipalLists, lt as DELETION_PROTECTION_DOC_POINTER, m as reportCreatedResource, mn as WAIT_CONDITION_SIGNAL_PREFIX, mt as protectedReplacementAdvice, n as enclosingDeadlineRemainingMs, nt as ProtectionFlipRegistry, o as prepareRemovalForUpdate, ot as ElapsedBudget, p as collectCreatedResources, pn as DEFAULT_STATE_PREFIX, pt as pasteableAwsCommand, r as whileEnclosingDeadlinesPaused, rt as isTerminalDeleteFailure, s as removalWarning, st as ElapsedBudgetRegistry, t as enclosingDeadlineExpired, u as withoutInjectedRemovals, un as recoveryCommandFlags, vn as injectiveKey, xn as producerRecordKey, yt as isInterruptedWaitError, zt as createMaskedLogSinks } from "./resource-deadline-o6RvWixc.js";
9
- import { t as expectedOwnerParam } from "./expected-bucket-owner-DNrpjI15.js";
10
- import { Ct as assertRecordedIdentity, Dt as slowCcOperationTimeoutMs, Et as recordedIdentityId, Ft as replaceDeadIdentity, Gt as orphansCarriedFrom, Ht as importableOutputs, Jt as stackInstanceIdCarriedFrom, Kt as shouldRetainResource, Lt as acceptedCreateOnlyDropsOf, Mt as isUsableIdentityValue, Nt as keepRecordedIdentity, Ot as SURVIVOR_IDENTITY_ATTRIBUTES, Pt as newCopyDeleteAttributes, Rt as describeRegionValueKind, Tt as identityWarner, Ut as isReadableBag, Vt as importableOutputKeys, Wt as orphansAfterRollback, gt as deniedIdentityReadRefusal, ht as dbInstanceAttributes, i as dbClusterAttributes, jt as isRecordedIdentityAttribute, kt as attributesAfterUpdate, n as isRefusedByName, qt as skippedOutputsCarriedFrom, r as markDeleteStarted, t as isDeleteStarted, vt as isAccessDeniedError, wt as differingIdentityWarning, yt as lookupEachName, zt as exportNamesCarriedFrom } from "./delete-started-CdhzmNUy.js";
11
- import { $t as recordInheritedParameterValue, A as witnessNormalize, An as recordNoEchoAttributeValues, At as withoutPhysicalNameCopies, B as redactionClaimOf, Cn as noEchoParameterPlaintextsOf, Ct as withLegacyOverlapScan, D as recordedNoEchoValuesOf, Dn as recordFreshNoEchoValuesIn, Dt as replaceEmbeddedPhysicalNameRewrites, E as recordPassedNoEchoParameters, En as recordDerivedMaskOnlyValue, Et as repairPhysicalNameCopyLeaves, F as markLeafCertifiedBag, G as foldRecording, Gt as recordTakenIfBranch, H as mixedLiteralAnswered, Ht as splitOutsideDynamicReferences, I as markSameGenerationBag, In as isDynamicReferenceString, It as secretRerenderPairs, J as hasPassProvenance, Jt as templateRereadsAccountId, K as openRecordingScope, Kt as inheritedPseudoValue, L as mergeResolvedPairs, Ln as isSingleDynamicReferenceToken, M as carryRedactionMarks, Mn as recordProvenPublicExpression, Mt as DYNAMIC_REFERENCE_TOKEN_SCAN, N as intrinsicLeafResolutionOf, Nn as wholeStringLeavesOf, Nt as dynamicReferenceTokens, O as replaceAtCoordinates, Ot as scrubResourceRecord, P as isSameGenerationBag, Pn as withoutNoEchoParameterEntries, Q as recordReferenceResolution, Qt as recordInheritedParameterRead, R as recordIntrinsicLeafResolution, Rn as maskMatchSpans, S as noEchoParametersReadBy, Sn as markNoEchoParameterClass, St as replaceWholeLeaves, Tt as repairEmbeddedPhysicalNamesTowards, U as withLegacyMixedScan, Ut as standsForInheritedSecret, V as resolvedPlaintextOf, Vt as rereadParameterExpression, W as redactForState, Wt as recordDroppedArrayElements, X as passReadVersionsFor, Xt as inheritedParameterExpression, Y as passProvenanceFor, Yt as inheritNestedStackParameterAssociations, Z as recordReferenceProvenanceEntry, Zt as inheritedRenderedToken, _ as noEchoComparison, _n as freshNoEchoValuesOf, _t as maskSecretsInText, an as recordRecoverableMaskedOutput, at as literalSplitDelimitersOf, bn as isScopedSecretVerdict, bt as legacyReferenceLeavesOnly, c as parseLambdaFunctionAddress, ct as recordLogOnlyParameterValue, d as canonicalJson$7, dn as crossStackSourceKey, dt as shareLogOnlyValues, en as redactInheritedParameterValue, et as carryLogOnlyValues, f as isMarkedCoordinate, fn as recordCrossStackExpression, ft as unionOfSecretBags, g as maskedLeafCoordinatesOf, gn as contradictProvenPublicExpression, gt as maskSecretsInError, h as maskWholeValue, hn as carryFreshNoEchoMark, ht as maskRecordedSecretsInText, in as freshNoEchoLeafPositions, it as hasMaskableValues, jn as recordNoEchoParameterFreshValue, jt as spanNamesResolvableService, k as valueAtCoordinate, kt as withPhysicalNameCopies, ln as recordPhysicalNameCopy, lt as recordLogOnlySplitFragments, m as maskReadbackAtCoordinates, mn as carriesSecretMask, mt as errorCauseChain, nn as carriesFreshNoEchoValue, nt as createUnionSecretMasker, on as recoverMaskedOutput, ot as logOnlyValueCount, p as maskAtCoordinates, pn as splitGetAttStringForm, pt as createSecretMasker, q as recordSecretResolution, qt as recordInheritedPseudoParameters, rn as embedsFreshNoEchoValue, rt as hasLogOnlyValues, sn as physicalNameCopiesOf, st as printingCorpusOf, t as ReplacementRulesRegistry, tn as withdrawRenderedParameterSpelling, tt as carryLogOnlyValuesCarriedBy, u as canonicalCoordinates, un as recordNestedStackParameterExpressions, ut as recordLogOnlyValue, v as noEchoCoordinatesOf, vn as isMaskOnlyPlaintext, vt as differingStringLeaves, w as readbackPathFor, wn as pinScopedSecretVerdict, wt as embeddedPhysicalNameRewrites, x as noEchoParameterNodesAt, xn as isSecretExpressionByVerdictOrSpelling, xt as overlapRuleAnswered, y as noEchoLeavesOf, yn as isNoEchoParameterPlaintext, yt as legacyLeavesWithoutMask, z as recordIntrinsicLeafResolutionAs, zt as arrayPairsWhateverDrops } from "./replacement-rules-D_XjAts6.js";
12
- import { C as withUnsettledItems, S as unsettledPropertiesOf, T as withoutUnsettledProperties, _ as isUsableAttemptedName, b as unsettledItemsOf, c as planTagDiff, f as tagPlanWarning, h as definedAttributes, i as refuseRestoreFromItself, l as readTagList, u as refuseMalformedDesiredTags, v as unsettledContextOf, w as withUnsettledProperties, x as unsettledItemsTopKey, y as unsettledItemsField } from "./restore-source-guard-ORkhNnNg.js";
8
+ import { $t as markAuxiliaryFailure, A as assertRegionMatch, At as canonicalizeRoute53QueryName, B as resolveExplicitPhysicalId, Bt as createMaskedRetryLogger, D as withoutServerErrorRetries, F as isQuotableImportValue, Gt as RETRY_AUXILIARY_OWNER, H as markNotGone, Ht as maskDeep, I as normalizeAwsTagsToCfn, It as resourceTypeShown, Jt as createdBeforeFailure, K as observeThenDisableProtection, L as quotedRemedyLogicalId, Lt as segmentAfterAnchor, Mt as compositeIdSeparatorRefusal, Pt as logicalIdShown, Qt as isAuxiliaryMarkOf, R as refusalTypeShown, Rt as stateOrphanRecordRemedy, U as compensateProtectionFlip, Ut as maskerOrIdentity, V as isMarkedNotGone, Vt as isSecretDerivedValue, W as deleteWithProtectionCompensation, Wt as withDerivedNameMasks, Yt as createdResourceIdentityBeforeFailure, Zt as isAuxiliaryFailure, _n as withPasteableAwsProfile, at as runDeleteAttempt, bt as startInterruptWatch, ct as monotonicNowMs, d as CreatedResourceSink, dn as sanitizeRecoveryValue, en as markCreatedBeforeFailure, f as clearCreatedReport, fn as CUSTOM_RESOURCE_RESPONSE_PREFIX, g as retractCreatedResource, i as withResourceDeadline, it as protectionFlipKey, k as RESOURCE_NOT_FOUND, kt as withUnchangedSecretPrincipalLists, lt as DELETION_PROTECTION_DOC_POINTER, m as reportCreatedResource, mn as WAIT_CONDITION_SIGNAL_PREFIX, mt as protectedReplacementAdvice, n as enclosingDeadlineRemainingMs, nt as ProtectionFlipRegistry, o as prepareRemovalForUpdate, ot as ElapsedBudget, p as collectCreatedResources, pn as DEFAULT_STATE_PREFIX, pt as pasteableAwsCommand, r as whileEnclosingDeadlinesPaused, rt as isTerminalDeleteFailure, s as removalWarning, st as ElapsedBudgetRegistry, t as enclosingDeadlineExpired, u as withoutInjectedRemovals, un as recoveryCommandFlags, vn as injectiveKey, xn as producerRecordKey, yt as isInterruptedWaitError, zt as createMaskedLogSinks } from "./resource-deadline-CUApArbf.js";
9
+ import { t as expectedOwnerParam } from "./expected-bucket-owner-DWEAlmAk.js";
10
+ import { At as SURVIVOR_IDENTITY_ATTRIBUTES, Bt as describeRegionValueKind, Et as identityWarner, Ft as keepRecordedIdentity, Gt as isReadableBag, It as newCopyDeleteAttributes, Jt as shouldRetainResource, Kt as orphansAfterRollback, Lt as replaceDeadIdentity, Nt as isRecordedIdentityAttribute, Ot as recordedIdentityId, Pt as isUsableIdentityValue, Tt as differingIdentityWarning, Ut as importableOutputKeys, Vt as exportNamesCarriedFrom, Wt as importableOutputs, Xt as stackInstanceIdCarriedFrom, Yt as skippedOutputsCarriedFrom, bt as lookupEachName, gt as deniedIdentityReadRefusal, ht as dbInstanceAttributes, i as dbClusterAttributes, jt as attributesAfterUpdate, kt as slowCcOperationTimeoutMs, n as isRefusedByName, qt as orphansCarriedFrom, r as markDeleteStarted, t as isDeleteStarted, wt as assertRecordedIdentity, yt as isAccessDeniedError, zt as acceptedCreateOnlyDropsOf } from "./delete-started-DHQvQxWa.js";
11
+ import { $t as recordInheritedParameterValue, A as witnessNormalize, An as recordNoEchoAttributeValues, At as withoutPhysicalNameCopies, B as redactionClaimOf, Cn as noEchoParameterPlaintextsOf, Ct as withLegacyOverlapScan, D as recordedNoEchoValuesOf, Dn as recordFreshNoEchoValuesIn, Dt as replaceEmbeddedPhysicalNameRewrites, E as recordPassedNoEchoParameters, En as recordDerivedMaskOnlyValue, Et as repairPhysicalNameCopyLeaves, F as markLeafCertifiedBag, G as foldRecording, Gt as recordTakenIfBranch, H as mixedLiteralAnswered, Ht as splitOutsideDynamicReferences, I as markSameGenerationBag, In as isDynamicReferenceString, It as secretRerenderPairs, J as hasPassProvenance, Jt as templateRereadsAccountId, K as openRecordingScope, Kt as inheritedPseudoValue, L as mergeResolvedPairs, Ln as isSingleDynamicReferenceToken, M as carryRedactionMarks, Mn as recordProvenPublicExpression, Mt as DYNAMIC_REFERENCE_TOKEN_SCAN, N as intrinsicLeafResolutionOf, Nn as wholeStringLeavesOf, Nt as dynamicReferenceTokens, O as replaceAtCoordinates, Ot as scrubResourceRecord, P as isSameGenerationBag, Pn as withoutNoEchoParameterEntries, Q as recordReferenceResolution, Qt as recordInheritedParameterRead, R as recordIntrinsicLeafResolution, Rn as maskMatchSpans, S as noEchoParametersReadBy, Sn as markNoEchoParameterClass, St as replaceWholeLeaves, Tt as repairEmbeddedPhysicalNamesTowards, U as withLegacyMixedScan, Ut as standsForInheritedSecret, V as resolvedPlaintextOf, Vt as rereadParameterExpression, W as redactForState, Wt as recordDroppedArrayElements, X as passReadVersionsFor, Xt as inheritedParameterExpression, Y as passProvenanceFor, Yt as inheritNestedStackParameterAssociations, Z as recordReferenceProvenanceEntry, Zt as inheritedRenderedToken, _ as noEchoComparison, _n as freshNoEchoValuesOf, _t as maskSecretsInText, an as recordRecoverableMaskedOutput, at as literalSplitDelimitersOf, bn as isScopedSecretVerdict, bt as legacyReferenceLeavesOnly, c as parseLambdaFunctionAddress, ct as recordLogOnlyParameterValue, d as canonicalJson$7, dn as crossStackSourceKey, dt as shareLogOnlyValues, en as redactInheritedParameterValue, et as carryLogOnlyValues, f as isMarkedCoordinate, fn as recordCrossStackExpression, ft as unionOfSecretBags, g as maskedLeafCoordinatesOf, gn as contradictProvenPublicExpression, gt as maskSecretsInError, h as maskWholeValue, hn as carryFreshNoEchoMark, ht as maskRecordedSecretsInText, in as freshNoEchoLeafPositions, it as hasMaskableValues, jn as recordNoEchoParameterFreshValue, jt as spanNamesResolvableService, k as valueAtCoordinate, kt as withPhysicalNameCopies, ln as recordPhysicalNameCopy, lt as recordLogOnlySplitFragments, m as maskReadbackAtCoordinates, mn as carriesSecretMask, mt as errorCauseChain, nn as carriesFreshNoEchoValue, nt as createUnionSecretMasker, on as recoverMaskedOutput, ot as logOnlyValueCount, p as maskAtCoordinates, pn as splitGetAttStringForm, pt as createSecretMasker, q as recordSecretResolution, qt as recordInheritedPseudoParameters, rn as embedsFreshNoEchoValue, rt as hasLogOnlyValues, sn as physicalNameCopiesOf, st as printingCorpusOf, t as ReplacementRulesRegistry, tn as withdrawRenderedParameterSpelling, tt as carryLogOnlyValuesCarriedBy, u as canonicalCoordinates, un as recordNestedStackParameterExpressions, ut as recordLogOnlyValue, v as noEchoCoordinatesOf, vn as isMaskOnlyPlaintext, vt as differingStringLeaves, w as readbackPathFor, wn as pinScopedSecretVerdict, wt as embeddedPhysicalNameRewrites, x as noEchoParameterNodesAt, xn as isSecretExpressionByVerdictOrSpelling, xt as overlapRuleAnswered, y as noEchoLeavesOf, yn as isNoEchoParameterPlaintext, yt as legacyLeavesWithoutMask, z as recordIntrinsicLeafResolutionAs, zt as arrayPairsWhateverDrops } from "./replacement-rules-TNt9wPax.js";
12
+ import { C as withUnsettledItems, S as unsettledPropertiesOf, T as withoutUnsettledProperties, _ as isUsableAttemptedName, b as unsettledItemsOf, c as planTagDiff, f as tagPlanWarning, h as definedAttributes, i as refuseRestoreFromItself, l as readTagList, u as refuseMalformedDesiredTags, v as unsettledContextOf, w as withUnsettledProperties, x as unsettledItemsTopKey, y as unsettledItemsField } from "./restore-source-guard-jCM5yJzQ.js";
13
13
  import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
14
14
  import { AsyncLocalStorage } from "node:async_hooks";
15
15
  import { CreateBucketCommand, DeleteObjectCommand, DeleteObjectsCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchKey, PutBucketEncryptionCommand, PutBucketLifecycleConfigurationCommand, PutBucketPolicyCommand, PutObjectCommand, PutPublicAccessBlockCommand, S3Client } from "@aws-sdk/client-s3";
@@ -82,7 +82,7 @@ async function resolveBucketRegion(bucketName, opts = {}) {
82
82
  });
83
83
  }
84
84
  try {
85
- const { expectedOwnerParam } = await import("./expected-bucket-owner-DNrpjI15.js").then((n) => n.n);
85
+ const { expectedOwnerParam } = await import("./expected-bucket-owner-DWEAlmAk.js").then((n) => n.n);
86
86
  return (await client.send(new GetBucketLocationCommand({
87
87
  Bucket: bucketName,
88
88
  ...await expectedOwnerParam(client)
@@ -4378,6 +4378,133 @@ var TemplateParser = class {
4378
4378
  }
4379
4379
  };
4380
4380
 
4381
+ // src/provisioning/providers/sns-subscription/attribute-plan.ts
4382
+ const MUTABLE_ATTRIBUTES = [
4383
+ "RawMessageDelivery",
4384
+ "FilterPolicy",
4385
+ "FilterPolicyScope",
4386
+ "RedrivePolicy",
4387
+ "DeliveryPolicy",
4388
+ "ReplayPolicy",
4389
+ "SubscriptionRoleArn"
4390
+ ];
4391
+ const RESET_VALUES = {
4392
+ RawMessageDelivery: "false",
4393
+ FilterPolicy: "",
4394
+ FilterPolicyScope: "MessageAttributes",
4395
+ RedrivePolicy: ""
4396
+ };
4397
+ const UNRESETTABLE_REASONS = {
4398
+ DeliveryPolicy: "DeliveryPolicy removed, which SNS cannot reset",
4399
+ ReplayPolicy: "ReplayPolicy removed, which SNS cannot reset",
4400
+ SubscriptionRoleArn: "SubscriptionRoleArn removed, which SNS cannot reset"
4401
+ };
4402
+ function toAttributeValue(key, value) {
4403
+ if (value === void 0) return void 0;
4404
+ if (key === "FilterPolicy" || key === "RedrivePolicy" || key === "DeliveryPolicy" || key === "ReplayPolicy") return typeof value === "string" ? value : JSON.stringify(value);
4405
+ return stringifyValue(value);
4406
+ }
4407
+ function resetValueOf(name) {
4408
+ return Object.hasOwn(RESET_VALUES, name) ? RESET_VALUES[name] : void 0;
4409
+ }
4410
+ function sameAttributeValue(name, desired, current) {
4411
+ if (current === void 0) return desired === resetValueOf(name);
4412
+ if (desired === current) return true;
4413
+ try {
4414
+ return JSON.stringify(JSON.parse(desired)) === JSON.stringify(JSON.parse(current));
4415
+ } catch {
4416
+ return false;
4417
+ }
4418
+ }
4419
+ function filterPolicyCleared(plan, current) {
4420
+ const planned = plan.find(([name]) => name === "FilterPolicy");
4421
+ if (planned !== void 0) return planned[1] === "";
4422
+ return current["FilterPolicy"] === void 0 || current["FilterPolicy"] === "";
4423
+ }
4424
+ function planSubscriptionAttributes(current, properties) {
4425
+ const calls = [];
4426
+ for (const name of MUTABLE_ATTRIBUTES) {
4427
+ const desired = toAttributeValue(name, properties[name]);
4428
+ const now = current[name];
4429
+ if (desired !== void 0) {
4430
+ if (!sameAttributeValue(name, desired, now)) calls.push([name, desired]);
4431
+ continue;
4432
+ }
4433
+ if (now === void 0 || now === "") continue;
4434
+ if (name === "FilterPolicyScope" && filterPolicyCleared(calls, current)) continue;
4435
+ const reset = resetValueOf(name);
4436
+ if (reset === void 0) return {
4437
+ kind: "replace",
4438
+ reason: UNRESETTABLE_REASONS[name]
4439
+ };
4440
+ if (now !== reset) calls.push([name, reset]);
4441
+ }
4442
+ const policy = calls.find(([name]) => name === "FilterPolicy");
4443
+ if (policy !== void 0 && policy[1] !== "" && calls.some(([name]) => name === "FilterPolicyScope")) return {
4444
+ kind: "replace",
4445
+ reason: "FilterPolicy and FilterPolicyScope change together"
4446
+ };
4447
+ return {
4448
+ kind: "in-place",
4449
+ calls
4450
+ };
4451
+ }
4452
+ function recordedSubscriptionAttributes(recorded) {
4453
+ const attributes = {};
4454
+ for (const name of MUTABLE_ATTRIBUTES) attributes[name] = toAttributeValue(name, recorded[name]);
4455
+ return attributes;
4456
+ }
4457
+
4458
+ // src/provisioning/providers/route53/record-name.ts
4459
+ const UNDECODABLE_OCTAL_ESCAPES = /* @__PURE__ */ new Set(["056", "134"]);
4460
+ function normalizeRecordName(name) {
4461
+ const lowered = name.replace(/\\([0-7]{3})/g, (match, oct) => UNDECODABLE_OCTAL_ESCAPES.has(oct) ? match : String.fromCharCode(parseInt(oct, 8))).toLowerCase();
4462
+ return lowered.endsWith(".") ? lowered : `${lowered}.`;
4463
+ }
4464
+
4465
+ // src/analyzer/diff-calculator/provider-replacement.ts
4466
+ const snsSubscriptionReplacement = (recorded, desired) => {
4467
+ const plan = planSubscriptionAttributes(recordedSubscriptionAttributes(recorded), desired);
4468
+ return plan.kind === "replace" ? plan.reason : void 0;
4469
+ };
4470
+ const recordSetRenameReplacement = (recorded, desired) => {
4471
+ const comparable = (value) => typeof value === "string" && value !== "" && !value.includes("{{resolve:");
4472
+ const [prevName, name] = [recorded["Name"], desired["Name"]];
4473
+ if (!comparable(prevName) || !comparable(name)) return void 0;
4474
+ if (!comparable(recorded["Type"]) || !comparable(desired["Type"])) return void 0;
4475
+ return normalizeRecordName(prevName) !== normalizeRecordName(name) ? "its Name changed, and Route 53 keys a record on its name" : void 0;
4476
+ };
4477
+ const PROVIDER_REPLACEMENT_PLANNERS = /* @__PURE__ */ new Map([["AWS::SNS::Subscription", {
4478
+ properties: [
4479
+ "DeliveryPolicy",
4480
+ "FilterPolicy",
4481
+ "FilterPolicyScope",
4482
+ "ReplayPolicy",
4483
+ "SubscriptionRoleArn"
4484
+ ],
4485
+ plan: snsSubscriptionReplacement,
4486
+ oldDeleted: "before-create"
4487
+ }], ["AWS::Route53::RecordSet", {
4488
+ properties: ["Name"],
4489
+ plan: recordSetRenameReplacement,
4490
+ oldDeleted: "during-deploy"
4491
+ }]]);
4492
+ function providerReplacementOldDeleted(resourceType) {
4493
+ return PROVIDER_REPLACEMENT_PLANNERS.get(resourceType)?.oldDeleted;
4494
+ }
4495
+ function providerReplacementReason(resourceType, record, desired) {
4496
+ const entry = PROVIDER_REPLACEMENT_PLANNERS.get(resourceType);
4497
+ if (entry === void 0) return void 0;
4498
+ if (record.resourceType !== resourceType || record.provisionedBy === "cc-api") return void 0;
4499
+ return entry.plan(record.properties ?? {}, desired);
4500
+ }
4501
+ function dropSupersededProviderReplacements(changes) {
4502
+ for (const change of changes.values()) {
4503
+ if (change.providerReplacement === void 0) continue;
4504
+ if ((change.propertyChanges ?? []).some((pc) => pc.requiresReplacement)) delete change.providerReplacement;
4505
+ }
4506
+ }
4507
+
4381
4508
  // src/provisioning/property-coverage.generated.ts
4382
4509
  const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4383
4510
  ["AWS::ApiGateway::Account", {
@@ -4910,8 +5037,8 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4910
5037
  "Tags",
4911
5038
  "ValidationMethod"
4912
5039
  ]),
4913
- sdkUnwired: /* @__PURE__ */ new Map(),
4914
- createOnlyDrops: /* @__PURE__ */ new Set(),
5040
+ sdkUnwired: /* @__PURE__ */ new Map([["CertificateUsage", "not yet implemented by cdkd"], ["RootHierarchyType", "not yet implemented by cdkd"]]),
5041
+ createOnlyDrops: /* @__PURE__ */ new Set(["CertificateUsage", "RootHierarchyType"]),
4915
5042
  readOnly: /* @__PURE__ */ new Set(["CertificateArn"]),
4916
5043
  primaryIdentifier: /* @__PURE__ */ new Set(["CertificateArn"]),
4917
5044
  ccRouteUnavailable: false
@@ -7101,6 +7228,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
7101
7228
  ["AWS::Route53::RecordSet", {
7102
7229
  handled: /* @__PURE__ */ new Set([
7103
7230
  "AliasTarget",
7231
+ "AZAffinity",
7104
7232
  "CidrRoutingConfig",
7105
7233
  "Comment",
7106
7234
  "Failover",
@@ -7118,7 +7246,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
7118
7246
  "Type",
7119
7247
  "Weight"
7120
7248
  ]),
7121
- sdkUnwired: /* @__PURE__ */ new Map([["AZAffinity", "not yet implemented by cdkd"]]),
7249
+ sdkUnwired: /* @__PURE__ */ new Map(),
7122
7250
  createOnlyDrops: /* @__PURE__ */ new Set(),
7123
7251
  readOnly: /* @__PURE__ */ new Set(),
7124
7252
  primaryIdentifier: /* @__PURE__ */ new Set([
@@ -9972,6 +10100,12 @@ function getTopLevelKeysHoldingUnreadableCreateOnly(resourceType, properties) {
9972
10100
  for (const path of settledUnreadableCreateOnlyPaths.get(resourceType) ?? []) if (holdsValueAt(properties, path)) result.add(path[0]);
9973
10101
  return result;
9974
10102
  }
10103
+ const WRITE_ONLY_KEYS_KEPT_WHEN_OMITTED = /* @__PURE__ */ new Map([["AWS::Lambda::Function", /* @__PURE__ */ new Map([["Code", ["Architectures"]]])]]);
10104
+ function getWriteOnlyKeysKeptWhenOmitted(resourceType, properties, previousProperties) {
10105
+ const result = /* @__PURE__ */ new Set();
10106
+ for (const [key, travelsWith] of WRITE_ONLY_KEYS_KEPT_WHEN_OMITTED.get(resourceType) ?? []) if (travelsWith.every((k) => isDeepStrictEqual(properties[k], previousProperties[k]))) result.add(key);
10107
+ return result;
10108
+ }
9975
10109
  function getSettledWriteOnlyPropertyPaths(resourceType) {
9976
10110
  return settledWriteOnlyPaths.get(resourceType) ?? [];
9977
10111
  }
@@ -9993,6 +10127,109 @@ function parseRegistrySchema(resourceType, schema) {
9993
10127
  return parseJsonNamingNoBody(schema, "the DescribeType schema", (line) => getLogger().child("WriteOnlyProperties").debug(safeMsg`${resourceType}: ${line}`));
9994
10128
  }
9995
10129
 
10130
+ // src/provisioning/secret-physical-id.ts
10131
+ const APPSYNC_APIKEY_ARN_RESOURCE_PATH = /^apis\/([^/|]+)\/apikeys?\/([^/|]+)$/;
10132
+ const APPSYNC_ARN = /^arn:[^:]+:appsync:[^:]*:[^:]*:(.+)$/;
10133
+ const SECRET_PHYSICAL_ID_TYPES = /* @__PURE__ */ new Set(["AWS::AppSync::ApiKey", "AWS::CloudFormation::WaitConditionHandle"]);
10134
+ const SUBSTRING_FLOOR = 4;
10135
+ function maskedSecretSegment(segment) {
10136
+ return `****${segment.slice(-4)}`;
10137
+ }
10138
+ function secretPhysicalIdSegment(resourceType, physicalId) {
10139
+ if (typeof physicalId !== "string" || physicalId === "") return void 0;
10140
+ if (typeof resourceType !== "string" || !SECRET_PHYSICAL_ID_TYPES.has(resourceType)) return;
10141
+ if (resourceType === "AWS::CloudFormation::WaitConditionHandle") {
10142
+ const query = physicalId.indexOf("?");
10143
+ return query >= 0 && query < physicalId.length - 1 ? physicalId.slice(query + 1) : void 0;
10144
+ }
10145
+ if (resourceType !== "AWS::AppSync::ApiKey") return void 0;
10146
+ const parts = physicalId.split("|");
10147
+ if (parts.length === 2 && parts[0] !== "" && parts[1] !== "") return parts[1];
10148
+ const arn = APPSYNC_ARN.exec(physicalId);
10149
+ const path = arn ? APPSYNC_APIKEY_ARN_RESOURCE_PATH.exec(arn[1]) : null;
10150
+ if (path) return path[2];
10151
+ return physicalId;
10152
+ }
10153
+ function maskSegmentsInText(text, segments) {
10154
+ let out = text;
10155
+ for (const segment of segments) {
10156
+ if (out === segment) return maskedSecretSegment(segment);
10157
+ if (segment.length >= SUBSTRING_FLOOR && out.includes(segment)) out = out.split(segment).join(maskedSecretSegment(segment));
10158
+ }
10159
+ return out;
10160
+ }
10161
+ function displayPhysicalId(resourceType, physicalId) {
10162
+ const segment = secretPhysicalIdSegment(resourceType, physicalId);
10163
+ if (segment === void 0 || typeof physicalId !== "string") return physicalId;
10164
+ return maskSegmentsInText(physicalId, [segment]);
10165
+ }
10166
+ function maskSecretSegmentsDeep(value, segments) {
10167
+ if (segments.length === 0) return value;
10168
+ const ordered = [...new Set(segments)].sort((a, b) => b.length - a.length);
10169
+ const walk = (v) => {
10170
+ if (typeof v === "string") return maskSegmentsInText(v, ordered);
10171
+ if (Array.isArray(v)) return v.map(walk);
10172
+ if (v !== null && typeof v === "object") {
10173
+ const out = {};
10174
+ for (const [k, child] of Object.entries(v)) out[k] = walk(child);
10175
+ return out;
10176
+ }
10177
+ return v;
10178
+ };
10179
+ return walk(value);
10180
+ }
10181
+ function segmentOfRecord(record) {
10182
+ if (record === null || typeof record !== "object") return void 0;
10183
+ const r = record;
10184
+ return secretPhysicalIdSegment(r.resourceType, r.physicalId);
10185
+ }
10186
+ function stringLeavesOf(value, out = []) {
10187
+ if (typeof value === "string") out.push(value);
10188
+ else if (Array.isArray(value)) for (const v of value) stringLeavesOf(v, out);
10189
+ else if (value !== null && typeof value === "object") for (const v of Object.values(value)) stringLeavesOf(v, out);
10190
+ return out;
10191
+ }
10192
+ function secretNamedAttributeLeavesOf$1(record) {
10193
+ if (record === null || typeof record !== "object") return [];
10194
+ const r = record;
10195
+ if (r.resourceType !== "AWS::CloudFormation::Stack") return [];
10196
+ const names = r.secretNamedAttributes;
10197
+ const attributes = r.attributes;
10198
+ if (!Array.isArray(names) || attributes === null || typeof attributes !== "object") return [];
10199
+ const leaves = [];
10200
+ for (const name of names) {
10201
+ if (typeof name !== "string" || !Object.hasOwn(attributes, name)) continue;
10202
+ for (const leaf of stringLeavesOf(attributes[name])) if (leaf !== "" && leaf !== "***" && !leaf.includes("{{resolve:")) leaves.push(leaf);
10203
+ }
10204
+ return leaves;
10205
+ }
10206
+ function secretSegmentsOfState(state) {
10207
+ if (state === null || typeof state !== "object") return [];
10208
+ const s = state;
10209
+ const segments = [];
10210
+ const add = (record) => {
10211
+ const segment = segmentOfRecord(record);
10212
+ if (segment !== void 0) segments.push(segment);
10213
+ };
10214
+ if (s.resources !== null && typeof s.resources === "object" && !Array.isArray(s.resources)) for (const record of Object.values(s.resources)) {
10215
+ add(record);
10216
+ segments.push(...secretNamedAttributeLeavesOf$1(record));
10217
+ }
10218
+ for (const list of [s.orphans, s.supersededResources]) {
10219
+ if (!Array.isArray(list)) continue;
10220
+ for (const entry of list) {
10221
+ if (entry === null || typeof entry !== "object") continue;
10222
+ const record = entry.state;
10223
+ add(record);
10224
+ segments.push(...secretNamedAttributeLeavesOf$1(record));
10225
+ }
10226
+ }
10227
+ return segments;
10228
+ }
10229
+ function withSecretPhysicalIdsMaskedInState(state, segments = secretSegmentsOfState(state)) {
10230
+ return maskSecretSegmentsDeep(state, segments);
10231
+ }
10232
+
9996
10233
  // src/deployment/replacement-name-holder/name-keys.ts
9997
10234
  const flat = (property) => ({ name: [[property]] });
9998
10235
  function ownEntry$1(table, key) {
@@ -10521,7 +10758,7 @@ function reverseReplacementTrustsGeneratedName(resourceType) {
10521
10758
 
10522
10759
  // src/deployment/replacement-name-holder/holder.ts
10523
10760
  function recordSetHolds(requested, recorded, observed, newPhysicalId, r, v) {
10524
- const newRecord = `${v.holderRecord} (${r.shown(newPhysicalId)})`;
10761
+ const newRecord = `${v.holderRecord} (${r.shown(displayPhysicalId(RECORD_SET, newPhysicalId))})`;
10525
10762
  const wantName = valueAt$2(requested, ["Name"]);
10526
10763
  const wantType = valueAt$2(requested, ["Type"]);
10527
10764
  const haveName = heldAt(recorded, observed, ["Name"]).value;
@@ -10571,7 +10808,7 @@ function reverseReplacementNewHoldsName(input) {
10571
10808
  function holderVerdict$1(input, v) {
10572
10809
  const { oldResourceType, newResourceType, requested, recorded, observed, physicalId } = input;
10573
10810
  const r = renderer(input.mask ?? ((value) => value));
10574
- const newResource = `${v.holder} (${r.shown(physicalId)})`;
10811
+ const newResource = `${v.holder} (${r.shown(displayPhysicalId(newResourceType, physicalId))})`;
10575
10812
  if (oldResourceType !== newResourceType && !SHARED_NAME_SPACES.some((s) => s.has(oldResourceType) && s.has(newResourceType))) return unproven(`${newResource} is of type ${r.shown(newResourceType)}, which cdkd does not know to share a name space with ${r.shown(oldResourceType)}`);
10576
10813
  if (oldResourceType === "AWS::Route53::RecordSet") return recordSetHolds(requested, recorded, observed, physicalId, r, v);
10577
10814
  const oldKey = nameKeyFor(oldResourceType);
@@ -10646,13 +10883,13 @@ function replacementOldHoldsSentName(input) {
10646
10883
  mask: input.mask
10647
10884
  }, DEPLOY_VOICE);
10648
10885
  }
10649
- function renderNameHeldElsewhere(change) {
10886
+ function renderNameHeldElsewhere(change, oldResourceType) {
10650
10887
  const property = change.property;
10651
10888
  const desiredPlain = isPlainName(change.desiredName);
10652
10889
  const asksFor = desiredPlain ? `asks for ${property} "${change.desiredName}"` : `asks for a name (${property}) that is not a plain identifier`;
10653
10890
  const heldProperty = change.heldProperty ?? property;
10654
10891
  const held = change.heldName === void 0 ? `does not hold that name` : isPlainName(change.heldName) ? `holds ${heldProperty} "${change.heldName}"` : `holds a name (${heldProperty}) that is not a plain identifier`;
10655
- return `The replacement ${asksFor}, but ${change.physicalId === "" ? "the resource being replaced, which has no recorded id," : isPlainName(change.physicalId) ? `the resource being replaced (${change.physicalId})` : "the resource being replaced, whose recorded id is not a plain identifier,"} ${held} — so ${desiredPlain ? `"${change.desiredName}"` : "the requested name"} is held by ANOTHER existing resource, not by the one being replaced, and deleting the old resource first cannot free it`;
10892
+ return `The replacement ${asksFor}, but ${change.physicalId === "" ? "the resource being replaced, which has no recorded id," : isPlainName(change.physicalId) ? `the resource being replaced (${displayPhysicalId(oldResourceType, change.physicalId)})` : "the resource being replaced, whose recorded id is not a plain identifier,"} ${held} — so ${desiredPlain ? `"${change.desiredName}"` : "the requested name"} is held by ANOTHER existing resource, not by the one being replaced, and deleting the old resource first cannot free it`;
10656
10893
  }
10657
10894
  function isPlainName(value) {
10658
10895
  return !/\s/.test(value) && displayIdent(value, { maxCodePoints: 1152 }) === value;
@@ -10764,8 +11001,8 @@ function probeErrorMeansNameHeld(resourceType, error) {
10764
11001
  if (typeof e.name === "string" && S3_CREDENTIAL_ERRORS.has(e.name)) return false;
10765
11002
  return e.name === "Forbidden" || e.$metadata?.httpStatusCode === 403;
10766
11003
  }
10767
- function renderReplacementNameChange(change, createProps) {
10768
- if (change.property !== "EventBusName") return renderNameHeldElsewhere(change);
11004
+ function renderReplacementNameChange(change, createProps, oldResourceType) {
11005
+ if (change.property !== "EventBusName") return renderNameHeldElsewhere(change, oldResourceType);
10769
11006
  const name = createProps["Name"];
10770
11007
  const rule = typeof name === "string" && isPlainName(name) ? `rule "${name}"` : "the rule (by its Name)";
10771
11008
  const bus = (value, fallback) => value !== void 0 && isPlainName(value) ? `bus "${value}"` : fallback;
@@ -13318,7 +13555,7 @@ function healMaskedOwnIdAttribute(resolver, logicalId, resource, attributeName,
13318
13555
  // src/deployment/intrinsic-resolver/getatt-refusals.ts
13319
13556
  function refuseUnservedAttribute(resolver, site) {
13320
13557
  const { logicalId, attributeName, resourceType, physicalId, context, observed, remedy } = site;
13321
- throw new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, ${displayMasked(resolver, attributeName, context)}] for ${displayMasked(resolver, resourceType, context)}: ${observed}. The physical id ${quotedRender(displayMasked(resolver, physicalId, context), "\"")} is not a usable ${displayMasked(resolver, attributeName, context)}, so cdkd refuses to substitute it. ${remedy}`);
13558
+ throw new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, ${displayMasked(resolver, attributeName, context)}] for ${displayMasked(resolver, resourceType, context)}: ${observed}. The physical id ${quotedRender(displayMasked(resolver, displayPhysicalId(resourceType, physicalId), context), "\"")} is not a usable ${displayMasked(resolver, attributeName, context)}, so cdkd refuses to substitute it. ${remedy}`);
13322
13559
  }
13323
13560
  function refuseUnconstructibleAttribute(resolver, site) {
13324
13561
  const { logicalId, attributeName, resourceType, context, why, remedyWhenHealCompleted } = site;
@@ -13376,14 +13613,14 @@ function guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceT
13376
13613
  const expectsUrlShape = /(?:Url|URL)$/.test(attributeName) && !/^https?:\/\//.test(physicalId);
13377
13614
  if (expectsArnShape || expectsUrlShape) {
13378
13615
  const expectedShape = expectsArnShape ? "an ARN (arn:...)" : "a URL (http(s)://...)";
13379
- throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, ${displayMasked(resolver, attributeName, context)}] for ${loggedType}: ` + (recordMayBeStale ? `the state record holds no value for it, and the physical ID ` : `attributes are not enriched for this resource type, and the physical ID `) + `fallback ${quotedRender(displayMasked(resolver, physicalId, context), "\"")} is not ${expectedShape}. CloudFormation would return a different value here, so falling back to the physical ID would silently produce a wrong value (e.g. in stack Outputs). ` + (recordMayBeStale ? staleRecordRemedy(resolver, healOutcome, context) : unenrichedRemedy(resolver, resourceType, attributeName, healOutcome, context))));
13616
+ throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, ${displayMasked(resolver, attributeName, context)}] for ${loggedType}: ` + (recordMayBeStale ? `the state record holds no value for it, and the physical ID ` : `attributes are not enriched for this resource type, and the physical ID `) + `fallback ${quotedRender(displayMasked(resolver, displayPhysicalId(resourceType, physicalId), context), "\"")} is not ${expectedShape}. CloudFormation would return a different value here, so falling back to the physical ID would silently produce a wrong value (e.g. in stack Outputs). ` + (recordMayBeStale ? staleRecordRemedy(resolver, healOutcome, context) : unenrichedRemedy(resolver, resourceType, attributeName, healOutcome, context))));
13380
13617
  }
13381
- if (resolver.strictGetAtt) throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, ${displayMasked(resolver, attributeName, context)}] for ${loggedType}: ` + (recordMayBeStale ? `the state record holds no value for it, and --strict-getatt ` : `attributes are not enriched for this resource type, and --strict-getatt `) + `rejects the physical ID fallback ${quotedRender(displayMasked(resolver, physicalId, context), "\"")} (which may not be the value CloudFormation would return). Drop --strict-getatt to fall back with a warning. ` + (recordMayBeStale ? staleRecordRemedy(resolver, healOutcome, context) : unenrichedRemedy(resolver, resourceType, attributeName, healOutcome, context))));
13618
+ if (resolver.strictGetAtt) throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, ${displayMasked(resolver, attributeName, context)}] for ${loggedType}: ` + (recordMayBeStale ? `the state record holds no value for it, and --strict-getatt ` : `attributes are not enriched for this resource type, and --strict-getatt `) + `rejects the physical ID fallback ${quotedRender(displayMasked(resolver, displayPhysicalId(resourceType, physicalId), context), "\"")} (which may not be the value CloudFormation would return). Drop --strict-getatt to fall back with a warning. ` + (recordMayBeStale ? staleRecordRemedy(resolver, healOutcome, context) : unenrichedRemedy(resolver, resourceType, attributeName, healOutcome, context))));
13382
13619
  const topAttribute = attributeName.split(".")[0] ?? attributeName;
13383
13620
  const resources = context?.resources;
13384
13621
  const record = resources !== void 0 && Object.hasOwn(resources, logicalId) ? resources[logicalId] : void 0;
13385
13622
  const coverage = getPropertyCoverage(resourceType);
13386
- if (record?.provisionedBy !== "cc-api" && coverage?.readOnly.has(topAttribute) === true && !isPhysicalIdIdentifier(resourceType, coverage.primaryIdentifier, topAttribute) && !PHYSICAL_ID_ATTRIBUTES.has(`${resourceType}.${attributeName}`) && !(isOwnArnAttribute(resourceType, attributeName) && physicalId.startsWith("arn:"))) throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, ${displayMasked(resolver, attributeName, context)}] for ${loggedType}: ` + (recordMayBeStale ? `the state record holds no value for it, and its physical ID ` : healOutcome?.kind === "read" ? `the provider's re-read of the resource reports no value for it (one still creating has none yet), and its physical ID ` : `cdkd does not record it for this resource type, and its physical ID `) + `${quotedRender(displayMasked(resolver, physicalId, context), "\"")} is not the value CloudFormation returns, so serving it would silently produce a wrong value. ` + (recordMayBeStale ? staleRecordRemedy(resolver, healOutcome, context) : unenrichedRemedy(resolver, resourceType, attributeName, healOutcome, context))));
13623
+ if (record?.provisionedBy !== "cc-api" && coverage?.readOnly.has(topAttribute) === true && !isPhysicalIdIdentifier(resourceType, coverage.primaryIdentifier, topAttribute) && !PHYSICAL_ID_ATTRIBUTES.has(`${resourceType}.${attributeName}`) && !(isOwnArnAttribute(resourceType, attributeName) && physicalId.startsWith("arn:"))) throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, ${displayMasked(resolver, attributeName, context)}] for ${loggedType}: ` + (recordMayBeStale ? `the state record holds no value for it, and its physical ID ` : healOutcome?.kind === "read" ? `the provider's re-read of the resource reports no value for it (one still creating has none yet), and its physical ID ` : `cdkd does not record it for this resource type, and its physical ID `) + `${quotedRender(displayMasked(resolver, displayPhysicalId(resourceType, physicalId), context), "\"")} is not the value CloudFormation returns, so serving it would silently produce a wrong value. ` + (recordMayBeStale ? staleRecordRemedy(resolver, healOutcome, context) : unenrichedRemedy(resolver, resourceType, attributeName, healOutcome, context))));
13387
13624
  resolver.physicalIdFallbackCount++;
13388
13625
  if (recordMayBeStale) {
13389
13626
  resolver.logger.warn(`The state record for ${displayMasked(resolver, logicalId, context)} (${loggedType}) holds no ${displayMasked(resolver, attributeName, context)}, returning physical ID. ` + staleRecordRemedy(resolver, healOutcome, context));
@@ -13460,7 +13697,7 @@ async function constructAttributeForCoreTypes(resolver, resource, attributeName,
13460
13697
  case "Ipv6CidrBlocks": try {
13461
13698
  const ec2 = resolver.clients.clientsForRegion(resolver.explicitRegion).ec2;
13462
13699
  const maxAttempts = 15;
13463
- const loggedId = displayMasked(resolver, physicalId, context);
13700
+ const loggedId = displayMasked(resolver, displayPhysicalId(resourceType, physicalId), context);
13464
13701
  for (let attempt = 1; attempt <= maxAttempts; attempt++) {
13465
13702
  const associations = (await ec2.send(new DescribeVpcsCommand({ VpcIds: [physicalId] }))).Vpcs?.[0]?.Ipv6CidrBlockAssociationSet || [];
13466
13703
  const blocks = associations.filter((a) => a.Ipv6CidrBlockState?.State === "associated").map((a) => a.Ipv6CidrBlock);
@@ -13478,11 +13715,11 @@ async function constructAttributeForCoreTypes(resolver, resource, attributeName,
13478
13715
  resolver.logger.warn(`VPC ${loggedId} IPv6 CIDR did not reach 'associated' state after ${maxAttempts} attempts`);
13479
13716
  return [];
13480
13717
  } catch (error) {
13481
- resolver.logger.warn(`Failed to fetch VPC Ipv6CidrBlocks for ${displayMasked(resolver, physicalId, context)}: ${displayMasked(resolver, describeAwsFailure(error).detail, context)}`);
13718
+ resolver.logger.warn(`Failed to fetch VPC Ipv6CidrBlocks for ${displayMasked(resolver, displayPhysicalId(resourceType, physicalId), context)}: ${displayMasked(resolver, describeAwsFailure(error).detail, context)}`);
13482
13719
  return [];
13483
13720
  }
13484
13721
  case "DefaultSecurityGroup": {
13485
- if (!/^vpc-[0-9a-f]+$/.test(physicalId)) throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, DefaultSecurityGroup] for AWS::EC2::VPC: the state record's physical id ${quotedRender(displayMasked(resolver, physicalId, context).slice(0, 64), "\"")} is not a VPC id (vpc-<hex>), so cdkd will not use it as an EC2 filter value. Repair the record (cdkd import, or re-create the VPC) and deploy again.`));
13722
+ if (!/^vpc-[0-9a-f]+$/.test(physicalId)) throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, DefaultSecurityGroup] for AWS::EC2::VPC: the state record's physical id ${quotedRender(displayMasked(resolver, displayPhysicalId(resourceType, physicalId), context).slice(0, 64), "\"")} is not a VPC id (vpc-<hex>), so cdkd will not use it as an EC2 filter value. Repair the record (cdkd import, or re-create the VPC) and deploy again.`));
13486
13723
  const cachedGroupId = cachedVpcDefaultSecurityGroups[physicalId];
13487
13724
  if (cachedGroupId !== void 0) return cachedGroupId;
13488
13725
  let groupId;
@@ -13520,7 +13757,7 @@ async function constructAttributeForCoreTypes(resolver, resource, attributeName,
13520
13757
  });
13521
13758
  }
13522
13759
  case "DefaultNetworkAcl": {
13523
- if (!/^vpc-[0-9a-f]+$/.test(physicalId)) throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, DefaultNetworkAcl] for AWS::EC2::VPC: the state record's physical id ${quotedRender(displayMasked(resolver, physicalId, context).slice(0, 64), "\"")} is not a VPC id (vpc-<hex>), so cdkd will not use it as an EC2 filter value. Repair the record (cdkd import, or re-create the VPC) and deploy again.`));
13760
+ if (!/^vpc-[0-9a-f]+$/.test(physicalId)) throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, DefaultNetworkAcl] for AWS::EC2::VPC: the state record's physical id ${quotedRender(displayMasked(resolver, displayPhysicalId(resourceType, physicalId), context).slice(0, 64), "\"")} is not a VPC id (vpc-<hex>), so cdkd will not use it as an EC2 filter value. Repair the record (cdkd import, or re-create the VPC) and deploy again.`));
13524
13761
  let aclId;
13525
13762
  try {
13526
13763
  aclId = (await resolver.clients.clientsForRegion(resolver.explicitRegion).ec2.send(new DescribeNetworkAclsCommand({ Filters: [{
@@ -15093,107 +15330,6 @@ async function rebuildByToken(value, resolveToken) {
15093
15330
  return value;
15094
15331
  }
15095
15332
 
15096
- // src/provisioning/secret-physical-id.ts
15097
- const APPSYNC_APIKEY_ARN_RESOURCE_PATH = /^apis\/([^/|]+)\/apikeys?\/([^/|]+)$/;
15098
- const APPSYNC_ARN = /^arn:[^:]+:appsync:[^:]*:[^:]*:(.+)$/;
15099
- const SUBSTRING_FLOOR = 4;
15100
- function maskedSecretSegment(segment) {
15101
- return `****${segment.slice(-4)}`;
15102
- }
15103
- function secretPhysicalIdSegment(resourceType, physicalId) {
15104
- if (typeof physicalId !== "string" || physicalId === "") return void 0;
15105
- if (resourceType === "AWS::CloudFormation::WaitConditionHandle") {
15106
- const query = physicalId.indexOf("?");
15107
- return query >= 0 && query < physicalId.length - 1 ? physicalId.slice(query + 1) : void 0;
15108
- }
15109
- if (resourceType !== "AWS::AppSync::ApiKey") return void 0;
15110
- const parts = physicalId.split("|");
15111
- if (parts.length === 2 && parts[0] !== "" && parts[1] !== "") return parts[1];
15112
- const arn = APPSYNC_ARN.exec(physicalId);
15113
- const path = arn ? APPSYNC_APIKEY_ARN_RESOURCE_PATH.exec(arn[1]) : null;
15114
- if (path) return path[2];
15115
- return physicalId;
15116
- }
15117
- function maskSegmentsInText(text, segments) {
15118
- let out = text;
15119
- for (const segment of segments) {
15120
- if (out === segment) return maskedSecretSegment(segment);
15121
- if (segment.length >= SUBSTRING_FLOOR && out.includes(segment)) out = out.split(segment).join(maskedSecretSegment(segment));
15122
- }
15123
- return out;
15124
- }
15125
- function displayPhysicalId(resourceType, physicalId) {
15126
- const segment = secretPhysicalIdSegment(resourceType, physicalId);
15127
- if (segment === void 0 || typeof physicalId !== "string") return physicalId;
15128
- return maskSegmentsInText(physicalId, [segment]);
15129
- }
15130
- function maskSecretSegmentsDeep(value, segments) {
15131
- if (segments.length === 0) return value;
15132
- const ordered = [...new Set(segments)].sort((a, b) => b.length - a.length);
15133
- const walk = (v) => {
15134
- if (typeof v === "string") return maskSegmentsInText(v, ordered);
15135
- if (Array.isArray(v)) return v.map(walk);
15136
- if (v !== null && typeof v === "object") {
15137
- const out = {};
15138
- for (const [k, child] of Object.entries(v)) out[k] = walk(child);
15139
- return out;
15140
- }
15141
- return v;
15142
- };
15143
- return walk(value);
15144
- }
15145
- function segmentOfRecord(record) {
15146
- if (record === null || typeof record !== "object") return void 0;
15147
- const r = record;
15148
- return secretPhysicalIdSegment(r.resourceType, r.physicalId);
15149
- }
15150
- function stringLeavesOf(value, out = []) {
15151
- if (typeof value === "string") out.push(value);
15152
- else if (Array.isArray(value)) for (const v of value) stringLeavesOf(v, out);
15153
- else if (value !== null && typeof value === "object") for (const v of Object.values(value)) stringLeavesOf(v, out);
15154
- return out;
15155
- }
15156
- function secretNamedAttributeLeavesOf$1(record) {
15157
- if (record === null || typeof record !== "object") return [];
15158
- const r = record;
15159
- if (r.resourceType !== "AWS::CloudFormation::Stack") return [];
15160
- const names = r.secretNamedAttributes;
15161
- const attributes = r.attributes;
15162
- if (!Array.isArray(names) || attributes === null || typeof attributes !== "object") return [];
15163
- const leaves = [];
15164
- for (const name of names) {
15165
- if (typeof name !== "string" || !Object.hasOwn(attributes, name)) continue;
15166
- for (const leaf of stringLeavesOf(attributes[name])) if (leaf !== "" && leaf !== "***" && !leaf.includes("{{resolve:")) leaves.push(leaf);
15167
- }
15168
- return leaves;
15169
- }
15170
- function secretSegmentsOfState(state) {
15171
- if (state === null || typeof state !== "object") return [];
15172
- const s = state;
15173
- const segments = [];
15174
- const add = (record) => {
15175
- const segment = segmentOfRecord(record);
15176
- if (segment !== void 0) segments.push(segment);
15177
- };
15178
- if (s.resources !== null && typeof s.resources === "object" && !Array.isArray(s.resources)) for (const record of Object.values(s.resources)) {
15179
- add(record);
15180
- segments.push(...secretNamedAttributeLeavesOf$1(record));
15181
- }
15182
- for (const list of [s.orphans, s.supersededResources]) {
15183
- if (!Array.isArray(list)) continue;
15184
- for (const entry of list) {
15185
- if (entry === null || typeof entry !== "object") continue;
15186
- const record = entry.state;
15187
- add(record);
15188
- segments.push(...secretNamedAttributeLeavesOf$1(record));
15189
- }
15190
- }
15191
- return segments;
15192
- }
15193
- function withSecretPhysicalIdsMaskedInState(state, segments = secretSegmentsOfState(state)) {
15194
- return maskSecretSegmentsDeep(state, segments);
15195
- }
15196
-
15197
15333
  // src/deployment/intrinsic-resolver/getatt-construct-app.ts
15198
15334
  async function constructAttributeForAppTypes(resolver, resource, attributeName, context, logicalId, resourceType, physicalId, accountId, partition, region) {
15199
15335
  if (resourceType === "AWS::Events::Rule") switch (attributeName) {
@@ -15541,7 +15677,7 @@ async function constructAttributeForComputeTypes(resolver, attributeName, contex
15541
15677
  if (resourceType === "AWS::EC2::SecurityGroup") switch (attributeName) {
15542
15678
  case "GroupId": return physicalId;
15543
15679
  case "VpcId": {
15544
- if (!/^sg-[0-9a-f]+$/.test(physicalId)) throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, VpcId] for AWS::EC2::SecurityGroup: the state record's physical id ${quotedRender(displayMasked(resolver, physicalId, context).slice(0, 64), "\"")} is not a security group id (sg-<hex>), so cdkd will not look it up. Repair the record (cdkd import, or re-create the security group) and deploy again.`));
15680
+ if (!/^sg-[0-9a-f]+$/.test(physicalId)) throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, VpcId] for AWS::EC2::SecurityGroup: the state record's physical id ${quotedRender(displayMasked(resolver, displayPhysicalId(resourceType, physicalId), context).slice(0, 64), "\"")} is not a security group id (sg-<hex>), so cdkd will not look it up. Repair the record (cdkd import, or re-create the security group) and deploy again.`));
15545
15681
  const cachedVpcId = cachedSecurityGroupVpcIds[physicalId];
15546
15682
  if (cachedVpcId !== void 0) return cachedVpcId;
15547
15683
  let vpcId;
@@ -15722,7 +15858,7 @@ async function constructAttributeForComputeTypes(resolver, attributeName, contex
15722
15858
  const value = attributeName === "LatestVersionNumber" ? lt?.LatestVersionNumber : lt?.DefaultVersionNumber;
15723
15859
  if (value !== void 0 && value !== null) return String(value);
15724
15860
  } catch (err) {
15725
- resolver.logger.warn(`DescribeLaunchTemplates(${displayMasked(resolver, physicalId, context)}) failed for ${displayMasked(resolver, attributeName, context)}: ${displayMasked(resolver, describeAwsFailure(err).detail, context)}`);
15861
+ resolver.logger.warn(`DescribeLaunchTemplates(${displayMasked(resolver, displayPhysicalId(resourceType, physicalId), context)}) failed for ${displayMasked(resolver, attributeName, context)}: ${displayMasked(resolver, describeAwsFailure(err).detail, context)}`);
15726
15862
  }
15727
15863
  return attributeName === "LatestVersionNumber" ? "$Latest" : "$Default";
15728
15864
  }
@@ -15732,7 +15868,7 @@ async function constructAttributeForComputeTypes(resolver, attributeName, contex
15732
15868
  if (resourceType === "AWS::CloudFront::Distribution") switch (attributeName) {
15733
15869
  case "Id": return physicalId;
15734
15870
  case "DomainName": {
15735
- if (!/^[A-Z0-9]+$/.test(physicalId)) throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, DomainName] for AWS::CloudFront::Distribution: the state record's physical id ${quotedRender(displayMasked(resolver, physicalId, context).slice(0, 64), "\"")} is not a distribution id (upper-case alphanumerics), so cdkd will not look it up. Repair the record (cdkd import, or re-create the distribution) and deploy again.`));
15871
+ if (!/^[A-Z0-9]+$/.test(physicalId)) throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, DomainName] for AWS::CloudFront::Distribution: the state record's physical id ${quotedRender(displayMasked(resolver, displayPhysicalId(resourceType, physicalId), context).slice(0, 64), "\"")} is not a distribution id (upper-case alphanumerics), so cdkd will not look it up. Repair the record (cdkd import, or re-create the distribution) and deploy again.`));
15736
15872
  const cachedDomainName = cachedCloudFrontDomainNames[physicalId];
15737
15873
  if (cachedDomainName !== void 0) return cachedDomainName;
15738
15874
  let domainName;
@@ -15769,7 +15905,7 @@ async function constructAttributeForComputeTypes(resolver, attributeName, contex
15769
15905
  if (attributeName === "VpcId") {
15770
15906
  if (context.staleAttributeHeal?.phase === "probe") throw new StaleAttributeMissSignal();
15771
15907
  const vpcIdHealOutcome = context.staleAttributeHeal?.phase === "settled" ? context.staleAttributeHeal.outcome : void 0;
15772
- throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, ${displayMasked(resolver, attributeName, context)}] for ${resourceType}: the state record holds no VpcId for it (the read-back that would have recorded it reported none), and the physical id ${quotedRender(displayMasked(resolver, physicalId, context), "\"")} is a name, not a VPC id, so cdkd refuses to substitute it. ${staleRecordRemedy(resolver, vpcIdHealOutcome, context)} Referencing the VPC directly also works.`));
15908
+ throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, ${displayMasked(resolver, attributeName, context)}] for ${resourceType}: the state record holds no VpcId for it (the read-back that would have recorded it reported none), and the physical id ${quotedRender(displayMasked(resolver, displayPhysicalId(resourceType, physicalId), context), "\"")} is a name, not a VPC id, so cdkd refuses to substitute it. ${staleRecordRemedy(resolver, vpcIdHealOutcome, context)} Referencing the VPC directly also works.`));
15773
15909
  }
15774
15910
  return guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceType, physicalId, context);
15775
15911
  }
@@ -15787,7 +15923,7 @@ const subnetIpv6AttributeWait = {
15787
15923
  };
15788
15924
  async function readSubnetAttributeLive(resolver, attributeName, context, logicalId, physicalId) {
15789
15925
  const resourceType = "AWS::EC2::Subnet";
15790
- if (!/^subnet-[0-9a-f]+$/.test(physicalId)) throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, ${displayMasked(resolver, attributeName, context)}] for AWS::EC2::Subnet: the state record's physical id ${quotedRender(displayMasked(resolver, physicalId, context).slice(0, 64), "\"")} is not a subnet id (subnet-<hex>), so cdkd will not look it up. Repair the record (cdkd import, or re-create the subnet) and deploy again.`));
15926
+ if (!/^subnet-[0-9a-f]+$/.test(physicalId)) throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Fn::GetAtt [${displayMasked(resolver, logicalId, context)}, ${displayMasked(resolver, attributeName, context)}] for AWS::EC2::Subnet: the state record's physical id ${quotedRender(displayMasked(resolver, displayPhysicalId(resourceType, physicalId), context).slice(0, 64), "\"")} is not a subnet id (subnet-<hex>), so cdkd will not look it up. Repair the record (cdkd import, or re-create the subnet) and deploy again.`));
15791
15927
  const ec2 = resolver.clients.clientsForRegion(resolver.explicitRegion).ec2;
15792
15928
  const refuse = (observed, remedy) => refuseUnservedAttribute(resolver, {
15793
15929
  logicalId,
@@ -15820,7 +15956,7 @@ async function readSubnetAttributeLive(resolver, attributeName, context, logical
15820
15956
  };
15821
15957
  const notFound = () => refuse("DescribeSubnets returned no subnet for it", `Check that the subnet still exists in this region, or repair the record with ${cdkdRemedy("cdkd import")}.`);
15822
15958
  if (attributeName === "Ipv6CidrBlocks") {
15823
- const loggedId = displayMasked(resolver, physicalId, context);
15959
+ const loggedId = displayMasked(resolver, displayPhysicalId(resourceType, physicalId), context);
15824
15960
  const { attempts, delayMs } = subnetIpv6AttributeWait;
15825
15961
  for (let attempt = 1; attempt <= attempts; attempt++) {
15826
15962
  const associations = (await describe() ?? notFound()).Ipv6CidrBlockAssociationSet ?? [];
@@ -19001,9 +19137,10 @@ async function updateInIdLogScope(logicalId, physicalId, resourceType, propertie
19001
19137
  const writeOnlyProperties = await getTopLevelWriteOnlyProperties(resourceType);
19002
19138
  if (writeOnlyProperties.size > 0) {
19003
19139
  const keptOnPreviousSide = getTopLevelKeysHoldingUnreadableCreateOnly(resourceType, cleanProperties);
19140
+ const keptWhenOmitted = getWriteOnlyKeysKeptWhenOmitted(resourceType, cleanProperties, cleanPreviousProperties);
19004
19141
  const previousWithoutWriteOnly = { ...cleanPreviousProperties };
19005
19142
  for (const propertyName of writeOnlyProperties) {
19006
- if (keptOnPreviousSide.has(propertyName) && isDeepStrictEqual(cleanPreviousProperties[propertyName], cleanProperties[propertyName])) continue;
19143
+ if ((keptOnPreviousSide.has(propertyName) || keptWhenOmitted.has(propertyName)) && isDeepStrictEqual(cleanPreviousProperties[propertyName], cleanProperties[propertyName])) continue;
19007
19144
  delete previousWithoutWriteOnly[propertyName];
19008
19145
  }
19009
19146
  patch = this.patchGenerator.generatePatch(previousWithoutWriteOnly, cleanProperties);
@@ -20252,7 +20389,7 @@ async function deleteInIdLogScope(logicalId, physicalId, resourceType, propertie
20252
20389
  const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
20253
20390
  if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
20254
20391
  this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
20255
- const { ASGProvider } = await import("./asg-provider-fEPlW1VD.js");
20392
+ const { ASGProvider } = await import("./asg-provider-D-wGQIgg.js");
20256
20393
  const delegateRegion = ambientRegion();
20257
20394
  let asgProvider = this.asgDeleteDelegates.get(delegateRegion);
20258
20395
  if (asgProvider === void 0) {
@@ -20407,7 +20544,7 @@ async function sdkDeleteDelegateInCcRegion(resourceType, logicalId, physicalId)
20407
20544
  const family = SDK_DELETE_FAMILIES.get(resourceType);
20408
20545
  const cached = this.sdkDeleteDelegates.get(family);
20409
20546
  if (cached !== void 0 && cached.region === ccRegion) return cached.provider;
20410
- const provider = family === "rds" ? new (await (import("./rds-provider-6MbfXMoG.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-B6VK2Cbj.js"))).NeptuneProvider({ region: ccRegion });
20547
+ const provider = family === "rds" ? new (await (import("./rds-provider-X8pB7V-7.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-ClN-LvMb.js"))).NeptuneProvider({ region: ccRegion });
20411
20548
  this.sdkDeleteDelegates.set(family, {
20412
20549
  region: ccRegion,
20413
20550
  provider
@@ -22983,7 +23120,7 @@ async function publishToSns(topicArn, request) {
22983
23120
  }
22984
23121
  async function invokeLambda(serviceToken, request) {
22985
23122
  if (localCustomResourceRuntimeActive()) {
22986
- const { invokeCustomResourceFunctionLocally } = await import("./custom-resource-runtime-DWIcvRGQ.js");
23123
+ const { invokeCustomResourceFunctionLocally } = await import("./custom-resource-runtime-BDRipTIL.js");
22987
23124
  const local = await invokeCustomResourceFunctionLocally({
22988
23125
  lambda: this.lambdaClient,
22989
23126
  s3: this.s3Client
@@ -23501,6 +23638,9 @@ async function listSignalVersions(client, bucket, key, owner) {
23501
23638
  const SIGNAL_URL_EXPIRES_IN_SECONDS = 43200;
23502
23639
  const MAX_SIGNAL_BYTES = 65536;
23503
23640
  const SIGNAL_KEY = new RegExp(`^${WAIT_CONDITION_SIGNAL_PREFIX}/[A-Za-z0-9]{1,255}-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\.json$`);
23641
+ function isSignalKey(key) {
23642
+ return SIGNAL_KEY.test(key);
23643
+ }
23504
23644
  function signalKeyFor(logicalId) {
23505
23645
  return `${WAIT_CONDITION_SIGNAL_PREFIX}/${logicalId}-${randomUUID()}.json`;
23506
23646
  }
@@ -23656,27 +23796,31 @@ var WaitConditionSignalStore = class {
23656
23796
  }
23657
23797
  async deleteSignals(key) {
23658
23798
  try {
23659
- const bucket = this.requireBucket();
23660
- const client = await this.client();
23661
- const owner = await expectedOwnerParam(client);
23662
- const deleted = await client.send(new DeleteObjectCommand({
23663
- Bucket: bucket,
23664
- Key: key,
23665
- ...owner
23666
- }));
23667
- await purgeNoncurrentKeyVersions(client, bucket, [key], { requestFields: owner });
23668
- if (deleted.DeleteMarker === true && typeof deleted.VersionId === "string") await client.send(new DeleteObjectCommand({
23669
- Bucket: bucket,
23670
- Key: key,
23671
- VersionId: deleted.VersionId,
23672
- ...owner
23673
- }));
23799
+ await this.removeSignalObjects(key);
23674
23800
  } catch (error) {
23675
23801
  const failure = describeAwsFailure(error);
23676
23802
  this.logger.warn(safeMsg`Could not remove the wait condition signal object ${key}: ${failure.summary}`);
23677
23803
  this.logger.debug(safeMsg`Signal object delete failure detail: ${failure.detail}`);
23678
23804
  }
23679
23805
  }
23806
+ async removeSignalObjects(key) {
23807
+ if (!isSignalKey(key)) throw new Error("Refusing to delete a key that is not a wait condition signal key.");
23808
+ const bucket = this.requireBucket();
23809
+ const client = await this.client();
23810
+ const owner = await expectedOwnerParam(client);
23811
+ const deleted = await client.send(new DeleteObjectCommand({
23812
+ Bucket: bucket,
23813
+ Key: key,
23814
+ ...owner
23815
+ }));
23816
+ await purgeNoncurrentKeyVersions(client, bucket, [key], { requestFields: owner });
23817
+ if (deleted.DeleteMarker === true && typeof deleted.VersionId === "string") await client.send(new DeleteObjectCommand({
23818
+ Bucket: bucket,
23819
+ Key: key,
23820
+ VersionId: deleted.VersionId,
23821
+ ...owner
23822
+ }));
23823
+ }
23680
23824
  };
23681
23825
 
23682
23826
  // src/provisioning/provider-registry/routing.ts
@@ -26705,6 +26849,77 @@ function lambdaPermissionMatchesDeclared(read, declared) {
26705
26849
  });
26706
26850
  }
26707
26851
 
26852
+ // src/deployment/stack-records-scope.ts
26853
+ const verifiedIdentityCaches = /* @__PURE__ */ new WeakMap();
26854
+ function verifiedIdentityCache(view) {
26855
+ const key = view?.runKey;
26856
+ if (key === void 0) return void 0;
26857
+ let cache = verifiedIdentityCaches.get(key);
26858
+ if (cache === void 0) {
26859
+ cache = /* @__PURE__ */ new Map();
26860
+ verifiedIdentityCaches.set(key, cache);
26861
+ }
26862
+ return cache;
26863
+ }
26864
+ async function awaitInFlightSibling(view, self, sibling) {
26865
+ const waiting = view.waiting;
26866
+ if (waiting === void 0 || waiting.has(sibling.logicalId)) return void 0;
26867
+ waiting.add(self);
26868
+ try {
26869
+ return await sibling.settled;
26870
+ } finally {
26871
+ waiting.delete(self);
26872
+ }
26873
+ }
26874
+ const stackRecordsStore = new AsyncLocalStorage();
26875
+ function withStackRecords(view, fn) {
26876
+ return stackRecordsStore.run(view, fn);
26877
+ }
26878
+ function getStackRecords() {
26879
+ return stackRecordsStore.getStore();
26880
+ }
26881
+ function deployStackRecordsView(records, before, deleting, unsettled = () => false, inFlight, writtenFresh) {
26882
+ const settled = () => Object.entries(records).filter(([lid]) => !unsettled(lid));
26883
+ return {
26884
+ ...inFlight && {
26885
+ inFlight,
26886
+ waiting: /* @__PURE__ */ new Set()
26887
+ },
26888
+ ...writtenFresh && { writtenFreshThisRun: writtenFresh },
26889
+ runKey: {},
26890
+ live: settled,
26891
+ survivors: () => [...settled().filter(([lid]) => !deleting.has(lid)), ...Object.entries(before).filter(([lid, record]) => deleting.has(lid) && shouldRetainResource(record.deletionPolicy))]
26892
+ };
26893
+ }
26894
+ function destroyStackRecordsView(records) {
26895
+ return {
26896
+ runKey: records,
26897
+ live: () => Object.entries(records),
26898
+ survivors: () => Object.entries(records).filter(([, record]) => shouldRetainResource(record.deletionPolicy))
26899
+ };
26900
+ }
26901
+ function replayStackRecordsView(records, orphanLogicalIds = /* @__PURE__ */ new Set()) {
26902
+ const kept = Object.entries(records).filter(([lid, record]) => record.deletionPolicy === "Retain" || orphanLogicalIds.has(lid));
26903
+ return {
26904
+ runKey: records,
26905
+ live: () => Object.entries(records),
26906
+ survivors: () => [...Object.entries(records), ...kept.filter(([lid]) => !Object.hasOwn(records, lid))]
26907
+ };
26908
+ }
26909
+ const REVERT_VIEW_RECORD_TYPES = /* @__PURE__ */ new Set([
26910
+ "AWS::IAM::Role",
26911
+ "AWS::IAM::Group",
26912
+ "AWS::IAM::User"
26913
+ ]);
26914
+ function revertStackRecordsView(records) {
26915
+ const principals = () => Object.entries(records).filter(([, record]) => REVERT_VIEW_RECORD_TYPES.has(record.resourceType));
26916
+ return {
26917
+ runKey: records,
26918
+ live: principals,
26919
+ survivors: principals
26920
+ };
26921
+ }
26922
+
26708
26923
  // src/provisioning/iam-sibling-managed-policies.ts
26709
26924
  const ATTACHMENT_FIELD = {
26710
26925
  "AWS::IAM::Role": "Roles",
@@ -27556,7 +27771,7 @@ async function ccRoutedInstanceTakesNoSnapshot(input) {
27556
27771
  if (resourceType !== "AWS::RDS::DBInstance") return false;
27557
27772
  if (region === void 0 || region === "") return false;
27558
27773
  const mask = input.mask ?? ((text) => text);
27559
- const { describeDBInstanceInRegion, isLiveReadReplica } = await import("./read-replica-Zx5KMOal.js").then((n) => n.l);
27774
+ const { describeDBInstanceInRegion, isLiveReadReplica } = await import("./read-replica-B9F3-d8h.js").then((n) => n.l);
27560
27775
  let reason;
27561
27776
  try {
27562
27777
  const live = await describeDBInstanceInRegion(physicalId, region);
@@ -27696,7 +27911,7 @@ function throwIfDeleteSkipped(result, logicalId, physicalId, duringClause, guard
27696
27911
  recordRollbackDeleteGuards(result, logicalId, physicalId, guardScope);
27697
27912
  const reason = deleteSkipReason(result);
27698
27913
  if (reason === void 0) return;
27699
- throw new Error(deleteSkippedMessage(logicalId, physicalId, reason, duringClause));
27914
+ throw new Error(deleteSkippedMessage(logicalId, displayPhysicalId(guardScope.resourceType, physicalId), reason, duringClause));
27700
27915
  }
27701
27916
  function recordRollbackDeleteGuards(result, logicalId, physicalId, scope) {
27702
27917
  for (const guard of deleteIndeterminateGuards(result)) scope.ctx.recordEvent?.({
@@ -27907,12 +28122,12 @@ function replayPrefixScope(input, logger, mask, restoring) {
27907
28122
  const rendered = displayIdent(masked);
27908
28123
  return rendered === masked ? `"${masked}"` : rendered;
27909
28124
  };
27910
- if (choice.kind === "reproduced" && choice.skipPrefix !== choice.recorded) logger.info(mask(` Rollback: ${restoring ? "re-creating" : "reverting"} ${subject} under the user-supplied-name prefix setting that created ` + (withheld ? `it (its physical id is withheld, as its name is secret-derived): ` : `${shown(input.physicalId)} (`) + `stack-name prefix ${setting(choice.skipPrefix)}; the failed deploy ran with it ${setting(choice.recorded)}${withheld ? "" : ")"}`));
28125
+ if (choice.kind === "reproduced" && choice.skipPrefix !== choice.recorded) logger.info(mask(` Rollback: ${restoring ? "re-creating" : "reverting"} ${subject} under the user-supplied-name prefix setting that created ` + (withheld ? `it (its physical id is withheld, as its name is secret-derived): ` : `${shown(displayPhysicalId(input.resourceType, input.physicalId))} (`) + `stack-name prefix ${setting(choice.skipPrefix)}; the failed deploy ran with it ${setting(choice.recorded)}${withheld ? "" : ")"}`));
27911
28126
  else if (choice.kind === "unreproduced" && restoring) {
27912
28127
  const idUnreadable = typeof input.physicalId !== "string" || input.physicalId === "";
27913
28128
  const prop = safe(choice.property);
27914
28129
  const unreadable = declared === void 0 ? idUnreadable ? `its ${prop} or its physical id` : `its ${prop}` : idUnreadable ? `its physical id` : void 0;
27915
- logger.warn(mask(` ⚠ ${subject}: cdkd cannot tell which user-supplied-name prefix setting created the old resource (` + (withheld ? `its physical id is withheld, as its name is secret-derived or unreadable` : shown(input.physicalId)) + `) — ` + (choice.names === void 0 ? unreadable !== void 0 ? `cdkd cannot read ${unreadable} to compare` : `cdkd cannot derive the names its ${prop} takes to compare` : secretDerived ? `its ${prop} is secret-derived, and neither name it derives matches` : `its ${prop} derives to ${quoted(choice.names.skipped)} (prefix skipped) or ${quoted(choice.names.kept)} (prefix kept), and it is neither`) + `; re-creating it with the stack-name prefix ${setting(choice.skipPrefix)}, as the failed deploy ran, so it may come back under a different physical name.`));
28130
+ logger.warn(mask(` ⚠ ${subject}: cdkd cannot tell which user-supplied-name prefix setting created the old resource (` + (withheld ? `its physical id is withheld, as its name is secret-derived or unreadable` : shown(displayPhysicalId(input.resourceType, input.physicalId))) + `) — ` + (choice.names === void 0 ? unreadable !== void 0 ? `cdkd cannot read ${unreadable} to compare` : `cdkd cannot derive the names its ${prop} takes to compare` : secretDerived ? `its ${prop} is secret-derived, and neither name it derives matches` : `its ${prop} derives to ${quoted(choice.names.skipped)} (prefix skipped) or ${quoted(choice.names.kept)} (prefix kept), and it is neither`) + `; re-creating it with the stack-name prefix ${setting(choice.skipPrefix)}, as the failed deploy ran, so it may come back under a different physical name.`));
27916
28131
  }
27917
28132
  const skip = choice.skipPrefix;
27918
28133
  return (fn) => withSkipPrefix(skip, () => inGeneration(fn));
@@ -28350,7 +28565,7 @@ async function readRecordAttributes(input) {
28350
28565
  knownPhysicalId: physicalId
28351
28566
  });
28352
28567
  if (found === null) return { kind: "not-found" };
28353
- if (found.physicalId !== physicalId) throw new Error(`the provider answered for a different resource (${found.physicalId}) than the one asked about (${physicalId})`);
28568
+ if (found.physicalId !== physicalId) throw new Error(`the provider answered for a different resource (${displayPhysicalId(resource.resourceType, found.physicalId)}) than the one asked about (${displayPhysicalId(resource.resourceType, physicalId)})`);
28354
28569
  if (flipped) assertSdkReadMatchesCcId(resource, logicalId, found.attributes ?? {});
28355
28570
  const reported = Object.entries(normalizeHealedAttributes(found.attributes));
28356
28571
  const attributes = Object.fromEntries(reported.filter(([, value]) => !carriesSecretMask(value)));
@@ -29252,7 +29467,7 @@ async function replaceDeleteFirstAndRecreate(run, deps, logicalId, resourceType,
29252
29467
  }));
29253
29468
  } catch (deleteError) {
29254
29469
  const shownSecrets = unionOfSecretBags([secrets, printingSecretsFor(deps.secretsRun(), logicalId)]);
29255
- const deleteText = fallbackFailureText(deps, deleteError, shownSecrets, (failure) => safeMsg`Failed to delete old resource ${maskSecretsInText(logicalId, shownSecrets)} ` + safeMsg`(${maskSecretsInText(currentResource.physicalId, shownSecrets)}) ` + `during the --replace delete-first fallback: ` + safeMsg`${asIsMessage(failure)}`);
29470
+ const deleteText = fallbackFailureText(deps, deleteError, shownSecrets, (failure) => safeMsg`Failed to delete old resource ${maskSecretsInText(logicalId, shownSecrets)} ` + safeMsg`(${maskSecretsInText(String(displayPhysicalId(currentResource.resourceType, currentResource.physicalId)), shownSecrets)}) ` + `during the --replace delete-first fallback: ` + safeMsg`${asIsMessage(failure)}`);
29256
29471
  throw stampRedacted$1(new Error(deleteText.message, { cause: deleteError instanceof Error ? maskSecretsInError(deleteError, secrets) : void 0 }), deleteText.redacted);
29257
29472
  }
29258
29473
  reportDeleteGuards(deleteResult, {
@@ -29261,7 +29476,7 @@ async function replaceDeleteFirstAndRecreate(run, deps, logicalId, resourceType,
29261
29476
  provisionedBy: oldDeleteProvisionedBy
29262
29477
  });
29263
29478
  const replaceSkipReason = deleteSkipReason(deleteResult);
29264
- if (replaceSkipReason !== void 0) throw new Error(deleteSkippedMessage(logicalId, currentResource.physicalId, replaceSkipReason, "during the --replace delete-first fallback"));
29479
+ if (replaceSkipReason !== void 0) throw new Error(deleteSkippedMessage(logicalId, displayPhysicalId(currentResource.resourceType, currentResource.physicalId), replaceSkipReason, "during the --replace delete-first fallback"));
29265
29480
  deps.logger.info(safeMsg` ${green("✓")} Old resource deleted`);
29266
29481
  run.oldDeletedBeforeCreate.add(logicalId);
29267
29482
  await oldDeleteProvider.waitForNameReleased?.(logicalId, currentResource.physicalId, oldResourceType, {
@@ -29281,7 +29496,7 @@ async function replaceDeleteFirstAndRecreate(run, deps, logicalId, resourceType,
29281
29496
  });
29282
29497
  } catch (recreateError) {
29283
29498
  const shownSecrets = unionOfSecretBags([secrets, printingSecretsFor(deps.secretsRun(), logicalId)]);
29284
- const recreateText = fallbackFailureText(deps, recreateError, shownSecrets, (failure) => safeMsg`Failed to re-create ${maskSecretsInText(logicalId, shownSecrets)} after the ` + safeMsg`--replace delete-first fallback already deleted the old resource (${maskSecretsInText(currentResource.physicalId, shownSecrets)}). ` + safeMsg`Re-run the deploy to create it fresh. Cause: ${asIsMessage(failure)}`);
29499
+ const recreateText = fallbackFailureText(deps, recreateError, shownSecrets, (failure) => safeMsg`Failed to re-create ${maskSecretsInText(logicalId, shownSecrets)} after the ` + safeMsg`--replace delete-first fallback already deleted the old resource (${maskSecretsInText(String(displayPhysicalId(currentResource.resourceType, currentResource.physicalId)), shownSecrets)}). ` + safeMsg`Re-run the deploy to create it fresh. Cause: ${asIsMessage(failure)}`);
29285
29500
  throw stampRedacted$1(new Error(recreateText.message, { cause: recreateError instanceof Error ? maskSecretsInError(recreateError, secrets) : void 0 }), recreateText.redacted);
29286
29501
  }
29287
29502
  }
@@ -29388,24 +29603,25 @@ async function checkedReplacementNameChange(deps, input) {
29388
29603
  if (found === null) return change;
29389
29604
  if (!typeChanged && probeFoundSameId(resourceType, found.physicalId, currentResource.physicalId)) return;
29390
29605
  const remedy = (await deps.rollbackRetainedCopies?.(input.stackName).catch(() => []) ?? []).some((copy) => copy.logicalId === logicalId && copy.resourceType === resourceType && probeFoundSameId(resourceType, copy.physicalId, found.physicalId)) ? `This stack's event history records that a rolled-back deploy kept ${displaySafe(logicalId)}'s replacement under this name because of UpdateReplacePolicy: Retain, as CloudFormation also does, untracked by cdkd. If the holder is that copy and you no longer need it, delete it; otherwise choose another name.` : `Choose a name no other resource holds, or delete the resource holding it if it is yours.`;
29391
- throw markNonRetryable(new CdkdError(maskName(`${subject} requires replacement, and another existing resource (${displaySafe(found.physicalId)}) already holds the name it asks for. ${renderReplacementNameChange(change, input.createProps)}. Since ${adoptsText}, creating the replacement would take that resource over and record it as this stack's. Nothing was created or deleted. ${remedy}`), "NAMED_REPLACEMENT_COLLISION"));
29606
+ throw markNonRetryable(new CdkdError(maskName(`${subject} requires replacement, and another existing resource (${displaySafe(displayPhysicalId(resourceType, found.physicalId))}) already holds the name it asks for. ${renderReplacementNameChange(change, input.createProps, input.oldResourceType)}. Since ${adoptsText}, creating the replacement would take that resource over and record it as this stack's. Nothing was created or deleted. ${remedy}`), "NAMED_REPLACEMENT_COLLISION"));
29392
29607
  }
29393
29608
 
29394
29609
  // src/deployment/deploy-engine/name-collision.ts
29395
- function replacementNameOrigin(logicalId, physicalId) {
29610
+ function replacementNameOrigin(logicalId, physicalId, resourceType) {
29611
+ const shownId = displayPhysicalId(resourceType, physicalId);
29396
29612
  if (looksLikeCdkdGeneratedName(physicalId, logicalId, getCurrentStackName(), getCurrentStackInstanceId())) return {
29397
- descriptor: `The physical name (${physicalId}) was GENERATED by cdkd from the construct's logical id rather than declared in your template, and that derivation has no random component — so the new resource asks for exactly the name the existing one still holds`,
29613
+ descriptor: `The physical name (${shownId}) was GENERATED by cdkd from the construct's logical id rather than declared in your template, and that derivation has no random component — so the new resource asks for exactly the name the existing one still holds`,
29398
29614
  remedy: "Either give the resource an explicit physical name in your CDK code, or rename the CONSTRUCT (its id feeds the generated name — note that this replaces the resource rather than renaming it in place)"
29399
29615
  };
29400
29616
  return {
29401
- descriptor: `The resource has a user-supplied physical name (${physicalId})`,
29617
+ descriptor: `The resource has a user-supplied physical name (${shownId})`,
29402
29618
  remedy: "Either rename the resource in your CDK code (a fresh name lets the safe create-first order proceed)"
29403
29619
  };
29404
29620
  }
29405
29621
  function generatedReplacementHolderAdvice(input) {
29406
29622
  if (input.change?.generated !== true) return "";
29407
29623
  const name = displaySafe(input.mask(input.change.desiredName), { asciiOnly: true });
29408
- const old = displaySafe(input.mask(input.oldPhysicalId), { asciiOnly: true });
29624
+ const old = displaySafe(input.mask(String(displayPhysicalId(input.oldResourceType, input.oldPhysicalId))), { asciiOnly: true });
29409
29625
  const lead = ` The colliding name ${isInertUnquoted(name) ? name : "the generated name"} is the one this replacement generates for its next name generation, so its holder is most likely the new resource an interrupted earlier attempt of this replacement created. If it is, `;
29410
29626
  const tail = `, or delete it and re-run the deploy.`;
29411
29627
  if (input.stackName.includes("~")) return lead + `adopt it through the top-level stack with ${proseQuoted(cdkdRemedy("cdkd import"), "`")} (then delete ${old} by hand)` + tail;
@@ -29430,7 +29646,7 @@ function orphanedNameCollisionAdvice(providerRegistry, changeType, logicalId, er
29430
29646
  const stackName = getCurrentStackName();
29431
29647
  if (!looksLikeCdkdGeneratedName(physicalId, logicalId, stackName, getCurrentStackInstanceId())) return;
29432
29648
  if (!stackName) return void 0;
29433
- const safeId = displaySafe(physicalId, { asciiOnly: true });
29649
+ const safeId = displaySafe(displayPhysicalId(error.resourceType, physicalId), { asciiOnly: true });
29434
29650
  const safeStack = displaySafe(stackName, { asciiOnly: true });
29435
29651
  const safeLogicalId = displaySafe(logicalId, { asciiOnly: true });
29436
29652
  const idShown = isInertUnquoted(safeId);
@@ -29538,7 +29754,8 @@ function findNestedStackTypeChanges(input) {
29538
29754
  }
29539
29755
  function renderNestedStackTypeChangeRefusal(typeChanges, stackName) {
29540
29756
  const rows = typeChanges.map((tc) => {
29541
- return `${` - ${tc.logicalId}: Type changes from ${tc.currentType} to ${tc.desiredType} (the existing ${tc.currentType} is ${tc.physicalId}).`}\n${tc.direction === "into-nested-stack" ? ` Replacing a single resource BY a nested stack is not supported: the create half of the replacement would deploy a whole child stack "${stackName}~${tc.logicalId}" as one row, while ${tc.physicalId} is still recorded under this logical id.` : ` Replacing a nested stack BY a single resource is not supported: a replacement deletes its old half as a best-effort cleanup step whose failure is only a warning, so the child stack "${stackName}~${tc.logicalId}" and every resource it owns could be left behind, untracked, under a deploy that reports success.`}`;
29757
+ const shownId = displayPhysicalId(tc.currentType, tc.physicalId);
29758
+ return `${` - ${tc.logicalId}: Type changes from ${tc.currentType} to ${tc.desiredType} (the existing ${tc.currentType} is ${shownId}).`}\n${tc.direction === "into-nested-stack" ? ` Replacing a single resource BY a nested stack is not supported: the create half of the replacement would deploy a whole child stack "${stackName}~${tc.logicalId}" as one row, while ${shownId} is still recorded under this logical id.` : ` Replacing a nested stack BY a single resource is not supported: a replacement deletes its old half as a best-effort cleanup step whose failure is only a warning, so the child stack "${stackName}~${tc.logicalId}" and every resource it owns could be left behind, untracked, under a deploy that reports success.`}`;
29542
29759
  });
29543
29760
  return `Refusing to deploy ${stackName}: ` + (typeChanges.length === 1 ? `a resource changes its Type ` : `${typeChanges.length} resources change their Type `) + `into or out of ${NESTED_STACK_RESOURCE_TYPE}, which cdkd does not replace in place.\n${rows.join("\n")}\n Deploy this as two changes instead: give the new resource a DIFFERENT logical id (in CDK, rename the construct) so the existing row is deleted through its own type's provider and the new one is created under its own — or remove the resource in one deploy and add its replacement in the next. There is no flag that overrides this refusal.`;
29544
29761
  }
@@ -29947,7 +30164,7 @@ function isSupersededHeldBySameType(entry, resources) {
29947
30164
  return Object.values(resources).some((record) => typeof record === "object" && record !== null && record.physicalId === entry.state.physicalId && record.resourceType === entry.state.resourceType);
29948
30165
  }
29949
30166
  function supersededHeldByOtherTypeWarning(entry, holderType) {
29950
- return `the superseded ${entry.state.resourceType} of ${entry.logicalId} (${entry.state.physicalId}) was not deleted: a ${holderType} record of this stack has the same physical id, and cdkd never deletes an id a record names. If the ${entry.state.resourceType} still exists, delete it by hand; it is no longer tracked in state.`;
30167
+ return `the superseded ${entry.state.resourceType} of ${entry.logicalId} (${displayPhysicalId(entry.state.resourceType, entry.state.physicalId)}) was not deleted: a ${holderType} record of this stack has the same physical id, and cdkd never deletes an id a record names. If the ${entry.state.resourceType} still exists, delete it by hand; it is no longer tracked in state.`;
29951
30168
  }
29952
30169
  function addSuperseded(host, entry) {
29953
30170
  host.supersededResources = [...(Array.isArray(host.supersededResources) ? host.supersededResources : []).filter((row) => !isSupersededResourceRecord(row) || row.state.physicalId !== entry.state.physicalId || row.state.resourceType !== entry.state.resourceType), entry];
@@ -30147,10 +30364,10 @@ async function deleteReplacedAfterCreate(run, deps, logicalId, oldResourceType,
30147
30364
  ...currentResource.dependencies !== void 0 && { dependencies: currentResource.dependencies },
30148
30365
  retry: () => deleteReplacedAfterCreate(run, deps, logicalId, oldResourceType, currentResource, deleteProvider, deleteProperties, finalSnapshotIdentifier, updateReplacePolicy, secrets, deleteProvisionedBy, noEchoDeleteValues, true)
30149
30366
  });
30150
- deps.logger.info(safeMsg` Old ${logicalId} (${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)}) is deleted after the rest of the deploy succeeds`);
30367
+ deps.logger.info(safeMsg` Old ${logicalId} (${displayPhysicalId(oldResourceType, currentResource.physicalId)}) is deleted after the rest of the deploy succeeds`);
30151
30368
  return;
30152
30369
  }
30153
- if (!isRetry) deps.logger.info(safeMsg` Deleting old ${logicalId} (${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)})...`);
30370
+ if (!isRetry) deps.logger.info(safeMsg` Deleting old ${logicalId} (${displayPhysicalId(oldResourceType, currentResource.physicalId)})...`);
30154
30371
  else if (!await journaledHolderIsOurs(run, deps, logicalId, oldResourceType, currentResource)) return;
30155
30372
  let sentSnapshotIdentifier = finalSnapshotIdentifier;
30156
30373
  if (owesPreDeleteSnapshot(oldResourceType, finalSnapshotIdentifier)) {
@@ -30181,7 +30398,7 @@ async function deleteReplacedAfterCreate(run, deps, logicalId, oldResourceType,
30181
30398
  run.replacedOldMaySurvive.set(logicalId, run.replacedOldMaySurvive.get(logicalId) === "unconfirmed" ? "unconfirmed" : replacedDeleteFailureVerdict(deleteError));
30182
30399
  const deferred = run.deferredReplacedDeletes;
30183
30400
  if (!isRetry && deferred !== void 0) {
30184
- deps.logger.info(safeMsg` Could not delete old ${logicalId} (${currentResource.physicalId}) yet: ${deleteMsg}. Retrying after the rest of the deploy.`);
30401
+ deps.logger.info(safeMsg` Could not delete old ${logicalId} (${displayPhysicalId(oldResourceType, currentResource.physicalId)}) yet: ${deleteMsg}. Retrying after the rest of the deploy.`);
30185
30402
  recordSupersededForDeferral(run, deps, logicalId, currentResource, {
30186
30403
  updateReplacePolicy,
30187
30404
  finalSnapshotIdentifier: sentSnapshotIdentifier,
@@ -30199,7 +30416,7 @@ async function deleteReplacedAfterCreate(run, deps, logicalId, oldResourceType,
30199
30416
  return;
30200
30417
  }
30201
30418
  const kept = isRetry && run.supersededEntries.has(logicalId);
30202
- deps.logger.warn(kept ? safeMsg` ⚠ Failed to delete old resource ${logicalId} (${currentResource.physicalId}): ${deleteMsg}. ${SUPERSEDED_KEPT_REMEDY}.` : safeMsg` ⚠ Failed to delete old resource ${logicalId} (${currentResource.physicalId}): ${deleteMsg}`);
30419
+ deps.logger.warn(kept ? safeMsg` ⚠ Failed to delete old resource ${logicalId} (${displayPhysicalId(oldResourceType, currentResource.physicalId)}): ${deleteMsg}. ${SUPERSEDED_KEPT_REMEDY}.` : safeMsg` ⚠ Failed to delete old resource ${logicalId} (${displayPhysicalId(oldResourceType, currentResource.physicalId)}): ${deleteMsg}`);
30203
30420
  }
30204
30421
  const recorded = isRetry ? run.supersededEntries.get(logicalId) : void 0;
30205
30422
  if (recorded !== void 0 && !deleteFailed && run.supersededHost !== void 0) {
@@ -30214,11 +30431,11 @@ async function deleteReplacedAfterCreate(run, deps, logicalId, oldResourceType,
30214
30431
  const skipReason = deleteSkipReason(deleteResult);
30215
30432
  if (skipReason !== void 0) {
30216
30433
  run.replacedOldMaySurvive.set(logicalId, "unconfirmed");
30217
- run.replacedDeleteSkips.set(logicalId, `the replaced ${oldResourceType} (${currentResource.physicalId}) was not deleted (${skipReason}) and is no longer tracked by cdkd`);
30218
- deps.logger.warn(safeMsg` ⚠ ${deleteSkippedMessage(logicalId, currentResource.physicalId, skipReason, "while cleaning up the replaced resource", { commandFreeLine: true })}. Delete it manually — it is no longer tracked in state.`);
30434
+ run.replacedDeleteSkips.set(logicalId, `the replaced ${oldResourceType} (${displayPhysicalId(oldResourceType, currentResource.physicalId)}) was not deleted (${skipReason}) and is no longer tracked by cdkd`);
30435
+ deps.logger.warn(safeMsg` ⚠ ${deleteSkippedMessage(logicalId, displayPhysicalId(oldResourceType, currentResource.physicalId), skipReason, "while cleaning up the replaced resource", { commandFreeLine: true })}. Delete it manually — it is no longer tracked in state.`);
30219
30436
  } else if (!deleteFailed) {
30220
30437
  if (isRetry) run.replacedOldMaySurvive.delete(logicalId);
30221
- deps.logger.info(isRetry ? safeMsg` ${green("✓")} Old ${logicalId} (${currentResource.physicalId}) deleted` : safeMsg` ${green("✓")} Old resource deleted`);
30438
+ deps.logger.info(isRetry ? safeMsg` ${green("✓")} Old ${logicalId} (${displayPhysicalId(oldResourceType, currentResource.physicalId)}) deleted` : safeMsg` ${green("✓")} Old resource deleted`);
30222
30439
  }
30223
30440
  }
30224
30441
  async function journaledHolderIsOurs(run, deps, logicalId, oldResourceType, oldResource) {
@@ -30243,7 +30460,7 @@ async function journaledHolderIsOurs(run, deps, logicalId, oldResourceType, oldR
30243
30460
  const why = unreadHolderCause(judged);
30244
30461
  if (recorded === void 0) {
30245
30462
  run.replacedOldMaySurvive.set(logicalId, "unconfirmed");
30246
- run.replacedDeleteSkips.set(logicalId, `the replaced ${oldResourceType} (${oldResource.physicalId}) was not deleted (${why}) and is no longer tracked by cdkd`);
30463
+ run.replacedDeleteSkips.set(logicalId, `the replaced ${oldResourceType} (${displayPhysicalId(oldResourceType, oldResource.physicalId)}) was not deleted (${why}) and is no longer tracked by cdkd`);
30247
30464
  }
30248
30465
  deps.logger.warn(safeMsg` ⚠ Old ${logicalId} (${shown}) was not deleted: ${why}, so no delete was sent. ` + (recorded !== void 0 ? safeMsg`${SUPERSEDED_KEPT_REMEDY}.` : "It is no longer tracked in state: delete it manually once you confirm it is the stack's."));
30249
30466
  return false;
@@ -30264,7 +30481,7 @@ async function takeOwedSnapshot(run, deps, logicalId, oldResource, secrets, isRe
30264
30481
  const recorded = isRetry ? run.supersededEntries.get(logicalId) : void 0;
30265
30482
  const tracking = () => recorded !== void 0 ? "kept" : oldIdHeldByAnotherRecord(deps, logicalId, oldResource) ? "held" : "untracked";
30266
30483
  if (isRetry && deps.interrupted()) {
30267
- deps.logger.warn(safeMsg` ⚠ Old ${logicalId} (${oldResource.physicalId}) was not deleted: the deploy was interrupted before its final snapshot (UpdateReplacePolicy: Snapshot). ` + (tracking() === "kept" ? safeMsg`${SUPERSEDED_KEPT_REMEDY}.` : tracking() === "held" ? "Another resource of this stack records the same physical id." : "Delete it manually once you have a snapshot; it is no longer tracked in state."));
30484
+ deps.logger.warn(safeMsg` ⚠ Old ${logicalId} (${displayPhysicalId(oldResource.resourceType, oldResource.physicalId)}) was not deleted: the deploy was interrupted before its final snapshot (UpdateReplacePolicy: Snapshot). ` + (tracking() === "kept" ? safeMsg`${SUPERSEDED_KEPT_REMEDY}.` : tracking() === "held" ? "Another resource of this stack records the same physical id." : "Delete it manually once you have a snapshot; it is no longer tracked in state."));
30268
30485
  return false;
30269
30486
  }
30270
30487
  const snapshotMask = createUnionSecretMasker([secrets, secretNameBagFor(deps.secretsRun(), logicalId)]);
@@ -30276,7 +30493,7 @@ async function takeOwedSnapshot(run, deps, logicalId, oldResource, secrets, isRe
30276
30493
  });
30277
30494
  } catch (snapshotError) {
30278
30495
  if (!isRetry) run.replacedOldMaySurvive.set(logicalId, "kept");
30279
- deps.logger.warn(safeMsg` ⚠ Final snapshot for old ${logicalId} (${oldResource.physicalId}) ` + safeMsg`failed: ${asIsMessage(snapshotMask(describeAwsFailure(snapshotError).detail))}. ` + `The old resource was NOT deleted (UpdateReplacePolicy: Snapshot). ` + (tracking() === "kept" ? safeMsg`${SUPERSEDED_KEPT_REMEDY}.` : tracking() === "held" ? "Another resource of this stack records the same physical id." : "Delete it manually once you have a snapshot; it is no longer tracked in state."));
30496
+ deps.logger.warn(safeMsg` ⚠ Final snapshot for old ${logicalId} (${displayPhysicalId(oldResource.resourceType, oldResource.physicalId)}) ` + safeMsg`failed: ${asIsMessage(snapshotMask(describeAwsFailure(snapshotError).detail))}. ` + `The old resource was NOT deleted (UpdateReplacePolicy: Snapshot). ` + (tracking() === "kept" ? safeMsg`${SUPERSEDED_KEPT_REMEDY}.` : tracking() === "held" ? "Another resource of this stack records the same physical id." : "Delete it manually once you have a snapshot; it is no longer tracked in state."));
30280
30497
  return false;
30281
30498
  }
30282
30499
  if (recorded?.finalSnapshotIdentifier !== void 0 && run.supersededHost !== void 0) {
@@ -30351,63 +30568,21 @@ async function createFirstThenDeleteOld(run, deps, input) {
30351
30568
  const createAwsMsg = displayAwsMessage(maskName(createFailure.detail));
30352
30569
  const createMsg = createFailure.redacted ? displaySafe(maskName(createFailure.summary)).replace(/\.$/, "") : createAwsMsg;
30353
30570
  if (createFailure.redacted) deps.logger.debug(safeMsg`${maskName(logicalId)}: the create-first attempt collided: ${asIsMessage(createAwsMsg)}`);
30354
- throw markNonRetryable(new CdkdError(maskName(`${displaySafe(logicalId)} (${displaySafe(resourceType)}) requires replacement (${input.trigger}), and cdkd created the new resource first because its name differs, but the create collided: ${createMsg}. If the collision is on the requested name: ${renderReplacementNameChange(input.change, input.createProps)}. Nothing was deleted` + (retainOld ? ` (UpdateReplacePolicy: Retain keeps the old resource in place)` : "") + ". Choose a name no other resource holds, or delete the resource holding it if it is yours." + generatedReplacementHolderAdvice({
30571
+ throw markNonRetryable(new CdkdError(maskName(`${displaySafe(logicalId)} (${displaySafe(resourceType)}) requires replacement (${input.trigger}), and cdkd created the new resource first because its name differs, but the create collided: ${createMsg}. If the collision is on the requested name: ${renderReplacementNameChange(input.change, input.createProps, input.oldResourceType)}. Nothing was deleted` + (retainOld ? ` (UpdateReplacePolicy: Retain keeps the old resource in place)` : "") + ". Choose a name no other resource holds, or delete the resource holding it if it is yours." + generatedReplacementHolderAdvice({
30355
30572
  stackName: input.stackName,
30356
30573
  logicalId,
30357
30574
  change: input.change,
30358
30575
  oldPhysicalId: currentResource.physicalId,
30576
+ oldResourceType: currentResource.resourceType,
30359
30577
  mask: (text) => maskName(maskSecretsInText(text, unionOfSecretBags([secrets, printingSecretsFor(deps.secretsRun(), logicalId)])))
30360
30578
  })), "NAMED_REPLACEMENT_COLLISION", createError instanceof Error ? createError : void 0));
30361
30579
  }
30362
- if (input.equalIdIsSameResource && createResult.physicalId === currentResource.physicalId) throw markNonRetryable(new CdkdError(maskName(`${displaySafe(logicalId)} (${displaySafe(resourceType)}) requires replacement (${input.trigger}) under a new name, but the create returned the resource being replaced (${displaySafe(currentResource.physicalId)}) instead of a new one, so cdkd cannot tell which name it holds. Nothing was deleted. Delete that resource by hand if it is yours, then re-run the deploy.`), "NAMED_REPLACEMENT_IDEMPOTENT_CREATE"));
30580
+ if (input.equalIdIsSameResource && createResult.physicalId === currentResource.physicalId) throw markNonRetryable(new CdkdError(maskName(`${displaySafe(logicalId)} (${displaySafe(resourceType)}) requires replacement (${input.trigger}) under a new name, but the create returned the resource being replaced (${displaySafe(displayPhysicalId(currentResource.resourceType, currentResource.physicalId))}) instead of a new one, so cdkd cannot tell which name it holds. Nothing was deleted. Delete that resource by hand if it is yours, then re-run the deploy.`), "NAMED_REPLACEMENT_IDEMPOTENT_CREATE"));
30363
30581
  if (retainOld) return createResult;
30364
30582
  await deleteReplacedAfterCreate(run, deps, logicalId, input.oldResourceType, currentResource, input.deleteProvider, input.deleteProperties, finalSnapshotIdentifier, input.deletePolicy, secrets, input.deleteProvisionedBy, input.noEchoDeleteValues, false, createResult.physicalId === currentResource.physicalId && resourceType === input.oldResourceType);
30365
30583
  return createResult;
30366
30584
  }
30367
30585
 
30368
- // src/deployment/stack-records-scope.ts
30369
- async function awaitInFlightSibling(view, self, sibling) {
30370
- const waiting = view.waiting;
30371
- if (waiting === void 0 || waiting.has(sibling.logicalId)) return void 0;
30372
- waiting.add(self);
30373
- try {
30374
- return await sibling.settled;
30375
- } finally {
30376
- waiting.delete(self);
30377
- }
30378
- }
30379
- const stackRecordsStore = new AsyncLocalStorage();
30380
- function withStackRecords(view, fn) {
30381
- return stackRecordsStore.run(view, fn);
30382
- }
30383
- function getStackRecords() {
30384
- return stackRecordsStore.getStore();
30385
- }
30386
- function deployStackRecordsView(records, before, deleting, unsettled = () => false, inFlight) {
30387
- const settled = () => Object.entries(records).filter(([lid]) => !unsettled(lid));
30388
- return {
30389
- ...inFlight && {
30390
- inFlight,
30391
- waiting: /* @__PURE__ */ new Set()
30392
- },
30393
- live: settled,
30394
- survivors: () => [...settled().filter(([lid]) => !deleting.has(lid)), ...Object.entries(before).filter(([lid, record]) => deleting.has(lid) && shouldRetainResource(record.deletionPolicy))]
30395
- };
30396
- }
30397
- function destroyStackRecordsView(records) {
30398
- return {
30399
- live: () => Object.entries(records),
30400
- survivors: () => Object.entries(records).filter(([, record]) => shouldRetainResource(record.deletionPolicy))
30401
- };
30402
- }
30403
- function replayStackRecordsView(records, orphanLogicalIds = /* @__PURE__ */ new Set()) {
30404
- const kept = Object.entries(records).filter(([lid, record]) => record.deletionPolicy === "Retain" || orphanLogicalIds.has(lid));
30405
- return {
30406
- live: () => Object.entries(records),
30407
- survivors: () => [...Object.entries(records), ...kept.filter(([lid]) => !Object.hasOwn(records, lid))]
30408
- };
30409
- }
30410
-
30411
30586
  // src/deployment/deploy-engine/replacement/deferred-deletes.ts
30412
30587
  async function retryDeferredReplacedDeletes(run, deps, stackName, counts) {
30413
30588
  const deferred = run.deferredReplacedDeletes;
@@ -30424,11 +30599,11 @@ async function retryDeferredReplacedDeletes(run, deps, stackName, counts) {
30424
30599
  const guards = [];
30425
30600
  try {
30426
30601
  await withPrintingSecrets(secretNameBagFor(deps.secretsRun(), logicalId), () => withStackRecords(deps.stackRecordsView(), () => collectDeleteGuards(guards, async () => {
30427
- deps.logger.info(safeMsg` Deleting old ${logicalId} (${entry.physicalId})...`);
30602
+ deps.logger.info(safeMsg` Deleting old ${logicalId} (${displayPhysicalId(entry.resourceType, entry.physicalId)})...`);
30428
30603
  try {
30429
30604
  await entry.retry();
30430
30605
  } catch {
30431
- deps.logger.warn(safeMsg` ⚠ Failed to delete old resource ${logicalId} (${entry.physicalId}): the retry failed unexpectedly`);
30606
+ deps.logger.warn(safeMsg` ⚠ Failed to delete old resource ${logicalId} (${displayPhysicalId(entry.resourceType, entry.physicalId)}): the retry failed unexpectedly`);
30432
30607
  }
30433
30608
  })));
30434
30609
  } finally {
@@ -30482,7 +30657,7 @@ async function retryDeferredReplacedDeletes(run, deps, stackName, counts) {
30482
30657
  function warnUnsentUntracked(run, deps, pending) {
30483
30658
  for (const [logicalId, entry] of pending) {
30484
30659
  if (run.supersededEntries.has(logicalId)) continue;
30485
- withPrintingSecrets(secretNameBagFor(deps.secretsRun(), logicalId), () => deps.logger.warn(safeMsg` ⚠ Old ${logicalId} (${entry.physicalId}) was not deleted: the deploy was interrupted. It is no longer tracked in state, so delete it manually`));
30660
+ withPrintingSecrets(secretNameBagFor(deps.secretsRun(), logicalId), () => deps.logger.warn(safeMsg` ⚠ Old ${logicalId} (${displayPhysicalId(entry.resourceType, entry.physicalId)}) was not deleted: the deploy was interrupted. It is no longer tracked in state, so delete it manually`));
30486
30661
  }
30487
30662
  }
30488
30663
  function warnUnretriedReplacedDeletes(run, deps, why) {
@@ -30490,7 +30665,7 @@ function warnUnretriedReplacedDeletes(run, deps, why) {
30490
30665
  run.deferredReplacedDeletes = void 0;
30491
30666
  const cause = why === "failed" ? "the deploy failed first" : why === "interrupted" ? "the deploy was interrupted" : "its nested stack's cleanup could not run";
30492
30667
  const noteFor = (logicalId) => run.supersededEntries.has(logicalId) ? `not retried: ${cause}; cdkd keeps it in state, and the next deploy retries the delete` : `not retried: ${cause}; it is no longer tracked in state, so delete it manually`;
30493
- for (const [logicalId, entry] of deferred ?? []) withPrintingSecrets(secretNameBagFor(deps.secretsRun(), logicalId), () => why === "cleanup-failed" && entry.failureMessage === void 0 ? deps.logger.warn(safeMsg` ⚠ Old ${logicalId} (${entry.physicalId}) was not deleted: ${cause}. ${run.supersededEntries.has(logicalId) ? "cdkd keeps it in state, and the next deploy deletes it" : "It is no longer tracked in state, so delete it manually"}`) : entry.cleanupPhase === true ? run.supersededEntries.has(logicalId) ? deps.logger.info(safeMsg` Old ${logicalId} (${entry.physicalId}) was not deleted: ${cause}. A rollback of the deploy adopts it again; otherwise cdkd keeps it in state, and the next deploy deletes it`) : deps.logger.warn(safeMsg` ⚠ Old ${logicalId} (${entry.physicalId}) was not deleted: ${cause}. A rollback of the deploy adopts it again; otherwise it is no longer tracked in state, so delete it manually`) : deps.logger.warn(entry.failureMessage === void 0 ? safeMsg` ⚠ The old physical id of ${logicalId} (${entry.physicalId}) was not sent its Delete: ${cause}. A rollback sends the new id an Update with the old properties, and this id is tracked again if the handler answers it; otherwise ${run.supersededEntries.has(logicalId) ? "cdkd keeps it in state, and the next deploy sends the Delete" : "it is no longer tracked in state, so delete it manually"}` : safeMsg` ⚠ Failed to delete old resource ${logicalId} (${entry.physicalId}): ${entry.failureMessage} (${noteFor(logicalId)})`));
30668
+ for (const [logicalId, entry] of deferred ?? []) withPrintingSecrets(secretNameBagFor(deps.secretsRun(), logicalId), () => why === "cleanup-failed" && entry.failureMessage === void 0 ? deps.logger.warn(safeMsg` ⚠ Old ${logicalId} (${displayPhysicalId(entry.resourceType, entry.physicalId)}) was not deleted: ${cause}. ${run.supersededEntries.has(logicalId) ? "cdkd keeps it in state, and the next deploy deletes it" : "It is no longer tracked in state, so delete it manually"}`) : entry.cleanupPhase === true ? run.supersededEntries.has(logicalId) ? deps.logger.info(safeMsg` Old ${logicalId} (${displayPhysicalId(entry.resourceType, entry.physicalId)}) was not deleted: ${cause}. A rollback of the deploy adopts it again; otherwise cdkd keeps it in state, and the next deploy deletes it`) : deps.logger.warn(safeMsg` ⚠ Old ${logicalId} (${displayPhysicalId(entry.resourceType, entry.physicalId)}) was not deleted: ${cause}. A rollback of the deploy adopts it again; otherwise it is no longer tracked in state, so delete it manually`) : deps.logger.warn(entry.failureMessage === void 0 ? safeMsg` ⚠ The old physical id of ${logicalId} (${displayPhysicalId(entry.resourceType, entry.physicalId)}) was not sent its Delete: ${cause}. A rollback sends the new id an Update with the old properties, and this id is tracked again if the handler answers it; otherwise ${run.supersededEntries.has(logicalId) ? "cdkd keeps it in state, and the next deploy sends the Delete" : "it is no longer tracked in state, so delete it manually"}` : safeMsg` ⚠ Failed to delete old resource ${logicalId} (${displayPhysicalId(entry.resourceType, entry.physicalId)}): ${entry.failureMessage} (${noteFor(logicalId)})`));
30494
30669
  }
30495
30670
 
30496
30671
  // src/deployment/masking-retry-logger.ts
@@ -33038,7 +33213,7 @@ async function replayOrphanFlag(s) {
33038
33213
  ...orphanFlagProvisionedBy && { provisionedBy: orphanFlagProvisionedBy },
33039
33214
  ...record?.physicalId && {
33040
33215
  physicalId: record.physicalId,
33041
- reason: mask(`--orphan left ${op.logicalId} (${op.resourceType}) in AWS as ${record.physicalId} and dropped it from state; it is live, still billing, and no longer tracked by cdkd.`)
33216
+ reason: mask(`--orphan left ${op.logicalId} (${op.resourceType}) in AWS as ${displayPhysicalId(record.resourceType, record.physicalId)} and dropped it from state; it is live, still billing, and no longer tracked by cdkd.`)
33042
33217
  }
33043
33218
  });
33044
33219
  } else logger.info(` Rollback: Leaving ${safe(op.logicalId)} at its new state (--orphan)`);
@@ -33071,7 +33246,7 @@ async function replayOrphanRetain(s) {
33071
33246
  ...orphanProvisionedBy && { provisionedBy: orphanProvisionedBy },
33072
33247
  ...record?.physicalId && {
33073
33248
  physicalId: record.physicalId,
33074
- reason: mask(`DeletionPolicy: Retain left ${op.logicalId} (${op.resourceType}) in AWS as ${record.physicalId} and dropped it from state; it is live, still billing, and no longer tracked by cdkd.`)
33249
+ reason: mask(`DeletionPolicy: Retain left ${op.logicalId} (${op.resourceType}) in AWS as ${displayPhysicalId(record.resourceType, record.physicalId)} and dropped it from state; it is live, still billing, and no longer tracked by cdkd.`)
33075
33250
  }
33076
33251
  });
33077
33252
  }
@@ -34154,7 +34329,7 @@ async function replayReadopt(s, survivor) {
34154
34329
  const oldKind = survivor === void 0 ? "retained" : "surviving";
34155
34330
  const current = stateResources[op.logicalId];
34156
34331
  const prev = op.previousState;
34157
- const oldShown = hasAddressablePhysicalId({ physicalId: prev.physicalId }) ? displaySafe(mask(prev.physicalId)) : "no recorded id";
34332
+ const oldShown = hasAddressablePhysicalId({ physicalId: prev.physicalId }) ? displaySafe(mask(String(displayPhysicalId(prev.resourceType, prev.physicalId)))) : "no recorded id";
34158
34333
  const unprovenCopyRefusal = (reason) => {
34159
34334
  const remedy = orphanRemedy(op.logicalId, ctx);
34160
34335
  return ownRemedyError(markNonRetryable(new CdkdError(safeMsg`Cannot reverse the replacement of ${shownLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}): ` + reason + ` The ${oldKind} old resource (${oldShown}) is named only by the rollback journal, so the JOURNAL is kept. Check both resources by hand.` + (remedy.offered ? ` To leave this one as it is, re-run ${rerunRollbackPhrase(ctx, proseQuoted(cdkdRemedy("cdkd rollback"), "`"))} with the command below; that also drops the journal's only record of the ${oldKind} old resource (${oldShown}), so note that id first.` : ` No repair of the state record makes this op succeed on a re-run.`) + remedy.clause + remedy.line, STATE_RESOURCES_MALFORMED)));
@@ -34162,16 +34337,16 @@ async function replayReadopt(s, survivor) {
34162
34337
  const opIdUnusable = op.physicalId !== void 0 && !hasAddressablePhysicalId(op);
34163
34338
  if (!rollbackRetainsNewResource(current) && rollbackCannotAddress(current, op.resourceType, current.provisionedBy ?? op.provisionedBy, current.physicalId)) {
34164
34339
  if (opIdUnusable) throw unprovenCopyRefusal("neither its state record nor its rollback journal entry has a non-empty string 'physicalId' for the replacement's new resource, so cdkd cannot address that resource in AWS or tell which resource it is, and sent nothing.");
34165
- const target = op.physicalId === void 0 ? void 0 : refusalPhysicalId(mask(String(op.physicalId)));
34340
+ const target = op.physicalId === void 0 ? void 0 : refusalPhysicalId(mask(String(displayPhysicalId(op.resourceType, op.physicalId))));
34166
34341
  const repair = target === void 0 ? `Repair the record's 'physicalId' to the id of the replacement's NEW resource (inspect it with ${proseQuoted(cdkdRemedy("cdkd state show"), "`")}): the journal does not record that id, and the re-run DELETES the resource the repaired record names as the new copy, so name the right one. Then re-run ${rerunRollbackPhrase(ctx, proseQuoted(cdkdRemedy("cdkd rollback"), "`"))}.` : `Repair the record's 'physicalId' to ${target}, the replacement's new resource the journal records (inspect it with ${proseQuoted(cdkdRemedy("cdkd state show"), "`")}); the re-run deletes it and re-adopts the old one. Any other id stops the revert and drops the journal's only record of the ${oldKind} old resource (${oldShown}). Then re-run ${rerunRollbackPhrase(ctx, proseQuoted(cdkdRemedy("cdkd rollback"), "`"))}.` + (describedPhysicalIdPointer(target) !== "" ? " That id is left out of the prose above: it is not a plain identifier — read it from the rollback journal." : target.includes("***") ? ` That id is shown masked — read the full value from the rollback journal.` : "");
34167
34342
  throw new CdkdError(safeMsg`Cannot reverse the replacement of ${shownLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}): ` + `its state record has no non-empty string 'physicalId', so cdkd cannot address the new resource in AWS to delete it, and sent nothing. The ${oldKind} old resource (${oldShown}) is named only by the rollback journal, so the JOURNAL is kept. ` + repair, STATE_RESOURCES_MALFORMED);
34168
34343
  }
34169
34344
  if (!rollbackRetainsNewResource(current) && opIdUnusable && current.physicalId !== op.physicalId) throw unprovenCopyRefusal("its rollback journal entry has no non-empty string 'physicalId' for the replacement's new resource, so cdkd cannot tell whether the resource state records under this id is that one, and did not delete it; nothing was sent.");
34170
- logger.info(` Rollback: Reversing replacement of ${safe(op.logicalId)} (${safe(op.resourceType)}) — deleting the new resource and re-adopting the ${oldKind} old one (${displaySafe(mask(prev.physicalId))})`);
34345
+ logger.info(` Rollback: Reversing replacement of ${safe(op.logicalId)} (${safe(op.resourceType)}) — deleting the new resource and re-adopting the ${oldKind} old one (${displaySafe(mask(String(displayPhysicalId(prev.resourceType, prev.physicalId))))})`);
34171
34346
  let survivorReason;
34172
34347
  const survivorId = retainedSurvivorId(current, op);
34173
34348
  if (rollbackRetainsNewResource(current)) {
34174
- const survivorMessages = retainedSurvivorMessages(op.logicalId, op.resourceType, survivorId ?? "no recorded id", `State is restored to the old resource (${prev.physicalId}).`, mask);
34349
+ const survivorMessages = retainedSurvivorMessages(op.logicalId, op.resourceType, survivorId === void 0 ? "no recorded id" : String(displayPhysicalId(current.resourceType, survivorId)), `State is restored to the old resource (${displayPhysicalId(prev.resourceType, prev.physicalId)}).`, mask);
34175
34350
  logger.warn(survivorMessages.warn);
34176
34351
  survivorReason = survivorMessages.reason;
34177
34352
  result.warnings++;
@@ -34366,6 +34541,10 @@ function earlyDeletedOld(op, oldType, unconfirmedFoundGone = false) {
34366
34541
  function earlyDeleteWhen(kind) {
34367
34542
  return kind === "before-create" ? "deleted the old resource before creating its replacement" : "deleted the old resource before the deploy succeeded";
34368
34543
  }
34544
+ const PLANNED_EARLY_DELETE_CONSEQUENCE = "a failed deploy's rollback does not restore what AWS held for it beyond its recorded properties";
34545
+ function plannedEarlyDeleteNote(kind) {
34546
+ return `the deploy ${kind === "during-deploy" ? "deletes the old resource before the deploy succeeds" : kind === "recreate" ? "deletes the old resource before creating its replacement (unless the replacement takes another name)" : "deletes the old resource before creating its replacement"}, so ${PLANNED_EARLY_DELETE_CONSEQUENCE}`;
34547
+ }
34369
34548
 
34370
34549
  // src/deployment/rollback-executor/replay-reverse-replacement/failures.ts
34371
34550
  function embeddedFailureText(error, logDetail) {
@@ -34449,7 +34628,7 @@ async function recreateOldResource(s, r) {
34449
34628
  });
34450
34629
  } catch (recreateError) {
34451
34630
  await deleteMarkedRecreate(recreateError, recreateCleanup);
34452
- const recreateFailure = (text) => mask(`Failed to re-create the old ${safe(op.logicalId)} after the new resource (${mask(current.physicalId)}) was already deleted: ${displaySafe(text)}${text.endsWith(".") ? "" : "."} The resource is now absent — fix forward by re-deploying the stack.`);
34631
+ const recreateFailure = (text) => mask(`Failed to re-create the old ${safe(op.logicalId)} after the new resource (${mask(String(displayPhysicalId(current.resourceType, current.physicalId)))}) was already deleted: ${displaySafe(text)}${text.endsWith(".") ? "" : "."} The resource is now absent — fix forward by re-deploying the stack.`);
34453
34632
  const recreateText = embeddedFailureText(recreateError, (detail) => logger.debug(displaySafe(recreateFailure(detail))));
34454
34633
  throw stampRedacted(new Error(recreateFailure(recreateText.text), { cause: maskSecretsInError(recreateError instanceof Error ? recreateError : void 0, secrets) }), recreateText.redacted);
34455
34634
  }
@@ -34457,7 +34636,7 @@ async function recreateOldResource(s, r) {
34457
34636
  let deletedNewFirst = false;
34458
34637
  let createResult;
34459
34638
  if (reverseDeleteFirst) {
34460
- logger.info(` Rollback: the replacement deleted the old resource before creating the new one — ` + safeMsg`deleting the new resource (${mask(current.physicalId)}) first...`);
34639
+ logger.info(` Rollback: the replacement deleted the old resource before creating the new one — ` + safeMsg`deleting the new resource (${mask(String(displayPhysicalId(current.resourceType, current.physicalId)))}) first...`);
34461
34640
  await deleteNewResourceFirst("while clearing the new resource before re-creating the old one (the replacement deleted the old one first)");
34462
34641
  deletedNewFirst = true;
34463
34642
  createResult = await recreateAfterNewDeleted();
@@ -34489,22 +34668,22 @@ async function recreateOldResource(s, r) {
34489
34668
  }));
34490
34669
  if (!holder.holds) {
34491
34670
  const remedy = orphanRemedy(op.logicalId, ctx);
34492
- const oldShown = refusalPhysicalId(mask(prev.physicalId));
34671
+ const oldShown = refusalPhysicalId(mask(String(displayPhysicalId(prev.resourceType, prev.physicalId))));
34493
34672
  throw ownRemedyError(markNonRetryable(new CdkdError(mask(`Cannot reverse the replacement of ${refusalLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}): the re-create of the old resource (${oldShown}) collided (why is on the Collision diagnosis line below) — so ` + (holder.known ? `another resource holds the colliding name` : `if another resource holds the name it collided on`) + " (an orphan of an earlier attempt, or one made outside this stack), deleting the new resource would destroy it and collide again. Nothing was deleted. Remove or rename whatever holds that name if it is yours — if that is the new resource itself, delete it by hand — then re-run ") + rerunRollbackPhrase(ctx, cdkdRemedy("cdkd rollback")) + mask(`, which proceeds: the journal is kept, so the revert resumes from here.` + (remedy.offered ? " To leave THIS resource alone and let the rest of the rollback proceed, re-run with the command below." : "") + `${remedy.clause}${describedPhysicalIdPointer(oldShown)}\nCollision diagnosis: ${holder.diagnosis}\nUnderlying collision: ${collisionLine(mask(msg))}`) + remedy.line, "NAMED_REPLACEMENT_COLLISION", maskSecretsInError(createError instanceof Error ? createError : void 0, secrets))));
34494
34673
  }
34495
34674
  if (rollbackRetainsNewResource(current)) {
34496
34675
  const remedy = orphanRemedy(op.logicalId, ctx);
34497
- const oldShown = refusalPhysicalId(mask(prev.physicalId));
34498
- const newShown = refusalPhysicalId(mask(current.physicalId));
34676
+ const oldShown = refusalPhysicalId(mask(String(displayPhysicalId(prev.resourceType, prev.physicalId))));
34677
+ const newShown = refusalPhysicalId(mask(String(displayPhysicalId(current.resourceType, current.physicalId))));
34499
34678
  throw ownRemedyError(markNonRetryable(new CdkdError(mask(`Cannot reverse the replacement of ${refusalLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}): the re-create of the old resource (${oldShown}) collided with the name still held by the new one (${newShown}), and UpdateReplacePolicy: Retain pins that new resource in place, so cdkd will not delete it to free the name. Delete the new resource yourself, or remove UpdateReplacePolicy: Retain, then re-run `) + rerunRollbackPhrase(ctx, cdkdRemedy("cdkd rollback")) + mask(` — the journal is kept, so the revert resumes from here.` + (remedy.offered ? " To leave THIS resource alone and let the rest of the rollback proceed, re-run with the command below: one op failure stops the segment loop, so a single pinned resource otherwise halts every OLDER segment too." : "") + `${remedy.clause}${describedPhysicalIdPointer(oldShown, newShown)}\nUnderlying collision: ${collisionLine(mask(msg))}`) + remedy.line, "NAMED_REPLACEMENT_COLLISION", maskSecretsInError(createError instanceof Error ? createError : void 0, secrets))));
34500
34679
  }
34501
34680
  if (deleteFirstBlocked !== void 0) {
34502
34681
  const remedy = orphanRemedy(op.logicalId, ctx);
34503
- const oldShown = refusalPhysicalId(mask(prev.physicalId));
34504
- const newShown = refusalPhysicalId(mask(current.physicalId));
34682
+ const oldShown = refusalPhysicalId(mask(String(displayPhysicalId(prev.resourceType, prev.physicalId))));
34683
+ const newShown = refusalPhysicalId(mask(String(displayPhysicalId(current.resourceType, current.physicalId))));
34505
34684
  throw ownRemedyError(markNonRetryable(new CdkdError(mask(`Cannot reverse the replacement of ${refusalLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}): the re-create of the old resource (${oldShown}) collided with the name still held by the new one (${newShown}), and the old resource's properties name what ${refusalLogicalId(deleteFirstBlocked.logicalId)} was before the same deploy replaced or deleted it, which this rollback may not be able to restore, so cdkd will not delete the new resource to free the name. Nothing was deleted. Re-deploy to fix forward, or re-run `) + rerunRollbackPhrase(ctx, cdkdRemedy("cdkd rollback")) + mask(` once the old resource can be re-created — the journal is kept.` + (remedy.offered ? " To leave THIS resource alone and let the rest of the rollback proceed, re-run with the command below." : "") + `${remedy.clause}${describedPhysicalIdPointer(oldShown, newShown)}\nUnderlying collision: ${collisionLine(mask(msg))}`) + remedy.line, "NAMED_REPLACEMENT_COLLISION", maskSecretsInError(createError instanceof Error ? createError : void 0, secrets))));
34506
34685
  }
34507
- logger.info(` Rollback: re-create collided with the new resource's name — deleting the new resource (${displaySafe(mask(current.physicalId))}) first...` + (typeChanged ? ` (this op changed the resource's Type, ${safe(op.resourceType)} -> ${safe(oldType)}, which share a name space)` : ""));
34686
+ logger.info(` Rollback: re-create collided with the new resource's name — deleting the new resource (${displaySafe(mask(String(displayPhysicalId(current.resourceType, current.physicalId))))}) first...` + (typeChanged ? ` (this op changed the resource's Type, ${safe(op.resourceType)} -> ${safe(oldType)}, which share a name space)` : ""));
34508
34687
  await deleteNewResourceFirst("while clearing the new resource so the old one could be re-created");
34509
34688
  deletedNewFirst = true;
34510
34689
  createResult = await recreateAfterNewDeleted();
@@ -34535,7 +34714,7 @@ async function finishReverseReplacement(s, r, createResult, deletedNewFirst) {
34535
34714
  }) && !deletedNewFirst && createResult.physicalId === current.physicalId;
34536
34715
  const keepLiveRecord = adoptedLiveNewResource && oldType === op.resourceType && !isCustomResource(oldType);
34537
34716
  if (adoptedLiveNewResource) {
34538
- const liveShown = refusalPhysicalId(mask(current.physicalId));
34717
+ const liveShown = refusalPhysicalId(mask(String(displayPhysicalId(current.resourceType, current.physicalId))));
34539
34718
  logger.warn(` ⚠ ${shownLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}): the re-create returned the LIVE new resource (${liveShown}) instead of re-creating the old one — its Create API is name-idempotent and the new resource still holds the same user-supplied name. Skipping the delete-new step (it would delete that very resource). ` + (keepLiveRecord ? "The old resource's ORIGINAL properties were NOT re-applied; state keeps the live resource's record, with the failed deploy's properties, so " + safeMsg`${proseQuoted(cdkdRemedy("cdkd deploy"))} re-applies the template's, or rename the resource to make the replacement ` + `reversible.` : "The old resource's ORIGINAL properties may NOT have been re-applied; state now records the pre-replacement properties, so inspect the drift and " + safeMsg`run ${proseQuoted(cdkdRemedy("cdkd deploy"))} to reconcile, or rename the resource to make the replacement ` + `reversible.`) + `${describedPhysicalIdPointer(liveShown)}\nInspect it with: ${pasteableCommand("cdkd drift", [{
34540
34719
  value: stackName,
34541
34720
  hole: "stack"
@@ -34585,7 +34764,7 @@ async function finishReverseReplacement(s, r, createResult, deletedNewFirst) {
34585
34764
  let survivorReason;
34586
34765
  const survivorId = retainedSurvivorId(current, op);
34587
34766
  if (!deletedNewFirst && !adoptedLiveNewResource && rollbackRetainsNewResource(current)) {
34588
- const survivorMessages = retainedSurvivorMessages(op.logicalId, op.resourceType, survivorId ?? "no recorded id", `State records the re-created old resource (${stateResources[op.logicalId]?.physicalId ?? prev.physicalId}).`, mask);
34767
+ const survivorMessages = retainedSurvivorMessages(op.logicalId, op.resourceType, survivorId === void 0 ? "no recorded id" : String(displayPhysicalId(current.resourceType, survivorId)), `State records the re-created old resource (${displayPhysicalId(prev.resourceType, stateResources[op.logicalId]?.physicalId ?? prev.physicalId)}).`, mask);
34589
34768
  logger.warn(survivorMessages.warn);
34590
34769
  survivorReason = survivorMessages.reason;
34591
34770
  result.warnings++;
@@ -34606,9 +34785,9 @@ async function finishReverseReplacement(s, r, createResult, deletedNewFirst) {
34606
34785
  }));
34607
34786
  throwIfDeleteSkipped(deleteNewAfterRecreate, op.logicalId, current.physicalId, "while deleting the new resource after re-creating the old one", newDeleteGuardScope(deleteNewAfterRecreateRoute.provisionedBy));
34608
34787
  } catch (deleteError) {
34609
- logger.warn(mask(` Rollback: old ${safe(op.logicalId)} re-created, but deleting the new resource (${displaySafe(mask(current.physicalId))}) failed: ${displaySafe(describeAwsFailure(deleteError).detail)}. ` + (recordSuperseded ? `${SUPERSEDED_KEPT_REMEDY}.` : `Delete it manually — it is no longer tracked in state.`)));
34788
+ logger.warn(mask(` Rollback: old ${safe(op.logicalId)} re-created, but deleting the new resource (${displaySafe(mask(String(displayPhysicalId(current.resourceType, current.physicalId))))}) failed: ${displaySafe(describeAwsFailure(deleteError).detail)}. ` + (recordSuperseded ? `${SUPERSEDED_KEPT_REMEDY}.` : `Delete it manually — it is no longer tracked in state.`)));
34610
34789
  const survivorFailure = embeddedFailureText(deleteError).text;
34611
- survivorReason = `The replacement's new ${op.resourceType} (${current.physicalId}) could not be deleted after the old resource was re-created: ${survivorFailure}${survivorFailure.endsWith(".") ? "" : "."} ` + (recordSuperseded ? `It is live and still billing; ${SUPERSEDED_KEPT_REMEDY}.` : `It is live, still billing, and no longer tracked by cdkd — delete it yourself.`);
34790
+ survivorReason = `The replacement's new ${op.resourceType} (${displayPhysicalId(current.resourceType, current.physicalId)}) could not be deleted after the old resource was re-created: ${survivorFailure}${survivorFailure.endsWith(".") ? "" : "."} ` + (recordSuperseded ? `It is live and still billing; ${SUPERSEDED_KEPT_REMEDY}.` : `It is live, still billing, and no longer tracked by cdkd — delete it yourself.`);
34612
34791
  result.warnings++;
34613
34792
  }
34614
34793
  const recreatedId = displaySafe(mask(String(displayPhysicalId(oldType, createResult.physicalId))));
@@ -34631,7 +34810,7 @@ async function finishReverseReplacement(s, r, createResult, deletedNewFirst) {
34631
34810
  return survivorReason === void 0;
34632
34811
  };
34633
34812
  const keep = (reason) => {
34634
- logger.warn(mask(` Rollback: old ${safe(op.logicalId)} re-created, but the new resource (${displaySafe(mask(current.physicalId))}) was not deleted: ${reason}. ${SUPERSEDED_KEPT_REMEDY}.`));
34813
+ logger.warn(mask(` Rollback: old ${safe(op.logicalId)} re-created, but the new resource (${displaySafe(mask(String(displayPhysicalId(current.resourceType, current.physicalId))))}) was not deleted: ${reason}. ${SUPERSEDED_KEPT_REMEDY}.`));
34635
34814
  result.warnings++;
34636
34815
  ctx.recordEvent?.({
34637
34816
  eventType: "ROLLBACK_RESOURCE_SUCCEEDED",
@@ -34641,16 +34820,16 @@ async function finishReverseReplacement(s, r, createResult, deletedNewFirst) {
34641
34820
  resourceType: op.resourceType,
34642
34821
  ...current.provisionedBy && { provisionedBy: current.provisionedBy },
34643
34822
  physicalId: current.physicalId,
34644
- reason: mask(`The old resource was re-created; the new one (${current.physicalId}) was not deleted: ${reason}. ${SUPERSEDED_KEPT_REMEDY}.`)
34823
+ reason: mask(`The old resource was re-created; the new one (${displayPhysicalId(current.resourceType, current.physicalId)}) was not deleted: ${reason}. ${SUPERSEDED_KEPT_REMEDY}.`)
34645
34824
  });
34646
34825
  };
34647
34826
  if (deferral !== void 0) {
34648
- logger.info(safeMsg` Rollback: old ${safe(op.logicalId)} re-created first; the new resource ` + safeMsg`(${mask(current.physicalId)}) is deleted once the resources that reference it ` + `are reverted`);
34827
+ logger.info(safeMsg` Rollback: old ${safe(op.logicalId)} re-created first; the new resource ` + safeMsg`(${mask(String(displayPhysicalId(current.resourceType, current.physicalId)))}) is deleted once the resources that reference it ` + `are reverted`);
34649
34828
  deferral.defer(async () => {
34650
34829
  let gone = false;
34651
34830
  try {
34652
34831
  if (supersededHolderOf(superseded, stateResources) !== void 0) {
34653
- logger.warn(safeMsg` Rollback: not deleting the new ${shownLogicalId(op.logicalId)} ` + safeMsg`(${mask(current.physicalId)}): a record of this stack now holds its ` + safeMsg`physical id. Check it with ${cdkdRemedy("cdkd drift")}.`);
34832
+ logger.warn(safeMsg` Rollback: not deleting the new ${shownLogicalId(op.logicalId)} ` + safeMsg`(${mask(String(displayPhysicalId(current.resourceType, current.physicalId)))}): a record of this stack now holds its ` + safeMsg`physical id. Check it with ${cdkdRemedy("cdkd drift")}.`);
34654
34833
  result.warnings++;
34655
34834
  ctx.recordEvent?.({
34656
34835
  eventType: "ROLLBACK_RESOURCE_SUCCEEDED",
@@ -34659,7 +34838,7 @@ async function finishReverseReplacement(s, r, createResult, deletedNewFirst) {
34659
34838
  logicalId: op.logicalId,
34660
34839
  resourceType: op.resourceType,
34661
34840
  ...op.provisionedBy && { provisionedBy: op.provisionedBy },
34662
- reason: mask(`The old resource was re-created; the new one (${current.physicalId}) was not deleted because a record of this stack now holds its physical id.`)
34841
+ reason: mask(`The old resource was re-created; the new one (${displayPhysicalId(current.resourceType, current.physicalId)}) was not deleted because a record of this stack now holds its physical id.`)
34663
34842
  });
34664
34843
  gone = true;
34665
34844
  } else gone = await finish();
@@ -34731,14 +34910,14 @@ async function replayReverseReplacement(s) {
34731
34910
  }
34732
34911
  if (survivor === "exists" && op.oldResourceMaySurvive === "unconfirmed") throw survivorUnprovenRefusal(s, oldType, "maybe-deleting");
34733
34912
  if (op.oldResourceMaySurvive === "deferred" && survivor !== "gone" && survivor !== "interrupted" && (survivor === "exists" || deferredDeleteStillPending(ctx.supersededResources, prev, oldType))) {
34734
- logger.info(safeMsg` Rollback: the old resource of ${safe(op.logicalId)} (${mask(String(prev.physicalId))}) was not deleted yet — re-adopting it`);
34913
+ logger.info(safeMsg` Rollback: the old resource of ${safe(op.logicalId)} (${mask(String(displayPhysicalId(prev.resourceType, prev.physicalId)))}) was not deleted yet — re-adopting it`);
34735
34914
  await replayReadopt(s, {});
34736
34915
  if (identityUnverified) warnUnverifiedSurvivor(s, oldType);
34737
34916
  if (survivor === "identity-uncompared" || survivor === "identity-unread") warnUnverifiedSurvivor(s, oldType, survivor);
34738
34917
  return;
34739
34918
  }
34740
34919
  if (survivor === "exists") {
34741
- const oldShown = refusalPhysicalId(mask(String(prev.physicalId)));
34920
+ const oldShown = refusalPhysicalId(mask(String(displayPhysicalId(prev.resourceType, prev.physicalId))));
34742
34921
  logger.warn(safeMsg` ⚠ Rollback: the old resource of ${shownLogicalId(op.logicalId)} (${oldShown}) still ` + "exists — the deploy's delete of it was not confirmed — so it is re-adopted instead of re-created. Part of it may have been removed before that delete failed: check it " + safeMsg`with ${cdkdRemedy("cdkd drift")} after the rollback.${describedPhysicalIdPointer(oldShown)}`);
34743
34922
  result.warnings++;
34744
34923
  await replayReadopt(s, { reason: `the old resource survived a delete that was refused or never sent during the deploy and was re-adopted instead of re-created; the provider may have run part of that delete, so check it with ${cdkdRemedy("cdkd drift")}` });
@@ -34747,7 +34926,7 @@ async function replayReverseReplacement(s) {
34747
34926
  }
34748
34927
  if (survivor !== "gone") throw survivorUnprovenRefusal(s, oldType, survivor);
34749
34928
  unconfirmedFoundGone = op.oldResourceMaySurvive === "unconfirmed";
34750
- logger.info(safeMsg` Rollback: the old resource of ${safe(op.logicalId)} (${mask(String(prev.physicalId))}) is gone — re-creating it`);
34929
+ logger.info(safeMsg` Rollback: the old resource of ${safe(op.logicalId)} (${mask(String(displayPhysicalId(prev.resourceType, prev.physicalId)))}) is gone — re-creating it`);
34751
34930
  }
34752
34931
  const typeChanged = oldType !== op.resourceType;
34753
34932
  if (!requireRestorableBaseline(prev.properties, logger, {
@@ -34850,7 +35029,7 @@ function uncomparedIdentityCause(oldType, verdict) {
34850
35029
  function survivorUnprovenRefusal(s, oldType, verdict) {
34851
35030
  const { op, ctx, mask } = s;
34852
35031
  const remedy = orphanRemedy(op.logicalId, ctx);
34853
- const oldId = op.previousState?.physicalId;
35032
+ const oldId = displayPhysicalId(op.previousState?.resourceType, op.previousState?.physicalId);
34854
35033
  const oldShown = hasAddressablePhysicalId({ physicalId: oldId }) ? refusalPhysicalId(mask(String(oldId))) : "no recorded id";
34855
35034
  const rerun = rerunRollbackPhrase(ctx, cdkdRemedy("cdkd rollback"));
34856
35035
  const identity = verdict === "identity-uncompared" || verdict === "identity-unread";
@@ -34860,7 +35039,7 @@ function survivorUnprovenRefusal(s, oldType, verdict) {
34860
35039
  function foreignSurvivorRefusal(s, oldType, verdict) {
34861
35040
  const { op, ctx, mask } = s;
34862
35041
  const remedy = orphanRemedy(op.logicalId, ctx);
34863
- const oldShown = refusalPhysicalId(mask(String(op.previousState?.physicalId)));
35042
+ const oldShown = refusalPhysicalId(mask(String(displayPhysicalId(op.previousState?.resourceType, op.previousState?.physicalId))));
34864
35043
  const rerun = rerunRollbackPhrase(ctx, cdkdRemedy("cdkd rollback"));
34865
35044
  const seen = verdict === "foreign-account" ? `it is not in this account's bucket list, so it belongs to another account` : verdict === "foreign-region" ? `it is in another region than this stack's, and a bucket never moves region` : verdict === "foreign-recreated" ? "its creation date differs from the one read when the deploy deferred the old bucket's delete, and in us-east-1 only a re-create changes it" : verdict === "foreign-appeared" ? `nothing held that id when this rollback started` : `its ${SURVIVOR_IDENTITY_ATTRIBUTES[oldType] ?? "identity"} differs`;
34866
35045
  return ownRemedyError(markNonRetryable(new CdkdError(`Cannot reverse the replacement of ${refusalLogicalId(op.logicalId)} (${refusalResourceType(oldType)}): AWS reports a resource under the old physical id (${oldShown}), but not the one this stack recorded (${seen}), so another resource took that name after the stack's was deleted. Re-adopting it would make it this stack's, and re-creating the old one would collide with it. Nothing was sent and the journal is kept. If that resource is not meant to be there, remove it, then re-run ${rerun}, which re-creates the old one.` + (remedy.offered ? " To keep the new resource in its place instead, re-run with the command below; leave the other resource alone." : "") + `${remedy.clause}${describedPhysicalIdPointer(oldShown)}` + remedy.line, "REPLACED_SURVIVOR_UNPROVEN")));
@@ -34868,7 +35047,7 @@ function foreignSurvivorRefusal(s, oldType, verdict) {
34868
35047
  function modifiedSurvivorRefusal(s, oldType) {
34869
35048
  const { op, ctx, mask } = s;
34870
35049
  const remedy = orphanRemedy(op.logicalId, ctx);
34871
- const oldShown = refusalPhysicalId(mask(String(op.previousState?.physicalId)));
35050
+ const oldShown = refusalPhysicalId(mask(String(displayPhysicalId(op.previousState?.resourceType, op.previousState?.physicalId))));
34872
35051
  const rerun = rerunRollbackPhrase(ctx, cdkdRemedy("cdkd rollback"));
34873
35052
  return ownRemedyError(markNonRetryable(new CdkdError(`Cannot reverse the replacement of ${refusalLogicalId(op.logicalId)} (${refusalResourceType(oldType)}): the bucket under the old name (${oldShown}) may have been re-created or modified since the failed deploy: its creation date differs from the one read when the deploy deferred its delete, and outside us-east-1 S3 moves that date on a configuration write (tags, versioning, encryption, policy) as well as on a re-create, so cdkd cannot tell which. Re-adopting it would delete the new resource for what may be another owner's bucket. Nothing was sent and the journal is kept. Re-running ${rerun} refuses again while that bucket is there.` + (remedy.offered ? " To keep the new resource in its place instead, re-run with the command below; the bucket under the old name is then outside the stack: if it is this stack's old bucket, delete it by hand once its contents are no longer needed, and otherwise leave it alone." : "") + `${remedy.clause}${describedPhysicalIdPointer(oldShown)}` + remedy.line, "REPLACED_SURVIVOR_UNPROVEN")));
34874
35053
  }
@@ -35228,15 +35407,15 @@ async function replayFailedOperationsUnbound(failedOps, stateResources, stackNam
35228
35407
  logger.info(` Rollback: failed ${safe(op.changeType)} of ${safe(op.logicalId)} (${safe(op.resourceType)}) left nothing to revert, skipping`);
35229
35408
  break;
35230
35409
  case "skip-failed-mismatch":
35231
- logger.warn(safeMsg` Rollback: Skipping failed CREATE of ${shownLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}) — it recorded ${mask(String(op.physicalId))}, which is not the resource state tracks under this id; manual attention may be required`);
35410
+ logger.warn(safeMsg` Rollback: Skipping failed CREATE of ${shownLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}) — it recorded ${mask(String(displayPhysicalId(op.resourceType, op.physicalId)))}, which is not the resource state tracks under this id; manual attention may be required`);
35232
35411
  recordRollbackSkip(skipScope, op, "The failed CREATE recorded a physical id other than the one state now tracks under this logical id, so the rollback left it as it is; manual attention may be required.");
35233
35412
  break;
35234
35413
  case "skip-failed-replaced-deleted":
35235
- logger.warn(safeMsg` Rollback: Skipping failed UPDATE of ${shownLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}) — its replacement deleted the old resource ${mask(String(op.physicalId))} before the new one's create failed, so there is nothing to revert` + (options.forDestroy === true ? "; the destroy drops its record with the stack" : "; state still records it, and a deploy whose template still replaces it creates it again"));
35414
+ logger.warn(safeMsg` Rollback: Skipping failed UPDATE of ${shownLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}) — its replacement deleted the old resource ${mask(String(displayPhysicalId(op.previousState?.resourceType ?? op.resourceType, op.physicalId)))} before the new one's create failed, so there is nothing to revert` + (options.forDestroy === true ? "; the destroy drops its record with the stack" : "; state still records it, and a deploy whose template still replaces it creates it again"));
35236
35415
  recordRollbackSkip(skipScope, op, "The failed UPDATE was a replacement that deleted the old resource before its create failed, so there is nothing to revert it onto; state still records the deleted resource.");
35237
35416
  break;
35238
35417
  case "skip-failed-superseded":
35239
- logger.warn(safeMsg` Rollback: Skipping failed CREATE of ${shownLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}) — it created ${mask(String(op.physicalId))} before failing, and a later deploy or rollback may own a resource under that id now; if it is not in use, delete it manually`);
35418
+ logger.warn(safeMsg` Rollback: Skipping failed CREATE of ${shownLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}) — it created ${mask(String(displayPhysicalId(op.resourceType, op.physicalId)))} before failing, and a later deploy or rollback may own a resource under that id now; if it is not in use, delete it manually`);
35240
35419
  recordRollbackSkip(skipScope, op, "The failed CREATE created its resource before failing, but a later deploy or rollback may own a resource under that id now, so the rollback left it as it is; manual attention may be required.");
35241
35420
  break;
35242
35421
  case "skip-failed-unknown":
@@ -35316,11 +35495,11 @@ async function replayFailedOperationsUnbound(failedOps, stateResources, stackNam
35316
35495
  });
35317
35496
  break;
35318
35497
  }
35319
- if (verdict !== void 0 && "retry" in verdict) throw new Error(`${String(op.physicalId)} is not deleted: ${verdict.retry}. The journal keeps it for a re-run; ${proseQuoted(cdkdRemedy("cdkd rollback", "--drop-failed"), "`")} removes only that record and leaves the resource in AWS`);
35498
+ if (verdict !== void 0 && "retry" in verdict) throw new Error(`${String(displayPhysicalId(op.resourceType, op.physicalId))} is not deleted: ${verdict.retry}. The journal keeps it for a re-run; ${proseQuoted(cdkdRemedy("cdkd rollback", "--drop-failed"), "`")} removes only that record and leaves the resource in AWS`);
35320
35499
  if (verdict !== void 0) {
35321
35500
  const keep = verdict.keep;
35322
35501
  const finish = verdict.finish ?? "if it is not in use, delete it by hand";
35323
- logger.warn(safeMsg` Rollback: Skipping failed CREATE of ${shownLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}) — it created ${mask(String(op.physicalId))} before failing, but ${keep}. It is left in AWS: ${finish}`);
35502
+ logger.warn(safeMsg` Rollback: Skipping failed CREATE of ${shownLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}) — it created ${mask(String(displayPhysicalId(op.resourceType, op.physicalId)))} before failing, but ${keep}. It is left in AWS: ${finish}`);
35324
35503
  recordRollbackSkip(skipScope, op, `The failed CREATE created its resource before failing, but ${keep}, so it is left in AWS; ${finish}.`);
35325
35504
  break;
35326
35505
  }
@@ -37554,12 +37733,14 @@ function findDestructiveChanges(stackName, changes, records, template, recreateT
37554
37733
  if (impact === void 0) continue;
37555
37734
  const recorded = typeof record?.constructPath === "string" ? record.constructPath : void 0;
37556
37735
  const constructPath = constructPathOf(template, change.logicalId) ?? recorded;
37736
+ const earlyDelete = impact === "WILL_REPLACE" ? plannedEarlyDelete(change, resourceType, template, recreateTargets) : void 0;
37557
37737
  found.push({
37558
37738
  stackName,
37559
37739
  logicalId: change.logicalId,
37560
37740
  resourceType,
37561
37741
  ...constructPath !== void 0 && { constructPath },
37562
- impact
37742
+ impact,
37743
+ ...earlyDelete !== void 0 && { earlyDelete }
37563
37744
  });
37564
37745
  }
37565
37746
  return found;
@@ -37582,6 +37763,16 @@ function destructiveImpactOf(change, record) {
37582
37763
  default: return;
37583
37764
  }
37584
37765
  }
37766
+ function plannedEarlyDelete(change, oldType, template, recreateTargets) {
37767
+ if (isInlinePolicyType(oldType)) return void 0;
37768
+ if (change.changeType !== "UPDATE") return void 0;
37769
+ if (recreateTargets.has(change.logicalId)) {
37770
+ const resources = template?.Resources;
37771
+ return (resources !== void 0 && Object.hasOwn(resources, change.logicalId) ? resources[change.logicalId]?.UpdateReplacePolicy : void 0) === "Retain" ? void 0 : "recreate";
37772
+ }
37773
+ if (change.providerReplacement === void 0 || oldType !== change.resourceType) return void 0;
37774
+ return providerReplacementOldDeleted(change.resourceType);
37775
+ }
37585
37776
  function constructPathOf(template, logicalId) {
37586
37777
  const resources = template?.Resources;
37587
37778
  if (resources === void 0 || !Object.hasOwn(resources, logicalId)) return void 0;
@@ -37598,7 +37789,7 @@ function describeDestructiveImpact(impact) {
37598
37789
  }
37599
37790
  function formatDestructiveChange(change) {
37600
37791
  const path = change.constructPath !== void 0 ? `${displaySafe(displayPath(change.constructPath))} ` : "";
37601
- return `${displayIdent(change.stackName)}: ${displaySafe(change.resourceType)} ${path}${displayIdent(change.logicalId)} ${describeDestructiveImpact(change.impact)}` + (change.movedTo !== void 0 ? movedToHint(change.movedTo) : "");
37792
+ return `${displayIdent(change.stackName)}: ${displaySafe(change.resourceType)} ${path}${displayIdent(change.logicalId)} ${describeDestructiveImpact(change.impact)}` + (change.earlyDelete !== void 0 ? ` — ${plannedEarlyDeleteNote(change.earlyDelete)}` : "") + (change.movedTo !== void 0 ? movedToHint(change.movedTo) : "");
37602
37793
  }
37603
37794
  function displayPath(constructPath) {
37604
37795
  let parts = constructPath.replace(/^\//, "").split("/");
@@ -38418,7 +38609,7 @@ async function planOrphanAdoption(params) {
38418
38609
  if (params.managedLogicalIds.has(record.logicalId)) continue;
38419
38610
  outcome.remaining.push(record);
38420
38611
  if ((params.template.Resources?.[record.logicalId])?.Type !== record.state.resourceType) continue;
38421
- outcome.warnings.push(`${displayIdent(record.logicalId)} (${displayIdent(record.state.resourceType)}) was left in AWS by an earlier rollback as ${displaySafe(record.state.physicalId)} (DeletionPolicy: Retain). This deploy does not take it back: it creates a new resource under a new name, as CloudFormation does. To manage the kept resource again, adopt it with: ${cdkdRemedy("cdkd import")}`);
38612
+ outcome.warnings.push(`${displayIdent(record.logicalId)} (${displayIdent(record.state.resourceType)}) was left in AWS by an earlier rollback as ${displaySafe(displayPhysicalId(record.state.resourceType, record.state.physicalId))} (DeletionPolicy: Retain). This deploy does not take it back: it creates a new resource under a new name, as CloudFormation does. To manage the kept resource again, adopt it with: ${cdkdRemedy("cdkd import")}`);
38422
38613
  }
38423
38614
  return outcome;
38424
38615
  }
@@ -38428,7 +38619,7 @@ async function planOrphanAdoption(params) {
38428
38619
  const { logicalId, state } = record;
38429
38620
  const shownId = displayIdent(logicalId);
38430
38621
  const shownType = displayIdent(state.resourceType);
38431
- const shownPhysicalId = displaySafe(state.physicalId);
38622
+ const shownPhysicalId = displaySafe(displayPhysicalId(state.resourceType, state.physicalId));
38432
38623
  if (params.managedLogicalIds.has(logicalId)) {
38433
38624
  params.logger.debug(`orphan ${shownId}: already present in state.resources — dropping the stale record`);
38434
38625
  continue;
@@ -38463,7 +38654,7 @@ async function planOrphanAdoption(params) {
38463
38654
  }
38464
38655
  if (found !== null && found.physicalId !== state.physicalId) {
38465
38656
  outcome.remaining.push(record);
38466
- outcome.notices.push(`${shownId} (${shownType}): cdkd asked about ${shownPhysicalId} and its provider answered for ${displaySafe(found.physicalId)} — not adopting.`);
38657
+ outcome.notices.push(`${shownId} (${shownType}): cdkd asked about ${shownPhysicalId} and its provider answered for ${displaySafe(displayPhysicalId(state.resourceType, found.physicalId))} — not adopting.`);
38467
38658
  continue;
38468
38659
  }
38469
38660
  if (found === null) {
@@ -38646,7 +38837,7 @@ async function adoptRollbackOrphans(deps, currentState, effectiveTemplate) {
38646
38837
  for (const [logicalId, record] of Object.entries(plan.adopted)) {
38647
38838
  adoptedFrom.set(logicalId, records.findLast((r) => r.logicalId === logicalId)?.state);
38648
38839
  currentState.resources[logicalId] = record;
38649
- deps.logger.info(safeMsg`Adopting ${displayIdent(logicalId)} (${displayIdent(record.resourceType)}) left in AWS ` + safeMsg`by an earlier rollback as ${displaySafe(maskSecretsInText(record.physicalId, named))}`);
38840
+ deps.logger.info(safeMsg`Adopting ${displayIdent(logicalId)} (${displayIdent(record.resourceType)}) left in AWS ` + safeMsg`by an earlier rollback as ${displaySafe(maskSecretsInText(String(displayPhysicalId(record.resourceType, record.physicalId)), named))}`);
38650
38841
  }
38651
38842
  if (records.length > 0) currentState.orphans = plan.remaining;
38652
38843
  return plan;
@@ -39275,7 +39466,7 @@ function nestedPendingSnapshot(state, refusesExportName) {
39275
39466
  }
39276
39467
  };
39277
39468
  }
39278
- function displacedPhysicalIdShown(op, logger, physicalId = journalOpPhysicalId(op)) {
39469
+ function displacedPhysicalIdShown(op, logger, physicalId = journalOpPhysicalId(op), idType = op.resourceType) {
39279
39470
  if (physicalId === void 0) return void 0;
39280
39471
  const masker = createOpMasker(logger, /* @__PURE__ */ new Map());
39281
39472
  for (const properties of [
@@ -39291,12 +39482,12 @@ function displacedPhysicalIdShown(op, logger, physicalId = journalOpPhysicalId(o
39291
39482
  physicalIds: [physicalId]
39292
39483
  });
39293
39484
  }
39294
- return displaySafe(String(masker.mask(physicalId)));
39485
+ return displaySafe(String(masker.mask(String(displayPhysicalId(idType, physicalId)))));
39295
39486
  }
39296
39487
  function displacedOpClause(op, marks, logger) {
39297
39488
  const retainedOld = retainedOldPhysicalId(op);
39298
39489
  if (retainedOld !== void 0 && marks.some((m) => isMarkFor(m, op))) {
39299
- const shownOld = displacedPhysicalIdShown(op, logger, retainedOld);
39490
+ const shownOld = displacedPhysicalIdShown(op, logger, retainedOld, op.previousState?.resourceType ?? op.resourceType);
39300
39491
  return `replaced ${shownOld} ${op.oldResourceRetained === true ? "but kept it (UpdateReplacePolicy: Retain)" : op.oldResourceMaySurvive === "deferred" ? "and may have kept it (its delete waits for the deploy to succeed)" : op.oldResourceMaySurvive !== void 0 ? "and may have kept it (its delete was not confirmed)" : "and may have kept it (the journal records no verdict)"}; cdkd import adopted the replacement, so ${shownOld} is left untracked`;
39301
39492
  }
39302
39493
  const shownId = displacedPhysicalIdShown(op, logger);
@@ -41409,7 +41600,7 @@ async function refuseTakenCreateName(engine, input) {
41409
41600
  if (found === null) return;
41410
41601
  const holderId = found.physicalId;
41411
41602
  const ownHolder = Object.entries(input.stateResources).find(([otherId, record]) => otherId !== logicalId && record.resourceType === resourceType && probeFoundSameId(resourceType, record.physicalId, holderId));
41412
- if (ownHolder !== void 0) return refuse(`${subject} is created with ${named}, which this stack's ${displaySafe(ownHolder[0])} (${shown(holderId)}) already holds — a construct moved or renamed keeps its explicit name under a new logical id. ` + (refusesItself ? "" : `Since ${adoptsText}, the create would hand back that resource and the removal of ${displaySafe(ownHolder[0])} would then delete it. `) + `Nothing was created. Give the new resource another name, or deploy the removal of ${displaySafe(ownHolder[0])} first. Do not delete or import that resource: it is already this stack's.`);
41603
+ if (ownHolder !== void 0) return refuse(`${subject} is created with ${named}, which this stack's ${displaySafe(ownHolder[0])} (${shown(displayPhysicalId(resourceType, holderId))}) already holds — a construct moved or renamed keeps its explicit name under a new logical id. ` + (refusesItself ? "" : `Since ${adoptsText}, the create would hand back that resource and the removal of ${displaySafe(ownHolder[0])} would then delete it. `) + `Nothing was created. Give the new resource another name, or deploy the removal of ${displaySafe(ownHolder[0])} first. Do not delete or import that resource: it is already this stack's.`);
41413
41604
  const ownCase = "if the resource is this stack's own (left by an earlier interrupted deploy, or kept by an earlier `cdkd destroy` under DeletionPolicy: Retain)";
41414
41605
  const built = input.stackName.includes("~") || resourceType === "AWS::S3::Bucket" ? void 0 : pasteableCommand("cdkd import", [{
41415
41606
  value: input.stackName,
@@ -41422,7 +41613,7 @@ async function refuseTakenCreateName(engine, input) {
41422
41613
  const adopt = built !== void 0 && maskName(built.command) === built.command ? built : void 0;
41423
41614
  const ownRemedy = input.stackName.includes("~") ? `${ownCase}, delete it and re-run.` : adopt !== void 0 ? `${ownCase}, delete it, or adopt it with ${proseQuoted(cdkdRemedy("cdkd import"), "`")} using the command below and re-run.` : `${ownCase}, delete it or adopt it with ${proseQuoted(cdkdRemedy("cdkd import"), "`")} and re-run.`;
41424
41615
  const holeNote = adopt === void 0 || adopt.withheld.length === 0 ? "" : " The command below prints a quoted hole in place of a value cdkd will not name on a command line; replace it whole, quotes included, with your stack name or '<logicalId>=<physicalId>', shell-quoted.";
41425
- return refuse(`${subject} is created with ${named}, and an existing resource (${shown(holderId)}) already holds that name. ` + (refusesItself ? `A log group's create refuses a taken name, as CloudFormation's does. ` : `Since ${adoptsText}, creating it would take that resource over and record it as this stack's, for a later \`cdkd destroy\` to delete. `) + `Nothing was created. Choose a name no other resource holds; ` + ownRemedy + holeNote + (adopt === void 0 ? "" : `
41616
+ return refuse(`${subject} is created with ${named}, and an existing resource (${shown(displayPhysicalId(resourceType, holderId))}) already holds that name. ` + (refusesItself ? `A log group's create refuses a taken name, as CloudFormation's does. ` : `Since ${adoptsText}, creating it would take that resource over and record it as this stack's, for a later \`cdkd destroy\` to delete. `) + `Nothing was created. Choose a name no other resource holds; ` + ownRemedy + holeNote + (adopt === void 0 ? "" : `
41426
41617
  CONFIRM IT IS YOURS FIRST: another stack or app may own a resource of that name, and adopting it hands that resource to this stack's \`cdkd destroy\`.\nAdopt with: ${adopt.command}`));
41427
41618
  }
41428
41619
  async function resumeAbandonedCreate(engine, args) {
@@ -41680,7 +41871,7 @@ function commandsOf(script) {
41680
41871
  return script.replace(/\\\r?\n/g, " ").split(/\r?\n|;|&&|\|\||\|/).map((c) => c.trim()).filter((c) => c.length > 0);
41681
41872
  }
41682
41873
  function parseBootstrapCall(command) {
41683
- const tokens = command.split(/\s+/).map((t) => t.replace(/^[\[("',]+|[\]),"']+$/g, "")).filter((t) => t.length > 0);
41874
+ const tokens = command.split(/\s+/).map((t) => t.replace(/^[[("',]+|[\]),"']+$/g, "")).filter((t) => t.length > 0);
41684
41875
  const at = tokens.findIndex((t) => /(?:^|[/\\])cfn-(?:init|signal)(?:\.exe)?$/i.test(t));
41685
41876
  if (at !== -1) {
41686
41877
  const kind = /init(?:\.exe)?$/i.test(tokens[at]) ? "init" : "signal";
@@ -42657,7 +42848,7 @@ Drop the record with: ${dropCommand}`);
42657
42848
  hole: nested ? "child-stack" : "stack",
42658
42849
  opts: { plainIdent: true }
42659
42850
  };
42660
- deps.logger.warn(safeMsg`${deleteSkippedMessage(logicalId, currentResource.physicalId, deleteSkipped, "while removing it from the template")}` + ". Its cdkd state record was KEPT, so the next 'cdkd deploy' re-attempts the delete. Repair the record first (for a nested stack it is the CHILD's own state, whose other resources may already be gone), or delete the resource by hand and drop the record." + (interrupted ? ` The commands name the child stack record. Its destroy was interrupted: re-run ` + safeMsg`${proseQuoted(cdkdRemedy("cdkd deploy"))} to resume it, and drop the child record only if that cannot finish, ` + "after deleting by hand what the child still holds (the inspect command with --show-nested lists every level; a child with nested stacks of its own has records under '<child>~<logicalId>' too, each needing the same drop)." : nested ? " The commands name the child stack record. Dropping it drops every record the child still has and nothing reaches those resources again, so first delete by hand what the child still holds (the inspect command with --show-nested lists every level; a child with nested stacks of its own has records under '<child>~<logicalId>' too, each needing the same drop). The next 'cdkd deploy' then removes this row." : " Keep '--resource' on the drop: without it the command drops the record of every resource in this still-deployed stack.") + (accountClause === "" ? "" : safeMsg` ${accountClause}`) + safeMsg`\nInspect it with: ${pasteableCommand("cdkd state show", [
42851
+ deps.logger.warn(safeMsg`${deleteSkippedMessage(logicalId, displayPhysicalId(currentResource.resourceType, currentResource.physicalId), deleteSkipped, "while removing it from the template")}` + ". Its cdkd state record was KEPT, so the next 'cdkd deploy' re-attempts the delete. Repair the record first (for a nested stack it is the CHILD's own state, whose other resources may already be gone), or delete the resource by hand and drop the record." + (interrupted ? ` The commands name the child stack record. Its destroy was interrupted: re-run ` + safeMsg`${proseQuoted(cdkdRemedy("cdkd deploy"))} to resume it, and drop the child record only if that cannot finish, ` + "after deleting by hand what the child still holds (the inspect command with --show-nested lists every level; a child with nested stacks of its own has records under '<child>~<logicalId>' too, each needing the same drop)." : nested ? " The commands name the child stack record. Dropping it drops every record the child still has and nothing reaches those resources again, so first delete by hand what the child still holds (the inspect command with --show-nested lists every level; a child with nested stacks of its own has records under '<child>~<logicalId>' too, each needing the same drop). The next 'cdkd deploy' then removes this row." : " Keep '--resource' on the drop: without it the command drops the record of every resource in this still-deployed stack.") + (accountClause === "" ? "" : safeMsg` ${accountClause}`) + safeMsg`\nInspect it with: ${pasteableCommand("cdkd state show", [
42661
42852
  stackArg,
42662
42853
  {
42663
42854
  flag: "--stack-region",
@@ -42753,11 +42944,11 @@ async function retryCarriedSupersededResources(engine, host, carried, resources,
42753
42944
  withPrintingSecrets(bag, () => engine.logger.warn(safeMsg` ⚠ ${supersededHeldByOtherTypeWarning(entry, holder.resourceType)}`));
42754
42945
  continue;
42755
42946
  }
42756
- withPrintingSecrets(bag, () => engine.logger.debug(safeMsg`Superseded ${logicalId} (${physicalId}) is held by a record again; not deleting it`));
42947
+ withPrintingSecrets(bag, () => engine.logger.debug(safeMsg`Superseded ${logicalId} (${displayPhysicalId(resourceType, physicalId)}) is held by a record again; not deleting it`));
42757
42948
  continue;
42758
42949
  }
42759
42950
  await withPrintingSecrets(bag, () => withStackRecords(view, async () => {
42760
- engine.logger.info(safeMsg` Deleting old ${logicalId} (${physicalId}), superseded by an earlier deploy...`);
42951
+ engine.logger.info(safeMsg` Deleting old ${logicalId} (${displayPhysicalId(resourceType, physicalId)}), superseded by an earlier deploy...`);
42761
42952
  let outcome;
42762
42953
  try {
42763
42954
  const route = engine.providerRegistry.getProviderFor({
@@ -42771,7 +42962,7 @@ async function retryCarriedSupersededResources(engine, host, carried, resources,
42771
42962
  stop: () => engine.interrupted,
42772
42963
  once: options.waitInUse !== true,
42773
42964
  holderProvider: () => engine.providerRegistry.getProvider(resourceType),
42774
- warn: (message) => engine.logger.warn(safeMsg` ⚠ Old ${logicalId} (${physicalId}): ${message}`),
42965
+ warn: (message) => engine.logger.warn(safeMsg` ⚠ Old ${logicalId} (${displayPhysicalId(resourceType, physicalId)}): ${message}`),
42775
42966
  preDeleteSnapshot: {
42776
42967
  clients: engine.options.finalSnapshotClients ?? getAwsClients(),
42777
42968
  logger: {
@@ -42792,24 +42983,24 @@ async function retryCarriedSupersededResources(engine, host, carried, resources,
42792
42983
  changed = true;
42793
42984
  }
42794
42985
  const detail = maskSecretsInText(describeAwsFailure(outcome.error).detail, bag);
42795
- engine.logger.warn(safeMsg` ⚠ Failed to delete old resource ${logicalId} (${physicalId}): ${detail}. ${SUPERSEDED_KEPT_REMEDY}.`);
42986
+ engine.logger.warn(safeMsg` ⚠ Failed to delete old resource ${logicalId} (${displayPhysicalId(resourceType, physicalId)}): ${detail}. ${SUPERSEDED_KEPT_REMEDY}.`);
42796
42987
  return;
42797
42988
  }
42798
42989
  removeSuperseded(host, entry);
42799
42990
  changed = true;
42800
42991
  if (outcome.kind === "gone") {
42801
- engine.logger.info(safeMsg` ${green("✓")} Old ${logicalId} (${physicalId}) is already gone; no delete was sent`);
42992
+ engine.logger.info(safeMsg` ${green("✓")} Old ${logicalId} (${displayPhysicalId(resourceType, physicalId)}) is already gone; no delete was sent`);
42802
42993
  return;
42803
42994
  }
42804
42995
  if (outcome.kind === "notOurs") {
42805
- engine.logger.warn(safeMsg` ⚠ Old ${logicalId} (${physicalId}) was not deleted: ${outcome.cause}. The replaced resource is gone, and cdkd no longer tracks it in state.`);
42996
+ engine.logger.warn(safeMsg` ⚠ Old ${logicalId} (${displayPhysicalId(resourceType, physicalId)}) was not deleted: ${outcome.cause}. The replaced resource is gone, and cdkd no longer tracks it in state.`);
42806
42997
  return;
42807
42998
  }
42808
42999
  if (outcome.kind === "notDeleted") {
42809
- engine.logger.warn(safeMsg` ⚠ ${deleteSkippedMessage(logicalId, physicalId, outcome.reason, "while cleaning up the superseded resource", { commandFreeLine: true })}. Delete it manually — it is no longer tracked in state.`);
43000
+ engine.logger.warn(safeMsg` ⚠ ${deleteSkippedMessage(logicalId, displayPhysicalId(resourceType, physicalId), outcome.reason, "while cleaning up the superseded resource", { commandFreeLine: true })}. Delete it manually — it is no longer tracked in state.`);
42810
43001
  return;
42811
43002
  }
42812
- engine.logger.info(safeMsg` ${green("✓")} Old ${logicalId} (${physicalId}) deleted`);
43003
+ engine.logger.info(safeMsg` ${green("✓")} Old ${logicalId} (${displayPhysicalId(resourceType, physicalId)}) deleted`);
42813
43004
  }));
42814
43005
  }
42815
43006
  return changed;
@@ -42887,7 +43078,7 @@ async function runQueuedNestedCleanup(engine, stackName, host, pass, context) {
42887
43078
  engine.logger.debug(safeMsg`Old ${logicalId} of nested stack ${display} is no longer awaiting its delete; not deleting it`);
42888
43079
  } else if (recorded === void 0 && Object.values(read.state.resources).some((record) => typeof record === "object" && record !== null && record.physicalId === entry.physicalId && record.resourceType === entry.resourceType)) {
42889
43080
  run.deferredReplacedDeletes?.delete(logicalId);
42890
- engine.logger.warn(safeMsg` ⚠ Old ${logicalId} of nested stack ${display} (${entry.physicalId}) was not deleted: a record of that stack names its physical id again, and cdkd never deletes an id a record names`);
43081
+ engine.logger.warn(safeMsg` ⚠ Old ${logicalId} of nested stack ${display} (${displayPhysicalId(entry.resourceType, entry.physicalId)}) was not deleted: a record of that stack names its physical id again, and cdkd never deletes an id a record names`);
42891
43082
  }
42892
43083
  }
42893
43084
  const before = supersededResourcesOf(host);
@@ -42948,7 +43139,7 @@ async function persistDropped(engine, stackName, fresh, dropped, replaced = [])
42948
43139
  }
42949
43140
  const again = attempt < 4 && isEtagConflict(failure) ? await engine.stateBackend.getState(stackName, region).catch(() => null) : null;
42950
43141
  if (again === null || again === void 0) {
42951
- const ids = dropped.map((entry) => `${entry.logicalId} (${entry.state.physicalId})`).join(", ");
43142
+ const ids = dropped.map((entry) => `${entry.logicalId} (${displayPhysicalId(entry.state.resourceType, entry.state.physicalId)})`).join(", ");
42952
43143
  engine.logger.warn(safeMsg` ⚠ Could not record in the state of nested stack ${displayStackName(stackName)} (region ${region}) that these replaced resources were deleted: ${ids}: ${asIsMessage(describeAwsFailure(failure).summary)}. They stay listed there, and its next deploy sends their deletes again`);
42953
43144
  return dropped.length;
42954
43145
  }
@@ -43254,7 +43445,7 @@ function planContributorInsightsOp(desired, previous, onUnusable) {
43254
43445
  onUnusable(desired.reason);
43255
43446
  return;
43256
43447
  }
43257
- if (desired.kind === "absent") return previous.kind === "absent" ? void 0 : { action: "DISABLE" };
43448
+ if (desired.kind === "absent") return previous.kind === "absent" || previous.kind === "usable" && !previous.enabled ? void 0 : { action: "DISABLE" };
43258
43449
  if (previous.kind === "usable" && previous.enabled === desired.enabled && (!desired.enabled || previous.mode === desired.mode)) return;
43259
43450
  if (!desired.enabled) return { action: "DISABLE" };
43260
43451
  return desired.mode === void 0 ? { action: "ENABLE" } : {
@@ -43312,12 +43503,25 @@ function enabledForStatus(status, transientAsTarget) {
43312
43503
  if (status === "DISABLED" || transientAsTarget && status === "DISABLING") return false;
43313
43504
  }
43314
43505
  function reverseMapTableContributorInsights(status, mode) {
43315
- const enabled = enabledForStatus(status, false);
43506
+ const enabled = enabledForStatus(status, true);
43316
43507
  if (enabled === void 0) return void 0;
43317
43508
  const block = { Enabled: enabled };
43318
43509
  if (enabled && mode !== void 0) block["Mode"] = mode;
43319
43510
  return block;
43320
43511
  }
43512
+ function completeTableContributorInsightsBaseline(baseline, aws, properties) {
43513
+ if (hasOwnKey(baseline, "ContributorInsightsSpecification")) return void 0;
43514
+ const live = aws[CONTRIBUTOR_INSIGHTS_KEY];
43515
+ if (typeof live !== "object" || live === null || Array.isArray(live)) return void 0;
43516
+ const declared = readContributorInsightsSpec(properties[CONTRIBUTOR_INSIGHTS_KEY], CONTRIBUTOR_INSIGHTS_KEY);
43517
+ if (declared.kind !== "usable") return void 0;
43518
+ const block = { Enabled: declared.enabled };
43519
+ if (!declared.enabled) return block;
43520
+ const liveBlock = live;
43521
+ const mode = declared.mode ?? (liveBlock["Enabled"] === true && typeof liveBlock["Mode"] === "string" ? liveBlock["Mode"] : void 0);
43522
+ if (mode !== void 0) block["Mode"] = mode;
43523
+ return block;
43524
+ }
43321
43525
  function reverseMapIndexContributorInsights(status, mode, declaredBlock) {
43322
43526
  const declared = readContributorInsightsSpec(declaredBlock, INDEX_CONTRIBUTOR_INSIGHTS_PATH);
43323
43527
  if (declared.kind !== "usable") return void 0;
@@ -50988,9 +51192,9 @@ async function recreateDestroyThenCreate(engine, { currentResource, equalIdIsSam
50988
51192
  if (updateReplacePolicy === "Retain") {
50989
51193
  engine.replacementRun.retainedOldOnReplacement.add(logicalId);
50990
51194
  await noteRetainedResource(oldResourceType, logicalId);
50991
- engine.logger.warn(safeMsg` ⚠ ${logicalId} has UpdateReplacePolicy: Retain — ${recreateFlagName} will ` + safeMsg`leak the old physical resource (${currentResource.physicalId}). The new ` + "resource shares the same name where applicable; if the type has user-supplied names (e.g. functionName, bucketName), the create will deterministically collide with the retained orphan.");
51195
+ engine.logger.warn(safeMsg` ⚠ ${logicalId} has UpdateReplacePolicy: Retain — ${recreateFlagName} will ` + safeMsg`leak the old physical resource (${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)}). The new ` + "resource shares the same name where applicable; if the type has user-supplied names (e.g. functionName, bucketName), the create will deterministically collide with the retained orphan.");
50992
51196
  } else {
50993
- engine.logger.info(safeMsg` Destroying old ${logicalId} (${currentResource.physicalId}) before recreate...`);
51197
+ engine.logger.info(safeMsg` Destroying old ${logicalId} (${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)}) before recreate...`);
50994
51198
  const recreateFinalSnapshotId = await prepareFinalSnapshotForDelete(engine.replacementDeps(), logicalId, oldResourceType, currentResource, updateReplacePolicy, createUnionSecretMasker([updateSecrets, secretNameBagFor(engine.secretsRun, logicalId)]));
50995
51199
  let recreateDeleteResult;
50996
51200
  try {
@@ -51015,7 +51219,7 @@ async function recreateDestroyThenCreate(engine, { currentResource, equalIdIsSam
51015
51219
  observed: currentResource.observedProperties
51016
51220
  }) ? "Give it a new name in the template, so that the recreate creates the new resource first and deletes the old one once its dependents have moved, or remove" : `Remove`) + ` those dependents from the template, deploy, recreate it, and add them back.` : "";
51017
51221
  const deleteFailure = describeAwsFailure(deleteError);
51018
- const destroyFailureText = (text) => safeMsg`Failed to destroy old resource ${maskSecretsInText(logicalId, shownSecrets)} ` + safeMsg`(${maskSecretsInText(currentResource.physicalId, shownSecrets)}) during ${recreateFlagName}: ` + safeMsg`${asIsMessage(maskSecretsInText(text, shownSecrets))}` + dependentHint;
51222
+ const destroyFailureText = (text) => safeMsg`Failed to destroy old resource ${maskSecretsInText(logicalId, shownSecrets)} ` + safeMsg`(${maskSecretsInText(String(displayPhysicalId(currentResource.resourceType, currentResource.physicalId)), shownSecrets)}) during ${recreateFlagName}: ` + safeMsg`${asIsMessage(maskSecretsInText(text, shownSecrets))}` + dependentHint;
51019
51223
  if (deleteFailure.redacted) engine.logger.debug(destroyFailureText(deleteFailure.detail));
51020
51224
  const destroyFailure = new Error(destroyFailureText(deleteFailure.redacted ? deleteFailure.summary : deleteFailure.detail), { cause: deleteError instanceof Error ? maskSecretsInError(deleteError, updateSecrets) : void 0 });
51021
51225
  throw deleteFailure.redacted && deleteError instanceof Error ? markRedactedCause(destroyFailure) : destroyFailure;
@@ -51026,7 +51230,7 @@ async function recreateDestroyThenCreate(engine, { currentResource, equalIdIsSam
51026
51230
  provisionedBy: oldDeleteRoute.provisionedBy
51027
51231
  });
51028
51232
  const recreateSkipReason = deleteSkipReason(recreateDeleteResult);
51029
- if (recreateSkipReason !== void 0) throw new Error(deleteSkippedMessage(logicalId, currentResource.physicalId, recreateSkipReason, `during ${recreateFlagName}`));
51233
+ if (recreateSkipReason !== void 0) throw new Error(deleteSkippedMessage(logicalId, displayPhysicalId(currentResource.resourceType, currentResource.physicalId), recreateSkipReason, `during ${recreateFlagName}`));
51030
51234
  engine.logger.info(safeMsg` ${green("✓")} Old resource deleted`);
51031
51235
  engine.replacementRun.oldDeletedBeforeCreate.add(logicalId);
51032
51236
  await oldDeleteProvider.waitForNameReleased?.(logicalId, currentResource.physicalId, oldResourceType, {
@@ -51053,7 +51257,7 @@ async function recreateDestroyThenCreate(engine, { currentResource, equalIdIsSam
51053
51257
  onInterrupted: () => new InterruptedError("user"),
51054
51258
  isRetryable: isRecreateRetryableError
51055
51259
  }));
51056
- if (equalIdIsSameResource && updateReplacePolicy === "Retain" && createResult.physicalId === currentResource.physicalId) throw new CdkdError(safeMsg`${logicalId} (${resourceType}) recreate returned the existing resource ` + safeMsg`(${currentResource.physicalId}) instead of creating a new one — its Create ` + "API is name-idempotent — and UpdateReplacePolicy: Retain means the old resource was never destroyed, so the new properties were not applied. Rename the resource in your CDK code (or remove the explicit physical name) so the recreate can produce a genuinely new resource.", "NAMED_REPLACEMENT_IDEMPOTENT_CREATE");
51260
+ if (equalIdIsSameResource && updateReplacePolicy === "Retain" && createResult.physicalId === currentResource.physicalId) throw new CdkdError(safeMsg`${logicalId} (${resourceType}) recreate returned the existing resource ` + safeMsg`(${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)}) instead of creating a new one — its Create ` + "API is name-idempotent — and UpdateReplacePolicy: Retain means the old resource was never destroyed, so the new properties were not applied. Rename the resource in your CDK code (or remove the explicit physical name) so the recreate can produce a genuinely new resource.", "NAMED_REPLACEMENT_IDEMPOTENT_CREATE");
51057
51261
  return createResult;
51058
51262
  }
51059
51263
 
@@ -51087,7 +51291,7 @@ async function replaceCreateFirst(engine, { currentResource, equalIdIsSameResour
51087
51291
  const createSentence = createMsg.endsWith(".") ? createMsg.slice(0, -1) : createMsg;
51088
51292
  if (!isNameCollisionErrorFrom(createError, logicalId)) throw createError;
51089
51293
  if (createFailure.redacted) engine.logger.debug(safeMsg`${maskSecretsInText(logicalId, updateSecrets)}: the create-first attempt collided: ${asIsMessage(createAwsMsg)}`);
51090
- const nameOrigin = replacementNameOrigin(logicalId, currentResource.physicalId);
51294
+ const nameOrigin = replacementNameOrigin(logicalId, currentResource.physicalId, currentResource.resourceType);
51091
51295
  const nameHeldElsewhere = replacementRequestsDifferentName({
51092
51296
  oldResourceType,
51093
51297
  newResourceType: resourceType,
@@ -51096,7 +51300,7 @@ async function replaceCreateFirst(engine, { currentResource, equalIdIsSameResour
51096
51300
  observed: currentResource.observedProperties,
51097
51301
  physicalId: currentResource.physicalId
51098
51302
  });
51099
- if (nameHeldElsewhere !== void 0) throw markNonRetryable(new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement, but the create-first ` + safeMsg`attempt collided: ${createSentence}. ${renderNameHeldElsewhere(nameHeldElsewhere)}` + (engine.options.replace === true ? ` — so --replace was NOT applied and nothing was deleted.` : updateReplacePolicy === "Retain" ? " — so removing UpdateReplacePolicy: Retain and re-running with `cdkd deploy --replace` would delete this resource and still collide." : " — so `cdkd deploy --replace` would delete this resource and still collide.") + " Choose a name no other resource holds, or delete the resource holding it if it is yours.", "NAMED_REPLACEMENT_COLLISION", createError instanceof Error ? createError : void 0));
51303
+ if (nameHeldElsewhere !== void 0) throw markNonRetryable(new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement, but the create-first ` + safeMsg`attempt collided: ${createSentence}. ${renderNameHeldElsewhere(nameHeldElsewhere, currentResource.resourceType)}` + (engine.options.replace === true ? ` — so --replace was NOT applied and nothing was deleted.` : updateReplacePolicy === "Retain" ? " — so removing UpdateReplacePolicy: Retain and re-running with `cdkd deploy --replace` would delete this resource and still collide." : " — so `cdkd deploy --replace` would delete this resource and still collide.") + " Choose a name no other resource holds, or delete the resource holding it if it is yours.", "NAMED_REPLACEMENT_COLLISION", createError instanceof Error ? createError : void 0));
51100
51304
  const holder = replacementOldHoldsSentName({
51101
51305
  createType: resourceType,
51102
51306
  holderType: oldResourceType,
@@ -51117,20 +51321,21 @@ async function replaceCreateFirst(engine, { currentResource, equalIdIsSameResour
51117
51321
  logicalId,
51118
51322
  change: nameChange,
51119
51323
  oldPhysicalId: currentResource.physicalId,
51324
+ oldResourceType: currentResource.resourceType,
51120
51325
  mask: (value) => maskSecretsInText(value, unionOfSecretBags([updateSecrets, printingSecretsFor(engine.secretsRun, logicalId)]))
51121
51326
  }) + ` Underlying collision: ${createMsg}`, updateSecrets), "NAMED_REPLACEMENT_COLLISION", createError instanceof Error ? createError : void 0));
51122
51327
  }
51123
51328
  if (updateReplacePolicy === "Retain") throw new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement, but its physical name ` + `is still held by the existing resource AND UpdateReplacePolicy: Retain ` + safeMsg`pins that resource in place. ${nameOrigin.descriptor}. ` + safeMsg`${nameOrigin.remedy} — with Retain, the old resource keeps the name, so a ` + `same-name replacement can never proceed.`, "NAMED_REPLACEMENT_COLLISION");
51124
51329
  if (engine.options.replace !== true) throw new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement, but the create-first ` + safeMsg`attempt collided with the existing resource: ${createSentence}. ` + safeMsg`${nameOrigin.descriptor}, so the CloudFormation-style safe replacement ` + "order (create the new resource before deleting the old) cannot reuse the occupied name — CloudFormation refuses this shape with \"cannot update a stack when a custom-named resource requires replacing\". " + safeMsg`${nameOrigin.remedy}, or re-run with ${deployReplaceCommand()} to delete ` + "the old resource FIRST and recreate it under the same name (the resource is briefly unavailable while it is recreated).", "NAMED_REPLACEMENT_COLLISION");
51125
- engine.logger.info(` Create-first collided with the existing resource's name and --replace is ` + safeMsg`set — deleting old ${logicalId} (${currentResource.physicalId}) first...`);
51330
+ engine.logger.info(` Create-first collided with the existing resource's name and --replace is ` + safeMsg`set — deleting old ${logicalId} (${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)}) first...`);
51126
51331
  deletedOldFirst = true;
51127
51332
  createResult = await replaceDeleteFirstAndRecreate(engine.replacementRun, engine.replacementDeps(), logicalId, resourceType, oldResourceType, currentResource, oldDeleteProvider, replaceProvider, replaceProps, updateSecrets, updateReplacePolicy, oldDeleteRoute.provisionedBy, noEchoDeleteValues);
51128
51333
  }
51129
51334
  if (equalIdIsSameResource && !deletedOldFirst && createResult.physicalId === currentResource.physicalId) {
51130
- const idempotentNameOrigin = replacementNameOrigin(logicalId, currentResource.physicalId);
51131
- if (updateReplacePolicy === "Retain") throw new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement, but its Create API is ` + `name-idempotent: the create-first attempt returned the existing resource ` + safeMsg`(${currentResource.physicalId}) instead of creating a new one, and ` + `UpdateReplacePolicy: Retain pins that resource in place. ` + safeMsg`${idempotentNameOrigin.descriptor}. ${idempotentNameOrigin.remedy} — with ` + "Retain, the old resource keeps the name, so a same-name replacement can never proceed.", "NAMED_REPLACEMENT_IDEMPOTENT_CREATE");
51132
- if (engine.options.replace !== true) throw new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement, but its Create API is ` + `name-idempotent: the create-first attempt returned the EXISTING resource ` + safeMsg`(${currentResource.physicalId}) instead of creating a new one, so deleting ` + `the "old" resource would silently destroy the resource the deploy just ` + safeMsg`reported as created. ${idempotentNameOrigin.descriptor}; ` + safeMsg`${idempotentNameOrigin.remedy}, or re-run with ` + `${deployReplaceCommand()} to delete the old resource FIRST and recreate it under the same name (the resource is briefly unavailable while it is recreated). Note: this branch is also reached when the old resource was deleted out-of-band and the physical id is name-derived — there the create was a genuine fresh create; \`--replace\` converges that case too.`, "NAMED_REPLACEMENT_IDEMPOTENT_CREATE");
51133
- engine.logger.info(` Create-first returned the existing resource (name-idempotent Create API) ` + safeMsg`and --replace is set — deleting old ${logicalId} ` + safeMsg`(${currentResource.physicalId}) first...`);
51335
+ const idempotentNameOrigin = replacementNameOrigin(logicalId, currentResource.physicalId, currentResource.resourceType);
51336
+ if (updateReplacePolicy === "Retain") throw new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement, but its Create API is ` + `name-idempotent: the create-first attempt returned the existing resource ` + safeMsg`(${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)}) instead of creating a new one, and ` + `UpdateReplacePolicy: Retain pins that resource in place. ` + safeMsg`${idempotentNameOrigin.descriptor}. ${idempotentNameOrigin.remedy} — with ` + "Retain, the old resource keeps the name, so a same-name replacement can never proceed.", "NAMED_REPLACEMENT_IDEMPOTENT_CREATE");
51337
+ if (engine.options.replace !== true) throw new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement, but its Create API is ` + `name-idempotent: the create-first attempt returned the EXISTING resource ` + safeMsg`(${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)}) instead of creating a new one, so deleting ` + `the "old" resource would silently destroy the resource the deploy just ` + safeMsg`reported as created. ${idempotentNameOrigin.descriptor}; ` + safeMsg`${idempotentNameOrigin.remedy}, or re-run with ` + `${deployReplaceCommand()} to delete the old resource FIRST and recreate it under the same name (the resource is briefly unavailable while it is recreated). Note: this branch is also reached when the old resource was deleted out-of-band and the physical id is name-derived — there the create was a genuine fresh create; \`--replace\` converges that case too.`, "NAMED_REPLACEMENT_IDEMPOTENT_CREATE");
51338
+ engine.logger.info(` Create-first returned the existing resource (name-idempotent Create API) ` + safeMsg`and --replace is set — deleting old ${logicalId} ` + safeMsg`(${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)}) first...`);
51134
51339
  deletedOldFirst = true;
51135
51340
  createResult = await replaceDeleteFirstAndRecreate(engine.replacementRun, engine.replacementDeps(), logicalId, resourceType, oldResourceType, currentResource, oldDeleteProvider, replaceProvider, replaceProps, updateSecrets, updateReplacePolicy, oldDeleteRoute.provisionedBy, noEchoDeleteValues);
51136
51341
  }
@@ -51147,7 +51352,7 @@ async function replaceCreateFirst(engine, { currentResource, equalIdIsSameResour
51147
51352
  if (snapshotError instanceof CdkdError && snapshotError.code === "FINAL_SNAPSHOT_UNSUPPORTED") throw snapshotError;
51148
51353
  snapshotBlockedDelete = true;
51149
51354
  engine.replacementRun.replacedOldMaySurvive.set(logicalId, "kept");
51150
- engine.logger.warn(safeMsg` ⚠ Final snapshot for old ${logicalId} (${currentResource.physicalId}) ` + safeMsg`failed: ${asIsMessage(describeAwsFailure(snapshotError).detail)}. ` + "The old resource was NOT deleted (UpdateReplacePolicy: Snapshot) — delete it manually once you have a snapshot; it is no longer tracked in state.");
51355
+ engine.logger.warn(safeMsg` ⚠ Final snapshot for old ${logicalId} (${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)}) ` + safeMsg`failed: ${asIsMessage(describeAwsFailure(snapshotError).detail)}. ` + "The old resource was NOT deleted (UpdateReplacePolicy: Snapshot) — delete it manually once you have a snapshot; it is no longer tracked in state.");
51151
51356
  }
51152
51357
  if (!snapshotBlockedDelete) await deleteReplacedAfterCreate(engine.replacementRun, engine.replacementDeps(), logicalId, oldResourceType, currentResource, oldDeleteProvider, currentResource.properties, cleanupFinalSnapshotId, updateReplacePolicy, updateSecrets, oldDeleteRoute.provisionedBy, noEchoDeleteValues, false, createResult.physicalId === currentResource.physicalId && resourceType === oldResourceType);
51153
51358
  }
@@ -51387,7 +51592,7 @@ async function deleteOldIdAfterDeploy(run, deps, input) {
51387
51592
  return;
51388
51593
  }
51389
51594
  if (keptBy === "Snapshot") {
51390
- run.replacedDeleteSkips.set(logicalId, `the old physical id ${oldResource.physicalId} was not sent a Delete (UpdateReplacePolicy: Snapshot) and is no longer tracked by cdkd`);
51595
+ run.replacedDeleteSkips.set(logicalId, `the old physical id ${shownOldId} was not sent a Delete (UpdateReplacePolicy: Snapshot) and is no longer tracked by cdkd`);
51391
51596
  deps.logger.warn(safeMsg` ⚠ ${logicalId} has UpdateReplacePolicy: Snapshot, which a custom resource cannot take — its old physical id (${shownOldId}) is not sent a Delete and is no longer tracked by cdkd`);
51392
51597
  return;
51393
51598
  }
@@ -51395,7 +51600,7 @@ async function deleteOldIdAfterDeploy(run, deps, input) {
51395
51600
  try {
51396
51601
  noEchoDeleteValues = await input.noEchoDeleteValues();
51397
51602
  } catch {
51398
- run.replacedDeleteSkips.set(logicalId, `the old physical id ${oldResource.physicalId} was not sent a Delete (its properties could not be prepared) and is no longer tracked by cdkd`);
51603
+ run.replacedDeleteSkips.set(logicalId, `the old physical id ${shownOldId} was not sent a Delete (its properties could not be prepared) and is no longer tracked by cdkd`);
51399
51604
  deps.logger.warn(safeMsg` ⚠ ${logicalId}'s old physical id (${shownOldId}) is not sent a Delete: cdkd could not prepare its properties. It is no longer tracked by cdkd; delete what the handler made under it manually`);
51400
51605
  return;
51401
51606
  }
@@ -51517,7 +51722,7 @@ async function replaceFallbackFor(engine, { currentProps, currentResource, logic
51517
51722
  provisionedBy: updateDecision.provisionedBy
51518
51723
  });
51519
51724
  const fallbackSkipReason = deleteSkipReason(fallbackDeleteResult);
51520
- if (fallbackSkipReason !== void 0) throw new Error(deleteSkippedMessage(logicalId, currentResource.physicalId, fallbackSkipReason, "during the UPDATE-not-supported replacement"));
51725
+ if (fallbackSkipReason !== void 0) throw new Error(deleteSkippedMessage(logicalId, displayPhysicalId(currentResource.resourceType, currentResource.physicalId), fallbackSkipReason, "during the UPDATE-not-supported replacement"));
51521
51726
  engine.replacementRun.oldDeletedBeforeCreate.add(logicalId);
51522
51727
  await updateProvider.waitForNameReleased?.(logicalId, currentResource.physicalId, resourceType, {
51523
51728
  isInterrupted: () => engine.userInterrupted,
@@ -51564,7 +51769,7 @@ async function replaceFallbackFor(engine, { currentProps, currentResource, logic
51564
51769
  if (!retainOldOnReplace) {
51565
51770
  const shownSecrets = unionOfSecretBags([updateSecrets, printingSecretsFor(engine.secretsRun, logicalId)]);
51566
51771
  const createFailure = describeAwsFailure(createError);
51567
- const createFailureText = (text) => safeMsg`Failed to create ${maskSecretsInText(logicalId, shownSecrets)} after the ` + safeMsg`UPDATE-not-supported replacement: the old resource (${maskSecretsInText(currentResource.physicalId, shownSecrets)}) ` + safeMsg`is now gone. Re-run the deploy to create it fresh. Cause: ${asIsMessage(maskSecretsInText(text, shownSecrets))}`;
51772
+ const createFailureText = (text) => safeMsg`Failed to create ${maskSecretsInText(logicalId, shownSecrets)} after the ` + safeMsg`UPDATE-not-supported replacement: the old resource (${maskSecretsInText(String(displayPhysicalId(currentResource.resourceType, currentResource.physicalId)), shownSecrets)}) ` + safeMsg`is now gone. Re-run the deploy to create it fresh. Cause: ${asIsMessage(maskSecretsInText(text, shownSecrets))}`;
51568
51773
  if (createFailure.redacted) engine.logger.debug(createFailureText(createFailure.detail));
51569
51774
  const createFailed = new Error(createFailureText(createFailure.redacted ? createFailure.summary : createFailure.detail), { cause: createError instanceof Error ? createError : void 0 });
51570
51775
  throw createFailure.redacted && createError instanceof Error ? markRedactedCause(createFailed) : createFailed;
@@ -51578,8 +51783,8 @@ async function replaceFallbackFor(engine, { currentProps, currentResource, logic
51578
51783
  observed: currentResource.observedProperties,
51579
51784
  physicalId: currentResource.physicalId
51580
51785
  });
51581
- if (nameHeldElsewhere !== void 0) throw markNonRetryable(new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement because the ` + `provisioning layer cannot update it in place, but the create collided. ` + safeMsg`${renderNameHeldElsewhere(nameHeldElsewhere)} — so removing ` + "UpdateReplacePolicy: Retain would delete this resource and still collide. Choose a name no other resource holds, or delete the resource holding it if it is yours.", "NAMED_REPLACEMENT_COLLISION", createError instanceof Error ? createError : void 0));
51582
- const nameOrigin = replacementNameOrigin(logicalId, currentResource.physicalId);
51786
+ if (nameHeldElsewhere !== void 0) throw markNonRetryable(new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement because the ` + `provisioning layer cannot update it in place, but the create collided. ` + safeMsg`${renderNameHeldElsewhere(nameHeldElsewhere, currentResource.resourceType)} — so removing ` + "UpdateReplacePolicy: Retain would delete this resource and still collide. Choose a name no other resource holds, or delete the resource holding it if it is yours.", "NAMED_REPLACEMENT_COLLISION", createError instanceof Error ? createError : void 0));
51787
+ const nameOrigin = replacementNameOrigin(logicalId, currentResource.physicalId, currentResource.resourceType);
51583
51788
  throw markNonRetryable(new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement because the ` + "provisioning layer cannot update it in place — but its physical name is still held by the existing resource AND UpdateReplacePolicy: Retain pins that resource in place. " + safeMsg`${nameOrigin.descriptor}. ${nameOrigin.remedy} — with Retain, the old ` + "resource keeps the name, so a same-name replacement can never proceed. Removing UpdateReplacePolicy: Retain lets cdkd delete the old resource first, which destroys it and any data it holds.", "NAMED_REPLACEMENT_COLLISION", createError instanceof Error ? createError : void 0));
51584
51789
  }
51585
51790
  if (!retainOldOnReplace && !createFirst && createResult.physicalId === currentResource.physicalId && !equalIdNamesDifferentResources({
@@ -51595,8 +51800,8 @@ async function replaceFallbackFor(engine, { currentProps, currentResource, logic
51595
51800
  oldProperties: currentResource.properties,
51596
51801
  newProperties: resolvedProps
51597
51802
  })) {
51598
- const idempotentNameOrigin = replacementNameOrigin(logicalId, currentResource.physicalId);
51599
- throw markNonRetryable(new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement, but its Create ` + `API is name-idempotent: the create returned the existing resource ` + safeMsg`(${currentResource.physicalId}) instead of creating a new one, and ` + `UpdateReplacePolicy: Retain pins that resource in place, so the new ` + safeMsg`properties were not applied. ${idempotentNameOrigin.descriptor}. ` + safeMsg`${idempotentNameOrigin.remedy} — with Retain, the old resource keeps ` + `the name, so a same-name replacement can never proceed.`, "NAMED_REPLACEMENT_IDEMPOTENT_CREATE"));
51803
+ const idempotentNameOrigin = replacementNameOrigin(logicalId, currentResource.physicalId, currentResource.resourceType);
51804
+ throw markNonRetryable(new CdkdError(safeMsg`${logicalId} (${resourceType}) requires replacement, but its Create ` + `API is name-idempotent: the create returned the existing resource ` + safeMsg`(${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)}) instead of creating a new one, and ` + `UpdateReplacePolicy: Retain pins that resource in place, so the new ` + safeMsg`properties were not applied. ${idempotentNameOrigin.descriptor}. ` + safeMsg`${idempotentNameOrigin.remedy} — with Retain, the old resource keeps ` + `the name, so a same-name replacement can never proceed.`, "NAMED_REPLACEMENT_IDEMPOTENT_CREATE"));
51600
51805
  }
51601
51806
  engine.replacementRun.retainedOldOnReplacement.add(logicalId);
51602
51807
  engine.logger.warn(safeMsg` ⚠ ${logicalId} has UpdateReplacePolicy: Retain — the old physical ` + safeMsg`resource (${displayPhysicalId(currentResource.resourceType, currentResource.physicalId)}) is RETAINED and is no longer ` + "tracked by cdkd: it keeps running and incurring cost, and `cdkd destroy` will not remove it. Delete it yourself once you no longer need its data.");
@@ -52912,7 +53117,7 @@ async function settleFailedDeployRecords(run) {
52912
53117
  engine.logger.warn(safeMsg` ⚠ ${lost.logicalId} (${childType}) went with a resource this deploy re-created under the same id; restoring it failed, and its state record is kept because the write may have reached AWS. If it is missing there, re-run the deploy with `.concat(recovery, " to write it again."));
52913
53118
  continue;
52914
53119
  }
52915
- const parentPhysicalId = newResources[lost.parent]?.physicalId;
53120
+ const parentPhysicalId = displayPhysicalId(newResources[lost.parent]?.resourceType, newResources[lost.parent]?.physicalId);
52916
53121
  const parentShown = parentPhysicalId !== void 0 && parentPhysicalId !== "" ? safeMsg`${lost.parent} (${parentPhysicalId})` : safeMsg`${lost.parent}`;
52917
53122
  const mayStillBeLive = attempted.has(lost.logicalId) ? safeMsg` Its write may still be on `.concat(parentShown, safeMsg`: if ${lost.logicalId} is removed from the template before the next deploy, remove it from that resource by hand.`) : "";
52918
53123
  if (lost.action === "forget" && mayStillBeLive !== "") {
@@ -53063,7 +53268,7 @@ async function rollbackFailedDeploy(run, error, initialDeploy, currentEtag) {
53063
53268
  if (autoRollbackClean) await settleNestedChildrenAfterCleanRollback(engine.rollbackDeps(), stackName, rollbackSettledNested, await settleJournalAfterCleanRollback(engine.rollbackDeps(), stackName, rollbackRemainingFailedOps, initialDeploy));
53064
53269
  } catch (retryError) {
53065
53270
  engine.logger.warn(safeMsg`Failed to save state after rollback: ${asIsMessage(describeAwsFailure(retryError).detail)}`);
53066
- for (const entry of rollbackSuperseded) withPrintingSecrets(unionOfSecretBags([secretNameBagFor(engine.secretsRun, entry.logicalId), orphanRecordsPrintingBag([entry])]), () => engine.logger.warn(safeMsg` ${entry.logicalId}'s new ${entry.state.resourceType} ` + safeMsg`(${entry.state.physicalId}) the rollback left to delete is NOT recorded: ` + "delete it manually."));
53271
+ for (const entry of rollbackSuperseded) withPrintingSecrets(unionOfSecretBags([secretNameBagFor(engine.secretsRun, entry.logicalId), orphanRecordsPrintingBag([entry])]), () => engine.logger.warn(safeMsg` ${entry.logicalId}'s new ${entry.state.resourceType} ` + safeMsg`(${displayPhysicalId(entry.state.resourceType, entry.state.physicalId)}) the rollback left to delete is NOT recorded: ` + "delete it manually."));
53067
53272
  }
53068
53273
  }
53069
53274
  }
@@ -53138,7 +53343,7 @@ async function executeDeploymentBody(engine, template, currentState, changes, da
53138
53343
  const startedUpdates = /* @__PURE__ */ new Set();
53139
53344
  const settledUpdates = /* @__PURE__ */ new Set();
53140
53345
  const inFlightWrites = /* @__PURE__ */ new Map();
53141
- engine.stackRecordsView = deployStackRecordsView(newResources, currentState.resources, deleteChanges, (logicalId) => startedUpdates.has(logicalId) && !settledUpdates.has(logicalId), () => [...inFlightWrites.values()].map(({ write }) => write));
53346
+ engine.stackRecordsView = deployStackRecordsView(newResources, currentState.resources, deleteChanges, (logicalId) => startedUpdates.has(logicalId) && !settledUpdates.has(logicalId), () => [...inFlightWrites.values()].map(({ write }) => write), (logicalId) => engine.replacementRun.updateWasReplaced.get(logicalId) === true || completedOperations.some((op) => op.logicalId === logicalId && op.changeType === "CREATE"));
53142
53347
  engine.replacementRun.deferredReplacedDeletes = /* @__PURE__ */ new Map();
53143
53348
  engine.replacementRun.supersededHost = currentState;
53144
53349
  const carriedSuperseded = supersededResourcesOf(currentState).filter((entry) => {
@@ -55297,5 +55502,5 @@ var DeployEngine = class {
55297
55502
  }
55298
55503
  };
55299
55504
 
55300
- export { recordTagWrite as $, policyContentKey as $a, refuseMalformedResourcePropertiesForExport as $c, cyan as $i, rebuildClientForBucketRegion as $l, propertiesChangedReason as $n, assertFlagRoleArn as $o, redactedDeleteAddressFields as $r, findReplacedReadersOfRecreateTargets as $s, macWriteOnlyKeys as $t, getCdkdAssetBucketName as $u, recordedProtectionEvidence as A, createPreDeleteFinalSnapshot as Aa, refuseMalformedOrphansForOrphan as Ac, isExportAliasCollision as Ai, withheldAccountClause as Al, crossStackReadsForPartialSave as An, deleteIndeterminateGuards as Ao, updatePartialReason as Ar, promoteInPlaceAttributeDependents as As, DELETE_INDEX_WAIT_PROCEED_NOTE as At, isDefaultBootstrapRepoName as Au, declaredStreamTagsMember as B, OWN_WRITE_REREAD_DELAYS_MS as Ba, refuseMalformedResourceEntries as Bc, holdsSupersededResources as Bi, withoutAcceptedSdkUnwiredProperties as Bl, findRefactorHints as Bn, poisonRenderedSpellingsCollidingIn as Bo, demoteSupersededOrphans as Br, carriesFetchableDynamicReference as Bs, isTruthyCfnBoolean as Bt, warnAbsoluteAssetPath as Bu, pendingMovesOutOf as C, PRE_DELETE_SNAPSHOT_TYPES as Ca, isReadableOrphanRecord as Cc, carriedExportAliasExposure as Ci, refuseMalformedResourcesForDeploy as Cl, loadJournaledOrphans as Cn, setLocalCustomResourceRuntimeEnabled as Co, settleUnsettledPrevious as Cr, cfnRefValueFromPhysicalId as Cs, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as Ct, rememberSynthesizedStacks as Cu, findServiceTokenRefusals as D, isFinalSnapshotError as Da, previewableOrphanRecords as Dc, noEchoParameterValueSeed as Di, repairMalformedResourcesForReadOnly as Dl, planOrphanAdoption as Dn, waitForGoneAfterDelete as Do, equalModuloMask as Dr, lacksRecordedTableArn as Ds, deleteBudgetKey as Dt, createLazyAssetModeContext as Du, deferredServiceTokenWarning as E, effectiveDeletionPolicy as Ea, malformedOrphanRowsKeptWarning as Ec, isWholeDynamicReferenceValue as Ei, refuseMalformedState as El, makeSiblingClaimReader as En, CloudControlProvider as Eo, equalModuloMarkedMask as Er, lacksRecordedRefArn as Es, compensateRemovedDeletionProtection as Et, createAssetRedirectResolver as Eu, readProtection as F, isStoredExpression as Fa, malformedLocalResourceEntriesWarning as Fc, awaitInFlightSibling as Fi, hasReadableResources as Fl, noEchoMacVerdict as Fn, isWaitAbandonedError as Fo, reserveStackCreateToken as Fr, recordedReferenceRegions as Fs, relayedIndexBusyDelete as Ft, AssetManifestLoader as Fu, streamDeclaresTags as G, lambdaPermissionMatchesDeclared as Ga, refuseMalformedResourceEntriesForOrphan as Gc, supersededResourcesOf as Gi, PROPERTY_COVERAGE_BY_TYPE as Gl, changedReferenceInDiff as Gn, maskedSecretSegment as Go, recordUnderIdIsNotOwn as Gr, namesRecreatedParent as Gs, refactorMarkerMovesOf as Gt, assertAssetBucketRegion as Gu, readStreamPolicy as H, declaredMemberDocument as Ha, refuseMalformedResourceEntriesForDestroy as Hc, supersededAfterRollback as Hi, withoutUnwrittenSdkUnwiredProperties as Hl, movedToHint as Hn, isSettledInstanceState as Ho, isReplacementOrphan as Hr, carriesDynamicReference as Hs, recordRetainedForReadoption as Ht, AssetModeResolver as Hu, DynamoDBGlobalTableProvider as I, withoutSiblingAttachedArns as Ia, malformedLocalResourcesWarning as Ic, destroyStackRecordsView as Ii, findActionableSdkUnwired as Il, noEchoValueMacsOf as In, markWaitAbandoned as Io, withCreateTokenLedger as Ir, referenceProvenanceOf as Is, waitForIndexesSettled as It, getDockerImageBySourceHash as Iu, streamTagsMatchDeclared as J, reReadUntilSettled as Ja, malformedDriftResourcePropertiesWarning as Jc, snapshotSegmentSurvivors as Ji, splitImportedOps as Jl, differingRemedy as Jn, withSecretPhysicalIdsMaskedInState as Jo, computeImplicitDeleteEdges as Jr, markNewValueKnownAfterDeploy as Js, sameMove as Jt, parseBootstrapMarker as Ju, streamMemberRefusals as K, memberReadFailure as Ka, repairMalformedResourceEntriesForReadOnly as Kc, withoutSuperseded as Ki, TemplateParser as Kl, changedReferencePath as Kn, secretPhysicalIdSegment as Ko, replacementNeverSwapped as Kr, INTRINSIC_KEYS as Ks, refactorMarkerRefusalMessage as Kt, isCrossRegionRedirect as Ku, STREAM_POLICY_KEY as L, withoutSiblingOwned as La, malformedResourceEntriesWarning as Lc, getStackRecords as Li, findHandledUnwrittenCreateOnly as Ll, constructPathOf as Ln, IntrinsicFunctionResolver as Lo, acquireIdempotencyToken as Lr, referenceTokensIn as Ls, ECR_AUTO_DELETE_IMAGES_TAG as Lt, isCfnTemplateAssetPath as Lu, PROTECTION_PROPERTY_BY_TYPE as M, collectGroupsAddedBySiblings as Ma, unpreviewableOrphanRecords as Mc, DEFAULT_RESOURCE_TIMEOUT_MS as Mi, UNREADABLE_RESOURCES_MAP_ROW as Ml, createNoEchoValueMacs as Mn, deleteSkipReason as Mo, replacementCreateRoutesToCloudControl as Mr, outputReferenceProvenanceOf as Ms, TABLE_INDEX_NOUN as Mt, redirectDockerAsset as Mu, isProtectionValueActive as N, collectManagedPolicyArnsAttachedBySiblings as Na, unreadableOrphanRecords as Nc, DEFAULT_RESOURCE_WARN_AFTER_MS as Ni, displayLogicalId as Nl, noEchoMacBinding as Nn, withIndeterminateGuard as No, earliestDefined as Nr, recordedOutputReferenceRegions as Ns, deleteTableWithIndexBusyRetry as Nt, redirectFileAsset as Nu, serviceTokenBlockingReason as O, refusesFinalSnapshot as Oa, refuseMalformedOrphanRecords as Oc, collectDeclaredOutputNames as Oi, JSON_LISTING_HOLE_VALUE as Ol, DeploymentEventsReader as On, RollbackInlinePolicyWriters as Oo, undeclaredEmptyObservedKeys as Or, parseWebACLArn as Os, resolveDynamoDbDeleteBudgetClock as Ot, flattenAssetPlaceholders as Ou, perType as P, collectPrincipalsAttachingPolicy as Pa, isReadableResourceEntry as Pc, maskingRetryLogger as Pi, hasReadableOutputs as Pl, noEchoMacParametersOf as Pn, getReadOnlyPropertyPaths as Po, ledgerForStack as Pr, recordedProvenanceOf as Ps, maskedLogger as Pt, rewriteTemplateAssetReferences as Pu, isDynamoDBTableArnIn as Q, attemptedPolicyDocument as Qa, refuseMalformedResourcePropertiesForDrift as Qc, bold as Qi, hasUnverifiableParameterRefusal as Ql, parseMappingFile as Qn, applyRoleArnIfSet as Qo, isRedactedRecordedValue as Qr, isLegacyHandleId as Qs, removeSignalReceiverNamed as Qt, BOOTSTRAP_MARKER_PREFIX as Qu, STREAM_TAGS_KEY as R, KMS_DEFAULT_KEY_POLICY_ID as Ra, malformedScrubResourceEntriesRefusalMessage as Rc, withStackRecords as Ri, findSdkUnwiredProperties as Rl, findDestructiveChanges as Rn, isSelectOutOfBounds as Ro, planRollback as Rr, getAccountInfo as Rs, S3_AUTO_DELETE_OBJECTS_TAG as Rt, parseAssetManifestBody as Ru, hasPendingMovesOut as S, ATOMIC_FINAL_SNAPSHOT_TYPES as Sa, deployRefusesOrphanRowsReason as Sc, secretSafeKeyDisplay as Si, malformedStateRefusalMessage as Sl, journaledOrphanLines as Sn, localCustomResourceRuntimeActive as So, recordAfterRollbackUpdate as Sr, AWS_NO_VALUE as Ss, DYNAMODB_DELETE_DEADLINE_MARGIN_MS as St, decodeListingKey as Su, refusePendingMovesOut as T, ccRoutedInstanceTakesNoSnapshot as Ta, malformedOrphanRecordsWarning as Tc, exportNameSecretExposure as Ti, refuseMalformedResourcesForExport as Tl, makeForeignHolderScan as Tn, waitForLambdaFunctionActive as To, calculateResourceDrift as Tr, refStateLookupFromResource as Ts, beginDeleteWait as Tt, buildAssetRedirectMap as Tu, reverseMapStreamPolicy as U, declaredPolicyDocument as Ua, refuseMalformedResourceEntriesForImport as Uc, supersededHeldByOtherTypeWarning as Ui, NO_CC_HANDLERS_REASON as Ul, rollbackOrphanIds as Un, APPSYNC_APIKEY_ARN_RESOURCE_PATH as Uo, planFailedOps as Ur, keepsSecretReferenceToken as Us, readRefactorMarker as Ut, ensureAssetStorage as Uu, planStreamMemberOps as V, SNS_DEFAULT_POLICY_ID as Va, refuseMalformedResourceEntriesForDeploy as Vc, isSupersededResourceRecord as Vi, withoutSdkUnwiredProperties as Vl, hintSidesOf as Vn, stackIdTailOf as Vo, isJournaledOrphan as Vr, isNamelessDynamicReferenceError as Vs, keptForRetainedRecord as Vt, warnWholeAssemblyAsSource as Vu, streamDeclaresPolicy as W, efsPolicyMatchesDeclared as Wa, refuseMalformedResourceEntriesForImportSave as Wc, supersededHolderOf as Wi, hasNoCloudControlHandlers as Wl, withMovedTo as Wn, displayPhysicalId as Wo, recheckFailedPlan as Wr, withSharedDrainBudget as Ws, readRefactorMarkerOnce as Wt, buildDenyExternalAccessPolicy as Wu, clearTagWrites as X, warnUnsettledMember as Xa, refuseMalformedResourceProperties as Xc, withPreviousPolicies as Xi, readOnlyStateVersionOf as Xl, looselyEqual as Xn, producerLookupOver as Xo, readsRegeneratingSecret as Xr, siblingsOf as Xs, deleteSignalReceiver as Xt, validateAssetBucketName as Xu, TAGS_BASELINE_REREAD_DELAYS_MS as Y, settleDeclaredMember as Ya, malformedResourcePropertiesWarning as Yc, resolveReplacementOldType as Yi, isKnownTokenFreeState as Yl, isPairableType as Yn, resolveDynamicReferences as Yo, attemptUsesCompletedCreate as Yr, replacementSidesForLog as Ys, updateRefactorMarker as Yt, readBootstrapMarkerBody as Yu, declaredTagsReadback as Z, verbatimEchoDriftKeys as Za, refuseMalformedResourcePropertiesForDestroy as Zc, findNestedStackTypeChanges as Zi, hasReasonlessBaselineRefusal as Zl, mappingPairs as Zn, refuseUnreadableCdkCrossAccountRefs as Zo, REDACTED_DELETE_ADDRESS_SKIP_REASON as Zr, LEGACY_HANDLE_ID_PREFIX as Zs, isReceiver as Zt, validateContainerRepoName as Zu, conditionFingerprint as _, secretNamedAttributeNamesOf as _a, parameterInputsFor as _c, WITHHELD_NAME_DISPLAY as _i, repairMalformedOutputsForReadOnly as _l, withNestedStackContext as _n, NO_LOCAL_CUSTOM_RESOURCES_FLAG as _o, replayRollback as _r, s3BucketRegionalDomainName as _s, planIndexContributorInsightsOps as _t, SSM_PARAMETER_VALUE_PREFIX as _u, scanActiveConsumers as a, noEchoComparisonForTemplate as aa, renderStatefulReason as ac, ownValue as ad, nameGenerationHighWaterOf as ai, malformedOrphansWarning as al, NESTED_PENDING_PARENT_REASON as an, WaitConditionSignalStore as ao, recordedRuleIdOf as ar, AWS_CREDENTIAL_ENV_KEYS as as, planTimeToLive as at, isNotImplemented as au, readRecordedConditionVerdicts as b, storedSecretNameNeedles as ba, declaresNoEcho as bc, secretBearing as bi, malformedRenderedContainersWarning as bl, dropFailedHint as bn, customResourcesRunWithoutApp as bo, earlyDeletedOld as br, isUnboundTemplateParameter as bs, reverseMapTableContributorInsights as bt, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as bu, nestedSsmNameDeferredNote as c, withAttemptedItemsMasked as ca, isWarmThroughputDecrease as cc, describeFileReadFailure as cd, retiredNameGenerationsAfter as ci, repairMalformedOrphansForReadOnly as cl, dropSettledNestedJournals as cn, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as co, siblingOwnedSgRuleIdentities as cr, envCredentialsAreAssumedRole as cs, planVectorIndexUpdates as ct, isSecretValuedAttribute as cu, slashedSsmNameHealAdoptedNote as d, journaledOrphanPrintingBag as da, getSettledWriteOnlyPropertyPaths as dc, renderAssemblyPathEscape as dd, getCurrentProducerRegions as di, malformedLocalOutputsWarning as dl, recordDisplacedSkips as dn, responsePresignClient as do, SG_RULE_ID_PATTERN as dr, producerRegionsFromState as ds, vectorIndexesSettled as dt, missingStateBucketRemedy as du, gray as ea, isPlainReferenceTo as ec, getCdkdContainerRepoName as ed, redactedDeleteAddressSkip as ei, refuseMalformedResourcePropertiesForOrphan as el, readsOnlyNoEchoParameters as en, CC_BROKEN_REASON as eo, proposeRenames as er, assertSendableRoleArn as es, settleWrittenTags as et, CrossPrefixReadError as eu, slashedSsmNameHealNote as f, maskEventTextWithBoundBags as fa, getTopLevelKeysHoldingUnreadableCreateOnly as fc, resolveAssemblyPath as fd, inheritProducerRegions as fi, malformedOutputsRefusalMessage as fl, revertNestedChildFromJournal as fn, TemplateNoEchoReresolver as fo, cfnIngressPortValue as fr, regionLessSecretName as fs, vectorIndexesShapeDetail as ft, findNestedTemplateTreeDefect as fu, makeCanonicalizePropertiesFn as g, secretNamePrintingBags as ga, movedMaskedProperties as gc, resourcesNamingDeclaredParameter as gi, refuseMalformedOutputsForDestroy as gl, getCurrentNestedStackContext as gn, withPrintingSecrets as go, replayFailedOperations as gr, s3BucketDualStackDomainName as gs, planContributorInsightsOp as gt, templateIdentity as gu, inheritedProvenanceForChildDiff as h, secretNamePrintingBag as ha, maskedPropertyFingerprintsOf as hc, reachableDivergentParameters as hi, refuseMalformedOutputs as hl, collectNestedChildUnaddressed as hn, getCurrentResourceSecrets as ho, canonicalizeIpProtocolValue as hr, s3BucketDomainName as hs, indexDeclaresContributorInsights as ht, renderNestedTemplateTreeDefect as hu, mergeNoChangeOutputs as i, noEchoAttributeNamesOf as ia, isStatefulRecreateTargetSync as ic, nullPrototypeRecord as id, nameGenerationCarriedFrom as ii, malformedOrphansRefusalMessage as il, resolvePendingCloudControlRequests as in, wouldReturnToSdkProvider as io, undeclaredGrantSiblingMembers as ir, sendableAssumeRoleCommand as is, isTtlRateLimited as it, isAccessDenied$1 as iu, recordedProtectionNote as j, buildFinalSnapshotIdentifier as ja, repairMalformedOrphanRecordsForReadOnly as jc, bindingSkippedOutputs as ji, STATE_RESOURCES_MALFORMED as jl, NOECHO_MAC_KEY_ALIAS as jn, deleteLeftInPlace as jo, findUpdatePolicyReplacementRefusals as jr, keepHeldTokenProvenance as js, INDEX_SETTLE_POLL_INTERVAL_MS as jt, loadPublishableAssetManifest as ju, diffSecurity as k, unsupportedFinalSnapshotError as ka, refuseMalformedOrphanRecordsForDestroy as kc, collectPublishedOutputNames as ki, accountArgs as kl, DeploymentEventsStore as kn, UNSPECIFIED_SKIP_REASON as ko, updatePartialMessage as kr, extractGetAttRefs as ks, resolveDynamoDbDeleteBudgetMs as kt, isDefaultBootstrapBucketName as ku, nestedSsmNameRowNote as l, createReadOnlyAttributeHealerFactory as la, toCfnInteger as lc, displayAssemblyPath as ld, retiredNameGenerationsLeaving as li, malformedExportNamesWarning as ll, getNestedRevertRun as ln, applyCustomResourceResponseExpiration as lo, siblingRecordedSgRuleIds as lr, classifyRecordedSecretRegion as ls, readbackVectorIndexes as lt, isSensitiveAttributeName as lu, crossStackOutputProvenanceSource as m, orphanRecordsPrintingBag as ma, inputFingerprinter as mc, resolveBucketRegion as md, namesAnyDeclaredParameter as mi, refuseMalformedNestedChildOutputs as ml, withNestedRevertRun as mn, isCustomResourceType as mo, sgProtocolKey as mr, s3BucketArn as ms, contributorInsightsRefusals as mt, listNestedTemplateRows as mu, isSecretBearingReferenceString as n, red as na, MULTI_REGION_RECREATE_BLOCKED_TYPES as nc, hasOwnKey as nd, removeProtectionTypeList as ni, UNREADABLE_ORPHANS_CONTAINER_ROW as nl, formatResourceLine as nn, ccBrokenReason as no, siblingOwnedRevertDesired as nr, isIamRoleArn as ns, takeTagWrite as nt, applyCrossPrefixScan as nu, inRunStackKey as o, noEchoExactEchoLeavesOf as oa, WARM_THROUGHPUT_MEMBERS as oc, absoluteAssemblyPathEscape as od, nameScopeOf as oi, refuseMalformedOrphans as ol, displacedOpClause as on, classifyHandleUrl as oo, sgRuleOwnershipIdentity as or, applyCallerIdentityCredentials as os, readTtlSpec as ot, stackInstanceIdOf as ou, slashedSsmNameHealPendingNote as p, namingSecretsWithRecordedNoEcho as pa, tryGetTopLevelWriteOnlyProperties as pc, clearBucketRegionCache as pd, computeParameterTaint as pi, malformedOutputsWarning as pl, revertedNestedRowIds as pn, readsNoEchoDeleteValues as po, recordedSgRuleId as pr, isUnexposedRecordedIdentity as ps, CONTRIBUTOR_INSIGHTS_KEY as pt, isAbsoluteAssetPath as pu, streamPolicyMatchesDeclared as q, policyDocumentMatchesDeclared as qa, unreadableResourceEntries as qc, replacedDeleteFailureVerdict as qi, S3StateBackend as ql, changedReferenceReason as qn, secretSegmentsOfState as qo, IMPLICIT_DELETE_DEPENDENCIES as qr, containsIntrinsic as qs, refuseRefactorMarker as qt, getBootstrapMarkerKey as qu, keptWholeReasonText as r, yellow as ra, isStatefulRecreateTargetForReplace as rc, hasPlainPrototype as rd, orphanNeedsIdentity as ri, hasReadableOrphans as rl, pendingRequestCount as rn, isCustomResource as ro, stripSiblingOwnedParentMembers as rr, parseIamRoleArn as rs, isTtlAlreadyDisabled as rt, crossPrefixDeniedWarning as ru, checkNestedSsmNames as s, noEchoParameterNamesOf as sa, coerceWarmThroughput as sc, assemblyPathEscape as sd, retiredAfterRollback as si, refuseMalformedOrphansForDestroy as sl, displacedPhysicalIdShown as sn, evaluateSignals as so, sgSiblingDecidedById as sr, callerEnvCredentials as ss, sendTtlWaitingOutRateLimit as st, withStackInstanceIdWithheld as su, DeployEngine as t, green as ta, shownType as tc, defineOwnKey as td, segmentCleanupOptions as ti, repairMalformedResourcePropertiesForReadOnly as tl, licensedNameHolder as tn, ProviderRegistry as to, referencedLogicalIds as tr, explicitRoleArnOrThrow as ts, tagsMatchDeclared as tt, CrossPrefixScanCache as tu, healSlashedSsmParameterNames as u, completedReplayEntries as ua, toFiniteNumber as uc, namesTheSameDirectory as ud, withNameGenerationReached as ui, malformedExportSourceWarning as ul, nestedChildStackName as un, customResourceResponseExpirationWarning as uo, withoutSiblingOwnedSgRules as ur, classifyReplaySecretRegion as us, vectorIndexesForCreate as ut, stringifyValue as uu, conditionInputsFrom as v, secretNamedRecordNeedles as va, maskedInputProof as vc, displayTextOrWithheld as vi, STATE_REGION_DIVERGED as vl, deleteJournaledOrphans as vn, customResourceStackName as vo, DELETED_RESOURCE_REMEDY as vr, s3BucketWebsiteUrl as vs, readContributorInsightsSpec as vt, isListParameterType as vu, pendingMovesRefusalMessage as w, ccRoutedFinalSnapshotError as wa, malformedOrphanRecordsRefusalMessage as wc, exportNameNoEchoParameters as wi, refuseMalformedResourcesForDestroy as wl, sameJournaledOrphans as wn, withCustomResourceStack as wo, withUnprovenUnsettled as wr, isStalePlaceholderArnAttribute as ws, DYNAMODB_DELETE_POLL_COST_MS as wt, synthesizedStacks as wu, childTemplateLoader as x, extractDeploymentEventError as xa, maskedPropertyFingerprint as xc, secretBearingStateKeyWarning as xi, malformedResourcesWarning as xl, isHandledOrphan as xn, localCustomResourceCommand as xo, buildReadCurrentStateContext as xr, parameterTypeMayLoseSecretIdentity as xs, stripIndexContributorInsights as xt, purgeNoncurrentKeyVersions as xu, parentSuppliedValues as y, stateSecretNameNeedles as ya, passedParameterClassesOf as yc, exportAliasCollisionScrubWarning as yi, refuseDivergentRecordRegionForDestroy as yl, dropFailedCommands as yn, customResourcesFailedWithoutApp as yo, earlyDeleteWhen as yr, coerceParameterTypedValue as ys, reverseMapIndexContributorInsights as yt, ssmResolvedValueType as yu, declaredStreamPolicyMember as z, LAMBDA_PERMISSION_STATEMENT_KEYS as za, refuseMalformedResourceAttributesForOrphan as zc, deleteSupersededEntry as zi, unwrittenCreateOnlyReplacement as zl, formatDestructiveChange as zn, isAlwaysLiveAttribute as zo, seedsDeleteFirstGuard as zr, isImpossibleEmptyStoredAttribute as zs, hasCdkAutoDeleteTag as zt, resolveFileAssetSourcePath as zu };
55301
- //# sourceMappingURL=deploy-engine-XCVGar9z.js.map
55505
+ export { recordTagWrite as $, settleDeclaredMember as $a, malformedDriftResourcePropertiesWarning as $c, green as $i, providerReplacementReason as $l, parseMappingFile as $n, assertSendableRoleArn as $o, REDACTED_DELETE_ADDRESS_SKIP_REASON as $r, isPlainReferenceTo as $s, removeSignalReceiverNamed as $t, ensureAssetStorage as $u, recordedProtectionEvidence as A, collectGroupsAddedBySiblings as Aa, malformedOrphanRecordsWarning as Ac, collectDeclaredOutputNames as Ai, refuseMalformedResourcesForExport as Al, DeploymentEventsStore as An, waitForLambdaFunctionActive as Ao, undeclaredEmptyObservedKeys as Ar, keepHeldTokenProvenance as As, resolveDynamoDbDeleteBudgetMs as At, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as Au, declaredStreamTagsMember as B, verifiedIdentityCache as Ba, malformedLocalResourceEntriesWarning as Bc, supersededAfterRollback as Bi, hasReadableResources as Bl, formatDestructiveChange as Bn, isWaitAbandonedError as Bo, planRollback as Br, isNamelessDynamicReferenceError as Bs, hasCdkAutoDeleteTag as Bt, isDefaultBootstrapRepoName as Bu, pendingMovesOutOf as C, ccRoutedInstanceTakesNoSnapshot as Ca, maskedInputProof as Cc, clearBucketRegionCache as Cd, secretBearingStateKeyWarning as Ci, STATE_REGION_DIVERGED as Cl, journaledOrphanLines as Cn, customResourceStackName as Co, buildReadCurrentStateContext as Cr, isStalePlaceholderArnAttribute as Cs, DYNAMODB_DELETE_DEADLINE_MARGIN_MS as Ct, isAbsoluteAssetPath as Cu, findServiceTokenRefusals as D, unsupportedFinalSnapshotError as Da, deployRefusesOrphanRowsReason as Dc, exportNameSecretExposure as Di, malformedStateRefusalMessage as Dl, makeSiblingClaimReader as Dn, localCustomResourceRuntimeActive as Do, calculateResourceDrift as Dr, parseWebACLArn as Ds, compensateRemovedDeletionProtection as Dt, SSM_PARAMETER_VALUE_PREFIX as Du, deferredServiceTokenWarning as E, refusesFinalSnapshot as Ea, maskedPropertyFingerprint as Ec, exportNameNoEchoParameters as Ei, malformedResourcesWarning as El, makeForeignHolderScan as En, localCustomResourceCommand as Eo, withUnprovenUnsettled as Er, lacksRecordedTableArn as Es, beginDeleteWait as Et, templateIdentity as Eu, readProtection as F, withoutSiblingOwned as Fa, refuseMalformedOrphansForOrphan as Fc, DEFAULT_RESOURCE_WARN_AFTER_MS as Fi, withheldAccountClause as Fl, noEchoMacParametersOf as Fn, deleteIndeterminateGuards as Fo, earliestDefined as Fr, referenceProvenanceOf as Fs, maskedLogger as Ft, buildAssetRedirectMap as Fu, streamDeclaresTags as G, SNS_DEFAULT_POLICY_ID as Ga, refuseMalformedResourceEntries as Gc, replacedDeleteFailureVerdict as Gi, withoutAcceptedSdkUnwiredProperties as Gl, withMovedTo as Gn, poisonRenderedSpellingsCollidingIn as Go, planFailedOps as Gr, INTRINSIC_KEYS as Gs, readRefactorMarkerOnce as Gt, AssetManifestLoader as Gu, readStreamPolicy as H, KMS_DEFAULT_KEY_POLICY_ID as Ha, malformedResourceEntriesWarning as Hc, supersededHolderOf as Hi, findHandledUnwrittenCreateOnly as Hl, hintSidesOf as Hn, IntrinsicFunctionResolver as Ho, demoteSupersededOrphans as Hr, keepsSecretReferenceToken as Hs, keptForRetainedRecord as Ht, redirectDockerAsset as Hu, DynamoDBGlobalTableProvider as I, awaitInFlightSibling as Ia, repairMalformedOrphanRecordsForReadOnly as Ic, maskingRetryLogger as Ii, STATE_RESOURCES_MALFORMED as Il, noEchoMacVerdict as In, deleteLeftInPlace as Io, ledgerForStack as Ir, referenceTokensIn as Is, relayedIndexBusyDelete as It, createAssetRedirectResolver as Iu, streamTagsMatchDeclared as J, efsPolicyMatchesDeclared as Ja, refuseMalformedResourceEntriesForImport as Jc, withPreviousPolicies as Ji, NO_CC_HANDLERS_REASON as Jl, changedReferenceReason as Jn, resolveDynamicReferences as Jo, replacementNeverSwapped as Jr, replacementSidesForLog as Js, refuseRefactorMarker as Jt, parseAssetManifestBody as Ju, streamMemberRefusals as K, declaredMemberDocument as Ka, refuseMalformedResourceEntriesForDeploy as Kc, snapshotSegmentSurvivors as Ki, withoutSdkUnwiredProperties as Kl, changedReferenceInDiff as Kn, stackIdTailOf as Ko, recheckFailedPlan as Kr, containsIntrinsic as Ks, refactorMarkerMovesOf as Kt, getDockerImageBySourceHash as Ku, STREAM_POLICY_KEY as L, destroyStackRecordsView as La, unpreviewableOrphanRecords as Lc, deleteSupersededEntry as Li, UNREADABLE_RESOURCES_MAP_ROW as Ll, noEchoValueMacsOf as Ln, deleteSkipReason as Lo, reserveStackCreateToken as Lr, getAccountInfo as Ls, waitForIndexesSettled as Lt, createLazyAssetModeContext as Lu, PROTECTION_PROPERTY_BY_TYPE as M, collectPrincipalsAttachingPolicy as Ma, previewableOrphanRecords as Mc, isExportAliasCollision as Mi, repairMalformedResourcesForReadOnly as Ml, NOECHO_MAC_KEY_ALIAS as Mn, waitForGoneAfterDelete as Mo, updatePartialReason as Mr, recordedOutputReferenceRegions as Ms, INDEX_SETTLE_POLL_INTERVAL_MS as Mt, decodeListingKey as Mu, isProtectionValueActive as N, isStoredExpression as Na, refuseMalformedOrphanRecords as Nc, bindingSkippedOutputs as Ni, JSON_LISTING_HOLE_VALUE as Nl, createNoEchoValueMacs as Nn, RollbackInlinePolicyWriters as No, findUpdatePolicyReplacementRefusals as Nr, recordedProvenanceOf as Ns, TABLE_INDEX_NOUN as Nt, rememberSynthesizedStacks as Nu, serviceTokenBlockingReason as O, createPreDeleteFinalSnapshot as Oa, isReadableOrphanRecord as Oc, isWholeDynamicReferenceValue as Oi, refuseMalformedResourcesForDeploy as Ol, planOrphanAdoption as On, setLocalCustomResourceRuntimeEnabled as Oo, equalModuloMarkedMask as Or, extractGetAttRefs as Os, deleteBudgetKey as Ot, isListParameterType as Ou, perType as P, withoutSiblingAttachedArns as Pa, refuseMalformedOrphanRecordsForDestroy as Pc, DEFAULT_RESOURCE_TIMEOUT_MS as Pi, accountArgs as Pl, noEchoMacBinding as Pn, UNSPECIFIED_SKIP_REASON as Po, replacementCreateRoutesToCloudControl as Pr, recordedReferenceRegions as Ps, deleteTableWithIndexBusyRetry as Pt, synthesizedStacks as Pu, isDynamoDBTableArnIn as Q, reReadUntilSettled as Qa, unreadableResourceEntries as Qc, gray as Qi, providerReplacementOldDeleted as Ql, mappingPairs as Qn, assertFlagRoleArn as Qo, readsRegeneratingSecret as Qr, findReplacedReadersOfRecreateTargets as Qs, isReceiver as Qt, AssetModeResolver as Qu, STREAM_TAGS_KEY as R, getStackRecords as Ra, unreadableOrphanRecords as Rc, holdsSupersededResources as Ri, displayLogicalId as Rl, constructPathOf as Rn, withIndeterminateGuard as Ro, withCreateTokenLedger as Rr, isImpossibleEmptyStoredAttribute as Rs, ECR_AUTO_DELETE_IMAGES_TAG as Rt, flattenAssetPlaceholders as Ru, hasPendingMovesOut as S, ccRoutedFinalSnapshotError as Sa, parameterInputsFor as Sc, resolveAssemblyPath as Sd, secretBearing as Si, repairMalformedOutputsForReadOnly as Sl, isHandledOrphan as Sn, NO_LOCAL_CUSTOM_RESOURCES_FLAG as So, earlyDeletedOld as Sr, cfnRefValueFromPhysicalId as Ss, stripIndexContributorInsights as St, findNestedTemplateTreeDefect as Su, refusePendingMovesOut as T, isFinalSnapshotError as Ta, declaresNoEcho as Tc, carriedExportAliasExposure as Ti, malformedRenderedContainersWarning as Tl, sameJournaledOrphans as Tn, customResourcesRunWithoutApp as To, settleUnsettledPrevious as Tr, lacksRecordedRefArn as Ts, DYNAMODB_DELETE_POLL_COST_MS as Tt, renderNestedTemplateTreeDefect as Tu, reverseMapStreamPolicy as U, LAMBDA_PERMISSION_STATEMENT_KEYS as Ua, malformedScrubResourceEntriesRefusalMessage as Uc, supersededResourcesOf as Ui, findSdkUnwiredProperties as Ul, movedToHint as Un, isSelectOutOfBounds as Uo, isJournaledOrphan as Ur, withSharedDrainBudget as Us, recordRetainedForReadoption as Ut, redirectFileAsset as Uu, planStreamMemberOps as V, withStackRecords as Va, malformedLocalResourcesWarning as Vc, supersededHeldByOtherTypeWarning as Vi, findActionableSdkUnwired as Vl, findRefactorHints as Vn, markWaitAbandoned as Vo, seedsDeleteFirstGuard as Vr, carriesDynamicReference as Vs, isTruthyCfnBoolean as Vt, loadPublishableAssetManifest as Vu, streamDeclaresPolicy as W, OWN_WRITE_REREAD_DELAYS_MS as Wa, refuseMalformedResourceAttributesForOrphan as Wc, withoutSuperseded as Wi, unwrittenCreateOnlyReplacement as Wl, rollbackOrphanIds as Wn, isAlwaysLiveAttribute as Wo, isReplacementOrphan as Wr, namesRecreatedParent as Ws, readRefactorMarker as Wt, rewriteTemplateAssetReferences as Wu, clearTagWrites as X, memberReadFailure as Xa, refuseMalformedResourceEntriesForOrphan as Xc, bold as Xi, PROPERTY_COVERAGE_BY_TYPE as Xl, isPairableType as Xn, refuseUnreadableCdkCrossAccountRefs as Xo, computeImplicitDeleteEdges as Xr, LEGACY_HANDLE_ID_PREFIX as Xs, updateRefactorMarker as Xt, warnAbsoluteAssetPath as Xu, TAGS_BASELINE_REREAD_DELAYS_MS as Y, lambdaPermissionMatchesDeclared as Ya, refuseMalformedResourceEntriesForImportSave as Yc, findNestedStackTypeChanges as Yi, hasNoCloudControlHandlers as Yl, differingRemedy as Yn, producerLookupOver as Yo, IMPLICIT_DELETE_DEPENDENCIES as Yr, siblingsOf as Ys, sameMove as Yt, resolveFileAssetSourcePath as Yu, declaredTagsReadback as Z, policyDocumentMatchesDeclared as Za, repairMalformedResourceEntriesForReadOnly as Zc, cyan as Zi, dropSupersededProviderReplacements as Zl, looselyEqual as Zn, applyRoleArnIfSet as Zo, attemptUsesCompletedCreate as Zr, isLegacyHandleId as Zs, deleteSignalReceiver as Zt, warnWholeAssemblyAsSource as Zu, conditionFingerprint as _, stateSecretNameNeedles as _a, getTopLevelKeysHoldingUnreadableCreateOnly as _c, assemblyPathEscape as _d, reachableDivergentParameters as _i, malformedOutputsRefusalMessage as _l, getCurrentNestedStackContext as _n, TemplateNoEchoReresolver as _o, replayFailedOperations as _r, s3BucketWebsiteUrl as _s, planContributorInsightsOp as _t, withStackInstanceIdWithheld as _u, scanActiveConsumers as a, noEchoParameterNamesOf as aa, WARM_THROUGHPUT_MEMBERS as ac, readBootstrapMarkerBody as ad, orphanNeedsIdentity as ai, refuseMalformedResourcePropertiesForOrphan as al, resolvePendingCloudControlRequests as an, ProviderRegistry as ao, undeclaredGrantSiblingMembers as ar, applyCallerIdentityCredentials as as, planTimeToLive as at, isKnownTokenFreeState as au, readRecordedConditionVerdicts as b, ATOMIC_FINAL_SNAPSHOT_TYPES as ba, maskedPropertyFingerprintsOf as bc, namesTheSameDirectory as bd, displayTextOrWithheld as bi, refuseMalformedOutputs as bl, dropFailedCommands as bn, getCurrentResourceSecrets as bo, PLANNED_EARLY_DELETE_CONSEQUENCE as br, parameterTypeMayLoseSecretIdentity as bs, reverseMapIndexContributorInsights as bt, stringifyValue as bu, nestedSsmNameDeferredNote as c, completedReplayEntries as ca, toCfnInteger as cc, BOOTSTRAP_MARKER_PREFIX as cd, nameScopeOf as ci, hasReadableOrphans as cl, displacedPhysicalIdShown as cn, wouldReturnToSdkProvider as co, sgSiblingDecidedById as cr, classifyRecordedSecretRegion as cs, planVectorIndexUpdates as ct, hasUnverifiableParameterRefusal as cu, slashedSsmNameHealAdoptedNote as d, namingSecretsWithRecordedNoEcho as da, displayPhysicalId as dc, defineOwnKey as dd, retiredNameGenerationsLeaving as di, refuseMalformedOrphans as dl, nestedChildStackName as dn, evaluateSignals as do, withoutSiblingOwnedSgRules as dr, regionLessSecretName as ds, vectorIndexesSettled as dt, CrossPrefixScanCache as du, red as ea, shownType as ec, buildDenyExternalAccessPolicy as ed, isRedactedRecordedValue as ei, malformedResourcePropertiesWarning as el, macWriteOnlyKeys as en, warnUnsettledMember as eo, propertiesChangedReason as er, explicitRoleArnOrThrow as es, settleWrittenTags as et, normalizeRecordName as eu, slashedSsmNameHealNote as f, orphanRecordsPrintingBag as fa, maskedSecretSegment as fc, hasOwnKey as fd, withNameGenerationReached as fi, refuseMalformedOrphansForDestroy as fl, recordDisplacedSkips as fn, isSignalKey as fo, SG_RULE_ID_PATTERN as fr, isUnexposedRecordedIdentity as fs, vectorIndexesShapeDetail as ft, applyCrossPrefixScan as fu, makeCanonicalizePropertiesFn as g, secretNamedRecordNeedles as ga, getSettledWriteOnlyPropertyPaths as gc, absoluteAssemblyPathEscape as gd, namesAnyDeclaredParameter as gi, malformedLocalOutputsWarning as gl, collectNestedChildUnaddressed as gn, responsePresignClient as go, canonicalizeIpProtocolValue as gr, s3BucketRegionalDomainName as gs, indexDeclaresContributorInsights as gt, stackInstanceIdOf as gu, inheritedProvenanceForChildDiff as h, secretNamedAttributeNamesOf as ha, withSecretPhysicalIdsMaskedInState as hc, ownValue as hd, computeParameterTaint as hi, malformedExportSourceWarning as hl, withNestedRevertRun as hn, customResourceResponseExpirationWarning as ho, sgProtocolKey as hr, s3BucketDualStackDomainName as hs, contributorInsightsRefusals as ht, isNotImplemented as hu, mergeNoChangeOutputs as i, noEchoExactEchoLeavesOf as ia, renderStatefulReason as ic, parseBootstrapMarker as id, removeProtectionTypeList as ii, refuseMalformedResourcePropertiesForExport as il, pendingRequestCount as in, CC_BROKEN_REASON as io, stripSiblingOwnedParentMembers as ir, AWS_CREDENTIAL_ENV_KEYS as is, isTtlRateLimited as it, splitImportedOps as iu, recordedProtectionNote as j, collectManagedPolicyArnsAttachedBySiblings as ja, malformedOrphanRowsKeptWarning as jc, collectPublishedOutputNames as ji, refuseMalformedState as jl, crossStackReadsForPartialSave as jn, CloudControlProvider as jo, updatePartialMessage as jr, outputReferenceProvenanceOf as js, DELETE_INDEX_WAIT_PROCEED_NOTE as jt, purgeNoncurrentKeyVersions as ju, diffSecurity as k, buildFinalSnapshotIdentifier as ka, malformedOrphanRecordsRefusalMessage as kc, noEchoParameterValueSeed as ki, refuseMalformedResourcesForDestroy as kl, DeploymentEventsReader as kn, withCustomResourceStack as ko, equalModuloMask as kr, promoteInPlaceAttributeDependents as ks, resolveDynamoDbDeleteBudgetClock as kt, ssmResolvedValueType as ku, nestedSsmNameRowNote as l, journaledOrphanPrintingBag as la, toFiniteNumber as lc, getCdkdAssetBucketName as ld, retiredAfterRollback as li, malformedOrphansRefusalMessage as ll, dropSettledNestedJournals as ln, WaitConditionSignalStore as lo, siblingOwnedSgRuleIdentities as lr, classifyReplaySecretRegion as ls, readbackVectorIndexes as lt, rebuildClientForBucketRegion as lu, crossStackOutputProvenanceSource as m, secretNamePrintingBags as ma, secretSegmentsOfState as mc, nullPrototypeRecord as md, inheritProducerRegions as mi, malformedExportNamesWarning as ml, revertedNestedRowIds as mn, applyCustomResourceResponseExpiration as mo, recordedSgRuleId as mr, s3BucketDomainName as ms, completeTableContributorInsightsBaseline as mt, isAccessDenied$1 as mu, isSecretBearingReferenceString as n, noEchoAttributeNamesOf as na, isStatefulRecreateTargetForReplace as nc, isCrossRegionRedirect as nd, redactedDeleteAddressSkip as ni, refuseMalformedResourcePropertiesForDestroy as nl, licensedNameHolder as nn, attemptedPolicyDocument as no, referencedLogicalIds as nr, parseIamRoleArn as ns, takeTagWrite as nt, TemplateParser as nu, inRunStackKey as o, withAttemptedItemsMasked as oa, coerceWarmThroughput as oc, validateAssetBucketName as od, nameGenerationCarriedFrom as oi, repairMalformedResourcePropertiesForReadOnly as ol, NESTED_PENDING_PARENT_REASON as on, ccBrokenReason as oo, recordedRuleIdOf as or, callerEnvCredentials as os, readTtlSpec as ot, readOnlyStateVersionOf as ou, slashedSsmNameHealPendingNote as p, secretNamePrintingBag as pa, secretPhysicalIdSegment as pc, hasPlainPrototype as pd, getCurrentProducerRegions as pi, repairMalformedOrphansForReadOnly as pl, revertNestedChildFromJournal as pn, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as po, cfnIngressPortValue as pr, s3BucketArn as ps, CONTRIBUTOR_INSIGHTS_KEY as pt, crossPrefixDeniedWarning as pu, streamPolicyMatchesDeclared as q, declaredPolicyDocument as qa, refuseMalformedResourceEntriesForDestroy as qc, resolveReplacementOldType as qi, withoutUnwrittenSdkUnwiredProperties as ql, changedReferencePath as qn, isSettledInstanceState as qo, recordUnderIdIsNotOwn as qr, markNewValueKnownAfterDeploy as qs, refactorMarkerRefusalMessage as qt, isCfnTemplateAssetPath as qu, keptWholeReasonText as r, noEchoComparisonForTemplate as ra, isStatefulRecreateTargetSync as rc, getBootstrapMarkerKey as rd, segmentCleanupOptions as ri, refuseMalformedResourcePropertiesForDrift as rl, formatResourceLine as rn, policyContentKey as ro, siblingOwnedRevertDesired as rr, sendableAssumeRoleCommand as rs, isTtlAlreadyDisabled as rt, S3StateBackend as ru, checkNestedSsmNames as s, createReadOnlyAttributeHealerFactory as sa, isWarmThroughputDecrease as sc, validateContainerRepoName as sd, nameGenerationHighWaterOf as si, UNREADABLE_ORPHANS_CONTAINER_ROW as sl, displacedOpClause as sn, isCustomResource as so, sgRuleOwnershipIdentity as sr, envCredentialsAreAssumedRole as ss, sendTtlWaitingOutRateLimit as st, hasReasonlessBaselineRefusal as su, DeployEngine as t, yellow as ta, MULTI_REGION_RECREATE_BLOCKED_TYPES as tc, assertAssetBucketRegion as td, redactedDeleteAddressFields as ti, refuseMalformedResourceProperties as tl, readsOnlyNoEchoParameters as tn, verbatimEchoDriftKeys as to, proposeRenames as tr, isIamRoleArn as ts, tagsMatchDeclared as tt, planSubscriptionAttributes as tu, healSlashedSsmParameterNames as u, maskEventTextWithBoundBags as ua, APPSYNC_APIKEY_ARN_RESOURCE_PATH as uc, getCdkdContainerRepoName as ud, retiredNameGenerationsAfter as ui, malformedOrphansWarning as ul, getNestedRevertRun as un, classifyHandleUrl as uo, siblingRecordedSgRuleIds as ur, producerRegionsFromState as us, vectorIndexesForCreate as ut, CrossPrefixReadError as uu, conditionInputsFrom as v, storedSecretNameNeedles as va, tryGetTopLevelWriteOnlyProperties as vc, describeFileReadFailure as vd, resourcesNamingDeclaredParameter as vi, malformedOutputsWarning as vl, withNestedStackContext as vn, readsNoEchoDeleteValues as vo, replayRollback as vr, coerceParameterTypedValue as vs, planIndexContributorInsightsOps as vt, isSecretValuedAttribute as vu, pendingMovesRefusalMessage as w, effectiveDeletionPolicy as wa, passedParameterClassesOf as wc, resolveBucketRegion as wd, secretSafeKeyDisplay as wi, refuseDivergentRecordRegionForDestroy as wl, loadJournaledOrphans as wn, customResourcesFailedWithoutApp as wo, recordAfterRollbackUpdate as wr, refStateLookupFromResource as ws, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as wt, listNestedTemplateRows as wu, childTemplateLoader as x, PRE_DELETE_SNAPSHOT_TYPES as xa, movedMaskedProperties as xc, renderAssemblyPathEscape as xd, exportAliasCollisionScrubWarning as xi, refuseMalformedOutputsForDestroy as xl, dropFailedHint as xn, withPrintingSecrets as xo, earlyDeleteWhen as xr, AWS_NO_VALUE as xs, reverseMapTableContributorInsights as xt, missingStateBucketRemedy as xu, parentSuppliedValues as y, extractDeploymentEventError as ya, inputFingerprinter as yc, displayAssemblyPath as yd, WITHHELD_NAME_DISPLAY as yi, refuseMalformedNestedChildOutputs as yl, deleteJournaledOrphans as yn, isCustomResourceType as yo, DELETED_RESOURCE_REMEDY as yr, isUnboundTemplateParameter as ys, readContributorInsightsSpec as yt, isSensitiveAttributeName as yu, declaredStreamPolicyMember as z, revertStackRecordsView as za, isReadableResourceEntry as zc, isSupersededResourceRecord as zi, hasReadableOutputs as zl, findDestructiveChanges as zn, getReadOnlyPropertyPaths as zo, acquireIdempotencyToken as zr, carriesFetchableDynamicReference as zs, S3_AUTO_DELETE_OBJECTS_TAG as zt, isDefaultBootstrapBucketName as zu };
55506
+ //# sourceMappingURL=deploy-engine-9rzhYsZc.js.map