@cdkd/cli 0.350.1 → 0.350.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/{ambient-client-defaults-7acjxfyN.js → ambient-client-defaults-CqrM5nDS.js} +12 -167
  2. package/dist/ambient-client-defaults-CqrM5nDS.js.map +1 -0
  3. package/dist/{asg-provider-Dvy_jqxt.js → asg-provider-hZ4nyheM.js} +9 -8
  4. package/dist/asg-provider-hZ4nyheM.js.map +1 -0
  5. package/dist/cli.js +3 -23
  6. package/dist/cli.js.map +1 -1
  7. package/dist/{custom-resource-runtime-CRy-dCjZ.js → custom-resource-runtime-CcClWTa-.js} +96 -15
  8. package/dist/custom-resource-runtime-CcClWTa-.js.map +1 -0
  9. package/dist/{db-instance-modify-retry-pFWx2ED5.js → db-instance-modify-retry-CsIlFgIJ.js} +4 -4
  10. package/dist/{db-instance-modify-retry-pFWx2ED5.js.map → db-instance-modify-retry-CsIlFgIJ.js.map} +1 -1
  11. package/dist/{delete-started-Co5Gt1jH.js → delete-started-C0g7PYI-.js} +24 -2
  12. package/dist/delete-started-C0g7PYI-.js.map +1 -0
  13. package/dist/{deploy-engine-BwlO3Jv_.js → deploy-engine-Sw2eta-t.js} +1240 -551
  14. package/dist/deploy-engine-Sw2eta-t.js.map +1 -0
  15. package/dist/{diff-calculator-CbibK_C3.js → diff-calculator-BvN5rnLe.js} +21 -29
  16. package/dist/diff-calculator-BvN5rnLe.js.map +1 -0
  17. package/dist/{ec2-termination-protection-BM1Zt3Fn.js → ec2-termination-protection-BIIHrzUa.js} +26 -8
  18. package/dist/ec2-termination-protection-BIIHrzUa.js.map +1 -0
  19. package/dist/{ecr-uri-C3_6QVgR.js → ecr-uri-CQ_BCOjX.js} +2 -2
  20. package/dist/{ecr-uri-C3_6QVgR.js.map → ecr-uri-CQ_BCOjX.js.map} +1 -1
  21. package/dist/{expected-bucket-owner-CGoY_YS8.js → expected-bucket-owner-DR9qK772.js} +2 -2
  22. package/dist/{expected-bucket-owner-CGoY_YS8.js.map → expected-bucket-owner-DR9qK772.js.map} +1 -1
  23. package/dist/{iam-role-provider-BaN9MMWs.js → iam-role-provider-i52A7e_4.js} +7 -6
  24. package/dist/iam-role-provider-i52A7e_4.js.map +1 -0
  25. package/dist/{image-plan-C9qclqRY.js → image-plan-DOnhBOIa.js} +102 -29
  26. package/dist/image-plan-DOnhBOIa.js.map +1 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +5 -5
  29. package/dist/{logger-DmQRya0S.js → logger-Ce9kvuBB.js} +4 -124
  30. package/dist/{logger-DmQRya0S.js.map → logger-Ce9kvuBB.js.map} +1 -1
  31. package/dist/{neptune-provider-BYgFNrtZ.js → neptune-provider-Bir1AdqM.js} +8 -7
  32. package/dist/neptune-provider-Bir1AdqM.js.map +1 -0
  33. package/dist/{program-CDu5N31o.js → program-DAAu8qUr.js} +751 -303
  34. package/dist/program-DAAu8qUr.js.map +1 -0
  35. package/dist/{provider-classes-Diwm8MK7.js → provider-classes-CM8Txuvb.js} +250 -129
  36. package/dist/provider-classes-CM8Txuvb.js.map +1 -0
  37. package/dist/{rds-provider-DKZjtd50.js → rds-provider-DmVAU_Mv.js} +23 -34
  38. package/dist/rds-provider-DmVAU_Mv.js.map +1 -0
  39. package/dist/{read-replica-C5e4xpYi.js → read-replica-Bmq3NTlC.js} +3 -3
  40. package/dist/{read-replica-C5e4xpYi.js.map → read-replica-Bmq3NTlC.js.map} +1 -1
  41. package/dist/{replacement-rules-01_01yDU.js → replacement-rules-lOM1aGPr.js} +3 -2
  42. package/dist/replacement-rules-lOM1aGPr.js.map +1 -0
  43. package/dist/{resource-deadline-TfDpwRQ_.js → resource-deadline-1VcUPyH4.js} +19 -19
  44. package/dist/{resource-deadline-TfDpwRQ_.js.map → resource-deadline-1VcUPyH4.js.map} +1 -1
  45. package/dist/run-cli-BlVizMfM.js +34 -0
  46. package/dist/run-cli-BlVizMfM.js.map +1 -0
  47. package/dist/{update-removal-D-FspP88.js → update-removal-BOue-bJm.js} +30 -8
  48. package/dist/update-removal-BOue-bJm.js.map +1 -0
  49. package/dist/version-DINEmsQH.js +300 -0
  50. package/dist/version-DINEmsQH.js.map +1 -0
  51. package/package.json +2 -2
  52. package/dist/ambient-client-defaults-7acjxfyN.js.map +0 -1
  53. package/dist/asg-provider-Dvy_jqxt.js.map +0 -1
  54. package/dist/custom-resource-runtime-CRy-dCjZ.js.map +0 -1
  55. package/dist/delete-started-Co5Gt1jH.js.map +0 -1
  56. package/dist/deploy-engine-BwlO3Jv_.js.map +0 -1
  57. package/dist/diff-calculator-CbibK_C3.js.map +0 -1
  58. package/dist/ec2-termination-protection-BM1Zt3Fn.js.map +0 -1
  59. package/dist/iam-role-provider-BaN9MMWs.js.map +0 -1
  60. package/dist/image-plan-C9qclqRY.js.map +0 -1
  61. package/dist/neptune-provider-BYgFNrtZ.js.map +0 -1
  62. package/dist/program-CDu5N31o.js.map +0 -1
  63. package/dist/provider-classes-Diwm8MK7.js.map +0 -1
  64. package/dist/rds-provider-DKZjtd50.js.map +0 -1
  65. package/dist/replacement-rules-01_01yDU.js.map +0 -1
  66. package/dist/update-removal-D-FspP88.js.map +0 -1
  67. package/dist/version-PlqBTGrc.js +0 -11
  68. package/dist/version-PlqBTGrc.js.map +0 -1
@@ -1,15 +1,15 @@
1
- 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, _t as truncateCodePoints, at as asIsMessage, b as alternateNamePropertiesFor, c as VERBOSE_POINTER, ct as displayIdent, dt as isPasteableIdent, et as withStackScopeBeforeStateRead, g as verbosePointerTail, gt as terminalSafe, h as verbosePointerSentence, it as UNRENDERABLE, j as readConfigString, k as configIntegerRefusal, lt as displaySafe, m as verboseAwareText, mt as safeMsg, n as getLogger, nt as SECRET_REF_MAX_CODE_POINTS, p as safeStringify, pt as plainIdentOr, q as getCurrentStackInstanceId, rt as STACK_REF_MAX_CODE_POINTS, st as displayAwsMessage, u as describeAwsFailure, ut as displayStackName, v as installLogLineMaskerSource, w as generatedNameFor, x as applyDefaultNameForFallback, y as getLiveRenderer } from "./logger-DmQRya0S.js";
2
- import { A as stripControlChars, C as isNameCooldownError, Ct as withheldTargetClause, 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, S as isNameCollisionErrorFrom, St as shellQuote, T as isReplayedNameCollisionFrom, U as isThrottlingError, W as markNonRetryable, X as MalformedProducerRecordRefusalError, Y as IntrinsicResolutionRefusalError, Z as SelectOutOfBoundsRefusalError, _ as ResourceUpdateNotSupportedError, _t as pasteableCommand, a as normalizeAwsError, at as ProvisioningError, b as isUpdateUnsupportedError, bt as quotedOrDescribed, et as CdkdError, ft as SHELL_ACTIVE_WHY, gt as isInertUnquoted, i as credentialFingerprint, k as escapeRegExp$1, m as ExportInUseError, mt as commandHole, n as ambientCredentialConfig, nt as DeploymentNotApprovedError, ot as ResourceTimeoutError, pt as UNSHOWABLE_VALUE, q as CrossAccountSecretRefusalError, r as clientDefaultsFor, st as StateError, t as ambientClientDefaults, vt as physicalIdShownBesideCommand, w as isRecreateRetryableError, xt as shellBoundedDisplay, yt as plainOrDescribed, z as isTransientServerError } from "./ambient-client-defaults-7acjxfyN.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-DINEmsQH.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-Ce9kvuBB.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, 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-CqrM5nDS.js";
3
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";
4
5
  import { l as s3ClientDefaults, r as getAwsClients } from "./aws-clients-DOkPjjAW.js";
5
- import { A as parseFailureDebugDetail, C as phaseTimingsEnabled, D as timePhaseSync, E as timePhase, M as utf8ByteLength, O as describeJsonParseFailure, S as phaseScopeForStack, _ as hasNoRegistrySchema, a as reDisableInstanceApiTermination, b as CREATE_ONLY_PATHS_SNAPSHOT, c as unchangedBehindSecretReference, d as getCreateOnlyPropertyPaths, f as isIntrinsicShaped, g as describeTypeWithThrottleRetry, h as parseCreateOnlyPropertyPointers, i as observeThenDisableInstanceApiTermination, j as parseJsonNamingNoBody, k as jsonParseFailureStandIn, l as cachedCreateOnlyPropertyPaths, m as templateResourceTypes, n as ec2InstanceProtectionSite, o as reEnableInstanceApiTermination, p as prefetchCreateOnlyPropertyPaths, r as isTerminationProtectionPropagationError, v as IAM_PROPAGATION_MAX_DELAY_MS, w as recordPhase, x as PhaseClock, y as withRetry } from "./ec2-termination-protection-BM1Zt3Fn.js";
6
+ import { A as describeJsonParseFailure, C as PhaseClock, E as recordPhase, M as parseFailureDebugDetail, N as parseJsonNamingNoBody, O as timePhase, P as utf8ByteLength, S as CREATE_ONLY_PATHS_SNAPSHOT, T as phaseTimingsEnabled, _ as hasNoRegistrySchema, a as reDisableInstanceApiTermination, b as IAM_PROPAGATION_MAX_DELAY_MS, c as unchangedBehindSecretReference, d as getCreateOnlyPropertyPaths, f as isIntrinsicShaped, g as describeTypeWithThrottleRetry, h as parseCreateOnlyPropertyPointers, i as observeThenDisableInstanceApiTermination, j as jsonParseFailureStandIn, k as timePhaseSync, l as cachedCreateOnlyPropertyPaths, m as templateResourceTypes, n as ec2InstanceProtectionSite, o as reEnableInstanceApiTermination, p as prefetchCreateOnlyPropertyPaths, r as isTerminationProtectionPropagationError, v as isAwsEmulatorRegistryMiss, w as phaseScopeForStack, x as withRetry, y as reportAwsEmulatorRegistryMiss } from "./ec2-termination-protection-BIIHrzUa.js";
6
7
  import { i as sameRegion, n as canonicalizeRegion, r as derivePartitionAndUrlSuffix } from "./aws-partition-DA0r2sr-.js";
7
- import { t as expectedOwnerParam } from "./expected-bucket-owner-CGoY_YS8.js";
8
- import { At as segmentAfterAnchor, B as resolveExplicitPhysicalId, Ct as canonicalizeRoute53QueryName, Dt as logicalIdShown, F as isQuotableImportValue, Ft as maskDeep, G as compensateProtectionFlip, Gt as isAuxiliaryMarkOf, H as assertRegionMatch, Ht as createdResourceIdentityBeforeFailure, I as normalizeAwsTagsToCfn, It as maskerOrIdentity, J as observeThenDisableProtection, K as deleteWithProtectionCompensation, Kt as markAuxiliaryFailure, L as quotedRemedyLogicalId, Lt as withDerivedNameMasks, Mt as createMaskedLogSinks, Nt as createMaskedRetryLogger, Pt as isSecretDerivedValue, R as refusalTypeShown, Rt as RETRY_AUXILIARY_OWNER, St as startInterruptWatch, Tt as compositeIdSeparatorRefusal, U as isMarkedNotGone, V as RESOURCE_NOT_FOUND, Vt as createdBeforeFailure, W as markNotGone, Wt as isAuxiliaryFailure, an as CUSTOM_RESOURCE_RESPONSE_PREFIX, at as isTerminalDeleteFailure, c as clearCreatedReport, ct as ElapsedBudget, dt as DELETION_PROTECTION_DOC_POINTER, f as retractCreatedResource, gt as protectedReplacementAdvice, ht as pasteableAwsCommand, in as sanitizeRecoveryValue, it as ProtectionFlipRegistry, j as withoutServerErrorRetries, jt as stateOrphanRecordRemedy, kt as resourceTypeShown, l as collectCreatedResources, lt as ElapsedBudgetRegistry, n as prepareRemovalForUpdate, o as withoutInjectedRemovals, on as DEFAULT_STATE_PREFIX, ot as protectionFlipKey, pn as withPasteableAwsProfile, qt as markCreatedBeforeFailure, r as removalWarning, rn as recoveryCommandFlags, s as CreatedResourceSink, sn as injectiveKey, st as runDeleteAttempt, u as reportCreatedResource, un as producerRecordKey, ut as monotonicNowMs, x as withUnchangedSecretPrincipalLists, xt as isInterruptedWaitError } from "./update-removal-D-FspP88.js";
9
- import { a as acceptedCreateOnlyDropsOf, d as isReadableBag, f as orphansAfterRollback, g as stackInstanceIdCarriedFrom, h as skippedOutputsCarriedFrom, i as slowCcOperationTimeoutMs, l as importableOutputKeys, m as shouldRetainResource, n as isRefusedByName, o as describeRegionValueKind, p as orphansCarriedFrom, r as markDeleteStarted, s as exportNamesCarriedFrom, t as isDeleteStarted, u as importableOutputs } from "./delete-started-Co5Gt1jH.js";
10
- import { $t as withdrawRenderedParameterSpelling, A as witnessNormalize, An as recordProvenPublicExpression, At as withoutPhysicalNameCopies, B as redactionClaimOf, Bt as splitOutsideDynamicReferences, Ct as withLegacyOverlapScan, D as recordedNoEchoValuesOf, Dt as replaceEmbeddedPhysicalNameRewrites, E as recordPassedNoEchoParameters, Et as repairPhysicalNameCopyLeaves, F as markLeafCertifiedBag, Fn as isSingleDynamicReferenceToken, G as foldRecording, Gt as recordInheritedPseudoParameters, H as mixedLiteralAnswered, Ht as recordDroppedArrayElements, I as markSameGenerationBag, In as maskMatchSpans, J as hasPassProvenance, Jt as inheritedParameterExpression, K as openRecordingScope, Kt as templateRereadsAccountId, L as mergeResolvedPairs, Lt as arrayPairsWhateverDrops, M as carryRedactionMarks, Mn as withoutNoEchoParameterEntries, Mt as DYNAMIC_REFERENCE_TOKEN_SCAN, N as intrinsicLeafResolutionOf, Nt as dynamicReferenceTokens, O as replaceAtCoordinates, On as recordNoEchoAttributeValues, Ot as scrubResourceRecord, P as isSameGenerationBag, Pn as isDynamicReferenceString, Q as recordReferenceResolution, Qt as redactInheritedParameterValue, R as recordIntrinsicLeafResolution, S as noEchoParametersReadBy, Sn as pinScopedSecretVerdict, St as replaceWholeLeaves, Tn as recordFreshNoEchoValuesIn, Tt as repairEmbeddedPhysicalNamesTowards, U as withLegacyMixedScan, Ut as recordTakenIfBranch, V as resolvedPlaintextOf, Vt as standsForInheritedSecret, W as redactForState, Wt as inheritedPseudoValue, X as passReadVersionsFor, Xt as recordInheritedParameterRead, Y as passProvenanceFor, Yt as inheritedRenderedToken, Z as recordReferenceProvenanceEntry, Zt as recordInheritedParameterValue, _ as noEchoComparison, _n as isNoEchoParameterPlaintext, _t as maskSecretsInText, an as physicalNameCopiesOf, at as literalSplitDelimitersOf, bn as markNoEchoParameterClass, bt as legacyReferenceLeavesOnly, c as parseLambdaFunctionAddress, cn as recordNestedStackParameterExpressions, ct as recordLogOnlyParameterValue, d as canonicalJson$5, dn as splitGetAttStringForm, dt as shareLogOnlyValues, en as carriesFreshNoEchoValue, et as carryLogOnlyValues, f as isMarkedCoordinate, fn as carriesSecretMask, ft as unionOfSecretBags, g as maskedLeafCoordinatesOf, gn as isMaskOnlyPlaintext, gt as maskSecretsInError, h as maskWholeValue, hn as freshNoEchoValuesOf, ht as maskRecordedSecretsInText, in as recoverMaskedOutput, it as hasMaskableValues, jn as wholeStringLeavesOf, jt as spanNamesResolvableService, k as valueAtCoordinate, kn as recordNoEchoParameterFreshValue, kt as withPhysicalNameCopies, ln as crossStackSourceKey, lt as recordLogOnlySplitFragments, m as maskReadbackAtCoordinates, mn as contradictProvenPublicExpression, mt as errorCauseChain, nn as freshNoEchoLeafPositions, nt as createUnionSecretMasker, p as maskAtCoordinates, pn as carryFreshNoEchoMark, pt as createSecretMasker, q as recordSecretResolution, qt as inheritNestedStackParameterAssociations, rn as recordRecoverableMaskedOutput, rt as hasLogOnlyValues, sn as recordPhysicalNameCopy, st as printingCorpusOf, t as ReplacementRulesRegistry, tn as embedsFreshNoEchoValue, tt as carryLogOnlyValuesCarriedBy, u as canonicalCoordinates, un as recordCrossStackExpression, ut as recordLogOnlyValue, v as noEchoCoordinatesOf, vn as isScopedSecretVerdict, vt as differingStringLeaves, w as readbackPathFor, wn as recordDerivedMaskOnlyValue, wt as embeddedPhysicalNameRewrites, x as noEchoParameterNodesAt, xn as noEchoParameterPlaintextsOf, xt as overlapRuleAnswered, y as noEchoLeavesOf, yn as isSecretExpressionByVerdictOrSpelling, yt as legacyLeavesWithoutMask, z as recordIntrinsicLeafResolutionAs, zt as rereadParameterExpression } from "./replacement-rules-01_01yDU.js";
11
- import { C as unsettledItemsTopKey, D as withoutUnsettledProperties, E as withUnsettledProperties, S as unsettledItemsOf, T as withUnsettledItems, b as unsettledContextOf, c as refuseRestoreFromItself, g as refuseMalformedDesiredTags, h as readTagList, i as withResourceDeadline, m as planTagDiff, n as enclosingDeadlineRemainingMs, r as whileEnclosingDeadlinesPaused, t as enclosingDeadlineExpired, u as definedAttributes, v as tagPlanWarning, w as unsettledPropertiesOf, x as unsettledItemsField, y as isUsableAttemptedName } from "./resource-deadline-TfDpwRQ_.js";
12
- import { t as getCdkdVersion } from "./version-PlqBTGrc.js";
8
+ import { t as expectedOwnerParam } from "./expected-bucket-owner-DR9qK772.js";
9
+ import { At as resourceTypeShown, Ct as startInterruptWatch, Et as compositeIdSeparatorRefusal, Ft as isSecretDerivedValue, G as markNotGone, Gt as isAuxiliaryFailure, H as RESOURCE_NOT_FOUND, Ht as createdBeforeFailure, I as isQuotableImportValue, It as maskDeep, Jt as markCreatedBeforeFailure, K as compensateProtectionFlip, Kt as isAuxiliaryMarkOf, L as normalizeAwsTagsToCfn, Lt as maskerOrIdentity, Mt as stateOrphanRecordRemedy, Nt as createMaskedLogSinks, Ot as logicalIdShown, Pt as createMaskedRetryLogger, R as quotedRemedyLogicalId, Rt as withDerivedNameMasks, St as isInterruptedWaitError, U as assertRegionMatch, Ut as createdResourceIdentityBeforeFailure, V as resolveExplicitPhysicalId, W as isMarkedNotGone, Y as observeThenDisableProtection, _t as protectedReplacementAdvice, an as sanitizeRecoveryValue, at as ProtectionFlipRegistry, c as clearCreatedReport, cn as injectiveKey, ct as runDeleteAttempt, dn as producerRecordKey, dt as monotonicNowMs, f as retractCreatedResource, ft as DELETION_PROTECTION_DOC_POINTER, gt as pasteableAwsCommand, in as recoveryCommandFlags, j as withoutServerErrorRetries, jt as segmentAfterAnchor, l as collectCreatedResources, lt as ElapsedBudget, mn as withPasteableAwsProfile, n as prepareRemovalForUpdate, o as withoutInjectedRemovals, on as CUSTOM_RESOURCE_RESPONSE_PREFIX, ot as isTerminalDeleteFailure, q as deleteWithProtectionCompensation, qt as markAuxiliaryFailure, r as removalWarning, s as CreatedResourceSink, sn as DEFAULT_STATE_PREFIX, st as protectionFlipKey, u as reportCreatedResource, ut as ElapsedBudgetRegistry, wt as canonicalizeRoute53QueryName, x as withUnchangedSecretPrincipalLists, z as refusalTypeShown, zt as RETRY_AUXILIARY_OWNER } from "./update-removal-BOue-bJm.js";
10
+ import { _ as stackInstanceIdCarriedFrom, a as slowCcOperationTimeoutMs, c as exportNamesCarriedFrom, d as importableOutputs, f as isReadableBag, g as skippedOutputsCarriedFrom, h as shouldRetainResource, i as dbInstanceAttributes, m as orphansCarriedFrom, n as isRefusedByName, o as acceptedCreateOnlyDropsOf, p as orphansAfterRollback, r as markDeleteStarted, s as describeRegionValueKind, t as isDeleteStarted, u as importableOutputKeys } from "./delete-started-C0g7PYI-.js";
11
+ import { $t as withdrawRenderedParameterSpelling, A as witnessNormalize, An as recordProvenPublicExpression, At as withoutPhysicalNameCopies, B as redactionClaimOf, Bt as splitOutsideDynamicReferences, Ct as withLegacyOverlapScan, D as recordedNoEchoValuesOf, Dt as replaceEmbeddedPhysicalNameRewrites, E as recordPassedNoEchoParameters, Et as repairPhysicalNameCopyLeaves, F as markLeafCertifiedBag, Fn as isSingleDynamicReferenceToken, G as foldRecording, Gt as recordInheritedPseudoParameters, H as mixedLiteralAnswered, Ht as recordDroppedArrayElements, I as markSameGenerationBag, In as maskMatchSpans, J as hasPassProvenance, Jt as inheritedParameterExpression, K as openRecordingScope, Kt as templateRereadsAccountId, L as mergeResolvedPairs, Lt as arrayPairsWhateverDrops, M as carryRedactionMarks, Mn as withoutNoEchoParameterEntries, Mt as DYNAMIC_REFERENCE_TOKEN_SCAN, N as intrinsicLeafResolutionOf, Nt as dynamicReferenceTokens, O as replaceAtCoordinates, On as recordNoEchoAttributeValues, Ot as scrubResourceRecord, P as isSameGenerationBag, Pn as isDynamicReferenceString, Q as recordReferenceResolution, Qt as redactInheritedParameterValue, R as recordIntrinsicLeafResolution, S as noEchoParametersReadBy, Sn as pinScopedSecretVerdict, St as replaceWholeLeaves, Tn as recordFreshNoEchoValuesIn, Tt as repairEmbeddedPhysicalNamesTowards, U as withLegacyMixedScan, Ut as recordTakenIfBranch, V as resolvedPlaintextOf, Vt as standsForInheritedSecret, W as redactForState, Wt as inheritedPseudoValue, X as passReadVersionsFor, Xt as recordInheritedParameterRead, Y as passProvenanceFor, Yt as inheritedRenderedToken, Z as recordReferenceProvenanceEntry, Zt as recordInheritedParameterValue, _ as noEchoComparison, _n as isNoEchoParameterPlaintext, _t as maskSecretsInText, an as physicalNameCopiesOf, at as literalSplitDelimitersOf, bn as markNoEchoParameterClass, bt as legacyReferenceLeavesOnly, c as parseLambdaFunctionAddress, cn as recordNestedStackParameterExpressions, ct as recordLogOnlyParameterValue, d as canonicalJson$5, dn as splitGetAttStringForm, dt as shareLogOnlyValues, en as carriesFreshNoEchoValue, et as carryLogOnlyValues, f as isMarkedCoordinate, fn as carriesSecretMask, ft as unionOfSecretBags, g as maskedLeafCoordinatesOf, gn as isMaskOnlyPlaintext, gt as maskSecretsInError, h as maskWholeValue, hn as freshNoEchoValuesOf, ht as maskRecordedSecretsInText, in as recoverMaskedOutput, it as hasMaskableValues, jn as wholeStringLeavesOf, jt as spanNamesResolvableService, k as valueAtCoordinate, kn as recordNoEchoParameterFreshValue, kt as withPhysicalNameCopies, ln as crossStackSourceKey, lt as recordLogOnlySplitFragments, m as maskReadbackAtCoordinates, mn as contradictProvenPublicExpression, mt as errorCauseChain, nn as freshNoEchoLeafPositions, nt as createUnionSecretMasker, p as maskAtCoordinates, pn as carryFreshNoEchoMark, pt as createSecretMasker, q as recordSecretResolution, qt as inheritNestedStackParameterAssociations, rn as recordRecoverableMaskedOutput, rt as hasLogOnlyValues, sn as recordPhysicalNameCopy, st as printingCorpusOf, t as ReplacementRulesRegistry, tn as embedsFreshNoEchoValue, tt as carryLogOnlyValuesCarriedBy, u as canonicalCoordinates, un as recordCrossStackExpression, ut as recordLogOnlyValue, v as noEchoCoordinatesOf, vn as isScopedSecretVerdict, vt as differingStringLeaves, w as readbackPathFor, wn as recordDerivedMaskOnlyValue, wt as embeddedPhysicalNameRewrites, x as noEchoParameterNodesAt, xn as noEchoParameterPlaintextsOf, xt as overlapRuleAnswered, y as noEchoLeavesOf, yn as isSecretExpressionByVerdictOrSpelling, yt as legacyLeavesWithoutMask, z as recordIntrinsicLeafResolutionAs, zt as rereadParameterExpression } from "./replacement-rules-lOM1aGPr.js";
12
+ import { C as unsettledItemsTopKey, D as withoutUnsettledProperties, E as withUnsettledProperties, S as unsettledItemsOf, T as withUnsettledItems, _ as definedAttributes, b as unsettledContextOf, c as refuseRestoreFromItself, f as planTagDiff, g as tagPlanWarning, i as withResourceDeadline, m as refuseMalformedDesiredTags, n as enclosingDeadlineRemainingMs, p as readTagList, r as whileEnclosingDeadlinesPaused, t as enclosingDeadlineExpired, w as unsettledPropertiesOf, x as unsettledItemsField, y as isUsableAttemptedName } from "./resource-deadline-1VcUPyH4.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, 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-CGoY_YS8.js").then((n) => n.n);
85
+ const { expectedOwnerParam } = await import("./expected-bucket-owner-DR9qK772.js").then((n) => n.n);
86
86
  return (await client.send(new GetBucketLocationCommand({
87
87
  Bucket: bucketName,
88
88
  ...await expectedOwnerParam(client)
@@ -278,6 +278,15 @@ function nullPrototypeRecord() {
278
278
  return Object.create(null);
279
279
  }
280
280
 
281
+ // src/synthesis/synthesized-stacks.ts
282
+ let lastSynthesizedStacks = [];
283
+ function rememberSynthesizedStacks(stacks) {
284
+ lastSynthesizedStacks = stacks;
285
+ }
286
+ function synthesizedStacks() {
287
+ return lastSynthesizedStacks;
288
+ }
289
+
281
290
  // src/utils/s3-listing-keys.ts
282
291
  function decodeListingKey(value) {
283
292
  if (value === void 0) return void 0;
@@ -606,6 +615,12 @@ function ssmResolvedValueType(type) {
606
615
  return inner.length > 0 ? inner : void 0;
607
616
  }
608
617
 
618
+ // src/utils/missing-state-bucket-remedy.ts
619
+ function missingStateBucketRemedy(what) {
620
+ if (!awsEndpointOverrideActive()) return `Run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))} to create ${what}.`;
621
+ return `AWS Emulator keeps nothing across restarts, so a new or restarted emulator has no cdkd bootstrap yet. A cdkd deploy without --dry-run creates the state bucket on its own; or bootstrap the emulator now with:\n${cdkdRemedy("cdkd bootstrap")}`;
622
+ }
623
+
609
624
  // src/assets/absolute-asset-path-warning.ts
610
625
  function warnWholeAssemblyAsSource(w) {
611
626
  getLogger().child("assets").warn(`${w.subject} has ${w.field} naming the output directory ITSELF: ${displayAssemblyPath(w.outdir)}. cdkd will ${w.sink} — that is the WHOLE assembly, every template and every staged asset, not one asset directory. No CDK synth emits this, so treat this assembly as untrusted unless you wrote that path yourself.`);
@@ -809,12 +824,12 @@ function parseBootstrapMarker(body, markerKey) {
809
824
  parsed = JSON.parse(body);
810
825
  } catch (error) {
811
826
  getLogger().debug(safeMsg`${markerSubject(markerKey)} failed to parse: ${parseFailureDebugDetail(error)}`);
812
- throw new CdkdError(`${markerSubject(markerKey)} in the state bucket is not valid JSON. Re-run 'cdkd bootstrap' for this region to rewrite it.`, "INVALID_BOOTSTRAP_MARKER", jsonParseFailureStandIn(error, utf8ByteLength(body)));
827
+ throw new CdkdError(`${markerSubject(markerKey)} in the state bucket is not valid JSON. Re-run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))} for this region to rewrite it.`, "INVALID_BOOTSTRAP_MARKER", jsonParseFailureStandIn(error, utf8ByteLength(body)));
813
828
  }
814
829
  const marker = parsed;
815
830
  if (typeof marker.assetSupportVersion === "number" && marker.assetSupportVersion > 1) throw new CdkdError(`${markerSubject(markerKey)} has assetSupportVersion ${marker.assetSupportVersion}, but this cdkd only understands up to ${1}. Upgrade cdkd to deploy in this region.`, "UNSUPPORTED_BOOTSTRAP_MARKER_VERSION");
816
- if (typeof marker.assetBucket !== "string" || marker.assetBucket.length === 0 || typeof marker.containerRepo !== "string" || marker.containerRepo.length === 0 || typeof marker.assetSupportVersion !== "number") throw new CdkdError(`${markerSubject(markerKey)} in the state bucket is malformed (missing assetBucket / containerRepo / assetSupportVersion). Re-run 'cdkd bootstrap' for this region to rewrite it.`, "INVALID_BOOTSTRAP_MARKER");
817
- if (!ASSET_BUCKET_NAME_PATTERN.test(marker.assetBucket) || !isValidContainerRepoName(marker.containerRepo)) throw new CdkdError(`${markerSubject(markerKey)} in the state bucket is malformed (its asset bucket or container repository name is not a valid name). Re-run 'cdkd bootstrap' for this region to rewrite it.`, "INVALID_BOOTSTRAP_MARKER");
831
+ if (typeof marker.assetBucket !== "string" || marker.assetBucket.length === 0 || typeof marker.containerRepo !== "string" || marker.containerRepo.length === 0 || typeof marker.assetSupportVersion !== "number") throw new CdkdError(`${markerSubject(markerKey)} in the state bucket is malformed (missing assetBucket / containerRepo / assetSupportVersion). Re-run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))} for this region to rewrite it.`, "INVALID_BOOTSTRAP_MARKER");
832
+ if (!ASSET_BUCKET_NAME_PATTERN.test(marker.assetBucket) || !isValidContainerRepoName(marker.containerRepo)) throw new CdkdError(`${markerSubject(markerKey)} in the state bucket is malformed (its asset bucket or container repository name is not a valid name). Re-run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))} for this region to rewrite it.`, "INVALID_BOOTSTRAP_MARKER");
818
833
  return {
819
834
  assetBucket: marker.assetBucket,
820
835
  containerRepo: marker.containerRepo,
@@ -1518,6 +1533,15 @@ const NON_SENSITIVE_SUFFIX = /(arn|id|name|url|alias|status)$/i;
1518
1533
  function isSensitiveAttributeName(attributeName) {
1519
1534
  return SENSITIVE_ATTRIBUTE_NAME.test(attributeName) && !NON_SENSITIVE_SUFFIX.test(attributeName);
1520
1535
  }
1536
+ const SECRET_VALUED_ATTRIBUTES = /* @__PURE__ */ new Map([
1537
+ ["AWS::AppSync::ApiKey", ["ApiKey"]],
1538
+ ["AWS::EC2::IpamExternalResourceVerificationToken", ["TokenValue"]],
1539
+ ["AWS::IVS::StreamKey", ["Value"]]
1540
+ ]);
1541
+ function isSecretValuedAttribute(resourceType, attribute) {
1542
+ if (resourceType === void 0) return false;
1543
+ return SECRET_VALUED_ATTRIBUTES.get(resourceType)?.includes(attribute) === true;
1544
+ }
1521
1545
  function stringifyAttributeForLog(attributeName, value) {
1522
1546
  if (isSensitiveAttributeName(attributeName)) return "<redacted>";
1523
1547
  return stringifyValue(value);
@@ -1878,8 +1902,8 @@ function stateCommand(verb, s, prefix) {
1878
1902
  function releaseRemedy(s, prefixes, destroyToo) {
1879
1903
  const first = prefixes[0];
1880
1904
  if (prefixes.length === 1 && destroyToo) return `\`${stateCommand("destroy", s, first)}\` deletes its resources and its record, \`${stateCommand("orphan", s, first)}\` drops only its record.`;
1881
- if (prefixes.length === 1) return `drop the other record with \`cdkd state orphan\` (it removes only the record, never a resource): \`${stateCommand("orphan", s, first)}\`.`;
1882
- return `release each other record with \`cdkd state orphan\` (it removes only the record, never a resource; a destroy under one of them is refused while another still records the stack, and the check stops at the first ones it finds, so re-run it until none is named), e.g. \`${stateCommand("orphan", s, first)}\`, then the same with each other prefix.`;
1905
+ if (prefixes.length === 1) return `drop the other record with ${proseQuoted(cdkdRemedy("cdkd state orphan"), "`")} (it removes only the record, never a resource): \`${stateCommand("orphan", s, first)}\`.`;
1906
+ return `release each other record with ${proseQuoted(cdkdRemedy("cdkd state orphan"), "`")} (it removes only the record, never a resource; a destroy under one of them is refused while another still records the stack, and the check stops at the first ones it finds, so re-run it until none is named), e.g. \`${stateCommand("orphan", s, first)}\`, then the same with each other prefix.`;
1883
1907
  }
1884
1908
  const VERB = {
1885
1909
  deploy: "deploy",
@@ -2330,7 +2354,7 @@ async function verifyBucketExists(options = {}) {
2330
2354
  }));
2331
2355
  } catch (error) {
2332
2356
  const name = error.name;
2333
- if (name === "NotFound" || name === "NoSuchBucket") throw new StateError(`State bucket '${this.config.bucket}' does not exist. Run 'cdkd bootstrap' to create it, or specify an existing bucket via --state-bucket, CDKD_STATE_BUCKET, or cdk.json context.cdkd.stateBucket.`, error instanceof Error ? error : void 0);
2357
+ if (name === "NotFound" || name === "NoSuchBucket") throw new StateError(`State bucket '${this.config.bucket}' does not exist. ` + (awsEndpointOverrideActive() ? missingStateBucketRemedy("it") : `Run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))} to create it, or specify an existing bucket via --state-bucket, CDKD_STATE_BUCKET, or cdk.json context.cdkd.stateBucket.`), error instanceof Error ? error : void 0);
2334
2358
  const normalized = normalizeAwsError(error, {
2335
2359
  bucket: this.config.bucket,
2336
2360
  operation: "HeadBucket"
@@ -4169,6 +4193,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4169
4193
  sdkUnwired: /* @__PURE__ */ new Map(),
4170
4194
  createOnlyDrops: /* @__PURE__ */ new Set(),
4171
4195
  readOnly: /* @__PURE__ */ new Set(["Id"]),
4196
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
4172
4197
  ccRouteUnavailable: false
4173
4198
  }],
4174
4199
  ["AWS::ApiGateway::Authorizer", {
@@ -4187,6 +4212,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4187
4212
  sdkUnwired: /* @__PURE__ */ new Map(),
4188
4213
  createOnlyDrops: /* @__PURE__ */ new Set(),
4189
4214
  readOnly: /* @__PURE__ */ new Set(["AuthorizerId"]),
4215
+ primaryIdentifier: /* @__PURE__ */ new Set(["AuthorizerId", "RestApiId"]),
4190
4216
  ccRouteUnavailable: false
4191
4217
  }],
4192
4218
  ["AWS::ApiGateway::Deployment", {
@@ -4198,6 +4224,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4198
4224
  ]),
4199
4225
  createOnlyDrops: /* @__PURE__ */ new Set(["DeploymentCanarySettings"]),
4200
4226
  readOnly: /* @__PURE__ */ new Set(["DeploymentId"]),
4227
+ primaryIdentifier: /* @__PURE__ */ new Set(["DeploymentId", "RestApiId"]),
4201
4228
  ccRouteUnavailable: false
4202
4229
  }],
4203
4230
  ["AWS::ApiGateway::Method", {
@@ -4219,6 +4246,11 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4219
4246
  sdkUnwired: /* @__PURE__ */ new Map(),
4220
4247
  createOnlyDrops: /* @__PURE__ */ new Set(),
4221
4248
  readOnly: /* @__PURE__ */ new Set(),
4249
+ primaryIdentifier: /* @__PURE__ */ new Set([
4250
+ "HttpMethod",
4251
+ "ResourceId",
4252
+ "RestApiId"
4253
+ ]),
4222
4254
  ccRouteUnavailable: false
4223
4255
  }],
4224
4256
  ["AWS::ApiGateway::Resource", {
@@ -4230,6 +4262,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4230
4262
  sdkUnwired: /* @__PURE__ */ new Map(),
4231
4263
  createOnlyDrops: /* @__PURE__ */ new Set(),
4232
4264
  readOnly: /* @__PURE__ */ new Set(["ResourceId"]),
4265
+ primaryIdentifier: /* @__PURE__ */ new Set(["ResourceId", "RestApiId"]),
4233
4266
  ccRouteUnavailable: false
4234
4267
  }],
4235
4268
  ["AWS::ApiGateway::RestApi", {
@@ -4256,6 +4289,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4256
4289
  sdkUnwired: /* @__PURE__ */ new Map(),
4257
4290
  createOnlyDrops: /* @__PURE__ */ new Set(),
4258
4291
  readOnly: /* @__PURE__ */ new Set(["RestApiId", "RootResourceId"]),
4292
+ primaryIdentifier: /* @__PURE__ */ new Set(["RestApiId"]),
4259
4293
  ccRouteUnavailable: false
4260
4294
  }],
4261
4295
  ["AWS::ApiGateway::Stage", {
@@ -4278,6 +4312,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4278
4312
  sdkUnwired: /* @__PURE__ */ new Map(),
4279
4313
  createOnlyDrops: /* @__PURE__ */ new Set(),
4280
4314
  readOnly: /* @__PURE__ */ new Set(),
4315
+ primaryIdentifier: /* @__PURE__ */ new Set(["RestApiId", "StageName"]),
4281
4316
  ccRouteUnavailable: false
4282
4317
  }],
4283
4318
  ["AWS::ApiGatewayV2::Api", {
@@ -4309,6 +4344,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4309
4344
  "ApiId",
4310
4345
  "ExecuteApiArn"
4311
4346
  ]),
4347
+ primaryIdentifier: /* @__PURE__ */ new Set(["ApiId"]),
4312
4348
  ccRouteUnavailable: false
4313
4349
  }],
4314
4350
  ["AWS::ApiGatewayV2::Authorizer", {
@@ -4328,6 +4364,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4328
4364
  sdkUnwired: /* @__PURE__ */ new Map(),
4329
4365
  createOnlyDrops: /* @__PURE__ */ new Set(),
4330
4366
  readOnly: /* @__PURE__ */ new Set(["AuthorizerId"]),
4367
+ primaryIdentifier: /* @__PURE__ */ new Set(["ApiId", "AuthorizerId"]),
4331
4368
  ccRouteUnavailable: false
4332
4369
  }],
4333
4370
  ["AWS::ApiGatewayV2::Integration", {
@@ -4354,6 +4391,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4354
4391
  sdkUnwired: /* @__PURE__ */ new Map(),
4355
4392
  createOnlyDrops: /* @__PURE__ */ new Set(),
4356
4393
  readOnly: /* @__PURE__ */ new Set(["IntegrationId"]),
4394
+ primaryIdentifier: /* @__PURE__ */ new Set(["ApiId", "IntegrationId"]),
4357
4395
  ccRouteUnavailable: false
4358
4396
  }],
4359
4397
  ["AWS::ApiGatewayV2::Route", {
@@ -4374,6 +4412,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4374
4412
  sdkUnwired: /* @__PURE__ */ new Map(),
4375
4413
  createOnlyDrops: /* @__PURE__ */ new Set(),
4376
4414
  readOnly: /* @__PURE__ */ new Set(["RouteId"]),
4415
+ primaryIdentifier: /* @__PURE__ */ new Set(["ApiId", "RouteId"]),
4377
4416
  ccRouteUnavailable: false
4378
4417
  }],
4379
4418
  ["AWS::ApiGatewayV2::Stage", {
@@ -4393,6 +4432,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4393
4432
  sdkUnwired: /* @__PURE__ */ new Map(),
4394
4433
  createOnlyDrops: /* @__PURE__ */ new Set(),
4395
4434
  readOnly: /* @__PURE__ */ new Set(),
4435
+ primaryIdentifier: /* @__PURE__ */ new Set(["ApiId", "StageName"]),
4396
4436
  ccRouteUnavailable: false
4397
4437
  }],
4398
4438
  ["AWS::AppConfig::Environment", {
@@ -4407,6 +4447,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4407
4447
  sdkUnwired: /* @__PURE__ */ new Map(),
4408
4448
  createOnlyDrops: /* @__PURE__ */ new Set(),
4409
4449
  readOnly: /* @__PURE__ */ new Set(["EnvironmentId"]),
4450
+ primaryIdentifier: /* @__PURE__ */ new Set(["ApplicationId", "EnvironmentId"]),
4410
4451
  ccRouteUnavailable: true
4411
4452
  }],
4412
4453
  ["AWS::AppSync::ApiKey", {
@@ -4422,6 +4463,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4422
4463
  "ApiKeyId",
4423
4464
  "Arn"
4424
4465
  ]),
4466
+ primaryIdentifier: /* @__PURE__ */ new Set(["ApiId", "ApiKeyId"]),
4425
4467
  ccRouteUnavailable: false
4426
4468
  }],
4427
4469
  ["AWS::AppSync::DataSource", {
@@ -4443,6 +4485,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4443
4485
  sdkUnwired: /* @__PURE__ */ new Map(),
4444
4486
  createOnlyDrops: /* @__PURE__ */ new Set(),
4445
4487
  readOnly: /* @__PURE__ */ new Set(["DataSourceArn"]),
4488
+ primaryIdentifier: /* @__PURE__ */ new Set(["DataSourceArn"]),
4446
4489
  ccRouteUnavailable: false
4447
4490
  }],
4448
4491
  ["AWS::AppSync::GraphQLApi", {
@@ -4477,6 +4520,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4477
4520
  "RealtimeDns",
4478
4521
  "RealtimeUrl"
4479
4522
  ]),
4523
+ primaryIdentifier: /* @__PURE__ */ new Set(["Arn"]),
4480
4524
  ccRouteUnavailable: false
4481
4525
  }],
4482
4526
  ["AWS::AppSync::GraphQLSchema", {
@@ -4488,6 +4532,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4488
4532
  sdkUnwired: /* @__PURE__ */ new Map(),
4489
4533
  createOnlyDrops: /* @__PURE__ */ new Set(),
4490
4534
  readOnly: /* @__PURE__ */ new Set(["Id"]),
4535
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
4491
4536
  ccRouteUnavailable: true
4492
4537
  }],
4493
4538
  ["AWS::AppSync::Resolver", {
@@ -4513,6 +4558,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4513
4558
  sdkUnwired: /* @__PURE__ */ new Map(),
4514
4559
  createOnlyDrops: /* @__PURE__ */ new Set(),
4515
4560
  readOnly: /* @__PURE__ */ new Set(["ResolverArn"]),
4561
+ primaryIdentifier: /* @__PURE__ */ new Set(["ResolverArn"]),
4516
4562
  ccRouteUnavailable: false
4517
4563
  }],
4518
4564
  ["AWS::AutoScaling::AutoScalingGroup", {
@@ -4561,6 +4607,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4561
4607
  ]),
4562
4608
  createOnlyDrops: /* @__PURE__ */ new Set(["InstanceId"]),
4563
4609
  readOnly: /* @__PURE__ */ new Set(["AutoScalingGroupARN"]),
4610
+ primaryIdentifier: /* @__PURE__ */ new Set(["AutoScalingGroupName"]),
4564
4611
  ccRouteUnavailable: false
4565
4612
  }],
4566
4613
  ["AWS::BedrockAgentCore::Browser", {
@@ -4573,6 +4620,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4573
4620
  "Name",
4574
4621
  "Status"
4575
4622
  ]),
4623
+ primaryIdentifier: /* @__PURE__ */ new Set(["BrowserArn"]),
4576
4624
  ccRouteUnavailable: true
4577
4625
  }],
4578
4626
  ["AWS::BedrockAgentCore::CodeInterpreter", {
@@ -4584,6 +4632,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4584
4632
  "CodeInterpreterId",
4585
4633
  "Status"
4586
4634
  ]),
4635
+ primaryIdentifier: /* @__PURE__ */ new Set(["CodeInterpreterArn"]),
4587
4636
  ccRouteUnavailable: true
4588
4637
  }],
4589
4638
  ["AWS::BedrockAgentCore::Evaluator", {
@@ -4606,6 +4655,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4606
4655
  "Status",
4607
4656
  "UpdatedAt"
4608
4657
  ]),
4658
+ primaryIdentifier: /* @__PURE__ */ new Set(["EvaluatorArn"]),
4609
4659
  ccRouteUnavailable: false
4610
4660
  }],
4611
4661
  ["AWS::BedrockAgentCore::Runtime", {
@@ -4638,6 +4688,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4638
4688
  "Status",
4639
4689
  "WorkloadIdentityDetails"
4640
4690
  ]),
4691
+ primaryIdentifier: /* @__PURE__ */ new Set(["AgentRuntimeId"]),
4641
4692
  ccRouteUnavailable: false
4642
4693
  }],
4643
4694
  ["AWS::Budgets::Budget", {
@@ -4649,6 +4700,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4649
4700
  sdkUnwired: /* @__PURE__ */ new Map(),
4650
4701
  createOnlyDrops: /* @__PURE__ */ new Set(),
4651
4702
  readOnly: /* @__PURE__ */ new Set(["Id"]),
4703
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
4652
4704
  ccRouteUnavailable: true
4653
4705
  }],
4654
4706
  ["AWS::CertificateManager::Certificate", {
@@ -4666,6 +4718,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4666
4718
  sdkUnwired: /* @__PURE__ */ new Map(),
4667
4719
  createOnlyDrops: /* @__PURE__ */ new Set(),
4668
4720
  readOnly: /* @__PURE__ */ new Set(["CertificateArn"]),
4721
+ primaryIdentifier: /* @__PURE__ */ new Set(["CertificateArn"]),
4669
4722
  ccRouteUnavailable: false
4670
4723
  }],
4671
4724
  ["AWS::CloudFormation::Stack", {
@@ -4696,6 +4749,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4696
4749
  "StackId",
4697
4750
  "StackStatus"
4698
4751
  ]),
4752
+ primaryIdentifier: /* @__PURE__ */ new Set(["StackId"]),
4699
4753
  ccRouteUnavailable: true
4700
4754
  }],
4701
4755
  ["AWS::CloudFormation::WaitConditionHandle", {
@@ -4703,6 +4757,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4703
4757
  sdkUnwired: /* @__PURE__ */ new Map(),
4704
4758
  createOnlyDrops: /* @__PURE__ */ new Set(),
4705
4759
  readOnly: /* @__PURE__ */ new Set(["Id"]),
4760
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
4706
4761
  ccRouteUnavailable: true
4707
4762
  }],
4708
4763
  ["AWS::CloudFront::CloudFrontOriginAccessIdentity", {
@@ -4710,6 +4765,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4710
4765
  sdkUnwired: /* @__PURE__ */ new Map(),
4711
4766
  createOnlyDrops: /* @__PURE__ */ new Set(),
4712
4767
  readOnly: /* @__PURE__ */ new Set(["Id", "S3CanonicalUserId"]),
4768
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
4713
4769
  ccRouteUnavailable: false
4714
4770
  }],
4715
4771
  ["AWS::CloudFront::Distribution", {
@@ -4717,6 +4773,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4717
4773
  sdkUnwired: /* @__PURE__ */ new Map(),
4718
4774
  createOnlyDrops: /* @__PURE__ */ new Set(),
4719
4775
  readOnly: /* @__PURE__ */ new Set(["DomainName", "Id"]),
4776
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
4720
4777
  ccRouteUnavailable: false
4721
4778
  }],
4722
4779
  ["AWS::CloudFront::OriginAccessControl", {
@@ -4724,6 +4781,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4724
4781
  sdkUnwired: /* @__PURE__ */ new Map(),
4725
4782
  createOnlyDrops: /* @__PURE__ */ new Set(),
4726
4783
  readOnly: /* @__PURE__ */ new Set(["Id"]),
4784
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
4727
4785
  ccRouteUnavailable: false
4728
4786
  }],
4729
4787
  ["AWS::CloudTrail::Trail", {
@@ -4750,6 +4808,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4750
4808
  sdkUnwired: /* @__PURE__ */ new Map(),
4751
4809
  createOnlyDrops: /* @__PURE__ */ new Set(),
4752
4810
  readOnly: /* @__PURE__ */ new Set(["Arn", "SnsTopicArn"]),
4811
+ primaryIdentifier: /* @__PURE__ */ new Set(["TrailName"]),
4753
4812
  ccRouteUnavailable: false
4754
4813
  }],
4755
4814
  ["AWS::CloudWatch::Alarm", {
@@ -4785,6 +4844,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4785
4844
  sdkUnwired: /* @__PURE__ */ new Map(),
4786
4845
  createOnlyDrops: /* @__PURE__ */ new Set(),
4787
4846
  readOnly: /* @__PURE__ */ new Set(["Arn"]),
4847
+ primaryIdentifier: /* @__PURE__ */ new Set(["AlarmName"]),
4788
4848
  ccRouteUnavailable: false
4789
4849
  }],
4790
4850
  ["AWS::CloudWatch::AnomalyDetector", {
@@ -4801,6 +4861,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4801
4861
  sdkUnwired: /* @__PURE__ */ new Map(),
4802
4862
  createOnlyDrops: /* @__PURE__ */ new Set(),
4803
4863
  readOnly: /* @__PURE__ */ new Set(["Id"]),
4864
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
4804
4865
  ccRouteUnavailable: true
4805
4866
  }],
4806
4867
  ["AWS::CodeBuild::Project", {
@@ -4834,6 +4895,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4834
4895
  sdkUnwired: /* @__PURE__ */ new Map(),
4835
4896
  createOnlyDrops: /* @__PURE__ */ new Set(),
4836
4897
  readOnly: /* @__PURE__ */ new Set(["Arn"]),
4898
+ primaryIdentifier: /* @__PURE__ */ new Set(["Name"]),
4837
4899
  ccRouteUnavailable: true
4838
4900
  }],
4839
4901
  ["AWS::CodeCommit::Repository", {
@@ -4854,6 +4916,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4854
4916
  "Name",
4855
4917
  "RepositoryId"
4856
4918
  ]),
4919
+ primaryIdentifier: /* @__PURE__ */ new Set(["RepositoryId"]),
4857
4920
  ccRouteUnavailable: false
4858
4921
  }],
4859
4922
  ["AWS::Cognito::UserPool", {
@@ -4899,6 +4962,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4899
4962
  "ProviderURL",
4900
4963
  "UserPoolId"
4901
4964
  ]),
4965
+ primaryIdentifier: /* @__PURE__ */ new Set(["UserPoolId"]),
4902
4966
  ccRouteUnavailable: false
4903
4967
  }],
4904
4968
  ["AWS::DLM::LifecyclePolicy", {
@@ -4919,6 +4983,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4919
4983
  sdkUnwired: /* @__PURE__ */ new Map(),
4920
4984
  createOnlyDrops: /* @__PURE__ */ new Set(),
4921
4985
  readOnly: /* @__PURE__ */ new Set(["Arn", "PolicyId"]),
4986
+ primaryIdentifier: /* @__PURE__ */ new Set(["PolicyId"]),
4922
4987
  ccRouteUnavailable: false
4923
4988
  }],
4924
4989
  ["AWS::DocDB::DBCluster", {
@@ -4963,6 +5028,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4963
5028
  "ReadEndpoint",
4964
5029
  "ServerlessV2PlatformVersion"
4965
5030
  ]),
5031
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
4966
5032
  ccRouteUnavailable: true
4967
5033
  }],
4968
5034
  ["AWS::DocDB::DBInstance", {
@@ -4985,6 +5051,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4985
5051
  "Id",
4986
5052
  "Port"
4987
5053
  ]),
5054
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
4988
5055
  ccRouteUnavailable: true
4989
5056
  }],
4990
5057
  ["AWS::DocDB::DBSubnetGroup", {
@@ -4997,6 +5064,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
4997
5064
  sdkUnwired: /* @__PURE__ */ new Map(),
4998
5065
  createOnlyDrops: /* @__PURE__ */ new Set(),
4999
5066
  readOnly: /* @__PURE__ */ new Set(),
5067
+ primaryIdentifier: /* @__PURE__ */ new Set(["DBSubnetGroupName"]),
5000
5068
  ccRouteUnavailable: false
5001
5069
  }],
5002
5070
  ["AWS::DynamoDB::GlobalTable", {
@@ -5032,6 +5100,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5032
5100
  "StreamArn",
5033
5101
  "TableId"
5034
5102
  ]),
5103
+ primaryIdentifier: /* @__PURE__ */ new Set(["TableName"]),
5035
5104
  ccRouteUnavailable: false
5036
5105
  }],
5037
5106
  ["AWS::DynamoDB::Table", {
@@ -5060,6 +5129,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5060
5129
  sdkUnwired: /* @__PURE__ */ new Map([["ImportSourceSpecification", "S3 import uses the separate ImportTable API (not CreateTable) and is create-only with no readback; deferred to a dedicated import-from-S3 PR"]]),
5061
5130
  createOnlyDrops: /* @__PURE__ */ new Set(["ImportSourceSpecification"]),
5062
5131
  readOnly: /* @__PURE__ */ new Set(["Arn", "StreamArn"]),
5132
+ primaryIdentifier: /* @__PURE__ */ new Set(["TableName"]),
5063
5133
  ccRouteUnavailable: false
5064
5134
  }],
5065
5135
  ["AWS::EC2::EIP", {
@@ -5081,6 +5151,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5081
5151
  "TransferAddress"
5082
5152
  ]),
5083
5153
  readOnly: /* @__PURE__ */ new Set(["AllocationId", "PublicIp"]),
5154
+ primaryIdentifier: /* @__PURE__ */ new Set(["AllocationId", "PublicIp"]),
5084
5155
  ccRouteUnavailable: false
5085
5156
  }],
5086
5157
  ["AWS::EC2::Instance", {
@@ -5136,6 +5207,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5136
5207
  "State",
5137
5208
  "VpcId"
5138
5209
  ]),
5210
+ primaryIdentifier: /* @__PURE__ */ new Set(["InstanceId"]),
5139
5211
  ccRouteUnavailable: false
5140
5212
  }],
5141
5213
  ["AWS::EC2::InternetGateway", {
@@ -5143,6 +5215,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5143
5215
  sdkUnwired: /* @__PURE__ */ new Map(),
5144
5216
  createOnlyDrops: /* @__PURE__ */ new Set(),
5145
5217
  readOnly: /* @__PURE__ */ new Set(["InternetGatewayId"]),
5218
+ primaryIdentifier: /* @__PURE__ */ new Set(["InternetGatewayId"]),
5146
5219
  ccRouteUnavailable: false
5147
5220
  }],
5148
5221
  ["AWS::EC2::NatGateway", {
@@ -5168,6 +5241,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5168
5241
  "NatGatewayId",
5169
5242
  "RouteTableId"
5170
5243
  ]),
5244
+ primaryIdentifier: /* @__PURE__ */ new Set(["NatGatewayId"]),
5171
5245
  ccRouteUnavailable: false
5172
5246
  }],
5173
5247
  ["AWS::EC2::NetworkAcl", {
@@ -5175,6 +5249,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5175
5249
  sdkUnwired: /* @__PURE__ */ new Map(),
5176
5250
  createOnlyDrops: /* @__PURE__ */ new Set(),
5177
5251
  readOnly: /* @__PURE__ */ new Set(["Id"]),
5252
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
5178
5253
  ccRouteUnavailable: false
5179
5254
  }],
5180
5255
  ["AWS::EC2::NetworkAclEntry", {
@@ -5192,6 +5267,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5192
5267
  sdkUnwired: /* @__PURE__ */ new Map(),
5193
5268
  createOnlyDrops: /* @__PURE__ */ new Set(),
5194
5269
  readOnly: /* @__PURE__ */ new Set(["Id"]),
5270
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
5195
5271
  ccRouteUnavailable: true
5196
5272
  }],
5197
5273
  ["AWS::EC2::Route", {
@@ -5216,6 +5292,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5216
5292
  sdkUnwired: /* @__PURE__ */ new Map(),
5217
5293
  createOnlyDrops: /* @__PURE__ */ new Set(),
5218
5294
  readOnly: /* @__PURE__ */ new Set(["CidrBlock"]),
5295
+ primaryIdentifier: /* @__PURE__ */ new Set(["CidrBlock", "RouteTableId"]),
5219
5296
  ccRouteUnavailable: false
5220
5297
  }],
5221
5298
  ["AWS::EC2::RouteTable", {
@@ -5223,6 +5300,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5223
5300
  sdkUnwired: /* @__PURE__ */ new Map(),
5224
5301
  createOnlyDrops: /* @__PURE__ */ new Set(),
5225
5302
  readOnly: /* @__PURE__ */ new Set(["RouteTableId"]),
5303
+ primaryIdentifier: /* @__PURE__ */ new Set(["RouteTableId"]),
5226
5304
  ccRouteUnavailable: false
5227
5305
  }],
5228
5306
  ["AWS::EC2::SecurityGroup", {
@@ -5237,6 +5315,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5237
5315
  sdkUnwired: /* @__PURE__ */ new Map(),
5238
5316
  createOnlyDrops: /* @__PURE__ */ new Set(),
5239
5317
  readOnly: /* @__PURE__ */ new Set(["GroupId", "Id"]),
5318
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
5240
5319
  ccRouteUnavailable: false
5241
5320
  }],
5242
5321
  ["AWS::EC2::SecurityGroupIngress", {
@@ -5255,6 +5334,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5255
5334
  sdkUnwired: /* @__PURE__ */ new Map([["GroupName", "EC2-Classic-only — use GroupId for VPC security groups (EC2-Classic retired 2022-08-15)"], ["SourceSecurityGroupName", "EC2-Classic-only — use SourceSecurityGroupId for VPC peer security groups (EC2-Classic retired 2022-08-15)"]]),
5256
5335
  createOnlyDrops: /* @__PURE__ */ new Set(["GroupName", "SourceSecurityGroupName"]),
5257
5336
  readOnly: /* @__PURE__ */ new Set(["Id"]),
5337
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
5258
5338
  ccRouteUnavailable: false
5259
5339
  }],
5260
5340
  ["AWS::EC2::Subnet", {
@@ -5283,6 +5363,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5283
5363
  "NetworkAclAssociationId",
5284
5364
  "SubnetId"
5285
5365
  ]),
5366
+ primaryIdentifier: /* @__PURE__ */ new Set(["SubnetId"]),
5286
5367
  ccRouteUnavailable: false
5287
5368
  }],
5288
5369
  ["AWS::EC2::SubnetNetworkAclAssociation", {
@@ -5290,6 +5371,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5290
5371
  sdkUnwired: /* @__PURE__ */ new Map(),
5291
5372
  createOnlyDrops: /* @__PURE__ */ new Set(),
5292
5373
  readOnly: /* @__PURE__ */ new Set(["AssociationId"]),
5374
+ primaryIdentifier: /* @__PURE__ */ new Set(["AssociationId"]),
5293
5375
  ccRouteUnavailable: false
5294
5376
  }],
5295
5377
  ["AWS::EC2::SubnetRouteTableAssociation", {
@@ -5297,6 +5379,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5297
5379
  sdkUnwired: /* @__PURE__ */ new Map(),
5298
5380
  createOnlyDrops: /* @__PURE__ */ new Set(),
5299
5381
  readOnly: /* @__PURE__ */ new Set(["Id"]),
5382
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
5300
5383
  ccRouteUnavailable: false
5301
5384
  }],
5302
5385
  ["AWS::EC2::VPC", {
@@ -5319,6 +5402,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5319
5402
  "Ipv6CidrBlocks",
5320
5403
  "VpcId"
5321
5404
  ]),
5405
+ primaryIdentifier: /* @__PURE__ */ new Set(["VpcId"]),
5322
5406
  ccRouteUnavailable: false
5323
5407
  }],
5324
5408
  ["AWS::EC2::VPCGatewayAttachment", {
@@ -5330,6 +5414,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5330
5414
  sdkUnwired: /* @__PURE__ */ new Map(),
5331
5415
  createOnlyDrops: /* @__PURE__ */ new Set(),
5332
5416
  readOnly: /* @__PURE__ */ new Set(["AttachmentType"]),
5417
+ primaryIdentifier: /* @__PURE__ */ new Set(["AttachmentType", "VpcId"]),
5333
5418
  ccRouteUnavailable: false
5334
5419
  }],
5335
5420
  ["AWS::ECR::Repository", {
@@ -5347,6 +5432,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5347
5432
  sdkUnwired: /* @__PURE__ */ new Map(),
5348
5433
  createOnlyDrops: /* @__PURE__ */ new Set(),
5349
5434
  readOnly: /* @__PURE__ */ new Set(["Arn", "RepositoryUri"]),
5435
+ primaryIdentifier: /* @__PURE__ */ new Set(["RepositoryName"]),
5350
5436
  ccRouteUnavailable: false
5351
5437
  }],
5352
5438
  ["AWS::ECS::Cluster", {
@@ -5362,6 +5448,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5362
5448
  sdkUnwired: /* @__PURE__ */ new Map(),
5363
5449
  createOnlyDrops: /* @__PURE__ */ new Set(),
5364
5450
  readOnly: /* @__PURE__ */ new Set(["Arn"]),
5451
+ primaryIdentifier: /* @__PURE__ */ new Set(["ClusterName"]),
5365
5452
  ccRouteUnavailable: false
5366
5453
  }],
5367
5454
  ["AWS::ECS::Service", {
@@ -5398,6 +5485,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5398
5485
  sdkUnwired: /* @__PURE__ */ new Map(),
5399
5486
  createOnlyDrops: /* @__PURE__ */ new Set(),
5400
5487
  readOnly: /* @__PURE__ */ new Set(["Name", "ServiceArn"]),
5488
+ primaryIdentifier: /* @__PURE__ */ new Set(["Cluster", "ServiceArn"]),
5401
5489
  ccRouteUnavailable: false
5402
5490
  }],
5403
5491
  ["AWS::ECS::TaskDefinition", {
@@ -5423,6 +5511,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5423
5511
  sdkUnwired: /* @__PURE__ */ new Map([["InferenceAccelerators", "AWS Elastic Inference end-of-life 2024-04; use AWS Inferentia / Trainium accelerator instance families instead"]]),
5424
5512
  createOnlyDrops: /* @__PURE__ */ new Set(["InferenceAccelerators"]),
5425
5513
  readOnly: /* @__PURE__ */ new Set(["TaskDefinitionArn"]),
5514
+ primaryIdentifier: /* @__PURE__ */ new Set(["TaskDefinitionArn"]),
5426
5515
  ccRouteUnavailable: false
5427
5516
  }],
5428
5517
  ["AWS::EFS::AccessPoint", {
@@ -5435,6 +5524,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5435
5524
  sdkUnwired: /* @__PURE__ */ new Map([["ClientToken", "cdkd supplies its own retry-stable ClientToken on CreateAccessPoint, so a template-supplied value would be overwritten. The SDK does not own this field either: an omitted ClientToken is auto-filled with a FRESH uuid per attempt, which leaves a retried 500 free to mint a second access point, while a caller-supplied value goes on the wire verbatim."]]),
5436
5525
  createOnlyDrops: /* @__PURE__ */ new Set(["ClientToken"]),
5437
5526
  readOnly: /* @__PURE__ */ new Set(["AccessPointId", "Arn"]),
5527
+ primaryIdentifier: /* @__PURE__ */ new Set(["AccessPointId"]),
5438
5528
  ccRouteUnavailable: false
5439
5529
  }],
5440
5530
  ["AWS::EFS::FileSystem", {
@@ -5455,6 +5545,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5455
5545
  sdkUnwired: /* @__PURE__ */ new Map([["ReplicationConfiguration", "Cross-region EFS replication (CreateReplicationConfiguration) provisions a separate destination file system in another region with its own lifecycle, KMS key, and availability-zone placement; replicating + then tearing down the destination on destroy is a multi-resource, cross-region orchestration that is out of scope for the single-resource SDK provider."]]),
5456
5546
  createOnlyDrops: /* @__PURE__ */ new Set(),
5457
5547
  readOnly: /* @__PURE__ */ new Set(["Arn", "FileSystemId"]),
5548
+ primaryIdentifier: /* @__PURE__ */ new Set(["FileSystemId"]),
5458
5549
  ccRouteUnavailable: false
5459
5550
  }],
5460
5551
  ["AWS::EFS::MountTarget", {
@@ -5469,6 +5560,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5469
5560
  sdkUnwired: /* @__PURE__ */ new Map(),
5470
5561
  createOnlyDrops: /* @__PURE__ */ new Set(),
5471
5562
  readOnly: /* @__PURE__ */ new Set(["Id"]),
5563
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
5472
5564
  ccRouteUnavailable: false
5473
5565
  }],
5474
5566
  ["AWS::ElastiCache::CacheCluster", {
@@ -5501,6 +5593,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5501
5593
  sdkUnwired: /* @__PURE__ */ new Map([["CacheSecurityGroupNames", "EC2-Classic-only — use VpcSecurityGroupIds for VPC-deployed clusters (EC2-Classic retired 2022-08-15)"]]),
5502
5594
  createOnlyDrops: /* @__PURE__ */ new Set(),
5503
5595
  readOnly: /* @__PURE__ */ new Set(["ConfigurationEndpoint", "RedisEndpoint"]),
5596
+ primaryIdentifier: /* @__PURE__ */ new Set(["ClusterName"]),
5504
5597
  ccRouteUnavailable: false
5505
5598
  }],
5506
5599
  ["AWS::ElastiCache::SubnetGroup", {
@@ -5514,6 +5607,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5514
5607
  sdkUnwired: /* @__PURE__ */ new Map(),
5515
5608
  createOnlyDrops: /* @__PURE__ */ new Set(),
5516
5609
  readOnly: /* @__PURE__ */ new Set(),
5610
+ primaryIdentifier: /* @__PURE__ */ new Set(["CacheSubnetGroupName"]),
5517
5611
  ccRouteUnavailable: false
5518
5612
  }],
5519
5613
  ["AWS::ElasticLoadBalancingV2::Listener", {
@@ -5532,6 +5626,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5532
5626
  sdkUnwired: /* @__PURE__ */ new Map(),
5533
5627
  createOnlyDrops: /* @__PURE__ */ new Set(),
5534
5628
  readOnly: /* @__PURE__ */ new Set(["ListenerArn"]),
5629
+ primaryIdentifier: /* @__PURE__ */ new Set(["ListenerArn"]),
5535
5630
  ccRouteUnavailable: false
5536
5631
  }],
5537
5632
  ["AWS::ElasticLoadBalancingV2::LoadBalancer", {
@@ -5560,6 +5655,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5560
5655
  "LoadBalancerFullName",
5561
5656
  "LoadBalancerName"
5562
5657
  ]),
5658
+ primaryIdentifier: /* @__PURE__ */ new Set(["LoadBalancerArn"]),
5563
5659
  ccRouteUnavailable: false
5564
5660
  }],
5565
5661
  ["AWS::ElasticLoadBalancingV2::TargetGroup", {
@@ -5593,6 +5689,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5593
5689
  "TargetGroupFullName",
5594
5690
  "TargetGroupName"
5595
5691
  ]),
5692
+ primaryIdentifier: /* @__PURE__ */ new Set(["TargetGroupArn"]),
5596
5693
  ccRouteUnavailable: false
5597
5694
  }],
5598
5695
  ["AWS::EMR::Cluster", {
@@ -5630,6 +5727,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5630
5727
  sdkUnwired: /* @__PURE__ */ new Map(),
5631
5728
  createOnlyDrops: /* @__PURE__ */ new Set(),
5632
5729
  readOnly: /* @__PURE__ */ new Set(["Id", "MasterPublicDNS"]),
5730
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
5633
5731
  ccRouteUnavailable: true
5634
5732
  }],
5635
5733
  ["AWS::EMR::InstanceFleetConfig", {
@@ -5646,6 +5744,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5646
5744
  sdkUnwired: /* @__PURE__ */ new Map(),
5647
5745
  createOnlyDrops: /* @__PURE__ */ new Set(),
5648
5746
  readOnly: /* @__PURE__ */ new Set(["InstanceFleetId"]),
5747
+ primaryIdentifier: /* @__PURE__ */ new Set(["ClusterId", "InstanceFleetId"]),
5649
5748
  ccRouteUnavailable: true
5650
5749
  }],
5651
5750
  ["AWS::EMR::InstanceGroupConfig", {
@@ -5665,6 +5764,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5665
5764
  sdkUnwired: /* @__PURE__ */ new Map(),
5666
5765
  createOnlyDrops: /* @__PURE__ */ new Set(),
5667
5766
  readOnly: /* @__PURE__ */ new Set(["InstanceGroupId"]),
5767
+ primaryIdentifier: /* @__PURE__ */ new Set(["InstanceGroupId", "JobFlowId"]),
5668
5768
  ccRouteUnavailable: true
5669
5769
  }],
5670
5770
  ["AWS::Events::EventBus", {
@@ -5681,6 +5781,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5681
5781
  sdkUnwired: /* @__PURE__ */ new Map(),
5682
5782
  createOnlyDrops: /* @__PURE__ */ new Set(),
5683
5783
  readOnly: /* @__PURE__ */ new Set(["Arn"]),
5784
+ primaryIdentifier: /* @__PURE__ */ new Set(["Name"]),
5684
5785
  ccRouteUnavailable: false
5685
5786
  }],
5686
5787
  ["AWS::Events::Rule", {
@@ -5698,6 +5799,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5698
5799
  sdkUnwired: /* @__PURE__ */ new Map(),
5699
5800
  createOnlyDrops: /* @__PURE__ */ new Set(),
5700
5801
  readOnly: /* @__PURE__ */ new Set(["Arn", "RuleName"]),
5802
+ primaryIdentifier: /* @__PURE__ */ new Set(["Arn"]),
5701
5803
  ccRouteUnavailable: false
5702
5804
  }],
5703
5805
  ["AWS::FSx::FileSystem", {
@@ -5726,6 +5828,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5726
5828
  "ResourceARN",
5727
5829
  "RootVolumeId"
5728
5830
  ]),
5831
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
5729
5832
  ccRouteUnavailable: true
5730
5833
  }],
5731
5834
  ["AWS::Glue::Connection", {
@@ -5737,6 +5840,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5737
5840
  sdkUnwired: /* @__PURE__ */ new Map(),
5738
5841
  createOnlyDrops: /* @__PURE__ */ new Set(),
5739
5842
  readOnly: /* @__PURE__ */ new Set(["Name"]),
5843
+ primaryIdentifier: /* @__PURE__ */ new Set(["CatalogId", "Name"]),
5740
5844
  ccRouteUnavailable: false
5741
5845
  }],
5742
5846
  ["AWS::Glue::Crawler", {
@@ -5760,6 +5864,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5760
5864
  sdkUnwired: /* @__PURE__ */ new Map(),
5761
5865
  createOnlyDrops: /* @__PURE__ */ new Set(),
5762
5866
  readOnly: /* @__PURE__ */ new Set(),
5867
+ primaryIdentifier: /* @__PURE__ */ new Set(["Name"]),
5763
5868
  ccRouteUnavailable: false
5764
5869
  }],
5765
5870
  ["AWS::Glue::Database", {
@@ -5771,6 +5876,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5771
5876
  sdkUnwired: /* @__PURE__ */ new Map(),
5772
5877
  createOnlyDrops: /* @__PURE__ */ new Set(),
5773
5878
  readOnly: /* @__PURE__ */ new Set(),
5879
+ primaryIdentifier: /* @__PURE__ */ new Set(["DatabaseName"]),
5774
5880
  ccRouteUnavailable: false
5775
5881
  }],
5776
5882
  ["AWS::Glue::Job", {
@@ -5803,6 +5909,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5803
5909
  sdkUnwired: /* @__PURE__ */ new Map(),
5804
5910
  createOnlyDrops: /* @__PURE__ */ new Set(),
5805
5911
  readOnly: /* @__PURE__ */ new Set(),
5912
+ primaryIdentifier: /* @__PURE__ */ new Set(["Name"]),
5806
5913
  ccRouteUnavailable: false
5807
5914
  }],
5808
5915
  ["AWS::Glue::SecurityConfiguration", {
@@ -5810,6 +5917,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5810
5917
  sdkUnwired: /* @__PURE__ */ new Map(),
5811
5918
  createOnlyDrops: /* @__PURE__ */ new Set(),
5812
5919
  readOnly: /* @__PURE__ */ new Set(),
5920
+ primaryIdentifier: /* @__PURE__ */ new Set(["Name"]),
5813
5921
  ccRouteUnavailable: false
5814
5922
  }],
5815
5923
  ["AWS::Glue::Table", {
@@ -5823,6 +5931,11 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5823
5931
  sdkUnwired: /* @__PURE__ */ new Map(),
5824
5932
  createOnlyDrops: /* @__PURE__ */ new Set(),
5825
5933
  readOnly: /* @__PURE__ */ new Set(),
5934
+ primaryIdentifier: /* @__PURE__ */ new Set([
5935
+ "CatalogId",
5936
+ "DatabaseName",
5937
+ "Name"
5938
+ ]),
5826
5939
  ccRouteUnavailable: true
5827
5940
  }],
5828
5941
  ["AWS::Glue::Trigger", {
@@ -5841,6 +5954,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5841
5954
  sdkUnwired: /* @__PURE__ */ new Map(),
5842
5955
  createOnlyDrops: /* @__PURE__ */ new Set(),
5843
5956
  readOnly: /* @__PURE__ */ new Set(),
5957
+ primaryIdentifier: /* @__PURE__ */ new Set(["Name"]),
5844
5958
  ccRouteUnavailable: false
5845
5959
  }],
5846
5960
  ["AWS::Glue::Workflow", {
@@ -5854,6 +5968,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5854
5968
  sdkUnwired: /* @__PURE__ */ new Map(),
5855
5969
  createOnlyDrops: /* @__PURE__ */ new Set(),
5856
5970
  readOnly: /* @__PURE__ */ new Set(),
5971
+ primaryIdentifier: /* @__PURE__ */ new Set(["Name"]),
5857
5972
  ccRouteUnavailable: false
5858
5973
  }],
5859
5974
  ["AWS::IAM::AccessKey", {
@@ -5865,6 +5980,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5865
5980
  sdkUnwired: /* @__PURE__ */ new Map(),
5866
5981
  createOnlyDrops: /* @__PURE__ */ new Set(),
5867
5982
  readOnly: /* @__PURE__ */ new Set(["Id", "SecretAccessKey"]),
5983
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
5868
5984
  ccRouteUnavailable: true
5869
5985
  }],
5870
5986
  ["AWS::IAM::Group", {
@@ -5877,6 +5993,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5877
5993
  sdkUnwired: /* @__PURE__ */ new Map(),
5878
5994
  createOnlyDrops: /* @__PURE__ */ new Set(),
5879
5995
  readOnly: /* @__PURE__ */ new Set(["Arn"]),
5996
+ primaryIdentifier: /* @__PURE__ */ new Set(["GroupName"]),
5880
5997
  ccRouteUnavailable: false
5881
5998
  }],
5882
5999
  ["AWS::IAM::InstanceProfile", {
@@ -5888,6 +6005,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5888
6005
  sdkUnwired: /* @__PURE__ */ new Map(),
5889
6006
  createOnlyDrops: /* @__PURE__ */ new Set(),
5890
6007
  readOnly: /* @__PURE__ */ new Set(["Arn"]),
6008
+ primaryIdentifier: /* @__PURE__ */ new Set(["InstanceProfileName"]),
5891
6009
  ccRouteUnavailable: false
5892
6010
  }],
5893
6011
  ["AWS::IAM::ManagedPolicy", {
@@ -5913,6 +6031,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5913
6031
  "PolicyId",
5914
6032
  "UpdateDate"
5915
6033
  ]),
6034
+ primaryIdentifier: /* @__PURE__ */ new Set(["PolicyArn"]),
5916
6035
  ccRouteUnavailable: false
5917
6036
  }],
5918
6037
  ["AWS::IAM::Policy", {
@@ -5926,6 +6045,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5926
6045
  sdkUnwired: /* @__PURE__ */ new Map(),
5927
6046
  createOnlyDrops: /* @__PURE__ */ new Set(),
5928
6047
  readOnly: /* @__PURE__ */ new Set(["Id"]),
6048
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
5929
6049
  ccRouteUnavailable: true
5930
6050
  }],
5931
6051
  ["AWS::IAM::Role", {
@@ -5943,6 +6063,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5943
6063
  sdkUnwired: /* @__PURE__ */ new Map(),
5944
6064
  createOnlyDrops: /* @__PURE__ */ new Set(),
5945
6065
  readOnly: /* @__PURE__ */ new Set(["Arn", "RoleId"]),
6066
+ primaryIdentifier: /* @__PURE__ */ new Set(["RoleName"]),
5946
6067
  ccRouteUnavailable: false
5947
6068
  }],
5948
6069
  ["AWS::IAM::User", {
@@ -5959,6 +6080,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5959
6080
  sdkUnwired: /* @__PURE__ */ new Map(),
5960
6081
  createOnlyDrops: /* @__PURE__ */ new Set(),
5961
6082
  readOnly: /* @__PURE__ */ new Set(["Arn"]),
6083
+ primaryIdentifier: /* @__PURE__ */ new Set(["UserName"]),
5962
6084
  ccRouteUnavailable: false
5963
6085
  }],
5964
6086
  ["AWS::IAM::UserToGroupAddition", {
@@ -5966,6 +6088,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5966
6088
  sdkUnwired: /* @__PURE__ */ new Map(),
5967
6089
  createOnlyDrops: /* @__PURE__ */ new Set(),
5968
6090
  readOnly: /* @__PURE__ */ new Set(["Id"]),
6091
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
5969
6092
  ccRouteUnavailable: true
5970
6093
  }],
5971
6094
  ["AWS::Kinesis::Stream", {
@@ -5983,6 +6106,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5983
6106
  sdkUnwired: /* @__PURE__ */ new Map([["WarmThroughputMiBps", "AWS accepts it only on an account enrolled in the Kinesis minimum throughput billing commitment, so the SDK path is not wired (go-to-k/cdkd#1695); Cloud Control forwards it."]]),
5984
6107
  createOnlyDrops: /* @__PURE__ */ new Set(),
5985
6108
  readOnly: /* @__PURE__ */ new Set(["Arn", "WarmThroughputObject"]),
6109
+ primaryIdentifier: /* @__PURE__ */ new Set(["Name"]),
5986
6110
  ccRouteUnavailable: false
5987
6111
  }],
5988
6112
  ["AWS::Kinesis::StreamConsumer", {
@@ -5998,6 +6122,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
5998
6122
  "ConsumerCreationTimestamp",
5999
6123
  "ConsumerStatus"
6000
6124
  ]),
6125
+ primaryIdentifier: /* @__PURE__ */ new Set(["ConsumerARN"]),
6001
6126
  ccRouteUnavailable: false
6002
6127
  }],
6003
6128
  ["AWS::KinesisFirehose::DeliveryStream", {
@@ -6022,6 +6147,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6022
6147
  sdkUnwired: /* @__PURE__ */ new Map([["DatabaseSourceConfiguration", "Database as a source was a public preview AWS removed on 2025-09-24 (Firehose document history); CreateDeliveryStream refused DeliveryStreamType DatabaseAsSource in every region probed, so an SDK path could not be verified. Stays on Cloud Control"], ["SnowflakeDestinationConfiguration", "Proving the wire shape live needs a real Snowflake account, and the block carries key material (PrivateKey, KeyPassphrase). Stays on Cloud Control"]]),
6023
6148
  createOnlyDrops: /* @__PURE__ */ new Set(["DatabaseSourceConfiguration"]),
6024
6149
  readOnly: /* @__PURE__ */ new Set(["Arn"]),
6150
+ primaryIdentifier: /* @__PURE__ */ new Set(["DeliveryStreamName"]),
6025
6151
  ccRouteUnavailable: false
6026
6152
  }],
6027
6153
  ["AWS::KMS::Alias", {
@@ -6029,6 +6155,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6029
6155
  sdkUnwired: /* @__PURE__ */ new Map(),
6030
6156
  createOnlyDrops: /* @__PURE__ */ new Set(),
6031
6157
  readOnly: /* @__PURE__ */ new Set(),
6158
+ primaryIdentifier: /* @__PURE__ */ new Set(["AliasName"]),
6032
6159
  ccRouteUnavailable: false
6033
6160
  }],
6034
6161
  ["AWS::KMS::Key", {
@@ -6049,6 +6176,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6049
6176
  sdkUnwired: /* @__PURE__ */ new Map(),
6050
6177
  createOnlyDrops: /* @__PURE__ */ new Set(),
6051
6178
  readOnly: /* @__PURE__ */ new Set(["Arn", "KeyId"]),
6179
+ primaryIdentifier: /* @__PURE__ */ new Set(["KeyId"]),
6052
6180
  ccRouteUnavailable: false
6053
6181
  }],
6054
6182
  ["AWS::Lambda::EventInvokeConfig", {
@@ -6062,6 +6190,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6062
6190
  sdkUnwired: /* @__PURE__ */ new Map(),
6063
6191
  createOnlyDrops: /* @__PURE__ */ new Set(),
6064
6192
  readOnly: /* @__PURE__ */ new Set(),
6193
+ primaryIdentifier: /* @__PURE__ */ new Set(["FunctionName", "Qualifier"]),
6065
6194
  ccRouteUnavailable: true
6066
6195
  }],
6067
6196
  ["AWS::Lambda::EventSourceMapping", {
@@ -6098,6 +6227,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6098
6227
  sdkUnwired: /* @__PURE__ */ new Map(),
6099
6228
  createOnlyDrops: /* @__PURE__ */ new Set(),
6100
6229
  readOnly: /* @__PURE__ */ new Set(["EventSourceMappingArn", "Id"]),
6230
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
6101
6231
  ccRouteUnavailable: false
6102
6232
  }],
6103
6233
  ["AWS::Lambda::Function", {
@@ -6137,6 +6267,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6137
6267
  sdkUnwired: /* @__PURE__ */ new Map(),
6138
6268
  createOnlyDrops: /* @__PURE__ */ new Set(),
6139
6269
  readOnly: /* @__PURE__ */ new Set(["Arn", "SnapStartResponse"]),
6270
+ primaryIdentifier: /* @__PURE__ */ new Set(["FunctionName"]),
6140
6271
  ccRouteUnavailable: false
6141
6272
  }],
6142
6273
  ["AWS::Lambda::LayerVersion", {
@@ -6151,6 +6282,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6151
6282
  sdkUnwired: /* @__PURE__ */ new Map(),
6152
6283
  createOnlyDrops: /* @__PURE__ */ new Set(),
6153
6284
  readOnly: /* @__PURE__ */ new Set(["LayerVersionArn"]),
6285
+ primaryIdentifier: /* @__PURE__ */ new Set(["LayerVersionArn"]),
6154
6286
  ccRouteUnavailable: false
6155
6287
  }],
6156
6288
  ["AWS::Lambda::MicrovmImage", {
@@ -6180,6 +6312,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6180
6312
  "State",
6181
6313
  "UpdatedAt"
6182
6314
  ]),
6315
+ primaryIdentifier: /* @__PURE__ */ new Set(["ImageArn"]),
6183
6316
  ccRouteUnavailable: false
6184
6317
  }],
6185
6318
  ["AWS::Lambda::NetworkConnector", {
@@ -6197,6 +6330,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6197
6330
  "LatestVersionArn",
6198
6331
  "State"
6199
6332
  ]),
6333
+ primaryIdentifier: /* @__PURE__ */ new Set(["Arn"]),
6200
6334
  ccRouteUnavailable: false
6201
6335
  }],
6202
6336
  ["AWS::Lambda::Permission", {
@@ -6214,6 +6348,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6214
6348
  sdkUnwired: /* @__PURE__ */ new Map(),
6215
6349
  createOnlyDrops: /* @__PURE__ */ new Set(),
6216
6350
  readOnly: /* @__PURE__ */ new Set(["Id"]),
6351
+ primaryIdentifier: /* @__PURE__ */ new Set(["FunctionName", "Id"]),
6217
6352
  ccRouteUnavailable: false
6218
6353
  }],
6219
6354
  ["AWS::Lambda::Url", {
@@ -6227,6 +6362,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6227
6362
  sdkUnwired: /* @__PURE__ */ new Map(),
6228
6363
  createOnlyDrops: /* @__PURE__ */ new Set(),
6229
6364
  readOnly: /* @__PURE__ */ new Set(["FunctionArn", "FunctionUrl"]),
6365
+ primaryIdentifier: /* @__PURE__ */ new Set(["FunctionArn"]),
6230
6366
  ccRouteUnavailable: false
6231
6367
  }],
6232
6368
  ["AWS::Lambda::WebFunctionEndpoint", {
@@ -6255,6 +6391,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6255
6391
  "UpdateStatus",
6256
6392
  "UpdateStatusReason"
6257
6393
  ]),
6394
+ primaryIdentifier: /* @__PURE__ */ new Set(["EndpointArn"]),
6258
6395
  ccRouteUnavailable: false
6259
6396
  }],
6260
6397
  ["AWS::Lambda::WebFunctionRevision", {
@@ -6275,6 +6412,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6275
6412
  "State",
6276
6413
  "StateReason"
6277
6414
  ]),
6415
+ primaryIdentifier: /* @__PURE__ */ new Set(["RevisionArn"]),
6278
6416
  ccRouteUnavailable: false
6279
6417
  }],
6280
6418
  ["AWS::Logs::LogGroup", {
@@ -6292,6 +6430,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6292
6430
  sdkUnwired: /* @__PURE__ */ new Map([["ResourcePolicyDocument", "not driven by this provider by decision (issue #1412): no CreateLogGroup / PutRetentionPolicy member carries it, and both policy lifecycles — the account-scoped AWS::Logs::ResourcePolicy type and the log-group-scoped logs:PutResourcePolicy (resourceArn + policyScope RESOURCE) — are ones this provider does not take on — routed via Cloud Control, whose handler applies it"]]),
6293
6431
  createOnlyDrops: /* @__PURE__ */ new Set(),
6294
6432
  readOnly: /* @__PURE__ */ new Set(["Arn"]),
6433
+ primaryIdentifier: /* @__PURE__ */ new Set(["LogGroupName"]),
6295
6434
  ccRouteUnavailable: false
6296
6435
  }],
6297
6436
  ["AWS::Neptune::DBCluster", {
@@ -6332,6 +6471,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6332
6471
  "Port",
6333
6472
  "ReadEndpoint"
6334
6473
  ]),
6474
+ primaryIdentifier: /* @__PURE__ */ new Set(["DBClusterIdentifier"]),
6335
6475
  ccRouteUnavailable: false
6336
6476
  }],
6337
6477
  ["AWS::Neptune::DBInstance", {
@@ -6352,6 +6492,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6352
6492
  sdkUnwired: /* @__PURE__ */ new Map([["DBSnapshotIdentifier", "The CloudFormation schema documents it as not supported, and CreateDBInstance has no such member: a Neptune instance is not restored from a snapshot, its cluster is"]]),
6353
6493
  createOnlyDrops: /* @__PURE__ */ new Set(["DBSnapshotIdentifier"]),
6354
6494
  readOnly: /* @__PURE__ */ new Set(["Endpoint", "Port"]),
6495
+ primaryIdentifier: /* @__PURE__ */ new Set(["DBInstanceIdentifier"]),
6355
6496
  ccRouteUnavailable: false
6356
6497
  }],
6357
6498
  ["AWS::Neptune::DBSubnetGroup", {
@@ -6364,6 +6505,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6364
6505
  sdkUnwired: /* @__PURE__ */ new Map(),
6365
6506
  createOnlyDrops: /* @__PURE__ */ new Set(),
6366
6507
  readOnly: /* @__PURE__ */ new Set(),
6508
+ primaryIdentifier: /* @__PURE__ */ new Set(["DBSubnetGroupName"]),
6367
6509
  ccRouteUnavailable: false
6368
6510
  }],
6369
6511
  ["AWS::Pipes::Pipe", {
@@ -6391,6 +6533,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6391
6533
  "LastModifiedTime",
6392
6534
  "StateReason"
6393
6535
  ]),
6536
+ primaryIdentifier: /* @__PURE__ */ new Set(["Name"]),
6394
6537
  ccRouteUnavailable: true
6395
6538
  }],
6396
6539
  ["AWS::RDS::DBCluster", {
@@ -6469,6 +6612,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6469
6612
  "StorageEncryptionType",
6470
6613
  "StorageThroughput"
6471
6614
  ]),
6615
+ primaryIdentifier: /* @__PURE__ */ new Set(["DBClusterIdentifier"]),
6472
6616
  ccRouteUnavailable: false
6473
6617
  }],
6474
6618
  ["AWS::RDS::DBInstance", {
@@ -6584,6 +6728,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6584
6728
  "StorageOperationPercentProgress",
6585
6729
  "StorageOperationStatus"
6586
6730
  ]),
6731
+ primaryIdentifier: /* @__PURE__ */ new Set(["DBInstanceIdentifier"]),
6587
6732
  ccRouteUnavailable: false
6588
6733
  }],
6589
6734
  ["AWS::RDS::DBProxy", {
@@ -6609,6 +6754,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6609
6754
  "Endpoint",
6610
6755
  "VpcId"
6611
6756
  ]),
6757
+ primaryIdentifier: /* @__PURE__ */ new Set(["DBProxyName"]),
6612
6758
  ccRouteUnavailable: false
6613
6759
  }],
6614
6760
  ["AWS::RDS::DBProxyEndpoint", {
@@ -6629,6 +6775,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6629
6775
  "IsDefault",
6630
6776
  "VpcId"
6631
6777
  ]),
6778
+ primaryIdentifier: /* @__PURE__ */ new Set(["DBProxyEndpointName"]),
6632
6779
  ccRouteUnavailable: false
6633
6780
  }],
6634
6781
  ["AWS::RDS::DBProxyTargetGroup", {
@@ -6643,6 +6790,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6643
6790
  sdkUnwired: /* @__PURE__ */ new Map(),
6644
6791
  createOnlyDrops: /* @__PURE__ */ new Set(),
6645
6792
  readOnly: /* @__PURE__ */ new Set(["TargetGroupArn"]),
6793
+ primaryIdentifier: /* @__PURE__ */ new Set(["TargetGroupArn"]),
6646
6794
  ccRouteUnavailable: true
6647
6795
  }],
6648
6796
  ["AWS::RDS::DBSubnetGroup", {
@@ -6655,6 +6803,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6655
6803
  sdkUnwired: /* @__PURE__ */ new Map(),
6656
6804
  createOnlyDrops: /* @__PURE__ */ new Set(),
6657
6805
  readOnly: /* @__PURE__ */ new Set(["DBSubnetGroupArn"]),
6806
+ primaryIdentifier: /* @__PURE__ */ new Set(["DBSubnetGroupName"]),
6658
6807
  ccRouteUnavailable: false
6659
6808
  }],
6660
6809
  ["AWS::Route53::HostedZone", {
@@ -6670,6 +6819,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6670
6819
  sdkUnwired: /* @__PURE__ */ new Map(),
6671
6820
  createOnlyDrops: /* @__PURE__ */ new Set(),
6672
6821
  readOnly: /* @__PURE__ */ new Set(["Id", "NameServers"]),
6822
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
6673
6823
  ccRouteUnavailable: false
6674
6824
  }],
6675
6825
  ["AWS::Route53::RecordSet", {
@@ -6695,6 +6845,12 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6695
6845
  sdkUnwired: /* @__PURE__ */ new Map(),
6696
6846
  createOnlyDrops: /* @__PURE__ */ new Set(),
6697
6847
  readOnly: /* @__PURE__ */ new Set(),
6848
+ primaryIdentifier: /* @__PURE__ */ new Set([
6849
+ "HostedZoneId",
6850
+ "Name",
6851
+ "SetIdentifier",
6852
+ "Type"
6853
+ ]),
6698
6854
  ccRouteUnavailable: false
6699
6855
  }],
6700
6856
  ["AWS::S3::Bucket", {
@@ -6732,6 +6888,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6732
6888
  "RegionalDomainName",
6733
6889
  "WebsiteURL"
6734
6890
  ]),
6891
+ primaryIdentifier: /* @__PURE__ */ new Set(["BucketName"]),
6735
6892
  ccRouteUnavailable: false
6736
6893
  }],
6737
6894
  ["AWS::S3::BucketPolicy", {
@@ -6739,6 +6896,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6739
6896
  sdkUnwired: /* @__PURE__ */ new Map(),
6740
6897
  createOnlyDrops: /* @__PURE__ */ new Set(),
6741
6898
  readOnly: /* @__PURE__ */ new Set(),
6899
+ primaryIdentifier: /* @__PURE__ */ new Set(["Bucket"]),
6742
6900
  ccRouteUnavailable: false
6743
6901
  }],
6744
6902
  ["AWS::S3Express::DirectoryBucket", {
@@ -6755,6 +6913,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6755
6913
  sdkUnwired: /* @__PURE__ */ new Map(),
6756
6914
  createOnlyDrops: /* @__PURE__ */ new Set(),
6757
6915
  readOnly: /* @__PURE__ */ new Set(["Arn", "AvailabilityZoneName"]),
6916
+ primaryIdentifier: /* @__PURE__ */ new Set(["BucketName"]),
6758
6917
  ccRouteUnavailable: false
6759
6918
  }],
6760
6919
  ["AWS::S3Tables::Namespace", {
@@ -6762,6 +6921,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6762
6921
  sdkUnwired: /* @__PURE__ */ new Map(),
6763
6922
  createOnlyDrops: /* @__PURE__ */ new Set(),
6764
6923
  readOnly: /* @__PURE__ */ new Set(),
6924
+ primaryIdentifier: /* @__PURE__ */ new Set(["Namespace", "TableBucketARN"]),
6765
6925
  ccRouteUnavailable: false
6766
6926
  }],
6767
6927
  ["AWS::S3Tables::Table", {
@@ -6786,6 +6946,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6786
6946
  "VersionToken",
6787
6947
  "WarehouseLocation"
6788
6948
  ]),
6949
+ primaryIdentifier: /* @__PURE__ */ new Set(["TableARN"]),
6789
6950
  ccRouteUnavailable: false
6790
6951
  }],
6791
6952
  ["AWS::S3Tables::TableBucket", {
@@ -6802,6 +6963,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6802
6963
  sdkUnwired: /* @__PURE__ */ new Map(),
6803
6964
  createOnlyDrops: /* @__PURE__ */ new Set(),
6804
6965
  readOnly: /* @__PURE__ */ new Set(["TableBucketARN"]),
6966
+ primaryIdentifier: /* @__PURE__ */ new Set(["TableBucketARN"]),
6805
6967
  ccRouteUnavailable: false
6806
6968
  }],
6807
6969
  ["AWS::S3Vectors::VectorBucket", {
@@ -6813,6 +6975,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6813
6975
  sdkUnwired: /* @__PURE__ */ new Map(),
6814
6976
  createOnlyDrops: /* @__PURE__ */ new Set(),
6815
6977
  readOnly: /* @__PURE__ */ new Set(["CreationTime", "VectorBucketArn"]),
6978
+ primaryIdentifier: /* @__PURE__ */ new Set(["VectorBucketArn"]),
6816
6979
  ccRouteUnavailable: false
6817
6980
  }],
6818
6981
  ["AWS::Scheduler::Schedule", {
@@ -6832,6 +6995,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6832
6995
  sdkUnwired: /* @__PURE__ */ new Map(),
6833
6996
  createOnlyDrops: /* @__PURE__ */ new Set(),
6834
6997
  readOnly: /* @__PURE__ */ new Set(["Arn"]),
6998
+ primaryIdentifier: /* @__PURE__ */ new Set(["Name"]),
6835
6999
  ccRouteUnavailable: true
6836
7000
  }],
6837
7001
  ["AWS::SecretsManager::Secret", {
@@ -6848,6 +7012,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6848
7012
  sdkUnwired: /* @__PURE__ */ new Map(),
6849
7013
  createOnlyDrops: /* @__PURE__ */ new Set(),
6850
7014
  readOnly: /* @__PURE__ */ new Set(["Id"]),
7015
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
6851
7016
  ccRouteUnavailable: false
6852
7017
  }],
6853
7018
  ["AWS::ServiceDiscovery::HttpNamespace", {
@@ -6859,6 +7024,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6859
7024
  sdkUnwired: /* @__PURE__ */ new Map(),
6860
7025
  createOnlyDrops: /* @__PURE__ */ new Set(),
6861
7026
  readOnly: /* @__PURE__ */ new Set(["Arn", "Id"]),
7027
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
6862
7028
  ccRouteUnavailable: false
6863
7029
  }],
6864
7030
  ["AWS::ServiceDiscovery::PrivateDnsNamespace", {
@@ -6876,6 +7042,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6876
7042
  "HostedZoneId",
6877
7043
  "Id"
6878
7044
  ]),
7045
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
6879
7046
  ccRouteUnavailable: false
6880
7047
  }],
6881
7048
  ["AWS::ServiceDiscovery::PublicDnsNamespace", {
@@ -6892,6 +7059,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6892
7059
  "HostedZoneId",
6893
7060
  "Id"
6894
7061
  ]),
7062
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
6895
7063
  ccRouteUnavailable: false
6896
7064
  }],
6897
7065
  ["AWS::ServiceDiscovery::Service", {
@@ -6909,6 +7077,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6909
7077
  sdkUnwired: /* @__PURE__ */ new Map(),
6910
7078
  createOnlyDrops: /* @__PURE__ */ new Set(),
6911
7079
  readOnly: /* @__PURE__ */ new Set(["Arn", "Id"]),
7080
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
6912
7081
  ccRouteUnavailable: false
6913
7082
  }],
6914
7083
  ["AWS::SNS::Subscription", {
@@ -6927,6 +7096,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6927
7096
  sdkUnwired: /* @__PURE__ */ new Map([["Region", "CFn-only cross-region subscription hint; cdkd uses the SDK client region directly and has no per-resource region override"]]),
6928
7097
  createOnlyDrops: /* @__PURE__ */ new Set(),
6929
7098
  readOnly: /* @__PURE__ */ new Set(["Arn"]),
7099
+ primaryIdentifier: /* @__PURE__ */ new Set(["Arn"]),
6930
7100
  ccRouteUnavailable: false
6931
7101
  }],
6932
7102
  ["AWS::SNS::Topic", {
@@ -6949,6 +7119,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6949
7119
  sdkUnwired: /* @__PURE__ */ new Map(),
6950
7120
  createOnlyDrops: /* @__PURE__ */ new Set(),
6951
7121
  readOnly: /* @__PURE__ */ new Set(["TopicArn"]),
7122
+ primaryIdentifier: /* @__PURE__ */ new Set(["TopicArn"]),
6952
7123
  ccRouteUnavailable: false
6953
7124
  }],
6954
7125
  ["AWS::SNS::TopicPolicy", {
@@ -6956,6 +7127,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6956
7127
  sdkUnwired: /* @__PURE__ */ new Map(),
6957
7128
  createOnlyDrops: /* @__PURE__ */ new Set(),
6958
7129
  readOnly: /* @__PURE__ */ new Set(["Id"]),
7130
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
6959
7131
  ccRouteUnavailable: true
6960
7132
  }],
6961
7133
  ["AWS::SQS::Queue", {
@@ -6980,6 +7152,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6980
7152
  sdkUnwired: /* @__PURE__ */ new Map(),
6981
7153
  createOnlyDrops: /* @__PURE__ */ new Set(),
6982
7154
  readOnly: /* @__PURE__ */ new Set(["Arn", "QueueUrl"]),
7155
+ primaryIdentifier: /* @__PURE__ */ new Set(["QueueUrl"]),
6983
7156
  ccRouteUnavailable: false
6984
7157
  }],
6985
7158
  ["AWS::SQS::QueuePolicy", {
@@ -6987,6 +7160,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
6987
7160
  sdkUnwired: /* @__PURE__ */ new Map(),
6988
7161
  createOnlyDrops: /* @__PURE__ */ new Set(),
6989
7162
  readOnly: /* @__PURE__ */ new Set(["Id"]),
7163
+ primaryIdentifier: /* @__PURE__ */ new Set(["Id"]),
6990
7164
  ccRouteUnavailable: true
6991
7165
  }],
6992
7166
  ["AWS::SSM::Parameter", {
@@ -7004,6 +7178,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
7004
7178
  sdkUnwired: /* @__PURE__ */ new Map(),
7005
7179
  createOnlyDrops: /* @__PURE__ */ new Set(),
7006
7180
  readOnly: /* @__PURE__ */ new Set(["Arn"]),
7181
+ primaryIdentifier: /* @__PURE__ */ new Set(["Name"]),
7007
7182
  ccRouteUnavailable: false
7008
7183
  }],
7009
7184
  ["AWS::StepFunctions::StateMachine", {
@@ -7027,6 +7202,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
7027
7202
  "Name",
7028
7203
  "StateMachineRevisionId"
7029
7204
  ]),
7205
+ primaryIdentifier: /* @__PURE__ */ new Set(["Arn"]),
7030
7206
  ccRouteUnavailable: false
7031
7207
  }],
7032
7208
  ["AWS::WAFv2::WebACL", {
@@ -7056,6 +7232,11 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
7056
7232
  "Id",
7057
7233
  "LabelNamespace"
7058
7234
  ]),
7235
+ primaryIdentifier: /* @__PURE__ */ new Set([
7236
+ "Id",
7237
+ "Name",
7238
+ "Scope"
7239
+ ]),
7059
7240
  ccRouteUnavailable: false
7060
7241
  }]
7061
7242
  ]);
@@ -7632,15 +7813,22 @@ function dropRecordLine(recovery) {
7632
7813
  }
7633
7814
  const JSON_LISTING_HOLE_VALUE = "the value decoded from its JSON string, then shell-quoted";
7634
7815
  const LISTING_SOURCE_TAIL = "which prints each name as a JSON string, escaped but never trimmed or sanitized, and act on the one whose stackName and region match (a legacy record that names no region lists it as null)";
7635
- const LISTING_SOURCE = `'cdkd state list --json', ${LISTING_SOURCE_TAIL}`;
7816
+ function listingCommand() {
7817
+ return proseQuoted(cdkdRemedy("cdkd state list", "--json"));
7818
+ }
7819
+ function listingSourceUnflagged() {
7820
+ return `${listingCommand()}, ${LISTING_SOURCE_TAIL}`;
7821
+ }
7636
7822
  function listingSource(flagged) {
7637
- return flagged ? `'cdkd state list --json' run with the same account flags as the command at the end of this line, ${LISTING_SOURCE_TAIL}` : LISTING_SOURCE;
7823
+ return flagged ? `${listingCommand()} run with the same account flags as the command at the end of this line, ${LISTING_SOURCE_TAIL}` : listingSourceUnflagged();
7824
+ }
7825
+ function withheldListingPointerProse() {
7826
+ return `${listingSourceUnflagged()}, filling the Inspect command's holes from it — replacing each quoted hole, quotes included, with ${JSON_LISTING_HOLE_VALUE}`;
7638
7827
  }
7639
- const WITHHELD_LISTING_POINTER = `${LISTING_SOURCE}, filling the Inspect command's holes from it — replacing each quoted hole, quotes included, with ${JSON_LISTING_HOLE_VALUE}`;
7640
7828
  function withheldListingPointer(recovery) {
7641
7829
  const args = accountArgs(recovery);
7642
7830
  if (args.length === 0) return {
7643
- pointer: WITHHELD_LISTING_POINTER,
7831
+ pointer: withheldListingPointerProse(),
7644
7832
  line: void 0
7645
7833
  };
7646
7834
  return {
@@ -7705,7 +7893,7 @@ function withheldAccountValues(recovery) {
7705
7893
  return pasteableCommand("cdkd", accountArgs(recovery)).withheld;
7706
7894
  }
7707
7895
  function confirmKeyListing(recovery) {
7708
- return accountArgs(recovery).length === 0 ? `'cdkd state list --long'` : `'cdkd state list --long' run with the same account flags as the command lines below`;
7896
+ return accountArgs(recovery).length === 0 ? proseQuoted(cdkdRemedy("cdkd state list", "--long")) : `${proseQuoted(cdkdRemedy("cdkd state list", "--long"))} run with the same account flags as the command lines below`;
7709
7897
  }
7710
7898
  function destroyAccountClause(recovery) {
7711
7899
  const clause = withheldAccountClause(recovery, "the command lines below print");
@@ -7890,7 +8078,7 @@ function orphanInspectClause(stackName, region, recovery, legacyLead = LISTED_LE
7890
8078
  const prefix = exactPrefix === void 0 || exactPrefix !== "" && !exactPrefix.split("/").every((seg) => isPasteableIdent(seg)) ? void 0 : exactPrefix;
7891
8079
  const stackShown = isInertUnquoted(stackName);
7892
8080
  const key = shellQuote(`${prefix ?? "<prefix>"}/${stackShown ? stackName : "<stack>"}/state.json`);
7893
- const stackFill = stackShown ? "" : ` The stack name ${SHELL_ACTIVE_WHY}, so the key shows the hole '<stack>' in its place; take the name from 'cdkd state list --json' and put it there, inside the outer quotes.`;
8081
+ const stackFill = stackShown ? "" : ` The stack name ${SHELL_ACTIVE_WHY}, so the key shows the hole '<stack>' in its place; take the name from ${proseQuoted(cdkdRemedy("cdkd state list", "--json"))} and put it there, inside the outer quotes.`;
7894
8082
  return {
7895
8083
  sentence: `${lead}: the 'Object key' line below names it${where}.${recovery?.statePrefix === void 0 ? ` Its prefix is 'cdkd' unless '--state-prefix' was given.` : prefix === void 0 ? " The prefix you passed is not shown here, because it did not render exactly or one of its '/'-separated parts is not a plain identifier, so the key shows the hole '<prefix>' where it belongs; put your own value there, inside the outer quotes." : ""}${stackFill}`,
7896
8084
  locations: [`Object key: ${key}`, ...locations]
@@ -7917,7 +8105,7 @@ function malformedDestroyResourcesRefusalMessage(stackName, region, recovery) {
7917
8105
  const detail = malformedStateDiagnosis(exact ? stackName : void 0, exact ? region : void 0);
7918
8106
  const listing = withheldListingPointer(recovery);
7919
8107
  return [
7920
- `${detail} This command DELETES state, so it refuses rather than continuing: the resource map IS the list of what to delete, so an unreadable one counts as ZERO resources and the run takes the empty-stack fast path, which removes state.json and reports success while every resource the record named is still live in AWS and no longer referenced by anything. Reading the bag as EMPTY is that same outcome rather than an alternative to it, so there is no repair available here. Repair or remove the record first. ${exact ? `To drop the record deliberately and leave the live resources standing, run 'cdkd state orphan' against the stack and the region THE RECORD'S S3 KEY holds. It is spelled as a template on its own line below rather than handed over ready to run, because that command DELETES a record and a key segment is chosen by anyone who can write this bucket: the key says WHICH record this is, which is not the same as vouching for it as a delete target. Confirm the key with ${confirmKeyListing(recovery)} — a legacy record shows none, and for one of those the flag must be OMITTED or it selects nothing.` : `This record's stack name or region does NOT render exactly — what is printed above is a sanitized form, and another record may render identically — so this message names no target and offers no command against one. List the records with ${listing.pointer}.`}` + destroyAccountClause(recovery),
8108
+ `${detail} This command DELETES state, so it refuses rather than continuing: the resource map IS the list of what to delete, so an unreadable one counts as ZERO resources and the run takes the empty-stack fast path, which removes state.json and reports success while every resource the record named is still live in AWS and no longer referenced by anything. Reading the bag as EMPTY is that same outcome rather than an alternative to it, so there is no repair available here. Repair or remove the record first. ${exact ? `To drop the record deliberately and leave the live resources standing, run ${proseQuoted(cdkdRemedy("cdkd state orphan"))} against the stack and the region THE RECORD'S S3 KEY holds. It is spelled as a template on its own line below rather than handed over ready to run, because that command DELETES a record and a key segment is chosen by anyone who can write this bucket: the key says WHICH record this is, which is not the same as vouching for it as a delete target. Confirm the key with ${confirmKeyListing(recovery)} — a legacy record shows none, and for one of those the flag must be OMITTED or it selects nothing.` : `This record's stack name or region does NOT render exactly — what is printed above is a sanitized form, and another record may render identically — so this message names no target and offers no command against one. List the records with ${listing.pointer}.`}` + destroyAccountClause(recovery),
7921
8109
  ...!exact && listing.line !== void 0 ? [listing.line] : [],
7922
8110
  `Inspect the record: ${inspectCommand(exact ? stackName : void 0, exact ? region : void 0, recovery)}`,
7923
8111
  ...exact ? [dropRecordLine(recovery)] : []
@@ -7972,7 +8160,7 @@ function divergentRecordRegionRefusalMessage(stackName, keyRegion, divergentBody
7972
8160
  const kind = describeRegionValueKind(divergentBodyRegion);
7973
8161
  const opening = exact ? `cdkd will not destroy stack ${shellQuote(safeIdentifier(stackName, cap))} (${shellQuote(safeIdentifier(keyRegion, cap))}): the state record read from that region's key carries a 'region' of its own (${kind}) that is not the key's, and ${lists}` : `cdkd will not destroy the state record this command loaded: it carries a 'region' of its own (${kind}) that is not the region of the key it was read from, and ${lists}`;
7974
8162
  const listing = withheldListingPointer(recovery);
7975
- const remedy = exact ? verboseAwareText("Re-run with --verbose to see what the record's region field holds, then either destroy ", "The debug output shows what the record's region field holds. Either destroy ") + "against the region the resources are really in, or repair that field to match the key it is stored under and re-run. " + withheldAccountClause(recovery, "the command at the end of this message prints") + "To drop the record and leave the live resources standing, spelled out rather than pasteable because that command DELETES a record: " + dropRecordTemplate(recovery) : "This record's stack name or region does NOT render exactly — what any surrounding output shows is a sanitized form, and another record may render identically — so this message names no target and offers no command against one. List the records with " + (listing.line === void 0 ? `${WITHHELD_LISTING_POINTER}. Inspect it with: ${inspectCommand(void 0, void 0)}` : `${listing.pointer}.` + destroyAccountClause(recovery) + `\n${listing.line}\nInspect it with: ${inspectCommand(void 0, void 0, recovery)}`);
8163
+ const remedy = exact ? verboseAwareText("Re-run with --verbose to see what the record's region field holds, then either destroy ", "The debug output shows what the record's region field holds. Either destroy ") + "against the region the resources are really in, or repair that field to match the key it is stored under and re-run. " + withheldAccountClause(recovery, "the command at the end of this message prints") + "To drop the record and leave the live resources standing, spelled out rather than pasteable because that command DELETES a record: " + dropRecordTemplate(recovery) : "This record's stack name or region does NOT render exactly — what any surrounding output shows is a sanitized form, and another record may render identically — so this message names no target and offers no command against one. List the records with " + (listing.line === void 0 ? `${withheldListingPointerProse()}. Inspect it with: ${inspectCommand(void 0, void 0)}` : `${listing.pointer}.` + destroyAccountClause(recovery) + `\n${listing.line}\nInspect it with: ${inspectCommand(void 0, void 0, recovery)}`);
7976
8164
  return `${opening} ${resourceCount === void 0 ? `— so cdkd can neither count what it would delete nor tell which region it is in` : `— so cdkd cannot tell which region those resources are in`}. cdkd stamps the key's region into every record it writes, so this record was not written by cdkd. Destroying against the key's region would issue every delete there; if the record's own region is the honest half, each delete comes back not-found, which this command reads as ALREADY DELETED — it would report success, remove the record, and leave every resource standing in the other region with nothing naming it. ${remedy}`;
7977
8165
  }
7978
8166
  function refuseDivergentRecordRegionForDestroy(state, stackName, keyRegion, divergentBodyRegion, recovery, provenOrphans = 0) {
@@ -8061,7 +8249,7 @@ function malformedDestroyOrphansRefusalMessage(stackName, region, recovery) {
8061
8249
  const exact = mayNameTargetWithDestructiveRemedy(stackName, region);
8062
8250
  const listing = withheldListingPointer(recovery);
8063
8251
  return [
8064
- `${`${stackClause(exact ? stackName : void 0, exact ? region : void 0)} has no readable 'orphans' list — the record is malformed or truncated.`} This command DELETES state, so it refuses rather than continuing: an unreadable container counts as no orphans, so the run would proceed through resource deletion to removing state.json while the record's evidence that an earlier failed deploy left resources live in AWS was never read — and that evidence goes with the record. Reading it as EMPTY is that outcome rather than an alternative to it, so there is no repair available here. Repair or remove the record first. ${exact ? `To drop the record deliberately and leave every live resource standing, run 'cdkd state orphan' against the stack and the region THE RECORD'S S3 KEY holds. It is spelled as a template on its own line below rather than handed over ready to run, because that command DELETES a record and a key segment is chosen by anyone who can write this bucket: the key says WHICH record this is, which is not the same as vouching for it as a delete target. Confirm the key with ${confirmKeyListing(recovery)} — a legacy record shows none, and for one of those the flag must be OMITTED or it selects nothing.` : `This record's stack name or region does NOT render exactly, so this message names no target and offers no command against one. List the records with ${listing.pointer}.`}` + destroyAccountClause(recovery),
8252
+ `${`${stackClause(exact ? stackName : void 0, exact ? region : void 0)} has no readable 'orphans' list — the record is malformed or truncated.`} This command DELETES state, so it refuses rather than continuing: an unreadable container counts as no orphans, so the run would proceed through resource deletion to removing state.json while the record's evidence that an earlier failed deploy left resources live in AWS was never read — and that evidence goes with the record. Reading it as EMPTY is that outcome rather than an alternative to it, so there is no repair available here. Repair or remove the record first. ${exact ? `To drop the record deliberately and leave every live resource standing, run ${proseQuoted(cdkdRemedy("cdkd state orphan"))} against the stack and the region THE RECORD'S S3 KEY holds. It is spelled as a template on its own line below rather than handed over ready to run, because that command DELETES a record and a key segment is chosen by anyone who can write this bucket: the key says WHICH record this is, which is not the same as vouching for it as a delete target. Confirm the key with ${confirmKeyListing(recovery)} — a legacy record shows none, and for one of those the flag must be OMITTED or it selects nothing.` : `This record's stack name or region does NOT render exactly, so this message names no target and offers no command against one. List the records with ${listing.pointer}.`}` + destroyAccountClause(recovery),
8065
8253
  ...!exact && listing.line !== void 0 ? [listing.line] : [],
8066
8254
  `Inspect the record: ${inspectCommand(exact ? stackName : void 0, exact ? region : void 0, recovery)}`,
8067
8255
  ...exact ? [dropRecordLine(recovery)] : []
@@ -8147,7 +8335,7 @@ function malformedDriftResourcePropertiesWarning(rawStackName, rawRegion, logica
8147
8335
  function malformedExportResourcePropertiesRefusalMessage(rawStackName, rawRegion, logicalIds, recovery) {
8148
8336
  const stackName = absentIfEmpty(rawStackName);
8149
8337
  const region = absentIfEmpty(rawRegion);
8150
- return inspectTail(`${namedPropertyBagsDiagnosis(stackName, region, logicalIds, true)} ${EXPORT_DELETES_STATE} The export reads this map to build the CloudFormation import identifier, to check it for the redaction mask, and to find what a phase-2 pre-delete removes, so a map it cannot read makes each of those answers wrong — and the record showing the damage is deleted once the export succeeds. Nothing was imported and no state was written. Repair the record by hand, or re-import each named resource with a selective 'cdkd import --force', which records the properties resolved from the template; then export again.`, stackName, region, recovery, EXPORT_LEGACY_LEAD);
8338
+ return inspectTail(`${namedPropertyBagsDiagnosis(stackName, region, logicalIds, true)} ${EXPORT_DELETES_STATE} The export reads this map to build the CloudFormation import identifier, to check it for the redaction mask, and to find what a phase-2 pre-delete removes, so a map it cannot read makes each of those answers wrong — and the record showing the damage is deleted once the export succeeds. Nothing was imported and no state was written. Repair the record by hand, or re-import each named resource with a selective ${proseQuoted(cdkdRemedy("cdkd import", "--force"))}, which records the properties resolved from the template; then export again.`, stackName, region, recovery, EXPORT_LEGACY_LEAD);
8151
8339
  }
8152
8340
  function refuseMalformedResourcePropertiesForExport(state, stackName, region, recovery) {
8153
8341
  const unreadable = unreadableResourcePropertyBags(state);
@@ -9408,6 +9596,10 @@ function getTopLevelWriteOnlyProperties(resourceType) {
9408
9596
  return result;
9409
9597
  }).catch((error) => {
9410
9598
  writeOnlyPropertiesCache.delete(resourceType);
9599
+ if (isAwsEmulatorRegistryMiss(error)) {
9600
+ reportAwsEmulatorRegistryMiss(resourceType, "updates use a minimal patch");
9601
+ return /* @__PURE__ */ new Set();
9602
+ }
9411
9603
  const message = describeAwsFailure(error).detail;
9412
9604
  getLogger().child("WriteOnlyProperties").warn(`Failed to resolve write-only properties for ${resourceType} via cloudformation:DescribeType (${message}). Falling back to a minimal update patch — write-only properties (if any) may be dropped by the Cloud Control read-modify-write update. Grant cloudformation:DescribeType to enable write-only property re-inclusion.`);
9413
9605
  return /* @__PURE__ */ new Set();
@@ -11748,6 +11940,56 @@ function parseWebACLArn(arn) {
11748
11940
  };
11749
11941
  }
11750
11942
 
11943
+ // src/deployment/intrinsic-resolver/ref-values/type-refs.ts
11944
+ function s3TablesTableRefFromPhysicalId(physicalId, stateLookup) {
11945
+ if (!physicalId.includes("|") || !stateLookup) return physicalId;
11946
+ const tableArn = stateLookup(["TableARN"]);
11947
+ if (tableArn === void 0) return physicalId;
11948
+ if (carriesSecretMask(tableArn)) return tableArn;
11949
+ return tableArn.startsWith("arn:") && !tableArn.includes("|") ? tableArn : physicalId;
11950
+ }
11951
+ function lacksRecordedTableArn(resource) {
11952
+ if (resource.resourceType !== "AWS::S3Tables::Table") return false;
11953
+ if (!resource.physicalId.includes("|")) return false;
11954
+ const recorded = (bag) => {
11955
+ if (bag === void 0 || !Object.hasOwn(bag, "TableARN")) return false;
11956
+ const value = bag["TableARN"];
11957
+ return typeof value === "string" && (carriesSecretMask(value) || value.startsWith("arn:") && !value.includes("|"));
11958
+ };
11959
+ return !recorded(resource.properties) && !recorded(resource.attributes);
11960
+ }
11961
+ function s3TablesNamespaceRefFromPhysicalId(physicalId) {
11962
+ const parts = physicalId.split("|");
11963
+ if (parts.length !== 2) return physicalId;
11964
+ const [first, second] = parts;
11965
+ if (!first.startsWith("arn:") && second.startsWith("arn:") && first !== "") return `${second}${"|"}${first}`;
11966
+ return physicalId;
11967
+ }
11968
+ function vpcGatewayAttachmentRefFromPhysicalId(physicalId) {
11969
+ const parts = physicalId.split("|");
11970
+ if (parts.length !== 2) return physicalId;
11971
+ const [gatewayId, vpcId] = parts;
11972
+ if (!vpcId.startsWith("vpc-")) return physicalId;
11973
+ if (gatewayId.startsWith("igw-")) return `IGW${"|"}${vpcId}`;
11974
+ if (gatewayId.startsWith("vgw-")) return `VGW${"|"}${vpcId}`;
11975
+ return physicalId;
11976
+ }
11977
+ const REF_ARN_ATTRIBUTE_HEALED = /* @__PURE__ */ new Map([["AWS::AppSync::GraphQLApi", "Arn"], ["AWS::S3Vectors::VectorBucket", "VectorBucketArn"]]);
11978
+ function lacksRecordedRefArn(resource) {
11979
+ const attribute = REF_ARN_ATTRIBUTE_HEALED.get(resource.resourceType);
11980
+ if (attribute === void 0 || resource.physicalId.startsWith("arn:")) return void 0;
11981
+ const recorded = (bag) => {
11982
+ if (bag === void 0 || !Object.hasOwn(bag, attribute)) return false;
11983
+ const value = bag[attribute];
11984
+ return typeof value === "string" && (carriesSecretMask(value) || value.startsWith("arn:") && !isPlaceholderArn(value));
11985
+ };
11986
+ return recorded(resource.properties) || recorded(resource.attributes) ? void 0 : attribute;
11987
+ }
11988
+ function isPlaceholderArn(arn) {
11989
+ const fields = arn.split(":");
11990
+ return fields.length >= 5 && (fields[3] === "*" || fields[4] === "*");
11991
+ }
11992
+
11751
11993
  // src/deployment/intrinsic-resolver/ref-values.ts
11752
11994
  const AWS_NO_VALUE = Symbol("AWS::NoValue");
11753
11995
  const REF_RETURNS_SEGMENT_AFTER_PIPE = /* @__PURE__ */ new Set([
@@ -11772,8 +12014,7 @@ const REF_RETURNS_SEGMENT_AFTER_PIPE = /* @__PURE__ */ new Set([
11772
12014
  "AWS::AppConfig::Environment",
11773
12015
  "AWS::AppConfig::ConfigurationProfile",
11774
12016
  "AWS::AppConfig::HostedConfigurationVersion",
11775
- "AWS::AppConfig::Deployment",
11776
- "AWS::S3Tables::Namespace"
12017
+ "AWS::AppConfig::Deployment"
11777
12018
  ]);
11778
12019
  const REF_RETURNS_SEGMENT_BEFORE_FIRST_PIPE = /* @__PURE__ */ new Set([
11779
12020
  "AWS::EC2::EIP",
@@ -11792,7 +12033,9 @@ const REF_RETURNS_SEGMENT_AT_INDEX = /* @__PURE__ */ new Map([["AWS::Route53::Re
11792
12033
  const REF_RETURNS_ARN_FROM_STATE = /* @__PURE__ */ new Map([
11793
12034
  ["AWS::AppSync::ApiKey", ["Arn"]],
11794
12035
  ["AWS::AppSync::DataSource", ["DataSourceArn"]],
11795
- ["AWS::AppSync::Resolver", ["ResolverArn"]]
12036
+ ["AWS::AppSync::Resolver", ["ResolverArn"]],
12037
+ ["AWS::AppSync::GraphQLApi", ["Arn"]],
12038
+ ["AWS::S3Vectors::VectorBucket", ["VectorBucketArn"]]
11796
12039
  ]);
11797
12040
  function graphQLSchemaCfnId(physicalId) {
11798
12041
  return /^[a-z0-9]+$/.test(physicalId) ? `${physicalId}GraphQLSchema` : physicalId;
@@ -11858,25 +12101,10 @@ function recordSetRefFromPhysicalId(physicalId, stateLookup) {
11858
12101
  if (recordedName === void 0) return void 0;
11859
12102
  return canonicalizeRoute53QueryName(name) === canonicalizeRoute53QueryName(recordedName) ? name : void 0;
11860
12103
  }
11861
- function s3TablesTableRefFromPhysicalId(physicalId, stateLookup) {
11862
- if (!physicalId.includes("|") || !stateLookup) return physicalId;
11863
- const tableArn = stateLookup(["TableARN"]);
11864
- if (tableArn === void 0) return physicalId;
11865
- if (carriesSecretMask(tableArn)) return tableArn;
11866
- return tableArn.startsWith("arn:") && !tableArn.includes("|") ? tableArn : physicalId;
11867
- }
11868
- function lacksRecordedTableArn(resource) {
11869
- if (resource.resourceType !== "AWS::S3Tables::Table") return false;
11870
- if (!resource.physicalId.includes("|")) return false;
11871
- const recorded = (bag) => {
11872
- if (bag === void 0 || !Object.hasOwn(bag, "TableARN")) return false;
11873
- const value = bag["TableARN"];
11874
- return typeof value === "string" && (carriesSecretMask(value) || value.startsWith("arn:") && !value.includes("|"));
11875
- };
11876
- return !recorded(resource.properties) && !recorded(resource.attributes);
11877
- }
11878
12104
  function cfnRefValueFromPhysicalId(resourceType, physicalId, stateLookup) {
11879
12105
  if (resourceType === "AWS::S3Tables::Table") return s3TablesTableRefFromPhysicalId(physicalId, stateLookup);
12106
+ if (resourceType === "AWS::S3Tables::Namespace") return s3TablesNamespaceRefFromPhysicalId(physicalId);
12107
+ if (resourceType === "AWS::EC2::VPCGatewayAttachment") return vpcGatewayAttachmentRefFromPhysicalId(physicalId);
11880
12108
  if (resourceType === "AWS::AppSync::GraphQLSchema") return graphQLSchemaCfnId(physicalId);
11881
12109
  if (resourceType === "AWS::Glue::Table") {
11882
12110
  const tableName = glueTableRefFromPhysicalId(physicalId, stateLookup);
@@ -11932,10 +12160,6 @@ function cfnRefValueFromPhysicalId(resourceType, physicalId, stateLookup) {
11932
12160
  }
11933
12161
  return physicalId;
11934
12162
  }
11935
- function isPlaceholderArn(arn) {
11936
- const fields = arn.split(":");
11937
- return fields.length >= 5 && (fields[3] === "*" || fields[4] === "*");
11938
- }
11939
12163
  const HANDLED_INTRINSIC_KEYS = /* @__PURE__ */ new Set([
11940
12164
  "Ref",
11941
12165
  "Fn::GetAtt",
@@ -12305,13 +12529,13 @@ function s3BucketWebsiteUrl(bucketName, region) {
12305
12529
 
12306
12530
  // src/deployment/intrinsic-resolver/getatt-heal.ts
12307
12531
  function staleRecordRemedy(resolver, outcome, context) {
12308
- const touch = "change any property of the resource so its next update re-records the attributes, or re-import it with 'cdkd import'";
12309
- if (outcome === void 0) return `Run 'cdkd deploy': it re-reads a stale record's attributes from AWS and heals the record. Otherwise ${touch}.`;
12532
+ const touch = `change any property of the resource so its next update re-records the attributes, or re-import it with ${proseQuoted(cdkdRemedy("cdkd import"))}`;
12533
+ if (outcome === void 0) return `Run ${proseQuoted(cdkdRemedy("cdkd deploy"))}: it re-reads a stale record's attributes from AWS and heals the record. Otherwise ${touch}.`;
12310
12534
  const preview = context?.attributeHealer?.readOnly === true;
12311
12535
  const attempted = preview ? `This preview re-read the attributes from AWS` : `cdkd tried to re-read the attributes from AWS to heal the record`;
12312
12536
  switch (outcome.kind) {
12313
12537
  case "failed": return `${attempted}, but ${describeFailureObserved(resolver, "the provider read", outcome.error, context)}. ` + (preview ? `A preview writes nothing to state; 'cdkd deploy' issues the same read and records the attribute once the read returns it. Fix the read (a missing read permission is the usual cause), or ${touch}.` : `Fix that (a missing read permission is the usual cause) and deploy again — cdkd retries the read on every deploy until the record is healed — or ${touch}.`);
12314
- case "not-found": return `${attempted}, but AWS reports no resource behind the recorded physical id — it was probably deleted outside cdkd. Check it with 'cdkd drift', then re-create it (change the resource so it is replaced) or remove it from state.`;
12538
+ case "not-found": return `${attempted}, but AWS reports no resource behind the recorded physical id — it was probably deleted outside cdkd. Check it with ${proseQuoted(cdkdRemedy("cdkd drift"))}, then re-create it (change the resource so it is replaced) or remove it from state.`;
12315
12539
  case "read":
12316
12540
  if ((outcome.withheldKeys?.length ?? 0) > 0) return withheldRemedy(resolver, context);
12317
12541
  return preview ? `This preview re-read the resource from AWS and the read reports no usable value for this attribute either; ${touch}.` : `cdkd re-read the resource from AWS and the read reports no usable value for this attribute either, so there is nothing to heal the record with; ${touch}.`;
@@ -12457,6 +12681,23 @@ function describeFailureObserved(resolver, read, err, context) {
12457
12681
  resolver.logger.debug(`${read} failed (${errorClass}): ${displayMasked(resolver, describeAwsFailure(err).detail, context)}`);
12458
12682
  return verbosePointerSentence() ? `${read} failed (${errorClass}); re-run with --verbose for the AWS error text` : `${read} failed (${errorClass}); the AWS error text is in the debug output above`;
12459
12683
  }
12684
+ function isPhysicalIdIdentifier(resourceType, primaryIdentifier, attribute) {
12685
+ if (IDENTIFIER_NOT_PHYSICAL_ID_TYPES.has(resourceType)) return false;
12686
+ return primaryIdentifier.has(attribute);
12687
+ }
12688
+ const IDENTIFIER_NOT_PHYSICAL_ID_TYPES = /* @__PURE__ */ new Set(["AWS::CodeCommit::Repository"]);
12689
+ function isOwnArnAttribute(resourceType, attributeName) {
12690
+ const typeName = resourceType.split("::").pop() ?? "";
12691
+ const lower = attributeName.toLowerCase();
12692
+ return lower === "arn" || lower === `${typeName.toLowerCase()}arn`;
12693
+ }
12694
+ const CFN_REJECTED_GETATT_ATTRIBUTES = /* @__PURE__ */ new Set(["AWS::CloudFormation::WaitConditionHandle.Id", "AWS::IAM::UserToGroupAddition.Id"]);
12695
+ const PHYSICAL_ID_ATTRIBUTES = /* @__PURE__ */ new Set([
12696
+ "AWS::ApiGateway::Account.Id",
12697
+ "AWS::Budgets::Budget.Id",
12698
+ "AWS::EFS::MountTarget.Id",
12699
+ "AWS::SQS::QueuePolicy.Id"
12700
+ ]);
12460
12701
  function guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceType, physicalId, context) {
12461
12702
  if (context?.staleAttributeHeal?.phase === "probe") throw new StaleAttributeMissSignal();
12462
12703
  const healOutcome = context?.staleAttributeHeal?.phase === "settled" ? context.staleAttributeHeal.outcome : void 0;
@@ -12469,6 +12710,11 @@ function guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceT
12469
12710
  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))));
12470
12711
  }
12471
12712
  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))));
12713
+ const topAttribute = attributeName.split(".")[0] ?? attributeName;
12714
+ const resources = context?.resources;
12715
+ const record = resources !== void 0 && Object.hasOwn(resources, logicalId) ? resources[logicalId] : void 0;
12716
+ const coverage = getPropertyCoverage(resourceType);
12717
+ if (CFN_REJECTED_GETATT_ATTRIBUTES.has(`${resourceType}.${attributeName}`) || 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))));
12472
12718
  resolver.physicalIdFallbackCount++;
12473
12719
  if (recordMayBeStale) {
12474
12720
  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));
@@ -12584,6 +12830,96 @@ async function constructAttributeForCoreTypes(resolver, resource, attributeName,
12584
12830
  remedy: "Check the VPC in the console, or reference the attribute from a later deploy."
12585
12831
  });
12586
12832
  }
12833
+ case "DefaultNetworkAcl": {
12834
+ 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.`));
12835
+ let aclId;
12836
+ try {
12837
+ aclId = (await resolver.clients.clientsForRegion(resolver.explicitRegion).ec2.send(new DescribeNetworkAclsCommand({ Filters: [{
12838
+ Name: "vpc-id",
12839
+ Values: [physicalId]
12840
+ }, {
12841
+ Name: "default",
12842
+ Values: ["true"]
12843
+ }] }))).NetworkAcls?.[0]?.NetworkAclId;
12844
+ } catch (err) {
12845
+ refuseUnservedAttribute(resolver, {
12846
+ logicalId,
12847
+ attributeName,
12848
+ resourceType,
12849
+ physicalId,
12850
+ context,
12851
+ observed: describeFailureObserved(resolver, "DescribeNetworkAcls", err, context),
12852
+ remedy: "Fix the read (the vpc-id / default filtered DescribeNetworkAcls permission, or the region) and deploy again."
12853
+ });
12854
+ }
12855
+ if (aclId) return aclId;
12856
+ refuseUnservedAttribute(resolver, {
12857
+ logicalId,
12858
+ attributeName,
12859
+ resourceType,
12860
+ physicalId,
12861
+ context,
12862
+ observed: "DescribeNetworkAcls found no default network ACL in the VPC",
12863
+ remedy: "Check the VPC in the console, or reference the attribute from a later deploy."
12864
+ });
12865
+ }
12866
+ case "CidrBlockAssociations": {
12867
+ let associationIds;
12868
+ let vpcFound = false;
12869
+ try {
12870
+ const vpc = (await resolver.clients.clientsForRegion(resolver.explicitRegion).ec2.send(new DescribeVpcsCommand({ VpcIds: [physicalId] }))).Vpcs?.[0];
12871
+ if (vpc) {
12872
+ vpcFound = true;
12873
+ associationIds = (vpc.CidrBlockAssociationSet ?? []).filter((a) => {
12874
+ const state = a.CidrBlockState?.State;
12875
+ return state === "associated" || state === "associating";
12876
+ }).map((a) => a.AssociationId).filter((id) => typeof id === "string" && id !== "");
12877
+ }
12878
+ } catch (err) {
12879
+ refuseUnservedAttribute(resolver, {
12880
+ logicalId,
12881
+ attributeName,
12882
+ resourceType,
12883
+ physicalId,
12884
+ context,
12885
+ observed: describeFailureObserved(resolver, "DescribeVpcs", err, context),
12886
+ remedy: "Fix the read (the DescribeVpcs permission, or the region) and deploy again."
12887
+ });
12888
+ }
12889
+ if (associationIds && associationIds.length > 0) return associationIds;
12890
+ if (!vpcFound) refuseUnservedAttribute(resolver, {
12891
+ logicalId,
12892
+ attributeName,
12893
+ resourceType,
12894
+ physicalId,
12895
+ context,
12896
+ observed: "DescribeVpcs found no VPC with this id",
12897
+ remedy: "Check the VPC in the console, or reference the attribute from a later deploy."
12898
+ });
12899
+ refuseUnservedAttribute(resolver, {
12900
+ logicalId,
12901
+ attributeName,
12902
+ resourceType,
12903
+ physicalId,
12904
+ context,
12905
+ observed: "DescribeVpcs returned no associated CIDR block for the VPC",
12906
+ remedy: "Check the VPC in the console, or reference the attribute from a later deploy."
12907
+ });
12908
+ }
12909
+ default: return guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceType, physicalId, context);
12910
+ }
12911
+ if (resourceType === "AWS::IAM::ManagedPolicy") switch (attributeName) {
12912
+ case "PolicyArn": return physicalId;
12913
+ case "PolicyId":
12914
+ case "DefaultVersionId":
12915
+ healBeforeConstructing(resolver, context);
12916
+ refuseUnconstructibleAttribute(resolver, {
12917
+ logicalId,
12918
+ attributeName,
12919
+ resourceType,
12920
+ context,
12921
+ why: "cdkd cannot build it from the policy ARN"
12922
+ });
12587
12923
  default: return guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceType, physicalId, context);
12588
12924
  }
12589
12925
  if (resourceType === "AWS::IAM::Policy") switch (attributeName) {
@@ -13582,7 +13918,7 @@ async function resolveGetStackOutput(resolver, arg, context) {
13582
13918
  }
13583
13919
  throw new Error(`Fn::GetStackOutput: stack ${loggedStackName} not found in region ${displayIdent(loggedRegion)}${roleArn ? ` (cross-account via ${shownReadRoleArn})` : ""}. ${!roleArn && resolver.cfnFallback ? "Searched cdkd state and CloudFormation stacks. Make sure the producer stack has been deployed (via cdkd or CloudFormation)." : `Make sure the producer stack has been deployed via cdkd.`}`);
13584
13920
  }
13585
- if (!hasReadableOutputs(stateData.state)) throw markNonRetryable(new MalformedProducerRecordRefusalError(`Fn::GetStackOutput: the state record of producer stack ${loggedStackName} (${displayIdent(loggedRegion)}) has no readable 'outputs' map — the record is malformed or truncated. cdkd refuses to resolve from it rather than reading it as a map: 'Object.hasOwn' answers TRUE for '0' on a string and for an index on a list, so continuing would resolve ONE CHARACTER or element of the record as this reference's value and this deploy would send it to AWS. Inspect the producer's record with 'cdkd state show' --json, repair or remove it, then re-run.`));
13921
+ if (!hasReadableOutputs(stateData.state)) throw markNonRetryable(new MalformedProducerRecordRefusalError(`Fn::GetStackOutput: the state record of producer stack ${loggedStackName} (${displayIdent(loggedRegion)}) has no readable 'outputs' map — the record is malformed or truncated. cdkd refuses to resolve from it rather than reading it as a map: 'Object.hasOwn' answers TRUE for '0' on a string and for an index on a list, so continuing would resolve ONE CHARACTER or element of the record as this reference's value and this deploy would send it to AWS. Inspect the producer's record with ${proseQuoted(cdkdRemedy("cdkd state show", "--json"))}, repair or remove it, then re-run.`));
13586
13922
  const outputs = stateData.state.outputs ?? {};
13587
13923
  if (!Object.hasOwn(outputs, outputName)) {
13588
13924
  const available = describeAvailableOutputs(resolver, Object.keys(outputs), context);
@@ -14068,6 +14404,103 @@ async function rebuildByToken(value, resolveToken) {
14068
14404
  return value;
14069
14405
  }
14070
14406
 
14407
+ // src/provisioning/secret-physical-id.ts
14408
+ const APPSYNC_APIKEY_ARN_RESOURCE_PATH = /^apis\/([^/|]+)\/apikeys?\/([^/|]+)$/;
14409
+ const APPSYNC_ARN = /^arn:[^:]+:appsync:[^:]*:[^:]*:(.+)$/;
14410
+ const SUBSTRING_FLOOR = 4;
14411
+ function maskedSecretSegment(segment) {
14412
+ return `****${segment.slice(-4)}`;
14413
+ }
14414
+ function secretPhysicalIdSegment(resourceType, physicalId) {
14415
+ if (resourceType !== "AWS::AppSync::ApiKey") return void 0;
14416
+ if (typeof physicalId !== "string" || physicalId === "") return void 0;
14417
+ const parts = physicalId.split("|");
14418
+ if (parts.length === 2 && parts[0] !== "" && parts[1] !== "") return parts[1];
14419
+ const arn = APPSYNC_ARN.exec(physicalId);
14420
+ const path = arn ? APPSYNC_APIKEY_ARN_RESOURCE_PATH.exec(arn[1]) : null;
14421
+ if (path) return path[2];
14422
+ return physicalId;
14423
+ }
14424
+ function maskSegmentsInText(text, segments) {
14425
+ let out = text;
14426
+ for (const segment of segments) {
14427
+ if (out === segment) return maskedSecretSegment(segment);
14428
+ if (segment.length >= SUBSTRING_FLOOR && out.includes(segment)) out = out.split(segment).join(maskedSecretSegment(segment));
14429
+ }
14430
+ return out;
14431
+ }
14432
+ function displayPhysicalId(resourceType, physicalId) {
14433
+ const segment = secretPhysicalIdSegment(resourceType, physicalId);
14434
+ if (segment === void 0 || typeof physicalId !== "string") return physicalId;
14435
+ return maskSegmentsInText(physicalId, [segment]);
14436
+ }
14437
+ function maskSecretSegmentsDeep(value, segments) {
14438
+ if (segments.length === 0) return value;
14439
+ const ordered = [...new Set(segments)].sort((a, b) => b.length - a.length);
14440
+ const walk = (v) => {
14441
+ if (typeof v === "string") return maskSegmentsInText(v, ordered);
14442
+ if (Array.isArray(v)) return v.map(walk);
14443
+ if (v !== null && typeof v === "object") {
14444
+ const out = {};
14445
+ for (const [k, child] of Object.entries(v)) out[k] = walk(child);
14446
+ return out;
14447
+ }
14448
+ return v;
14449
+ };
14450
+ return walk(value);
14451
+ }
14452
+ function segmentOfRecord(record) {
14453
+ if (record === null || typeof record !== "object") return void 0;
14454
+ const r = record;
14455
+ return secretPhysicalIdSegment(r.resourceType, r.physicalId);
14456
+ }
14457
+ function stringLeavesOf(value, out = []) {
14458
+ if (typeof value === "string") out.push(value);
14459
+ else if (Array.isArray(value)) for (const v of value) stringLeavesOf(v, out);
14460
+ else if (value !== null && typeof value === "object") for (const v of Object.values(value)) stringLeavesOf(v, out);
14461
+ return out;
14462
+ }
14463
+ function secretNamedAttributeLeavesOf$1(record) {
14464
+ if (record === null || typeof record !== "object") return [];
14465
+ const r = record;
14466
+ if (r.resourceType !== "AWS::CloudFormation::Stack") return [];
14467
+ const names = r.secretNamedAttributes;
14468
+ const attributes = r.attributes;
14469
+ if (!Array.isArray(names) || attributes === null || typeof attributes !== "object") return [];
14470
+ const leaves = [];
14471
+ for (const name of names) {
14472
+ if (typeof name !== "string" || !Object.hasOwn(attributes, name)) continue;
14473
+ for (const leaf of stringLeavesOf(attributes[name])) if (leaf !== "" && leaf !== "***" && !leaf.includes("{{resolve:")) leaves.push(leaf);
14474
+ }
14475
+ return leaves;
14476
+ }
14477
+ function secretSegmentsOfState(state) {
14478
+ if (state === null || typeof state !== "object") return [];
14479
+ const s = state;
14480
+ const segments = [];
14481
+ const add = (record) => {
14482
+ const segment = segmentOfRecord(record);
14483
+ if (segment !== void 0) segments.push(segment);
14484
+ };
14485
+ if (s.resources !== null && typeof s.resources === "object" && !Array.isArray(s.resources)) for (const record of Object.values(s.resources)) {
14486
+ add(record);
14487
+ segments.push(...secretNamedAttributeLeavesOf$1(record));
14488
+ }
14489
+ for (const list of [s.orphans, s.supersededResources]) {
14490
+ if (!Array.isArray(list)) continue;
14491
+ for (const entry of list) {
14492
+ if (entry === null || typeof entry !== "object") continue;
14493
+ const record = entry.state;
14494
+ add(record);
14495
+ segments.push(...secretNamedAttributeLeavesOf$1(record));
14496
+ }
14497
+ }
14498
+ return segments;
14499
+ }
14500
+ function withSecretPhysicalIdsMaskedInState(state, segments = secretSegmentsOfState(state)) {
14501
+ return maskSecretSegmentsDeep(state, segments);
14502
+ }
14503
+
14071
14504
  // src/deployment/intrinsic-resolver/getatt-construct-app.ts
14072
14505
  async function constructAttributeForAppTypes(resolver, resource, attributeName, context, logicalId, resourceType, physicalId, accountId, partition, region) {
14073
14506
  if (resourceType === "AWS::Events::Rule") switch (attributeName) {
@@ -14078,6 +14511,7 @@ async function constructAttributeForAppTypes(resolver, resource, attributeName,
14078
14511
  const busName = bus.startsWith("arn:") ? bus.split("/").pop() || "" : bus;
14079
14512
  return busName ? `arn:${partition}:events:${region}:${accountId}:rule/${busName}/${physicalId}` : `arn:${partition}:events:${region}:${accountId}:rule/${physicalId}`;
14080
14513
  }
14514
+ case "RuleName": return physicalId.startsWith("arn:") ? physicalId.slice(physicalId.lastIndexOf("/") + 1) : physicalId;
14081
14515
  default: return guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceType, physicalId, context);
14082
14516
  }
14083
14517
  if (resourceType === "AWS::Events::EventBus") switch (attributeName) {
@@ -14107,8 +14541,50 @@ async function constructAttributeForAppTypes(resolver, resource, attributeName,
14107
14541
  if (resourceType === "AWS::AppSync::GraphQLApi") switch (attributeName) {
14108
14542
  case "Arn": return `arn:${partition}:appsync:${region}:${accountId}:apis/${physicalId}`;
14109
14543
  case "ApiId": return physicalId;
14544
+ case "GraphQLEndpointArn":
14545
+ case "RealtimeUrl": {
14546
+ const host = typeof resource.attributes?.["GraphQLDns"] === "string" ? resource.attributes["GraphQLDns"] : urlHost(resource.attributes?.["GraphQLUrl"]);
14547
+ const match = host === void 0 ? null : /^([a-z0-9]+)\.appsync-api\.(.+)$/.exec(host);
14548
+ if (match) {
14549
+ const [, endpointId, rest] = match;
14550
+ return attributeName === "GraphQLEndpointArn" ? `arn:${partition}:appsync:${region}:${accountId}:endpoints/graphql-api/${endpointId}` : `wss://${endpointId}.appsync-realtime-api.${rest}/graphql`;
14551
+ }
14552
+ healBeforeConstructing(resolver, context);
14553
+ refuseUnconstructibleAttribute(resolver, {
14554
+ logicalId,
14555
+ attributeName,
14556
+ resourceType,
14557
+ context,
14558
+ why: "it is built on the endpoint id of the API's GraphQL host, which the record does not hold"
14559
+ });
14560
+ }
14561
+ case "GraphQLDns":
14562
+ case "RealtimeDns":
14563
+ if (attributeName === "GraphQLDns") {
14564
+ const host = urlHost(resource.attributes?.["GraphQLUrl"]);
14565
+ if (host !== void 0) return noteAttributeSecrecy(resolver, logicalId, attributeName, host, context);
14566
+ }
14567
+ healBeforeConstructing(resolver, context);
14568
+ refuseUnconstructibleAttribute(resolver, {
14569
+ logicalId,
14570
+ attributeName,
14571
+ resourceType,
14572
+ context,
14573
+ why: "AppSync serves the host under an endpoint id that is not the api id"
14574
+ });
14110
14575
  default: return guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceType, physicalId, context);
14111
14576
  }
14577
+ if (resourceType === "AWS::AppSync::ApiKey" && attributeName === "ApiKeyId") {
14578
+ const keyId = secretPhysicalIdSegment(resourceType, physicalId);
14579
+ if (keyId !== void 0 && keyId !== physicalId) return keyId;
14580
+ refuseUnconstructibleAttribute(resolver, {
14581
+ logicalId,
14582
+ attributeName,
14583
+ resourceType,
14584
+ context,
14585
+ why: "the physical id is neither the `<apiId>|<keyId>` pair nor the key ARN it is read from"
14586
+ });
14587
+ }
14112
14588
  if (resourceType === "AWS::AppSync::GraphQLSchema" && attributeName === "Id") return graphQLSchemaCfnId(physicalId);
14113
14589
  if (resourceType === "AWS::ApiGatewayV2::Api") switch (attributeName) {
14114
14590
  case "ExecuteApiArn": return `arn:${partition}:execute-api:${region}:${accountId}:${physicalId}`;
@@ -14167,20 +14643,97 @@ async function constructAttributeForAppTypes(resolver, resource, attributeName,
14167
14643
  case "Arn": return `arn:${partition}:cloudwatch:${region}:${accountId}:alarm:${physicalId}`;
14168
14644
  default: return guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceType, physicalId, context);
14169
14645
  }
14170
- if (resourceType === "AWS::RDS::DBInstance" || resourceType === "AWS::DocDB::DBInstance" || resourceType === "AWS::Neptune::DBInstance") switch (attributeName) {
14171
- case "DBInstanceArn":
14172
- case "Arn": return `arn:${partition}:rds:${region}:${accountId}:db:${physicalId}`;
14173
- default: return guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceType, physicalId, context);
14646
+ if (resourceType === "AWS::AutoScaling::AutoScalingGroup" && attributeName === "AutoScalingGroupARN") {
14647
+ const recorded = resource.attributes?.["Arn"];
14648
+ if (typeof recorded === "string" && recorded.startsWith("arn:")) return noteAttributeSecrecy(resolver, logicalId, attributeName, recorded, context);
14649
+ healBeforeConstructing(resolver, context);
14650
+ refuseUnconstructibleAttribute(resolver, {
14651
+ logicalId,
14652
+ attributeName,
14653
+ resourceType,
14654
+ context,
14655
+ why: "its ARN carries a group id cdkd cannot build from the group name"
14656
+ });
14657
+ }
14658
+ if (resourceType === "AWS::RDS::DBInstance" || resourceType === "AWS::DocDB::DBInstance" || resourceType === "AWS::Neptune::DBInstance") {
14659
+ switch (attributeName) {
14660
+ case "DBInstanceArn":
14661
+ case "Arn": return `arn:${partition}:rds:${region}:${accountId}:db:${physicalId}`;
14662
+ case "DbiResourceId":
14663
+ case "Endpoint.HostedZoneId":
14664
+ case "ListenerEndpoint.Address":
14665
+ case "ListenerEndpoint.Port":
14666
+ case "ListenerEndpoint.HostedZoneId":
14667
+ case "CertificateDetails.CAIdentifier":
14668
+ case "CertificateDetails.ValidTill":
14669
+ if (resourceType !== "AWS::RDS::DBInstance") break;
14670
+ healBeforeConstructing(resolver, context);
14671
+ refuseUnconstructibleAttribute(resolver, {
14672
+ logicalId,
14673
+ attributeName,
14674
+ resourceType,
14675
+ context,
14676
+ why: "cdkd cannot build it from the DB instance identifier",
14677
+ remedyWhenHealCompleted: attributeName.startsWith("ListenerEndpoint.") ? "This DB instance has no listener endpoint, and CloudFormation cannot return one for it either: remove the reference, or use Endpoint.Address." : "RDS does not report it for the instance yet (it may still be creating): deploy again once the instance is available."
14678
+ });
14679
+ }
14680
+ return guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceType, physicalId, context);
14174
14681
  }
14175
14682
  if (resourceType === "AWS::RDS::DBCluster" || resourceType === "AWS::DocDB::DBCluster" || resourceType === "AWS::Neptune::DBCluster") switch (attributeName) {
14176
14683
  case "DBClusterArn":
14177
14684
  case "Arn": return `arn:${partition}:rds:${region}:${accountId}:cluster:${physicalId}`;
14178
14685
  default: return guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceType, physicalId, context);
14179
14686
  }
14687
+ if (resourceType === "AWS::S3Express::DirectoryBucket" && attributeName === "AvailabilityZoneName") {
14688
+ const zoneId = /--([a-z0-9]+(?:-[a-z0-9]+)*)--x-s3$/.exec(physicalId)?.[1];
14689
+ if (zoneId === void 0) refuseUnservedAttribute(resolver, {
14690
+ logicalId,
14691
+ attributeName,
14692
+ resourceType,
14693
+ physicalId,
14694
+ context,
14695
+ observed: "the bucket name carries no --<zone-id>--x-s3 suffix",
14696
+ remedy: "Check the directory bucket in the console."
14697
+ });
14698
+ let zoneName;
14699
+ try {
14700
+ zoneName = (await resolver.clients.clientsForRegion(resolver.explicitRegion).ec2.send(new DescribeAvailabilityZonesCommand({ ZoneIds: [zoneId] }))).AvailabilityZones?.[0]?.ZoneName;
14701
+ } catch (err) {
14702
+ refuseUnservedAttribute(resolver, {
14703
+ logicalId,
14704
+ attributeName,
14705
+ resourceType,
14706
+ physicalId,
14707
+ context,
14708
+ observed: describeFailureObserved(resolver, "DescribeAvailabilityZones", err, context),
14709
+ remedy: "Fix the read (the DescribeAvailabilityZones permission, or the region) and deploy again."
14710
+ });
14711
+ }
14712
+ if (zoneName) return zoneName;
14713
+ refuseUnservedAttribute(resolver, {
14714
+ logicalId,
14715
+ attributeName,
14716
+ resourceType,
14717
+ physicalId,
14718
+ context,
14719
+ observed: "DescribeAvailabilityZones returned no zone for that zone ID",
14720
+ remedy: "Check the directory bucket in the console, or reference the attribute from a later deploy."
14721
+ });
14722
+ }
14180
14723
  if (resourceType === "AWS::S3Express::DirectoryBucket") switch (attributeName) {
14181
14724
  case "Arn": return `arn:${partition}:s3express:${region}:${accountId}:bucket/${physicalId}`;
14182
14725
  default: return guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceType, physicalId, context);
14183
14726
  }
14727
+ if (resourceType === "AWS::S3Tables::Table" && (attributeName === "WarehouseLocation" || attributeName === "VersionToken")) {
14728
+ healBeforeConstructing(resolver, context);
14729
+ refuseUnconstructibleAttribute(resolver, {
14730
+ logicalId,
14731
+ attributeName,
14732
+ resourceType,
14733
+ context,
14734
+ why: "only GetTable reports it"
14735
+ });
14736
+ }
14184
14737
  if (resourceType === "AWS::Lambda::Function") switch (attributeName) {
14185
14738
  case "Arn": return `arn:${partition}:lambda:${region}:${accountId}:function:${physicalId}`;
14186
14739
  default: return guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceType, physicalId, context);
@@ -14205,6 +14758,14 @@ async function constructAttributeForAppTypes(resolver, resource, attributeName,
14205
14758
  }
14206
14759
  return NOT_CONSTRUCTED;
14207
14760
  }
14761
+ function urlHost(value) {
14762
+ if (typeof value !== "string" || !/^https:\/\/[^/]+\//.test(value)) return void 0;
14763
+ try {
14764
+ return new URL(value).host;
14765
+ } catch {
14766
+ return;
14767
+ }
14768
+ }
14208
14769
 
14209
14770
  // src/provisioning/ec2-instance-state.ts
14210
14771
  function isSettledInstanceState(stateName) {
@@ -14530,7 +15091,7 @@ async function readSubnetAttributeLive(resolver, attributeName, context, logical
14530
15091
  return refuse(describeFailureObserved(resolver, "DescribeSubnets", err, context), "Fix the read (the ec2:DescribeSubnets permission, or the region) and deploy again.");
14531
15092
  }
14532
15093
  };
14533
- const notFound = () => refuse("DescribeSubnets returned no subnet for it", "Check that the subnet still exists in this region, or repair the record with cdkd import.");
15094
+ 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")}.`);
14534
15095
  if (attributeName === "Ipv6CidrBlocks") {
14535
15096
  const loggedId = displayMasked(resolver, physicalId, context);
14536
15097
  const { attempts, delayMs } = subnetIpv6AttributeWait;
@@ -15187,7 +15748,13 @@ async function resolveRef(resolver, logicalId, context, onParameter) {
15187
15748
  if (lacksRecordedTableArn(resource)) {
15188
15749
  const tableArn = await resolveGetAtt(resolver, [logicalId, "TableARN"], context);
15189
15750
  if (typeof tableArn === "string" && tableArn.startsWith("arn:") && !tableArn.includes("|")) return tableArn;
15190
- throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Ref ${displayMasked(resolver, logicalId, context)}: the state records no usable TableARN for this S3 Tables table (a cdkd older than v0.201.0 recorded none), and CloudFormation's Ref of a table is its TableARN, which its physical id does not contain. No usable one could be read from AWS either. If the state records none, run 'cdkd deploy' with permission to call s3tables:GetTable so cdkd records it; if it records a value that is not the table's ARN, re-import the table with 'cdkd import'.`));
15751
+ throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Ref ${displayMasked(resolver, logicalId, context)}: the state records no usable TableARN for this S3 Tables table (a cdkd older than v0.201.0 recorded none), and CloudFormation's Ref of a table is its TableARN, which its physical id does not contain. No usable one could be read from AWS either. If the state records none, run ${proseQuoted(cdkdRemedy("cdkd deploy"))} with permission to call s3tables:GetTable so cdkd records it; if it records a value that is not the table's ARN, re-import the table with ${proseQuoted(cdkdRemedy("cdkd import"))}.`));
15752
+ }
15753
+ const healedAttribute = lacksRecordedRefArn(resource);
15754
+ if (healedAttribute !== void 0) {
15755
+ const arn = await resolveGetAtt(resolver, [logicalId, healedAttribute], context);
15756
+ if (typeof arn === "string" && arn.startsWith("arn:") && !isPlaceholderArn(arn)) return arn;
15757
+ throw markNonRetryable(new IntrinsicResolutionRefusalError(`Cannot resolve Ref ${displayMasked(resolver, logicalId, context)}: the Ref value CloudFormation returns for this resource is its ${healedAttribute}, which its physical id is not, and the value read for it is not a usable ARN. Re-import the resource with ${proseQuoted(cdkdRemedy("cdkd import"))}.`));
15191
15758
  }
15192
15759
  const refValue = resolveRefValue(resolver, logicalId, resource, context);
15193
15760
  recordSecretNamedRead(logicalId, refValue, context);
@@ -15417,7 +15984,7 @@ function referencesProvenLocal(value, logicalId, context) {
15417
15984
 
15418
15985
  // src/deployment/intrinsic-resolver/getatt.ts
15419
15986
  function isAlwaysLiveAttribute(resourceType, attributeName) {
15420
- if (resourceType === "AWS::EC2::VPC") return attributeName === "Ipv6CidrBlocks";
15987
+ if (resourceType === "AWS::EC2::VPC") return attributeName === "Ipv6CidrBlocks" || attributeName === "CidrBlockAssociations";
15421
15988
  if (resourceType !== "AWS::EC2::Subnet") return false;
15422
15989
  return attributeName === "Ipv6CidrBlocks" || attributeName === "NetworkAclAssociationId" || attributeName === "BlockPublicAccessStates" || attributeName.startsWith("BlockPublicAccessStates.");
15423
15990
  }
@@ -16738,6 +17305,10 @@ function isDefinitiveRefusal(error) {
16738
17305
  }
16739
17306
  const readOnlyPropertiesCache = /* @__PURE__ */ new Map();
16740
17307
  const attributeNamesCache = /* @__PURE__ */ new Map();
17308
+ const emulatorRegistryMissTypes = /* @__PURE__ */ new Set();
17309
+ function isAwsEmulatorRegistryMissType(resourceType) {
17310
+ return emulatorRegistryMissTypes.has(resourceType);
17311
+ }
16741
17312
  async function getTopLevelAttributeNames(resourceType) {
16742
17313
  const readOnly = await getTopLevelReadOnlyProperties(resourceType);
16743
17314
  if (readOnly === void 0) return void 0;
@@ -16767,6 +17338,7 @@ function getTopLevelReadOnlyProperties(resourceType) {
16767
17338
  if (cached) return cached;
16768
17339
  const entry = fetchTopLevelReadOnlyProperties(resourceType).catch((error) => {
16769
17340
  if (!isDefinitiveRefusal(error)) readOnlyPropertiesCache.delete(resourceType);
17341
+ if (isAwsEmulatorRegistryMiss(error)) emulatorRegistryMissTypes.add(resourceType);
16770
17342
  const message = describeAwsFailure(error).detail;
16771
17343
  getLogger().child("ReadOnlyProperties").debug(`Failed to resolve read-only properties for ${displaySafe(resourceType, { asciiOnly: true })} via cloudformation:DescribeType (${message}).`);
16772
17344
  });
@@ -16988,7 +17560,7 @@ function narrowToChangedFeatures(op, current) {
16988
17560
  if (name === void 0) return op;
16989
17561
  if (!isDeepStrictEqual(entry, byName.get(name))) changed.push(entry);
16990
17562
  }
16991
- if (changed.length === 0) throw markNonRetryable(/* @__PURE__ */ new Error("cannot revert Features: the live list differs from the recorded baseline only in the order of its entries or in entries GuardDuty added, which UpdateDetector cannot undo, so nothing on this detector was reverted. cdkd drift --accept would record the live list, but it records the live value of EVERY drifted property of the stack, not only Features: revert any other drift on this detector first (for example with aws guardduty update-detector), then run it."));
17563
+ if (changed.length === 0) throw markNonRetryable(/* @__PURE__ */ new Error(`cannot revert Features: the live list differs from the recorded baseline only in the order of its entries or in entries GuardDuty added, which UpdateDetector cannot undo, so nothing on this detector was reverted. ${cdkdRemedy("cdkd drift", "--accept")} would record the live list, but it records the live value of EVERY drifted property of the stack, not only Features: revert any other drift on this detector first (for example with aws guardduty update-detector), then run it.`));
16992
17564
  return {
16993
17565
  ...op,
16994
17566
  value: changed
@@ -18198,7 +18770,7 @@ async function deleteInIdLogScope(logicalId, physicalId, resourceType, propertie
18198
18770
  const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
18199
18771
  if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
18200
18772
  this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
18201
- const { ASGProvider } = await import("./asg-provider-Dvy_jqxt.js");
18773
+ const { ASGProvider } = await import("./asg-provider-hZ4nyheM.js");
18202
18774
  const delegateRegion = ambientRegion();
18203
18775
  let asgProvider = this.asgDeleteDelegates.get(delegateRegion);
18204
18776
  if (asgProvider === void 0) {
@@ -18352,7 +18924,7 @@ async function sdkDeleteDelegateInCcRegion(resourceType, logicalId, physicalId)
18352
18924
  const family = SDK_DELETE_FAMILIES.get(resourceType);
18353
18925
  const cached = this.sdkDeleteDelegates.get(family);
18354
18926
  if (cached !== void 0 && cached.region === ccRegion) return cached.provider;
18355
- const provider = family === "rds" ? new (await (import("./rds-provider-DKZjtd50.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-BYgFNrtZ.js"))).NeptuneProvider({ region: ccRegion });
18927
+ const provider = family === "rds" ? new (await (import("./rds-provider-DmVAU_Mv.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-Bir1AdqM.js"))).NeptuneProvider({ region: ccRegion });
18356
18928
  this.sdkDeleteDelegates.set(family, {
18357
18929
  region: ccRegion,
18358
18930
  provider
@@ -18885,10 +19457,7 @@ async function enrichResourceAttributes(resourceType, physicalId, attributes, lo
18885
19457
  try {
18886
19458
  const inst = (await new RDSClient({ ...ambientClientDefaults() }).send(new DescribeDBInstancesCommand({ DBInstanceIdentifier: physicalId }))).DBInstances?.[0];
18887
19459
  if (inst) {
18888
- if (inst.Endpoint?.Address) enriched["Endpoint.Address"] = inst.Endpoint.Address;
18889
- if (inst.Endpoint?.Port !== void 0) enriched["Endpoint.Port"] = String(inst.Endpoint.Port);
18890
- if (inst.Endpoint?.HostedZoneId) enriched["Endpoint.HostedZoneId"] = inst.Endpoint.HostedZoneId;
18891
- if (inst.DBInstanceArn) enriched["Arn"] = inst.DBInstanceArn;
19460
+ Object.assign(enriched, dbInstanceAttributes(inst));
18892
19461
  log.debug(`Enriched RDS DBInstance ${physicalId} with Endpoint/Port/Arn from DescribeDBInstances`);
18893
19462
  }
18894
19463
  } catch (error) {
@@ -19265,7 +19834,7 @@ async function maskUncertifiedModelValues(model, resourceType, physicalId) {
19265
19834
  if (attributeNames === void 0) {
19266
19835
  if (!this.warnedUnresolvableSchemaTypes.has(resourceType)) {
19267
19836
  this.warnedUnresolvableSchemaTypes.add(resourceType);
19268
- this.logger.warn(`Could not resolve the CloudFormation schema for ${safeType}, so cdkd cannot tell which of its Cloud Control model keys are Fn::GetAtt attributes. Every imported attribute for this type is recorded as "${"***"}" rather than risking a credential in state.json; an Fn::GetAtt against such a resource fails with a named refusal until that resource is next created or updated by a deploy. Grant cloudformation:DescribeType and re-import to record its attributes.`);
19837
+ this.logger.warn(`Could not resolve the CloudFormation schema for ${safeType}, so cdkd cannot tell which of its Cloud Control model keys are Fn::GetAtt attributes. Every imported attribute for this type is recorded as "${"***"}" rather than risking a credential in state.json; an Fn::GetAtt against such a resource fails with a named refusal until that resource is next created or updated by a ` + (isAwsEmulatorRegistryMissType(resourceType) ? "deploy. The AWS Emulator's CloudFormation registry has no schema for this type, so no permission change helps here." : "deploy. Grant cloudformation:DescribeType and re-import to record its attributes."));
19269
19838
  }
19270
19839
  }
19271
19840
  const masked = Object.create(null);
@@ -19744,6 +20313,45 @@ const DELETE_ACCOUNT_LOOKUP_RETRY_DELAYS_MS = [
19744
20313
  const CR_LOG_TAIL_BOILERPLATE = /^(START|END|REPORT|XRAY|INIT_START|INIT_REPORT|RESTORE_START|RESTORE_REPORT|EXTENSION) /;
19745
20314
  const SNS_SERVICE_TOKEN_ARN_RE = /^arn:aws[a-z0-9-]*:sns:/;
19746
20315
 
20316
+ // src/local/custom-resource-runtime-gate.ts
20317
+ function localAwsEmulatorActive() {
20318
+ return getActiveWorkloadAwsWiring()?.mode === "emulator";
20319
+ }
20320
+ const NO_LOCAL_CUSTOM_RESOURCES_FLAG = "--no-local-custom-resources";
20321
+ let enabled = true;
20322
+ let commandPath;
20323
+ function setLocalCustomResourceRuntimeEnabled(value, command) {
20324
+ enabled = value;
20325
+ commandPath = command;
20326
+ }
20327
+ function localCustomResourceCommand() {
20328
+ return commandPath;
20329
+ }
20330
+ function localCustomResourceRuntimeActive() {
20331
+ return enabled && localAwsEmulatorActive();
20332
+ }
20333
+ function customResourcesRunWithoutApp() {
20334
+ return localCustomResourceRuntimeActive() && synthesizedStacks().length === 0;
20335
+ }
20336
+ const sentToEmulatorRuntime = /* @__PURE__ */ new Set();
20337
+ const failedWithoutApp = /* @__PURE__ */ new Set();
20338
+ function noteSentToEmulatorRuntime(logicalId) {
20339
+ if (customResourcesRunWithoutApp()) sentToEmulatorRuntime.add(logicalId);
20340
+ }
20341
+ function noteCustomResourceFailure(logicalId) {
20342
+ if (sentToEmulatorRuntime.has(logicalId)) failedWithoutApp.add(logicalId);
20343
+ }
20344
+ function customResourcesFailedWithoutApp() {
20345
+ return [...failedWithoutApp];
20346
+ }
20347
+ const destroyingStack = new AsyncLocalStorage();
20348
+ function withCustomResourceStack(stackName, fn) {
20349
+ return destroyingStack.run(stackName, fn);
20350
+ }
20351
+ function customResourceStackName() {
20352
+ return destroyingStack.getStore();
20353
+ }
20354
+
19747
20355
  // src/provisioning/providers/custom-resource/delete-skip-reasons.ts
19748
20356
  function deletePathMasker(callerMask, noEchoMask) {
19749
20357
  if (callerMask === void 0) return noEchoMask;
@@ -19771,7 +20379,7 @@ function crDeployNoStateOrphan(logicalId) {
19771
20379
  return `For a resource removed from the template, to give up on the delete and stop tracking it, drop the record with ${stateOrphanRecordRemedy(void 0, logicalId)}.`;
19772
20380
  }
19773
20381
  function crDeploySkipTail(logicalId) {
19774
- return "Meanwhile 'cdkd deploy --allow-unaddressed' exits 0 (a deploy-only flag; 'cdkd rollback' has none); the record stays and each deploy re-attempts the delete. A delete-first REPLACEMENT or a rollback delete usually FAILS the resource and keeps the record (https://github.com/go-to-k/cdkd/issues/1762). Where the other copy already exists (a replacement that created the new resource first, or a rollback that re-created the old one first), the skip only warns and the surviving copy is no longer tracked, so tear it down by hand. " + crDeployNoStateOrphan(logicalId);
20382
+ return `Meanwhile ${proseQuoted(cdkdRemedy("cdkd deploy", "--allow-unaddressed"))} exits 0 (a deploy-only flag; 'cdkd rollback' has none); the record stays and each deploy re-attempts the delete. A delete-first REPLACEMENT or a rollback delete usually FAILS the resource and keeps the record (https://github.com/go-to-k/cdkd/issues/1762). Where the other copy already exists (a replacement that created the new resource first, or a rollback that re-created the old one first), the skip only warns and the surviving copy is no longer tracked, so tear it down by hand. ` + crDeployNoStateOrphan(logicalId);
19775
20383
  }
19776
20384
  const CR_DEPLOY_HANDLER_SKIP_HEAD = "This delete is not part of a stack destroy (a 'cdkd deploy' template removal, replacement or rollback, or a 'cdkd rollback'). For a resource removed from the template the record is KEPT and the next 'cdkd deploy' re-sends the Delete: fix what made it fail (the handler's Delete logic, or what stopped the invoke) and re-deploy. That reaches the handler only while its function exists: if this deploy also deleted the backing Lambda, the next deploy finds it gone and DROPS the record with a warning, so tear down what the handler manages by hand. ";
19777
20385
  const CR_DEPLOY_UNADDRESSABLE_HEAD = "This delete is not part of a stack destroy (a 'cdkd deploy' template removal, replacement or rollback, or a 'cdkd rollback'). For a resource removed from the template the record is KEPT and every 'cdkd deploy' skips it again until ServiceToken is restored: put the provider's Lambda function or SNS topic ARN back in state.json and re-deploy, which sends the Delete while that handler exists. If its Lambda function is gone, that deploy DROPS the record with a warning instead, so tear down what the handler manages by hand. ";
@@ -19786,7 +20394,7 @@ function crUnresolvedTokenUpdateRemedy() {
19786
20394
  }
19787
20395
  const CR_UNRESOLVED_TOKEN_CREATE_REMEDY = "This indicates an unresolved value in the template, or, on a rollback, in the resource's recorded state. Check that the template resolves ServiceToken to the provider's Lambda function or SNS topic ARN; a rollback replays the recorded value, so restore the template and re-deploy instead.";
19788
20396
  function unresolvedTokenDeleteRemedy(context, logicalId) {
19789
- return context?.stackDestroy === true ? `re-run 'cdkd import', or drop the record with ${stateOrphanRecordRemedy(context, logicalId)}, to recover.` : `put the provider's Lambda function or SNS topic ARN back as ServiceToken in state.json and re-run to recover. ${crDeployNoStateOrphan(logicalId)}`;
20397
+ return context?.stackDestroy === true ? `re-run ${proseQuoted(cdkdRemedy("cdkd import"))}, or drop the record with ${stateOrphanRecordRemedy(context, logicalId)}, to recover.` : `put the provider's Lambda function or SNS topic ARN back as ServiceToken in state.json and re-run to recover. ${crDeployNoStateOrphan(logicalId)}`;
19790
20398
  }
19791
20399
  function unaddressableServiceTokenRemedy(context, logicalId) {
19792
20400
  return context?.stackDestroy === true ? crDestroyUnaddressableRemedy(context, logicalId) : `${CR_DEPLOY_UNADDRESSABLE_HEAD}${crDeploySkipTail(logicalId)}`;
@@ -19927,6 +20535,7 @@ async function create$1(logicalId, resourceType, properties, context) {
19927
20535
  };
19928
20536
  } catch (error) {
19929
20537
  markAuxiliaryFailure(error, logicalId);
20538
+ noteCustomResourceFailure(logicalId);
19930
20539
  const cause = error instanceof Error ? error : void 0;
19931
20540
  throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to create custom resource ${logicalId}: ${text}`, resourceType, logicalId, void 0, cause));
19932
20541
  }
@@ -19965,6 +20574,7 @@ async function update$1(logicalId, physicalId, resourceType, properties, previou
19965
20574
  ...cfnResponse.NoEcho === true && { noEchoAttributes: true }
19966
20575
  };
19967
20576
  } catch (error) {
20577
+ noteCustomResourceFailure(logicalId);
19968
20578
  const cause = error instanceof Error ? error : void 0;
19969
20579
  throw this.wrapCaughtError(context?.maskSecrets, error, (text) => new ProvisioningError(`Failed to update custom resource ${logicalId}: ${text}`, resourceType, logicalId, physicalId, cause));
19970
20580
  }
@@ -20424,7 +21034,7 @@ async function deleteImpl(logicalId, physicalId, resourceType, properties, conte
20424
21034
  };
20425
21035
  }
20426
21036
  if (carriesSecretMask(payload)) {
20427
- this.logger.warn(safeMsg`Custom resource ${logicalId} is recorded in state with a property holding the ` + "'***' redaction mask, which no NoEcho coordinate of the record names, so cdkd cannot re-resolve it and its handler would receive the mask in ResourceProperties; skipping deletion — the handler is not invoked, so anything this custom resource manages is LEFT IN PLACE. For a record 'cdkd import' or 'cdkd scrub' wrote, a 'cdkd deploy' of the app first records which positions hold a NoEcho value, after which 'cdkd destroy' sends the delete. " + safeMsg`${noEchoPropertiesRemedy(context, logicalId)}`);
21037
+ this.logger.warn(safeMsg`Custom resource ${logicalId} is recorded in state with a property holding the ` + "'***' redaction mask, which no NoEcho coordinate of the record names, so cdkd cannot re-resolve it and its handler would receive the mask in ResourceProperties; skipping deletion — the handler is not invoked, so anything this custom resource manages is " + safeMsg`LEFT IN PLACE. For a record 'cdkd import' or 'cdkd scrub' wrote, a ${proseQuoted(cdkdRemedy("cdkd deploy"))} of the ` + safeMsg`app first records which positions hold a NoEcho value, after which ${proseQuoted(cdkdRemedy("cdkd destroy"))} ` + `sends the delete. ` + safeMsg`${noEchoPropertiesRemedy(context, logicalId)}`);
20428
21038
  return {
20429
21039
  outcome: "skipped",
20430
21040
  reason: CR_MASKED_PROPERTIES_SKIP_REASON
@@ -20900,31 +21510,6 @@ function debugWaiterRejections(logicalId, rejections) {
20900
21510
  for (const line of waiterRejectionDebugLines(rejections)) this.logger.debug(safeMsg`Readiness waiter for ${logicalId} observed ${line}`);
20901
21511
  }
20902
21512
 
20903
- // src/local/custom-resource-runtime-gate.ts
20904
- function localAwsEmulatorActive() {
20905
- return getActiveWorkloadAwsWiring()?.mode === "emulator";
20906
- }
20907
- const NO_LOCAL_CUSTOM_RESOURCES_FLAG = "--no-local-custom-resources";
20908
- let enabled = true;
20909
- let commandPath;
20910
- function setLocalCustomResourceRuntimeEnabled(value, command) {
20911
- enabled = value;
20912
- commandPath = command;
20913
- }
20914
- function localCustomResourceCommand() {
20915
- return commandPath;
20916
- }
20917
- function localCustomResourceRuntimeActive() {
20918
- return enabled && localAwsEmulatorActive();
20919
- }
20920
- const destroyingStack = new AsyncLocalStorage();
20921
- function withCustomResourceStack(stackName, fn) {
20922
- return destroyingStack.run(stackName, fn);
20923
- }
20924
- function customResourceStackName() {
20925
- return destroyingStack.getStore();
20926
- }
20927
-
20928
21513
  // src/provisioning/providers/custom-resource/dispatch.ts
20929
21514
  async function sendRequest(serviceToken, request, responseKey, logicalId, operation, onDelivered, mask) {
20930
21515
  if (this.isSnsServiceToken(serviceToken)) {
@@ -21011,12 +21596,13 @@ async function publishToSns(topicArn, request) {
21011
21596
  }
21012
21597
  async function invokeLambda(serviceToken, request) {
21013
21598
  if (localCustomResourceRuntimeActive()) {
21014
- const { invokeCustomResourceFunctionLocally } = await import("./custom-resource-runtime-CRy-dCjZ.js");
21599
+ const { invokeCustomResourceFunctionLocally } = await import("./custom-resource-runtime-CcClWTa-.js");
21015
21600
  const local = await invokeCustomResourceFunctionLocally({
21016
21601
  lambda: this.lambdaClient,
21017
21602
  s3: this.s3Client
21018
21603
  }, serviceToken, request);
21019
21604
  if (local !== void 0) return local;
21605
+ if (typeof request["LogicalResourceId"] === "string") noteSentToEmulatorRuntime(request["LogicalResourceId"]);
21020
21606
  }
21021
21607
  return await this.lambdaClient.send(new InvokeCommand({
21022
21608
  FunctionName: serviceToken,
@@ -24159,7 +24745,7 @@ async function ccRoutedInstanceTakesNoSnapshot(input) {
24159
24745
  if (resourceType !== "AWS::RDS::DBInstance") return false;
24160
24746
  if (region === void 0 || region === "") return false;
24161
24747
  const mask = input.mask ?? ((text) => text);
24162
- const { describeDBInstanceInRegion, isLiveReadReplica } = await import("./read-replica-C5e4xpYi.js").then((n) => n.l);
24748
+ const { describeDBInstanceInRegion, isLiveReadReplica } = await import("./read-replica-Bmq3NTlC.js").then((n) => n.l);
24163
24749
  let reason;
24164
24750
  try {
24165
24751
  const live = await describeDBInstanceInRegion(physicalId, region);
@@ -24239,7 +24825,11 @@ function maskedRecordRemedyFor(reads, resources, causeScoped = false) {
24239
24825
  { literal: "--force" }
24240
24826
  ]).command}`);
24241
24827
  }
24242
- if (withheld.length > 0) parts.push(`${causeScoped ? "If cause (3) applies, re-import" : "Re-import"} the record that HOLDS the mask for ${withheld.map(shown).join(", ")}, but the command is withheld: that is not a plain CloudFormation logical id, so a pasted cdkd import line could be reshaped by the shell or name a different resource. Read the id from 'cdkd state show' and quote it yourself, in cdkd import ${commandHole("stack")} --resource ${commandHole("id")}=${commandHole("physicalId")} --force.`);
24828
+ if (withheld.length > 0) parts.push(`${causeScoped ? "If cause (3) applies, re-import" : "Re-import"} the record that HOLDS the mask for ${withheld.map(shown).join(", ")}, but the command is withheld: that is not a plain CloudFormation logical id, so a pasted cdkd import line could be reshaped by the shell or name a different resource. Read the id from ${proseQuoted(cdkdRemedy("cdkd state show"))} and quote it yourself, in ${pasteableCommand("cdkd import", [
24829
+ { hole: "stack" },
24830
+ { literal: `--resource ${commandHole("id")}=${commandHole("physicalId")}` },
24831
+ { literal: "--force" }
24832
+ ]).command}.`);
24243
24833
  }
24244
24834
  if (unclearableTargets.length > 0) parts.push(`Do NOT re-import ${unclearableTargets.map(shown).join(", ")}: a custom resource's import records no attributes, so the masked bag is carried forward unchanged and the refusal repeats.` + (causeScoped ? ` Cause (1) above is the one that applies to it.` : ""));
24245
24835
  if (foreignReads.length > 0) {
@@ -24250,103 +24840,6 @@ function maskedRecordRemedyFor(reads, resources, causeScoped = false) {
24250
24840
  return [parts.join(" "), ...commandLines].join("\n");
24251
24841
  }
24252
24842
 
24253
- // src/provisioning/secret-physical-id.ts
24254
- const APPSYNC_APIKEY_ARN_RESOURCE_PATH = /^apis\/([^/|]+)\/apikeys?\/([^/|]+)$/;
24255
- const APPSYNC_ARN = /^arn:[^:]+:appsync:[^:]*:[^:]*:(.+)$/;
24256
- const SUBSTRING_FLOOR = 4;
24257
- function maskedSecretSegment(segment) {
24258
- return `****${segment.slice(-4)}`;
24259
- }
24260
- function secretPhysicalIdSegment(resourceType, physicalId) {
24261
- if (resourceType !== "AWS::AppSync::ApiKey") return void 0;
24262
- if (typeof physicalId !== "string" || physicalId === "") return void 0;
24263
- const parts = physicalId.split("|");
24264
- if (parts.length === 2 && parts[0] !== "" && parts[1] !== "") return parts[1];
24265
- const arn = APPSYNC_ARN.exec(physicalId);
24266
- const path = arn ? APPSYNC_APIKEY_ARN_RESOURCE_PATH.exec(arn[1]) : null;
24267
- if (path) return path[2];
24268
- return physicalId;
24269
- }
24270
- function maskSegmentsInText(text, segments) {
24271
- let out = text;
24272
- for (const segment of segments) {
24273
- if (out === segment) return maskedSecretSegment(segment);
24274
- if (segment.length >= SUBSTRING_FLOOR && out.includes(segment)) out = out.split(segment).join(maskedSecretSegment(segment));
24275
- }
24276
- return out;
24277
- }
24278
- function displayPhysicalId(resourceType, physicalId) {
24279
- const segment = secretPhysicalIdSegment(resourceType, physicalId);
24280
- if (segment === void 0 || typeof physicalId !== "string") return physicalId;
24281
- return maskSegmentsInText(physicalId, [segment]);
24282
- }
24283
- function maskSecretSegmentsDeep(value, segments) {
24284
- if (segments.length === 0) return value;
24285
- const ordered = [...new Set(segments)].sort((a, b) => b.length - a.length);
24286
- const walk = (v) => {
24287
- if (typeof v === "string") return maskSegmentsInText(v, ordered);
24288
- if (Array.isArray(v)) return v.map(walk);
24289
- if (v !== null && typeof v === "object") {
24290
- const out = {};
24291
- for (const [k, child] of Object.entries(v)) out[k] = walk(child);
24292
- return out;
24293
- }
24294
- return v;
24295
- };
24296
- return walk(value);
24297
- }
24298
- function segmentOfRecord(record) {
24299
- if (record === null || typeof record !== "object") return void 0;
24300
- const r = record;
24301
- return secretPhysicalIdSegment(r.resourceType, r.physicalId);
24302
- }
24303
- function stringLeavesOf(value, out = []) {
24304
- if (typeof value === "string") out.push(value);
24305
- else if (Array.isArray(value)) for (const v of value) stringLeavesOf(v, out);
24306
- else if (value !== null && typeof value === "object") for (const v of Object.values(value)) stringLeavesOf(v, out);
24307
- return out;
24308
- }
24309
- function secretNamedAttributeLeavesOf$1(record) {
24310
- if (record === null || typeof record !== "object") return [];
24311
- const r = record;
24312
- if (r.resourceType !== "AWS::CloudFormation::Stack") return [];
24313
- const names = r.secretNamedAttributes;
24314
- const attributes = r.attributes;
24315
- if (!Array.isArray(names) || attributes === null || typeof attributes !== "object") return [];
24316
- const leaves = [];
24317
- for (const name of names) {
24318
- if (typeof name !== "string" || !Object.hasOwn(attributes, name)) continue;
24319
- for (const leaf of stringLeavesOf(attributes[name])) if (leaf !== "" && leaf !== "***" && !leaf.includes("{{resolve:")) leaves.push(leaf);
24320
- }
24321
- return leaves;
24322
- }
24323
- function secretSegmentsOfState(state) {
24324
- if (state === null || typeof state !== "object") return [];
24325
- const s = state;
24326
- const segments = [];
24327
- const add = (record) => {
24328
- const segment = segmentOfRecord(record);
24329
- if (segment !== void 0) segments.push(segment);
24330
- };
24331
- if (s.resources !== null && typeof s.resources === "object" && !Array.isArray(s.resources)) for (const record of Object.values(s.resources)) {
24332
- add(record);
24333
- segments.push(...secretNamedAttributeLeavesOf$1(record));
24334
- }
24335
- for (const list of [s.orphans, s.supersededResources]) {
24336
- if (!Array.isArray(list)) continue;
24337
- for (const entry of list) {
24338
- if (entry === null || typeof entry !== "object") continue;
24339
- const record = entry.state;
24340
- add(record);
24341
- segments.push(...secretNamedAttributeLeavesOf$1(record));
24342
- }
24343
- }
24344
- return segments;
24345
- }
24346
- function withSecretPhysicalIdsMaskedInState(state, segments = secretSegmentsOfState(state)) {
24347
- return maskSecretSegmentsDeep(state, segments);
24348
- }
24349
-
24350
24843
  // src/types/deployment-events.ts
24351
24844
  function extractDeploymentEventError(err) {
24352
24845
  if (!(err instanceof Error)) return {
@@ -24442,7 +24935,7 @@ function skipUnaddressableReplay(scope, logger, op, what, source = "record") {
24442
24935
  recordRollbackSkip(scope, op, UNADDRESSABLE_JOURNAL_SKIP_CAUSE);
24443
24936
  return;
24444
24937
  }
24445
- logger.warn(safeMsg` Rollback: Cannot ${what} ${shownLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}) ` + "— its state record has no non-empty string 'physicalId', so cdkd cannot address it in AWS and sent nothing for it. The resource and its state record are left exactly as they are. Repair the record's 'physicalId' (inspect it with `cdkd state show`), then re-converge it with `cdkd deploy`.");
24938
+ logger.warn(safeMsg` Rollback: Cannot ${what} ${shownLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}) ` + "— its state record has no non-empty string 'physicalId', so cdkd cannot address it in AWS and sent nothing for it. The resource and its state record are left exactly as they are. Repair the record's 'physicalId' (inspect it with " + safeMsg`${proseQuoted(cdkdRemedy("cdkd state show"), "`")}), then re-converge it with ` + safeMsg`${proseQuoted(cdkdRemedy("cdkd deploy"), "`")}.`);
24446
24939
  recordRollbackSkip(scope, op, UNADDRESSABLE_SKIP_CAUSE);
24447
24940
  }
24448
24941
  async function keptForAnotherHolder(scope, logger, op, physicalId) {
@@ -24714,7 +25207,7 @@ function requireRestorableBaseline(bag, logger, { logicalId, consequence, remedy
24714
25207
  return false;
24715
25208
  }
24716
25209
  const shape = bag === null ? "null" : Array.isArray(bag) ? "an array" : `a ${typeof bag}`;
24717
- throw new CdkdError(`Cannot roll ${shownLogicalId(logicalId)} back: its recorded previous state has a \`properties\` field that is not a property bag (${shape}), so cdkd cannot tell what to restore it to. Replaying it would do one of two things, and cdkd does neither: send the malformed value to the provider as-is, or send an empty desired state (which would ${consequence}). The rollback JOURNAL record is kept: once that record holds a property bag again, ${retry}. Otherwise fix forward with \`cdkd deploy\`, or remove the stack with \`cdkd destroy\`.`, "ROLLBACK_UNUSABLE_BASELINE");
25210
+ throw new CdkdError(`Cannot roll ${shownLogicalId(logicalId)} back: its recorded previous state has a \`properties\` field that is not a property bag (${shape}), so cdkd cannot tell what to restore it to. Replaying it would do one of two things, and cdkd does neither: send the malformed value to the provider as-is, or send an empty desired state (which would ${consequence}). The rollback JOURNAL record is kept: once that record holds a property bag again, ${retry}. Otherwise fix forward with ${proseQuoted(cdkdRemedy("cdkd deploy"), "`")}, or remove the stack with ${proseQuoted(cdkdRemedy("cdkd destroy"), "`")}.`, "ROLLBACK_UNUSABLE_BASELINE");
24718
25211
  }
24719
25212
  function isRestorableBag(bag) {
24720
25213
  return typeof bag === "object" && bag !== null && !Array.isArray(bag);
@@ -25564,7 +26057,7 @@ function refuseRedactedAttributeReads(logicalId, resourceType, context) {
25564
26057
  const producers = [...new Set(reads.map((read) => read.logicalId).filter((id) => !!id))];
25565
26058
  throw new ProvisioningError(safeMsg`Cannot resolve ${reads.map((read) => read.display).join(", ")} for ${logicalId}: ` + safeMsg`${producers.map((id) => displayIdent(id)).join(", ")} declared ${reads.length === 1 ? "that attribute" : "those attributes"} NoEcho, ` + safeMsg`so cdkd's recorded state holds only the redaction mask for ${reads.length === 1 ? "it" : "them"}, ` + `and cdkd does not re-run a producer to recover a value. Remedy: deploy a change to the ` + safeMsg`producer in the SAME run as ${logicalId} (for a custom resource, change one of its ` + "properties, e.g. a nonce / version property, so its handler runs again and supplies the value), or stop declaring the value NoEcho.", resourceType, logicalId);
25566
26059
  }
25567
- throw new ProvisioningError(safeMsg`Cannot resolve ${reads.map((read) => read.display).join(", ")} for ${logicalId}: cdkd's recorded state holds only the ` + `redaction mask there, and the value is not recoverable from state. There are four ways a record comes to hold the mask. (1) A custom resource handler declared its response NoEcho: true — the value is generated by the handler, so cdkd has nothing to re-derive it from and must not write the literal mask to AWS. Remedies: force that custom resource to update (change one of its properties, e.g. a nonce / version property) so its handler runs again and supplies the value in this same run; or stop setting NoEcho on that response. If the value comes from ANOTHER stack, the producer and this stack must deploy in ONE run (cdkd deploy --all, or cdkd deploy '**' when either is inside a CDK Stage) with the producer's custom resource actually running — re-deploying the producer by itself does not help, because it re-masks the value on the way into its own state. (2) The value holds the Fn::Base64 encoding of a secret value (a {{resolve:...}} dynamic reference under Fn::Base64, such as EC2 UserData), which cdkd never records — so a deploy that leaves the resource or output holding it unchanged reads the mask again, and a re-import does not recover it. Remedy: have this resource build the value itself from the SECRET's own reference (the {{resolve:secretsmanager:...}} or {{resolve:ssm-secure:...}} reference, or a {{resolve:ssm:...}} of a SecureString parameter, that the encoding was made from) under its own Fn::Base64, instead of reading it from another resource's attribute or another stack's output — not by a {{resolve:ssm:...}} read of a String parameter holding the encoding, which cdkd treats as public and would record in state in the clear. (3) The resource is recorded through the Cloud Control fallback (by a deploy or by 'cdkd import'), which keeps in the clear only the Fn::GetAtt attributes it can vouch for and masks the rest. If the name above is not an Fn::GetAtt attribute CloudFormation accepts for that resource type, no record will ever hold it: stop reading it. If it is one, 'cdkd import' masked it because it could not vouch for the value, or could not read the schema and warned about it when it happened (if that warning named a missing cloudformation:DescribeType permission, grant it first); a deploy that creates or updates the resource records it, unless its value came from a secret. (4) Two secret values cdkd resolved overlap inside the value, so no single {{resolve:...}} reference renders it and cdkd stored the mask rather than part of a secret: change the producer's value (or rotate one of the secrets) so that they no longer overlap, and deploy the producer in the same run as this resource. See https://github.com/go-to-k/cdkd/issues/2449. ${DeployEngine.maskedRecordRemedyFor(reads, context.resources, true)}`, resourceType, logicalId);
26060
+ throw new ProvisioningError(safeMsg`Cannot resolve ${reads.map((read) => read.display).join(", ")} for ${logicalId}: cdkd's recorded state holds only the ` + `redaction mask there, and the value is not recoverable from state. There are four ways a record comes to hold the mask. (1) A custom resource handler declared its response NoEcho: true — the value is generated by the handler, so cdkd has nothing to re-derive it from and must not write the literal mask to AWS. Remedies: force that custom resource to update (change one of its properties, e.g. a nonce / version property) so its handler runs again and supplies the value in this same run; or stop setting NoEcho on that response. If the value comes from ANOTHER stack, the producer and this stack must deploy in ONE run (${cdkdRemedy("cdkd deploy", "--all")}, or ${cdkdRemedy("cdkd deploy", "'**'")} when either is inside a CDK Stage) with the producer's custom resource actually running — re-deploying the producer by itself does not help, because it re-masks the value on the way into its own state. (2) The value holds the Fn::Base64 encoding of a secret value (a {{resolve:...}} dynamic reference under Fn::Base64, such as EC2 UserData), which cdkd never records — so a deploy that leaves the resource or output holding it unchanged reads the mask again, and a re-import does not recover it. Remedy: have this resource build the value itself from the SECRET's own reference (the {{resolve:secretsmanager:...}} or {{resolve:ssm-secure:...}} reference, or a {{resolve:ssm:...}} of a SecureString parameter, that the encoding was made from) under its own Fn::Base64, instead of reading it from another resource's attribute or another stack's output — not by a {{resolve:ssm:...}} read of a String parameter holding the encoding, which cdkd treats as public and would record in state in the clear. (3) The resource is recorded through the Cloud Control fallback (by a deploy or by 'cdkd import'), which keeps in the clear only the Fn::GetAtt attributes it can vouch for and masks the rest. If the name above is not an Fn::GetAtt attribute CloudFormation accepts for that resource type, no record will ever hold it: stop reading it. If it is one, 'cdkd import' masked it because it could not vouch for the value, or could not read the schema and warned about it when it happened (if that warning named a missing cloudformation:DescribeType permission, grant it first); a deploy that creates or updates the resource records it, unless its value came from a secret. (4) Two secret values cdkd resolved overlap inside the value, so no single {{resolve:...}} reference renders it and cdkd stored the mask rather than part of a secret: change the producer's value (or rotate one of the secrets) so that they no longer overlap, and deploy the producer in the same run as this resource. See https://github.com/go-to-k/cdkd/issues/2449. ${DeployEngine.maskedRecordRemedyFor(reads, context.resources, true)}`, resourceType, logicalId);
25568
26061
  }
25569
26062
 
25570
26063
  // src/deployment/deploy-engine/masking.ts
@@ -25811,8 +26304,8 @@ async function verifyRestoreSourceIdentity(input) {
25811
26304
  if (input.resourceType !== "AWS::RDS::DBCluster") return;
25812
26305
  const source = input.properties["SourceDbClusterResourceId"];
25813
26306
  if (typeof source !== "string" || source === "") return;
25814
- const recorded = input.attributes?.["DBClusterResourceId"];
25815
- if (typeof recorded === "string" && recorded !== "") return;
26307
+ const recordedValue = input.attributes?.["DBClusterResourceId"];
26308
+ const recorded = typeof recordedValue === "string" && recordedValue !== "" ? recordedValue : void 0;
25816
26309
  const refuse = (reason) => {
25817
26310
  throw markNonRetryable(new ProvisioningError(safeMsg`${input.resourceType} ${input.logicalId}: ${reason}; nothing was changed.`, input.resourceType, input.logicalId, input.physicalId));
25818
26311
  };
@@ -25836,8 +26329,9 @@ async function verifyRestoreSourceIdentity(input) {
25836
26329
  } catch (error) {
25837
26330
  failure = `the read failed (${error?.name ?? "Error"})`;
25838
26331
  }
25839
- if (typeof liveId !== "string" || liveId === "") return refuse(`SourceDbClusterResourceId may name the cluster this replacement deletes first, and its identity could not be verified (${failure || "no resource id was read"}). Name the source with SourceDBClusterIdentifier instead, or retry`);
25840
- if (liveId.toLowerCase() === source.toLowerCase()) refuse("SourceDbClusterResourceId must be another cluster's than the one this replaces");
26332
+ const own = [recorded, typeof liveId === "string" && liveId !== "" ? liveId : void 0];
26333
+ if (own.some((id) => id !== void 0 && id.toLowerCase() === source.toLowerCase())) refuse("SourceDbClusterResourceId must be another cluster's than the one this replaces");
26334
+ if (own[1] === void 0 && recorded === void 0) refuse(`SourceDbClusterResourceId may name the cluster this replacement deletes first, and its identity could not be verified (${failure || "no resource id was read"}). Name the source with SourceDBClusterIdentifier instead, or retry`);
25841
26335
  }
25842
26336
  async function verifyInstancePointInTimeSource(input) {
25843
26337
  const nonEmpty = (key) => {
@@ -25849,15 +26343,21 @@ async function verifyInstancePointInTimeSource(input) {
25849
26343
  const backupsRegion = declaredBackups?.split(":")[3];
25850
26344
  const backups = declaredBackups !== void 0 && (backupsRegion === void 0 || backupsRegion === "" || backupsRegion === input.region) ? declaredBackups : void 0;
25851
26345
  if (resourceId === void 0 && backups === void 0) return;
25852
- const recorded = input.attributes?.["DbiResourceId"];
25853
- if (backups === void 0 && typeof recorded === "string" && recorded !== "") return;
26346
+ const recordedValue = input.attributes?.["DbiResourceId"];
26347
+ const recorded = typeof recordedValue === "string" && recordedValue !== "" ? recordedValue : void 0;
25854
26348
  const key = backups !== void 0 ? "SourceDBInstanceAutomatedBackupsArn" : "SourceDbiResourceId";
25855
26349
  const refuse = (reason) => {
25856
26350
  throw markNonRetryable(new ProvisioningError(safeMsg`${input.resourceType} ${input.logicalId}: ${reason}; nothing was changed.`, input.resourceType, input.logicalId, input.physicalId));
25857
26351
  };
25858
26352
  const unverified = (failure) => refuse(`${key} may name the DB instance this replacement deletes first, and its identity could not be verified (${failure}). Name the source with SourceDBInstanceIdentifier instead, or retry`);
25859
26353
  const provider = input.provider();
25860
- if (provider?.resourceIdentity === void 0) return unverified("no provider can read it");
26354
+ if (provider?.resourceIdentity === void 0) {
26355
+ if (recorded !== void 0 && backups === void 0) {
26356
+ if (resourceId !== void 0 && resourceId.toLowerCase() === recorded.toLowerCase()) refuse("SourceDbiResourceId must be another DB instance's than the one this replaces");
26357
+ return;
26358
+ }
26359
+ return unverified("no provider can read it");
26360
+ }
25861
26361
  const read = provider.resourceIdentity.bind(provider);
25862
26362
  const identity = async (id) => {
25863
26363
  let answer;
@@ -25869,17 +26369,22 @@ async function verifyInstancePointInTimeSource(input) {
25869
26369
  if (answer === void 0 || answer === "") return unverified("no resource id was read");
25870
26370
  return answer;
25871
26371
  };
25872
- let own = typeof recorded === "string" && recorded !== "" ? recorded : void 0;
25873
- if (own === void 0) {
25874
- const live = await identity(input.physicalId);
26372
+ let live;
26373
+ if (recorded === void 0) {
26374
+ live = await identity(input.physicalId);
25875
26375
  if (live === RESOURCE_NOT_FOUND) return unverified("it was not found");
25876
- own = live;
26376
+ } else try {
26377
+ const answer = await read(input.physicalId, input.resourceType, { expectedRegion: input.region });
26378
+ live = answer === "" ? void 0 : answer;
26379
+ } catch {
26380
+ live = void 0;
25877
26381
  }
25878
- if (resourceId !== void 0 && resourceId.toLowerCase() === own.toLowerCase()) refuse("SourceDbiResourceId must be another DB instance's than the one this replaces");
26382
+ const own = [recorded, live === RESOURCE_NOT_FOUND ? void 0 : live].filter((id) => id !== void 0);
26383
+ if (resourceId !== void 0 && own.some((id) => id.toLowerCase() === resourceId.toLowerCase())) refuse("SourceDbiResourceId must be another DB instance's than the one this replaces");
25879
26384
  if (backups !== void 0) {
25880
26385
  const owner = await identity(backups);
25881
26386
  if (owner === RESOURCE_NOT_FOUND) refuse("SourceDBInstanceAutomatedBackupsArn names no automated backup this account can read, so the restore after the delete would fail");
25882
- if (owner !== RESOURCE_NOT_FOUND && owner.toLowerCase() === own.toLowerCase()) refuse("SourceDBInstanceAutomatedBackupsArn must name another DB instance's automated backups than the one this replaces");
26387
+ if (owner !== RESOURCE_NOT_FOUND && own.some((id) => id.toLowerCase() === owner.toLowerCase())) refuse("SourceDBInstanceAutomatedBackupsArn must name another DB instance's automated backups than the one this replaces");
25883
26388
  }
25884
26389
  }
25885
26390
 
@@ -26071,7 +26576,7 @@ function generatedReplacementHolderAdvice(input) {
26071
26576
  const old = displaySafe(input.mask(input.oldPhysicalId), { asciiOnly: true });
26072
26577
  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, `;
26073
26578
  const tail = `, or delete it and re-run the deploy.`;
26074
- if (input.stackName.includes("~")) return lead + `adopt it through the top-level stack with \`cdkd import\` (then delete ${old} by hand)` + tail;
26579
+ if (input.stackName.includes("~")) return lead + `adopt it through the top-level stack with ${proseQuoted(cdkdRemedy("cdkd import"), "`")} (then delete ${old} by hand)` + tail;
26075
26580
  const adopt = pasteableCommand("cdkd import", [{
26076
26581
  value: input.stackName,
26077
26582
  hole: "stack"
@@ -26081,7 +26586,7 @@ function generatedReplacementHolderAdvice(input) {
26081
26586
  hole: "logicalId=physicalId"
26082
26587
  }]);
26083
26588
  const command = input.mask(adopt.command) === adopt.command ? adopt.command : void 0;
26084
- return lead + (command === void 0 ? `adopt it with \`cdkd import\`` : `adopt it with \`${command}\` (using its physical id where the type records another)`) + ` and then delete ${old} by hand` + tail;
26589
+ return lead + (command === void 0 ? `adopt it with ${proseQuoted(cdkdRemedy("cdkd import"), "`")}` : `adopt it with ${proseQuoted(command, "`")} (using its physical id where the type records another)`) + ` and then delete ${old} by hand` + tail;
26085
26590
  }
26086
26591
  function orphanedNameCollisionAdvice(providerRegistry, changeType, logicalId, error) {
26087
26592
  if (changeType !== "CREATE") return void 0;
@@ -27420,7 +27925,7 @@ var ReplayResolvers = class {
27420
27925
  };
27421
27926
  function regionAmbiguousReplaySecretError(logicalId, propertyPath, secretName, foreignProducerRegions, consumerRegion, execCtx) {
27422
27927
  const where = propertyPath === "" ? "" : ` property ${quotedPlainOr(propertyPath, "property path")}`;
27423
- const error = new CdkdError(`Rollback of ${shownLogicalId(logicalId)}${where} cannot re-resolve the secret reference ${quotedPlainOr(secretName, "secret name")}: the reference carries no region of its own, and this stack read across a region boundary (producer region(s) on record: ${foreignProducerRegions.map((r) => plainOrDescribed(r, "region")).join(", ")}), so it may have been resolved in one of those rather than in ${quotedOrDescribed(consumerRegion, "region")}. A secret of the same name in two regions is two independent values, so replaying this would write the WRONG secret to a live resource. Refusing instead. Resolve the reference in its own region and set the property directly (or spell it as a full ARN, which names its region and is resolved there), then re-run ${rerunRollbackPhrase(execCtx, "'cdkd rollback'")}.`, "ROLLBACK_SECRET_REGION_AMBIGUOUS");
27928
+ const error = new CdkdError(`Rollback of ${shownLogicalId(logicalId)}${where} cannot re-resolve the secret reference ${quotedPlainOr(secretName, "secret name")}: the reference carries no region of its own, and this stack read across a region boundary (producer region(s) on record: ${foreignProducerRegions.map((r) => plainOrDescribed(r, "region")).join(", ")}), so it may have been resolved in one of those rather than in ${quotedOrDescribed(consumerRegion, "region")}. A secret of the same name in two regions is two independent values, so replaying this would write the WRONG secret to a live resource. Refusing instead. Resolve the reference in its own region and set the property directly (or spell it as a full ARN, which names its region and is resolved there), then re-run ${rerunRollbackPhrase(execCtx, proseQuoted(cdkdRemedy("cdkd rollback")))}.`, "ROLLBACK_SECRET_REGION_AMBIGUOUS");
27424
27929
  return markNonRetryable(error);
27425
27930
  }
27426
27931
  function refuseUnprovenReplaySecret(leaf, propertyPath, logicalId, execCtx, recordedRegions) {
@@ -27433,7 +27938,7 @@ function refuseUnprovenReplaySecret(leaf, propertyPath, logicalId, execCtx, reco
27433
27938
  }
27434
27939
  function regionUnknownReplaySecretError(logicalId, propertyPath, secretName, consumerRegion, execCtx) {
27435
27940
  const where = propertyPath === "" ? "" : ` property ${quotedPlainOr(propertyPath, "property path")}`;
27436
- return new CdkdError(`Rollback of ${shownLogicalId(logicalId)}${where} cannot re-resolve the secret reference ${quotedPlainOr(secretName, "secret name")}: the reference carries no region of its own, and this is a nested stack, and the cross-region reads its parent made are not known to this replay, so the parent may have resolved it in another region than ${quotedOrDescribed(consumerRegion, "region")}. A secret of the same name in two regions is two independent values, so replaying this could write the WRONG secret to a live resource. Refusing instead. Where the journal of the top-level stack still holds this run, roll back the top-level stack instead, which supplies its regions. Otherwise resolve the reference in its own region and set the property directly (or spell it as a full ARN, which names its region and is resolved there), then re-run ${rerunRollbackPhrase(execCtx, "'cdkd rollback'")}.`, "ROLLBACK_SECRET_REGION_AMBIGUOUS");
27941
+ return new CdkdError(`Rollback of ${shownLogicalId(logicalId)}${where} cannot re-resolve the secret reference ${quotedPlainOr(secretName, "secret name")}: the reference carries no region of its own, and this is a nested stack, and the cross-region reads its parent made are not known to this replay, so the parent may have resolved it in another region than ${quotedOrDescribed(consumerRegion, "region")}. A secret of the same name in two regions is two independent values, so replaying this could write the WRONG secret to a live resource. Refusing instead. Where the journal of the top-level stack still holds this run, roll back the top-level stack instead, which supplies its regions. Otherwise resolve the reference in its own region and set the property directly (or spell it as a full ARN, which names its region and is resolved there), then re-run ${rerunRollbackPhrase(execCtx, proseQuoted(cdkdRemedy("cdkd rollback")))}.`, "ROLLBACK_SECRET_REGION_AMBIGUOUS");
27437
27942
  }
27438
27943
  async function resolveLeafByRegion(leaf, propertyPath, logicalId, execCtx, resolvers, resolverContext, recordedRegions) {
27439
27944
  const verdicts = dynamicReferenceTokens(leaf).map((token) => [token, classifyRecordedSecretRegion(token, execCtx.region, execCtx.importedProducerRegions, recordedRegions)]);
@@ -27762,7 +28267,7 @@ async function journaledOrphanKeepReason(op, foreignHolder, ctx) {
27762
28267
  keep: `${holding.by} holds a resource of that type under the same physical id now`,
27763
28268
  finish: "it now belongs to that stack: leave it to that stack"
27764
28269
  };
27765
- if (holding?.kind === "unreadable") return { retry: `${holding.what} leaves open whether another stack holds it now; once that record can be read (re-deploy or inspect it with \`cdkd state show\`, or retry when the bucket is reachable), re-run` };
28270
+ if (holding?.kind === "unreadable") return { retry: `${holding.what} leaves open whether another stack holds it now; once that record can be read (re-deploy or inspect it with ${proseQuoted(cdkdRemedy("cdkd state show"), "`")}, or retry when the bucket is reachable), re-run` };
27766
28271
  const created = await createdResourceStillThere(op, ctx);
27767
28272
  if (created === "gone") return "gone";
27768
28273
  if (created === "mismatch") return { keep: "the resource now under that id is another one (its identity differs from the one the failed deploy recorded, so its name was reused)" };
@@ -27948,7 +28453,7 @@ async function restoreHeldInlinePolicies(writers, stateResources, stackName, ctx
27948
28453
  async function restoreOne({ kind, holders, unreadable, unsettled }, stateResources, stackName, ctx, result, refuseAll) {
27949
28454
  const { logger } = ctx;
27950
28455
  const ids = [...new Set(holders.map((h) => h.logicalId))].map((id) => safe(id)).join(", ");
27951
- const lost = safeMsg`the ${kind} it is on lacks that inline policy until the resource is next updated, or ` + `'cdkd drift <stack> --revert' restores it`;
28456
+ const lost = safeMsg`the ${kind} it is on lacks that inline policy until the resource is next updated, or ` + safeMsg`${proseQuoted(pasteableCommand("cdkd drift", [{ hole: "stack" }, { literal: "--revert" }]).command)} restores it`;
27952
28457
  if (refuseAll || unsettled.length > 0) {
27953
28458
  const pending = refuseAll ? ids : unsettled.map((id) => safe(id)).join(", ");
27954
28459
  logger.warn(safeMsg` Rollback: an inline policy this rollback removed is recorded by ${ids}, but the ` + safeMsg`rollback of ${pending} has not completed, so that record may be the failed ` + safeMsg`deploy's and cdkd did not put it back; ${lost}.`);
@@ -28107,7 +28612,7 @@ function resolveReplacementOldType(op) {
28107
28612
  }
28108
28613
  function unroutableReplacementError(op, reason, remedyCtx) {
28109
28614
  const remedy = orphanRemedy(op.logicalId, remedyCtx);
28110
- return ownRemedyError(markNonRetryable(new CdkdError(`Cannot reverse the replacement of ${refusalLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}): ${reason}, so cdkd will not guess which provider re-creates the old resource. Nothing was changed. The journal is kept: fix forward with cdkd deploy` + (remedy.offered ? ", or leave this resource as it is and let the rest of the rollback proceed by re-running with the command below." : ".") + `${remedy.clause}${remedy.line}`, "ROLLBACK_REPLACEMENT_UNROUTABLE")));
28615
+ return ownRemedyError(markNonRetryable(new CdkdError(`Cannot reverse the replacement of ${refusalLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}): ${reason}, so cdkd will not guess which provider re-creates the old resource. Nothing was changed. The journal is kept: fix forward with ${cdkdRemedy("cdkd deploy")}` + (remedy.offered ? ", or leave this resource as it is and let the rest of the rollback proceed by re-running with the command below." : ".") + `${remedy.clause}${remedy.line}`, "ROLLBACK_REPLACEMENT_UNROUTABLE")));
28111
28616
  }
28112
28617
  function isTypeChangeOp(op) {
28113
28618
  const { stamped, recorded } = journaledOldTypes(op);
@@ -28225,6 +28730,292 @@ function withPreviousPolicies(current, previous) {
28225
28730
  };
28226
28731
  }
28227
28732
 
28733
+ // src/analyzer/implicit-delete-deps.ts
28734
+ const IMPLICIT_DELETE_DEPENDENCIES = {
28735
+ "AWS::EC2::InternetGateway": ["AWS::EC2::VPCGatewayAttachment", "AWS::EC2::NatGateway"],
28736
+ "AWS::EC2::VPCGatewayAttachment": ["AWS::EC2::NatGateway"],
28737
+ "AWS::Events::EventBus": ["AWS::Events::Rule"],
28738
+ "AWS::Athena::WorkGroup": ["AWS::Athena::NamedQuery"],
28739
+ "AWS::CloudFront::ResponseHeadersPolicy": ["AWS::CloudFront::Distribution"],
28740
+ "AWS::CloudFront::CachePolicy": ["AWS::CloudFront::Distribution"],
28741
+ "AWS::CloudFront::OriginAccessControl": ["AWS::CloudFront::Distribution"],
28742
+ "AWS::EC2::VPC": [
28743
+ "AWS::EC2::Subnet",
28744
+ "AWS::EC2::SecurityGroup",
28745
+ "AWS::EC2::InternetGateway",
28746
+ "AWS::EC2::EgressOnlyInternetGateway",
28747
+ "AWS::EC2::VPCGatewayAttachment",
28748
+ "AWS::EC2::RouteTable"
28749
+ ],
28750
+ "AWS::EC2::Subnet": ["AWS::EC2::SubnetRouteTableAssociation", "AWS::Lambda::Function"],
28751
+ "AWS::EC2::RouteTable": ["AWS::EC2::Route", "AWS::EC2::SubnetRouteTableAssociation"],
28752
+ "AWS::EC2::SecurityGroup": [
28753
+ "AWS::EC2::SecurityGroupIngress",
28754
+ "AWS::EC2::SecurityGroupEgress",
28755
+ "AWS::Lambda::Function"
28756
+ ]
28757
+ };
28758
+ const ALARM_RULE_FUNCTION_REGEX = /\b(?:ALARM|OK|INSUFFICIENT_DATA)\s*\(\s*([^)]*?)\s*\)/gi;
28759
+ function extractReferencedAlarmNames(alarmRule) {
28760
+ const names = /* @__PURE__ */ new Set();
28761
+ for (const match of alarmRule.matchAll(ALARM_RULE_FUNCTION_REGEX)) {
28762
+ let arg = (match[1] ?? "").trim();
28763
+ if (arg.length === 0) continue;
28764
+ if (arg.startsWith("\"") && arg.endsWith("\"") || arg.startsWith("'") && arg.endsWith("'")) arg = arg.slice(1, -1);
28765
+ if (arg.length === 0) continue;
28766
+ const arnAlarmMatch = /:alarm:(.+)$/.exec(arg);
28767
+ if (arnAlarmMatch?.[1]) names.add(arnAlarmMatch[1]);
28768
+ else names.add(arg);
28769
+ }
28770
+ return [...names];
28771
+ }
28772
+ function computeImplicitDeleteEdges(resources) {
28773
+ const edges = [];
28774
+ const alarmTypes = /* @__PURE__ */ new Set(["AWS::CloudWatch::Alarm", "AWS::CloudWatch::CompositeAlarm"]);
28775
+ const nameToLogicalId = /* @__PURE__ */ new Map();
28776
+ for (const [logicalId, resource] of Object.entries(resources)) {
28777
+ if (!alarmTypes.has(resource.resourceType)) continue;
28778
+ const alarmName = typeof resource.properties?.["AlarmName"] === "string" ? resource.properties["AlarmName"] : resource.physicalId;
28779
+ if (alarmName) nameToLogicalId.set(alarmName, logicalId);
28780
+ }
28781
+ for (const [logicalId, resource] of Object.entries(resources)) {
28782
+ if (resource.resourceType !== "AWS::CloudWatch::CompositeAlarm") continue;
28783
+ const alarmRule = resource.properties?.["AlarmRule"];
28784
+ if (typeof alarmRule !== "string") continue;
28785
+ for (const referencedName of extractReferencedAlarmNames(alarmRule)) {
28786
+ const referencedLogicalId = nameToLogicalId.get(referencedName);
28787
+ if (!referencedLogicalId || referencedLogicalId === logicalId) continue;
28788
+ edges.push({
28789
+ before: logicalId,
28790
+ after: referencedLogicalId
28791
+ });
28792
+ }
28793
+ }
28794
+ return edges;
28795
+ }
28796
+
28797
+ // src/deployment/dag-executor.ts
28798
+ var DagExecutor = class {
28799
+ nodes = /* @__PURE__ */ new Map();
28800
+ logger = getLogger().child("DagExecutor");
28801
+ priorityById = null;
28802
+ timingScope;
28803
+ constructor(timingScope) {
28804
+ this.timingScope = timingScope;
28805
+ }
28806
+ add(node) {
28807
+ this.nodes.set(node.id, node);
28808
+ }
28809
+ computePriorities() {
28810
+ if (this.priorityById) return this.priorityById;
28811
+ const dependentsOf = /* @__PURE__ */ new Map();
28812
+ for (const node of this.nodes.values()) for (const depId of node.dependencies) {
28813
+ if (!this.nodes.has(depId)) continue;
28814
+ let set = dependentsOf.get(depId);
28815
+ if (!set) {
28816
+ set = /* @__PURE__ */ new Set();
28817
+ dependentsOf.set(depId, set);
28818
+ }
28819
+ set.add(node.id);
28820
+ }
28821
+ const memo = /* @__PURE__ */ new Map();
28822
+ const visiting = /* @__PURE__ */ new Set();
28823
+ const collect = (id) => {
28824
+ const cached = memo.get(id);
28825
+ if (cached) return cached;
28826
+ const acc = /* @__PURE__ */ new Set();
28827
+ if (visiting.has(id)) return acc;
28828
+ visiting.add(id);
28829
+ for (const dependent of dependentsOf.get(id) ?? []) {
28830
+ acc.add(dependent);
28831
+ for (const t of collect(dependent)) acc.add(t);
28832
+ }
28833
+ visiting.delete(id);
28834
+ memo.set(id, acc);
28835
+ return acc;
28836
+ };
28837
+ const priorities = /* @__PURE__ */ new Map();
28838
+ for (const id of this.nodes.keys()) priorities.set(id, collect(id).size);
28839
+ this.priorityById = priorities;
28840
+ return priorities;
28841
+ }
28842
+ has(id) {
28843
+ return this.nodes.has(id);
28844
+ }
28845
+ size() {
28846
+ return this.nodes.size;
28847
+ }
28848
+ values() {
28849
+ return this.nodes.values();
28850
+ }
28851
+ async execute(concurrency, fn, cancelled = () => false) {
28852
+ let active = 0;
28853
+ const errors = [];
28854
+ const priority = this.computePriorities();
28855
+ const timingScope = phaseTimingsEnabled() ? this.timingScope : void 0;
28856
+ const readySince = /* @__PURE__ */ new Map();
28857
+ return new Promise((resolve, reject) => {
28858
+ const dispatch = () => {
28859
+ let changed = true;
28860
+ while (changed) {
28861
+ changed = false;
28862
+ for (const node of this.nodes.values()) {
28863
+ if (node.state !== "pending") continue;
28864
+ if ([...node.dependencies].some((depId) => {
28865
+ const dep = this.nodes.get(depId);
28866
+ return dep && (dep.state === "failed" || dep.state === "skipped");
28867
+ })) {
28868
+ node.state = "skipped";
28869
+ changed = true;
28870
+ this.logger.debug(`Skipped ${node.id}: dependency failed or was skipped`);
28871
+ }
28872
+ }
28873
+ }
28874
+ const ready = [];
28875
+ for (const node of this.nodes.values()) {
28876
+ if (node.state !== "pending") continue;
28877
+ if ([...node.dependencies].every((depId) => {
28878
+ const dep = this.nodes.get(depId);
28879
+ return !dep || dep.state === "completed";
28880
+ })) ready.push(node);
28881
+ }
28882
+ ready.sort((a, b) => (priority.get(b.id) ?? 0) - (priority.get(a.id) ?? 0));
28883
+ if (timingScope !== void 0) {
28884
+ const now = performance.now();
28885
+ for (const node of ready) if (!readySince.has(node.id)) readySince.set(node.id, now);
28886
+ }
28887
+ if (!cancelled()) for (const node of ready) {
28888
+ if (active >= concurrency) break;
28889
+ node.state = "running";
28890
+ active++;
28891
+ if (timingScope !== void 0) recordPhase(timingScope, "ready, waiting for a --concurrency slot", performance.now() - (readySince.get(node.id) ?? performance.now()), node.id);
28892
+ fn(node).then(() => {
28893
+ node.state = "completed";
28894
+ }).catch((error) => {
28895
+ node.state = "failed";
28896
+ errors.push({
28897
+ id: node.id,
28898
+ error
28899
+ });
28900
+ }).finally(() => {
28901
+ active--;
28902
+ dispatch();
28903
+ });
28904
+ }
28905
+ if (active === 0) {
28906
+ if (errors.length > 0) {
28907
+ reject(errors[0].error);
28908
+ return;
28909
+ }
28910
+ if ([...this.nodes.values()].some((n) => n.state === "pending") && !cancelled()) {
28911
+ const pending = [...this.nodes.values()].filter((n) => n.state === "pending").map((n) => n.id);
28912
+ reject(/* @__PURE__ */ new Error(`Deadlock detected: ${pending.length} node(s) stuck with unresolvable dependencies (${pending.join(", ")})`));
28913
+ return;
28914
+ }
28915
+ resolve();
28916
+ }
28917
+ };
28918
+ dispatch();
28919
+ });
28920
+ }
28921
+ };
28922
+
28923
+ // src/deployment/deploy-engine/dependencies.ts
28924
+ function hasPending(executor) {
28925
+ for (const node of executor.values()) if (node.state === "pending") return true;
28926
+ return false;
28927
+ }
28928
+ function nearestMemberDependencies(ids, dependenciesOf, isMember) {
28929
+ const through = /* @__PURE__ */ new Map();
28930
+ const visiting = /* @__PURE__ */ new Set();
28931
+ let guardHits = 0;
28932
+ const collect = (deps, into) => {
28933
+ for (const dep of deps) {
28934
+ if (isMember(dep)) {
28935
+ into.add(dep);
28936
+ continue;
28937
+ }
28938
+ for (const reached of membersBehind(dep)) into.add(reached);
28939
+ }
28940
+ };
28941
+ const membersBehind = (id) => {
28942
+ const cached = through.get(id);
28943
+ if (cached) return cached;
28944
+ const reached = /* @__PURE__ */ new Set();
28945
+ if (visiting.has(id)) {
28946
+ guardHits++;
28947
+ return reached;
28948
+ }
28949
+ const hitsBefore = guardHits;
28950
+ visiting.add(id);
28951
+ collect(dependenciesOf(id), reached);
28952
+ visiting.delete(id);
28953
+ if (guardHits === hitsBefore) through.set(id, reached);
28954
+ return reached;
28955
+ };
28956
+ const result = /* @__PURE__ */ new Map();
28957
+ for (const id of ids) {
28958
+ const reached = /* @__PURE__ */ new Set();
28959
+ collect(dependenciesOf(id), reached);
28960
+ reached.delete(id);
28961
+ result.set(id, reached);
28962
+ }
28963
+ return result;
28964
+ }
28965
+ function recordedDependencies(resources) {
28966
+ return (id) => {
28967
+ const deps = Object.hasOwn(resources, id) ? resources[id]?.dependencies : void 0;
28968
+ return Array.isArray(deps) ? deps.filter((d) => typeof d === "string") : [];
28969
+ };
28970
+ }
28971
+ function buildDeletionDependencies(deleteIds, state, logger) {
28972
+ const dependedBy = /* @__PURE__ */ new Map();
28973
+ for (const id of deleteIds) dependedBy.set(id, /* @__PURE__ */ new Set());
28974
+ const nearest = nearestMemberDependencies(deleteIds, recordedDependencies(state.resources), (d) => deleteIds.has(d));
28975
+ for (const [id, deps] of nearest) for (const dep of deps) dependedBy.get(dep).add(id);
28976
+ addImplicitDeleteDependencies(deleteIds, state, dependedBy, logger);
28977
+ return dependedBy;
28978
+ }
28979
+ function addImplicitDeleteDependencies(deleteIds, state, dependedBy, logger) {
28980
+ const typeToIds = /* @__PURE__ */ new Map();
28981
+ for (const id of deleteIds) {
28982
+ const resource = state.resources[id];
28983
+ if (!resource) continue;
28984
+ const ids = typeToIds.get(resource.resourceType) ?? [];
28985
+ ids.push(id);
28986
+ typeToIds.set(resource.resourceType, ids);
28987
+ }
28988
+ for (const id of deleteIds) {
28989
+ const resource = state.resources[id];
28990
+ if (!resource) continue;
28991
+ const mustDeleteAfter = IMPLICIT_DELETE_DEPENDENCIES[resource.resourceType];
28992
+ if (!mustDeleteAfter) continue;
28993
+ for (const depType of mustDeleteAfter) {
28994
+ const depIds = typeToIds.get(depType);
28995
+ if (!depIds) continue;
28996
+ for (const depId of depIds) {
28997
+ if (!dependedBy.has(id)) dependedBy.set(id, /* @__PURE__ */ new Set());
28998
+ if (!dependedBy.get(id).has(depId)) {
28999
+ dependedBy.get(id).add(depId);
29000
+ logger.debug(safeMsg`Implicit delete dependency: ${depId} (${depType}) must be deleted before ${id} (${resource.resourceType})`);
29001
+ }
29002
+ }
29003
+ }
29004
+ }
29005
+ const scoped = {};
29006
+ for (const id of deleteIds) {
29007
+ const resource = state.resources[id];
29008
+ if (resource) scoped[id] = resource;
29009
+ }
29010
+ for (const { before, after } of computeImplicitDeleteEdges(scoped)) {
29011
+ if (!dependedBy.has(after)) dependedBy.set(after, /* @__PURE__ */ new Set());
29012
+ if (!dependedBy.get(after).has(before)) {
29013
+ dependedBy.get(after).add(before);
29014
+ logger.debug(safeMsg`Implicit delete dependency: ${before} (${scoped[before]?.resourceType}) must be deleted before ${after} (${scoped[after]?.resourceType})`);
29015
+ }
29016
+ }
29017
+ }
29018
+
28228
29019
  // src/deployment/rollback-executor/plan/failed-ops.ts
28229
29020
  function failedCreateRecordedNoPhysicalId(op) {
28230
29021
  return op.changeType === "CREATE" && !op.physicalId;
@@ -28493,14 +29284,10 @@ function sortRollbackCreates(createOps, stateResources, logger) {
28493
29284
  }
28494
29285
  const dependedBy = /* @__PURE__ */ new Map();
28495
29286
  for (const id of deleteIds) if (!dependedBy.has(id)) dependedBy.set(id, /* @__PURE__ */ new Set());
28496
- for (const id of deleteIds) {
28497
- const resource = stateResources[id];
28498
- if (!resource?.dependencies) continue;
28499
- for (const dep of resource.dependencies) {
28500
- if (!deleteIds.has(dep)) continue;
28501
- if (!dependedBy.has(dep)) dependedBy.set(dep, /* @__PURE__ */ new Set());
28502
- dependedBy.get(dep).add(id);
28503
- }
29287
+ const nearest = nearestMemberDependencies(deleteIds, recordedDependencies(stateResources), (d) => deleteIds.has(d));
29288
+ for (const [id, deps] of nearest) for (const dep of deps) {
29289
+ if (!dependedBy.has(dep)) dependedBy.set(dep, /* @__PURE__ */ new Set());
29290
+ dependedBy.get(dep).add(id);
28504
29291
  }
28505
29292
  const sorted = [];
28506
29293
  let remaining = new Set(deleteIds);
@@ -29042,14 +29829,14 @@ function shownPaths(coordinates) {
29042
29829
  }
29043
29830
  function unreadableNoEchoLeafRefusal(logicalId, coordinates, failure) {
29044
29831
  const why = failure === "read-failed" ? "reading the resource back from AWS failed, so cdkd could not learn the value AWS holds there (re-running the rollback retries the read)" : "cdkd cannot read the value AWS holds there (the property is write-only, AWS does not return it, or cdkd has no readback for this resource type)";
29045
- return markNonRetryable(new CdkdError(`Cannot roll ${shownLogicalId(logicalId)} back: its recorded baseline holds a NoEcho value only as the redaction mask ('${"***"}') at ${shownPaths(coordinates)}, and ${why}. cdkd sent nothing rather than write the mask to the live resource. Restore the property with 'cdkd deploy', which sends the NoEcho parameter's value again (a NoEcho attribute of a custom resource is sent again only when that custom resource updates in the same deploy).`, "ROLLBACK_REDACTED_BASELINE"));
29832
+ return markNonRetryable(new CdkdError(`Cannot roll ${shownLogicalId(logicalId)} back: its recorded baseline holds a NoEcho value only as the redaction mask ('${"***"}') at ${shownPaths(coordinates)}, and ${why}. cdkd sent nothing rather than write the mask to the live resource. Restore the property with ${proseQuoted(cdkdRemedy("cdkd deploy"))}, which sends the NoEcho parameter's value again (a NoEcho attribute of a custom resource is sent again only when that custom resource updates in the same deploy).`, "ROLLBACK_REDACTED_BASELINE"));
29046
29833
  }
29047
29834
  function refuseMarkedNoEchoRecreate(props, marked, logicalId) {
29048
29835
  if (props === void 0 || marked === void 0 || marked.length === 0) return;
29049
29836
  const masked = maskedLeafCoordinatesOf(props);
29050
29837
  if (masked.length === 0 || !masksOnlyAt(props, marked)) return;
29051
29838
  const shown = marked.filter((outer) => masked.some((inner) => isMarkedCoordinate(inner, [outer])));
29052
- throw new CdkdError(`Cannot re-create ${shownLogicalId(logicalId)} while reversing its replacement: its recorded baseline holds a NoEcho value only as the redaction mask ('${"***"}') at ${shownPaths(shown)}, and there is no live resource to read that value back from, so cdkd sent nothing rather than create the resource with the mask. Restore the stack with 'cdkd deploy', which sends the NoEcho parameter's value again.`, "ROLLBACK_REDACTED_BASELINE");
29839
+ throw new CdkdError(`Cannot re-create ${shownLogicalId(logicalId)} while reversing its replacement: its recorded baseline holds a NoEcho value only as the redaction mask ('${"***"}') at ${shownPaths(shown)}, and there is no live resource to read that value back from, so cdkd sent nothing rather than create the resource with the mask. Restore the stack with ${proseQuoted(cdkdRemedy("cdkd deploy"))}, which sends the NoEcho parameter's value again.`, "ROLLBACK_REDACTED_BASELINE");
29053
29840
  }
29054
29841
  function masksOnlyAt(props, marked) {
29055
29842
  return maskedLeafCoordinatesOf(props).every((c) => isMarkedCoordinate(c, marked));
@@ -29290,7 +30077,11 @@ var ReplayPins = class {
29290
30077
  function refuseMaskedReplayBaseline(props, logicalId, inert = []) {
29291
30078
  if (props === void 0 || !carriesSecretMask(props)) return;
29292
30079
  if (inert.length > 0 && masksOnlyAt(props, inert)) return;
29293
- throw new CdkdError(`Cannot roll ${shownLogicalId(logicalId)} back: its recorded baseline holds the redaction mask ('${"***"}'), so cdkd would write that literal to the live resource. There are five ways a baseline comes to hold it. (1) A NoEcho custom-resource value was resolved there: restore the property with 'cdkd deploy' AFTER forcing that custom resource to update (change one of its properties, e.g. a nonce), so its handler runs again and supplies the real value — an ordinary re-deploy leaves the resource unchanged, so the handler does not run and the mask stays. (2) The Fn::Base64 encoding of a secret value (a {{resolve:...}} dynamic reference under Fn::Base64, such as EC2 UserData), which cdkd never records: restore the property with a 'cdkd deploy' that changes this resource, which sends it the encoded value again — a re-deploy that leaves this resource unchanged sends it nothing. Every rollback to such a baseline refuses, so to end this, stop encoding the secret into the property (have the resource read the secret at run time instead — not by writing the secret's plaintext into the template, which cdkd would then record in state in the clear). (3) The value was SPLICED from a masked record of ANOTHER resource — by 'cdkd orphan --force', or by 'cdkd import' resolving an Fn::GetAtt or a Ref over a value the Cloud Control fallback had masked. Repair the record that HOLDS the mask ('cdkd import <stack> --resource <logicalId>=<physicalId> --force', granting cloudformation:DescribeType first if the import warned that it could not read the schema), then re-run whichever command wrote this property. (4) A NoEcho template parameter's value, which cdkd stores only as the mask: restore the property with 'cdkd deploy', which sends the parameter's value again. (5) Two secret values cdkd resolved overlap inside the value, so no single {{resolve:...}} reference renders it and cdkd stored the mask rather than part of a secret: restore the property with a 'cdkd deploy' that changes this resource, which sends it the value again. Every rollback to such a baseline refuses while the two values still overlap there, so to end this, change the property (or rotate one of the secrets) so that they no longer overlap. See https://github.com/go-to-k/cdkd/issues/2449.`, "ROLLBACK_REDACTED_BASELINE");
30080
+ throw new CdkdError(`Cannot roll ${shownLogicalId(logicalId)} back: its recorded baseline holds the redaction mask ('${"***"}'), so cdkd would write that literal to the live resource. There are five ways a baseline comes to hold it. (1) A NoEcho custom-resource value was resolved there: restore the property with ${proseQuoted(cdkdRemedy("cdkd deploy"))} AFTER forcing that custom resource to update (change one of its properties, e.g. a nonce), so its handler runs again and supplies the real value — an ordinary re-deploy leaves the resource unchanged, so the handler does not run and the mask stays. (2) The Fn::Base64 encoding of a secret value (a {{resolve:...}} dynamic reference under Fn::Base64, such as EC2 UserData), which cdkd never records: restore the property with a ${proseQuoted(cdkdRemedy("cdkd deploy"))} that changes this resource, which sends it the encoded value again — a re-deploy that leaves this resource unchanged sends it nothing. Every rollback to such a baseline refuses, so to end this, stop encoding the secret into the property (have the resource read the secret at run time instead — not by writing the secret's plaintext into the template, which cdkd would then record in state in the clear). (3) The value was SPLICED from a masked record of ANOTHER resource — by 'cdkd orphan --force', or by 'cdkd import' resolving an Fn::GetAtt or a Ref over a value the Cloud Control fallback had masked. Repair the record that HOLDS the mask (${pasteableCommand("cdkd import", [
30081
+ { hole: "stack" },
30082
+ { literal: `--resource ${commandHole("logicalId")}=${commandHole("physicalId")}` },
30083
+ { literal: "--force" }
30084
+ ]).command}, granting cloudformation:DescribeType first if the import warned that it could not read the schema), then re-run whichever command wrote this property. (4) A NoEcho template parameter's value, which cdkd stores only as the mask: restore the property with ${proseQuoted(cdkdRemedy("cdkd deploy"))}, which sends the parameter's value again. (5) Two secret values cdkd resolved overlap inside the value, so no single {{resolve:...}} reference renders it and cdkd stored the mask rather than part of a secret: restore the property with a ${proseQuoted(cdkdRemedy("cdkd deploy"))} that changes this resource, which sends it the value again. Every rollback to such a baseline refuses while the two values still overlap there, so to end this, change the property (or rotate one of the secrets) so that they no longer overlap. See https://github.com/go-to-k/cdkd/issues/2449.`, "ROLLBACK_REDACTED_BASELINE");
29294
30085
  }
29295
30086
 
29296
30087
  // src/analyzer/drift-normalize.ts
@@ -29544,7 +30335,7 @@ async function readLive(args, names) {
29544
30335
  }
29545
30336
  function refusal(args, names, why) {
29546
30337
  const list = [...names].sort().join(", ");
29547
- return new ProvisioningError(`${args.logicalId} (${args.resourceType}): an earlier failed update left ${list} unsettled, and ${why} — nothing was updated. Re-run the deploy once the resource has settled` + (args.provider.readCurrentState !== void 0 ? ", or, to keep what AWS holds instead, run 'cdkd drift --accept' once it has." : "."), args.resourceType, args.logicalId, args.physicalId);
30338
+ return new ProvisioningError(`${args.logicalId} (${args.resourceType}): an earlier failed update left ${list} unsettled, and ${why} — nothing was updated. Re-run the deploy once the resource has settled` + (args.provider.readCurrentState !== void 0 ? `, or, to keep what AWS holds instead, run ${proseQuoted(cdkdRemedy("cdkd drift", "--accept"))} once it has.` : "."), args.resourceType, args.logicalId, args.physicalId);
29548
30339
  }
29549
30340
  async function settleUnsettledPrevious(args) {
29550
30341
  const { names, previous, provider } = args;
@@ -29817,13 +30608,13 @@ async function replayReadopt(s, survivor) {
29817
30608
  const oldShown = hasAddressablePhysicalId({ physicalId: prev.physicalId }) ? displaySafe(mask(prev.physicalId)) : "no recorded id";
29818
30609
  const unprovenCopyRefusal = (reason) => {
29819
30610
  const remedy = orphanRemedy(op.logicalId, ctx);
29820
- 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, "`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)));
30611
+ 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)));
29821
30612
  };
29822
30613
  const opIdUnusable = op.physicalId !== void 0 && !hasAddressablePhysicalId(op);
29823
30614
  if (!rollbackRetainsNewResource(current) && rollbackCannotAddress(current, op.resourceType, current.provisionedBy ?? op.provisionedBy, current.physicalId)) {
29824
30615
  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.");
29825
30616
  const target = op.physicalId === void 0 ? void 0 : refusalPhysicalId(mask(String(op.physicalId)));
29826
- const repair = target === void 0 ? `Repair the record's 'physicalId' to the id of the replacement's NEW resource (inspect it with \`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, "`cdkd rollback`")}.` : `Repair the record's 'physicalId' to ${target}, the replacement's new resource the journal records (inspect it with \`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, "`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.` : "");
30617
+ 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.` : "");
29827
30618
  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);
29828
30619
  }
29829
30620
  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.");
@@ -29896,8 +30687,8 @@ async function replayRevert(s) {
29896
30687
  if (!requireRestorableBaseline(previousState.properties, logger, {
29897
30688
  logicalId: op.logicalId,
29898
30689
  consequence: "be applied as a complete desired state: a patch provider removes every property, and an SDK provider may reset a subset or replace the resource",
29899
- remedy: "Re-run `cdkd deploy` to re-converge it.",
29900
- retry: `re-running ${rerunRollbackPhrase(ctx, "`cdkd rollback`")} retries this op`
30690
+ remedy: `Re-run ${proseQuoted(cdkdRemedy("cdkd deploy"), "`")} to re-converge it.`,
30691
+ retry: `re-running ${rerunRollbackPhrase(ctx, proseQuoted(cdkdRemedy("cdkd rollback"), "`"))} retries this op`
29901
30692
  })) {
29902
30693
  recordRollbackSkip(s, op, ABSENT_BASELINE_SKIP_CAUSE);
29903
30694
  return;
@@ -30120,19 +30911,19 @@ async function recreateOldResource(s, r) {
30120
30911
  if (!holder.holds) {
30121
30912
  const remedy = orphanRemedy(op.logicalId, ctx);
30122
30913
  const oldShown = refusalPhysicalId(mask(prev.physicalId));
30123
- 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, "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))));
30914
+ 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))));
30124
30915
  }
30125
30916
  if (rollbackRetainsNewResource(current)) {
30126
30917
  const remedy = orphanRemedy(op.logicalId, ctx);
30127
30918
  const oldShown = refusalPhysicalId(mask(prev.physicalId));
30128
30919
  const newShown = refusalPhysicalId(mask(current.physicalId));
30129
- 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, "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))));
30920
+ 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))));
30130
30921
  }
30131
30922
  if (deleteFirstBlocked !== void 0) {
30132
30923
  const remedy = orphanRemedy(op.logicalId, ctx);
30133
30924
  const oldShown = refusalPhysicalId(mask(prev.physicalId));
30134
30925
  const newShown = refusalPhysicalId(mask(current.physicalId));
30135
- 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, "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))));
30926
+ 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))));
30136
30927
  }
30137
30928
  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)` : ""));
30138
30929
  await deleteNewResourceFirst("while clearing the new resource so the old one could be re-created");
@@ -30165,7 +30956,7 @@ async function finishReverseReplacement(s, r, createResult, deletedNewFirst) {
30165
30956
  }) && !deletedNewFirst && createResult.physicalId === current.physicalId;
30166
30957
  if (adoptedLiveNewResource) {
30167
30958
  const liveShown = refusalPhysicalId(mask(current.physicalId));
30168
- 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). The old resource's ORIGINAL properties may NOT have been re-applied; state now records the pre-replacement properties, so inspect the drift and run 'cdkd deploy' to reconcile, or rename the resource to make the replacement reversible.${describedPhysicalIdPointer(liveShown)}\nInspect it with: ${pasteableCommand("cdkd drift", [{
30959
+ 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). 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", [{
30169
30960
  value: stackName,
30170
30961
  hole: "stack"
30171
30962
  }, {
@@ -30243,7 +31034,7 @@ async function finishReverseReplacement(s, r, createResult, deletedNewFirst) {
30243
31034
  reason: mask(survivorReason),
30244
31035
  ...survivorProvisionedBy && { provisionedBy: survivorProvisionedBy }
30245
31036
  },
30246
- ...adoptedLiveNewResource && { reason: mask("The re-create returned the live new resource instead of re-creating the old one (its Create API is name-idempotent), so the replacement was NOT fully reversed: the old resource's original properties may not have been re-applied. Inspect it with `cdkd drift` and run `cdkd deploy` to reconcile.") }
31037
+ ...adoptedLiveNewResource && { reason: mask(`The re-create returned the live new resource instead of re-creating the old one (its Create API is name-idempotent), so the replacement was NOT fully reversed: the old resource's original properties may not have been re-applied. Inspect it with ${proseQuoted(cdkdRemedy("cdkd drift"), "`")} and run ${proseQuoted(cdkdRemedy("cdkd deploy"), "`")} to reconcile.`) }
30247
31038
  });
30248
31039
  return survivorReason === void 0;
30249
31040
  };
@@ -30267,7 +31058,7 @@ async function finishReverseReplacement(s, r, createResult, deletedNewFirst) {
30267
31058
  let gone = false;
30268
31059
  try {
30269
31060
  if (supersededHolderOf(superseded, stateResources) !== void 0) {
30270
- logger.warn(safeMsg` Rollback: not deleting the new ${shownLogicalId(op.logicalId)} ` + safeMsg`(${mask(current.physicalId)}): a record of this stack now holds its ` + `physical id. Check it with cdkd drift.`);
31061
+ 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")}.`);
30271
31062
  result.warnings++;
30272
31063
  ctx.recordEvent?.({
30273
31064
  eventType: "ROLLBACK_RESOURCE_SUCCEEDED",
@@ -30311,13 +31102,13 @@ function refuseSameIdParentReversal(s) {
30311
31102
  const remedy = orphanRemedy(op.logicalId, ctx);
30312
31103
  const shown = children.slice(0, 5).map(refusalLogicalId).join(", ");
30313
31104
  const more = children.length > 5 ? ` and ${children.length - 5} more` : "";
30314
- throw ownRemedyError(markNonRetryable(new CdkdError(`Cannot reverse the replacement of ${refusalLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}): the deploy deleted it and re-created it under the same physical id, so reversing it deletes it again, and with it what AWS stores inside it (${shown}${more}), which this rollback does not re-create. Nothing was deleted. The journal is kept: fix forward by deploying the previous version of the template with cdkd deploy --replace, which re-creates both` + (remedy.offered ? ", or leave this resource as it is and let the rest of the rollback proceed by re-running with the command below." : ".") + `${remedy.clause}${remedy.line}`, "ROLLBACK_SAME_ID_PARENT")));
31105
+ throw ownRemedyError(markNonRetryable(new CdkdError(`Cannot reverse the replacement of ${refusalLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}): the deploy deleted it and re-created it under the same physical id, so reversing it deletes it again, and with it what AWS stores inside it (${shown}${more}), which this rollback does not re-create. Nothing was deleted. The journal is kept: fix forward by deploying the previous version of the template with ${deployReplaceCommand()}, which re-creates both` + (remedy.offered ? ", or leave this resource as it is and let the rest of the rollback proceed by re-running with the command below." : ".") + `${remedy.clause}${remedy.line}`, "ROLLBACK_SAME_ID_PARENT")));
30315
31106
  }
30316
31107
  function refuseUndecidableSameIdReversal(s) {
30317
31108
  const { op, stateResources, ctx } = s;
30318
31109
  if (!sameIdReversalUndecidable(op, stateResources[op.logicalId])) return;
30319
31110
  const remedy = orphanRemedy(op.logicalId, ctx);
30320
- throw ownRemedyError(markNonRetryable(new CdkdError(`Cannot reverse the replacement of ${refusalLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}): the deploy deleted it and re-created it under the same physical id, and its state record cannot tell whether an earlier rollback already reversed it (its recorded properties read the same before and after the deploy and hold a redacted value, which may hide what changed, or the deploy's properties were not journaled). Nothing was deleted. The journal is kept: fix forward by deploying the previous version of the template with cdkd deploy --replace` + (remedy.offered ? ", or leave this resource as it is and let the rest of the rollback proceed by re-running with the command below." : ".") + `${remedy.clause}${remedy.line}`, "ROLLBACK_SAME_ID_UNDECIDABLE")));
31111
+ throw ownRemedyError(markNonRetryable(new CdkdError(`Cannot reverse the replacement of ${refusalLogicalId(op.logicalId)} (${refusalResourceType(op.resourceType)}): the deploy deleted it and re-created it under the same physical id, and its state record cannot tell whether an earlier rollback already reversed it (its recorded properties read the same before and after the deploy and hold a redacted value, which may hide what changed, or the deploy's properties were not journaled). Nothing was deleted. The journal is kept: fix forward by deploying the previous version of the template with ${deployReplaceCommand()}` + (remedy.offered ? ", or leave this resource as it is and let the rest of the rollback proceed by re-running with the command below." : ".") + `${remedy.clause}${remedy.line}`, "ROLLBACK_SAME_ID_UNDECIDABLE")));
30321
31112
  }
30322
31113
  async function replayReverseReplacement(s) {
30323
31114
  const { op, stateResources, stackName, ctx, resolver, result, inlinePolicyWriters, logger, secrets, opMasker, mask } = s;
@@ -30335,9 +31126,9 @@ async function replayReverseReplacement(s) {
30335
31126
  if (survivor === "exists" && op.oldResourceMaySurvive !== "kept") throw survivorUnprovenRefusal(s, oldType, "maybe-deleting");
30336
31127
  if (survivor === "exists") {
30337
31128
  const oldShown = refusalPhysicalId(mask(String(prev.physicalId)));
30338
- 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 cdkd drift after the rollback.${describedPhysicalIdPointer(oldShown)}`);
31129
+ 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)}`);
30339
31130
  result.warnings++;
30340
- return 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 cdkd drift" });
31131
+ return 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")}` });
30341
31132
  }
30342
31133
  if (survivor !== "gone") throw survivorUnprovenRefusal(s, oldType, survivor);
30343
31134
  logger.info(safeMsg` Rollback: the old resource of ${safe(op.logicalId)} (${mask(String(prev.physicalId))}) is gone — re-creating it`);
@@ -30346,8 +31137,8 @@ async function replayReverseReplacement(s) {
30346
31137
  if (!requireRestorableBaseline(prev.properties, logger, {
30347
31138
  logicalId: op.logicalId,
30348
31139
  consequence: "create a default-configured resource and then delete the live one",
30349
- remedy: "Re-run `cdkd deploy` to re-converge it.",
30350
- retry: `re-running ${rerunRollbackPhrase(ctx, "`cdkd rollback`")} retries this op`
31140
+ remedy: `Re-run ${proseQuoted(cdkdRemedy("cdkd deploy"), "`")} to re-converge it.`,
31141
+ retry: `re-running ${rerunRollbackPhrase(ctx, proseQuoted(cdkdRemedy("cdkd rollback"), "`"))} retries this op`
30351
31142
  })) {
30352
31143
  recordRollbackSkip(s, op, ABSENT_BASELINE_SKIP_CAUSE);
30353
31144
  return;
@@ -30432,7 +31223,7 @@ function survivorUnprovenRefusal(s, oldType, verdict) {
30432
31223
  const remedy = orphanRemedy(op.logicalId, ctx);
30433
31224
  const oldId = op.previousState?.physicalId;
30434
31225
  const oldShown = hasAddressablePhysicalId({ physicalId: oldId }) ? refusalPhysicalId(mask(String(oldId))) : "no recorded id";
30435
- const rerun = rerunRollbackPhrase(ctx, "cdkd rollback");
31226
+ const rerun = rerunRollbackPhrase(ctx, cdkdRemedy("cdkd rollback"));
30436
31227
  const why = verdict === "unreadable" ? "cdkd has no read for this resource type that can tell whether it does. Re-creating it could duplicate it or collide with it" : verdict === "interrupted" ? `the rollback was interrupted before cdkd could read whether it does; re-running ${rerun} reads it` : verdict === "unknown" ? `cdkd could not read whether it does (the read failed or did not answer in time); re-running ${rerun} reads it again. Re-creating it could duplicate it or collide with it` : `AWS still reports it, but its failed delete may have been accepted and still be running, or only partly ran. Re-adopting it could leave neither resource once a running delete finishes, or one that delete already stripped; once AWS reports it gone, re-running ${rerun} re-creates it. A refused delete is not running, so waiting does not help: if its delete was refused, delete it by hand, then re-run ${rerun}`;
30437
31228
  return ownRemedyError(markNonRetryable(new CdkdError(`Cannot reverse the replacement of ${refusalLogicalId(op.logicalId)} (${refusalResourceType(oldType)}): the deploy did not confirm that it deleted the old resource (${oldShown}), so it may still exist, and ${why}. Nothing was sent and the journal is kept.` + (remedy.offered ? " To keep the new resource in its place instead, re-run with the command below, then delete the old resource by hand if it still exists." : "") + `${remedy.clause}${describedPhysicalIdPointer(oldShown)}` + remedy.line, "REPLACED_SURVIVOR_UNPROVEN")));
30438
31229
  }
@@ -30697,7 +31488,7 @@ async function partitionDeletedOutsideCdkd(deps, ops) {
30697
31488
  };
30698
31489
  }
30699
31490
  function deletedOutsideCdkdMessage(op, recordDropped) {
30700
- return safeMsg`${op.logicalId} (${op.resourceType}): AWS reports this resource no longer exists ` + `(deleted outside cdkd), so its failed update has nothing to revert` + (recordDropped ? ` and no rollback record is kept for it.` : ` and 'cdkd rollback --revert-failed' drops its record.`) + safeMsg` ${DELETED_RESOURCE_REMEDY}`;
31491
+ return safeMsg`${op.logicalId} (${op.resourceType}): AWS reports this resource no longer exists ` + `(deleted outside cdkd), so its failed update has nothing to revert` + (recordDropped ? ` and no rollback record is kept for it.` : ` and ${proseQuoted(cdkdRemedy("cdkd rollback", "--revert-failed"))} drops its record.`) + safeMsg` ${DELETED_RESOURCE_REMEDY}`;
30701
31492
  }
30702
31493
  const DELETED_OUTSIDE_SKIP_CAUSE = "AWS reports the resource no longer exists (deleted outside cdkd), so its failed update has nothing to revert; the rollback dropped its record from the journal.";
30703
31494
 
@@ -30793,7 +31584,7 @@ async function replayFailedOperationsUnbound(failedOps, stateResources, stackNam
30793
31584
  recordRollbackSkip(skipScope, op, "No previous state is available for the failed UPDATE, so there is nothing to revert it to.");
30794
31585
  break;
30795
31586
  case "skip-failed-type-change":
30796
- logger.warn(` Rollback: cannot revert failed UPDATE of ${shownLogicalId(op.logicalId)} in place — it was a Type change (${refusalResourceType(op.previousState?.resourceType)} -> ${refusalResourceType(op.resourceType)}), which is a replacement, and its remote state is unknown. Inspect it with \`cdkd drift\` and re-converge with \`cdkd deploy\`. Skipping.`);
31587
+ logger.warn(` Rollback: cannot revert failed UPDATE of ${shownLogicalId(op.logicalId)} in place — it was a Type change (${refusalResourceType(op.previousState?.resourceType)} -> ${refusalResourceType(op.resourceType)}), which is a replacement, and its remote state is unknown. Inspect it with ${proseQuoted(cdkdRemedy("cdkd drift"), "`")} and re-converge with ${proseQuoted(cdkdRemedy("cdkd deploy"), "`")}. Skipping.`);
30797
31588
  recordRollbackSkip(skipScope, op, `The failed UPDATE was a Type change (${String(op.previousState?.resourceType)} -> ${String(op.resourceType)}), which is a replacement, and its remote state is unknown, so it cannot be reverted in place.`);
30798
31589
  break;
30799
31590
  case "orphan-failed-create-retain": {
@@ -30861,7 +31652,7 @@ async function replayFailedOperationsUnbound(failedOps, stateResources, stackNam
30861
31652
  });
30862
31653
  break;
30863
31654
  }
30864
- 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; \`cdkd rollback --drop-failed\` removes only that record and leaves the resource in AWS`);
31655
+ 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`);
30865
31656
  if (verdict !== void 0) {
30866
31657
  const keep = verdict.keep;
30867
31658
  const finish = verdict.finish ?? "if it is not in use, delete it by hand";
@@ -30938,8 +31729,8 @@ async function replayFailedOperationsUnbound(failedOps, stateResources, stackNam
30938
31729
  if (!requireRestorableBaseline(prev.properties, logger, {
30939
31730
  logicalId: op.logicalId,
30940
31731
  consequence: "be applied as a complete desired state: a patch provider removes every property, and an SDK provider may reset a subset or replace the resource",
30941
- remedy: "Inspect it with `cdkd drift` (this op died mid-flight, so its remote state is unknown) and re-converge with `cdkd drift --revert` or `cdkd deploy`.",
30942
- retry: "re-running `cdkd rollback --revert-failed` retries this op (a plain `cdkd rollback` replays only the COMPLETED ops and then pops the whole segment, discarding this record)"
31732
+ remedy: `Inspect it with ${proseQuoted(cdkdRemedy("cdkd drift"), "`")} (this op died mid-flight, so its remote state is unknown) and re-converge with ${proseQuoted(cdkdRemedy("cdkd drift", "--revert"), "`")} or ${proseQuoted(cdkdRemedy("cdkd deploy"), "`")}.`,
31733
+ retry: `re-running ${proseQuoted(cdkdRemedy("cdkd rollback", "--revert-failed"), "`")} retries this op (a plain \`cdkd rollback\` replays only the COMPLETED ops and then pops the whole segment, discarding this record)`
30943
31734
  })) {
30944
31735
  recordRollbackSkip(skipScope, op, ABSENT_BASELINE_SKIP_CAUSE);
30945
31736
  break;
@@ -31667,13 +32458,13 @@ function changedReferencePath(reference) {
31667
32458
  return `${REFERENCE_PATH_PREFIX}${reference}`;
31668
32459
  }
31669
32460
  function differingRemedy(paths) {
31670
- return paths.some((p) => p.startsWith(REFERENCE_PATH_PREFIX)) ? "As cdk refactor does, cdkd treats it as a new resource (a Lambda version or an API Gateway deployment after a change is one). If it was renamed, revert that change, run cdkd refactor, then deploy the change." : "cdkd refactor keeps only an unchanged resource: revert the property change, run cdkd refactor, then deploy the change.";
32461
+ return paths.some((p) => p.startsWith(REFERENCE_PATH_PREFIX)) ? `As cdk refactor does, cdkd treats it as a new resource (a Lambda version or an API Gateway deployment after a change is one). If it was renamed, revert that change, run ${cdkdRemedy("cdkd refactor")}, then deploy the change.` : `cdkd refactor keeps only an unchanged resource: revert the property change, run ${cdkdRemedy("cdkd refactor")}, then deploy the change.`;
31671
32462
  }
31672
32463
  function changedReferenceReason(reference) {
31673
- return `it references ${reference}, which the next deploy changes, so cdkd treats it as a new resource, as cdk refactor does (a Lambda version or an API Gateway deployment after a change is one). If it is a renamed one, revert the change to ${reference}, run cdkd refactor, then deploy the change`;
32464
+ return `it references ${reference}, which the next deploy changes, so cdkd treats it as a new resource, as cdk refactor does (a Lambda version or an API Gateway deployment after a change is one). If it is a renamed one, revert the change to ${reference}, run ${cdkdRemedy("cdkd refactor")}, then deploy the change`;
31674
32465
  }
31675
32466
  function propertiesChangedReason(paths) {
31676
- return `its properties also changed (${paths.join(", ")}); cdkd refactor keeps only an unchanged resource. Revert the property change, run cdkd refactor, then deploy the change`;
32467
+ return `its properties also changed (${paths.join(", ")}); cdkd refactor keeps only an unchanged resource. Revert the property change, run ${cdkdRemedy("cdkd refactor")}, then deploy the change`;
31677
32468
  }
31678
32469
  function isIntrinsic(value) {
31679
32470
  if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
@@ -31823,7 +32614,7 @@ function hintSidesOf(changes, template, exclude = /* @__PURE__ */ new Set()) {
31823
32614
  };
31824
32615
  }
31825
32616
  function movedToHint(movedTo) {
31826
- return ` (moved to ${displayIdent(movedTo.stackName)}.${displayIdent(movedTo.logicalId)}, run 'cdkd refactor' to keep it)`;
32617
+ return ` (moved to ${displayIdent(movedTo.stackName)}.${displayIdent(movedTo.logicalId)}, run ${proseQuoted(cdkdRemedy("cdkd refactor"))} to keep it)`;
31827
32618
  }
31828
32619
  function withMovedTo(changes, hints) {
31829
32620
  return changes.map((change) => {
@@ -32069,7 +32860,7 @@ var NoEchoValueMacs = class {
32069
32860
  } catch (error) {
32070
32861
  const name = errorNameOf(error, abort.signal.aborted);
32071
32862
  if (this.options.purpose === "diff") logger.debug(safeMsg`cdkd diff: NoEcho value MACs unavailable (${name} from kms:GenerateMac on ${NOECHO_MAC_KEY_ALIAS} in ${region}); the preview does not compare them`);
32072
- else if (name === "NotFoundException") logger.debug(safeMsg`NoEcho value MACs: no KMS key ${NOECHO_MAC_KEY_ALIAS} in ${region} (run 'cdkd bootstrap' to create it); a write-only property a NoEcho parameter feeds is re-sent on every deploy`);
32863
+ else if (name === "NotFoundException") logger.debug(safeMsg`NoEcho value MACs: no KMS key ${NOECHO_MAC_KEY_ALIAS} in ${region} (run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))} to create it); a write-only property a NoEcho parameter feeds is re-sent on every deploy`);
32073
32864
  else logger.info(safeMsg`NoEcho value MACs unavailable (${name} from kms:GenerateMac on ${NOECHO_MAC_KEY_ALIAS} in ${region}): a write-only property a NoEcho parameter feeds is re-sent on every deploy. Grant the deploying identity kms:GenerateMac on that key to compare the values instead.`);
32074
32865
  return;
32075
32866
  } finally {
@@ -32699,7 +33490,7 @@ async function planOrphanAdoption(params) {
32699
33490
  if (params.managedLogicalIds.has(record.logicalId)) continue;
32700
33491
  outcome.remaining.push(record);
32701
33492
  if ((params.template.Resources?.[record.logicalId])?.Type !== record.state.resourceType) continue;
32702
- 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 'cdkd import'.`);
33493
+ 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")}`);
32703
33494
  }
32704
33495
  return outcome;
32705
33496
  }
@@ -33301,7 +34092,7 @@ async function settleJournaledOrphansOnSuccess(args) {
33301
34092
  try {
33302
34093
  await stateBackend.dropRollbackJournalFailedOperations(stackName, region, (op, segment) => isHandledOrphan(cleared, segment, op));
33303
34094
  } catch (err) {
33304
- logger.warn(safeMsg`Failed to remove the settled entries from the rollback journal of stack ${stack}: ` + safeMsg`${errorDetail(err)}. A cdkd rollback or cdkd destroy could act on them again; run a ` + "successful cdkd deploy of the stack first, which settles them again.");
34095
+ logger.warn(safeMsg`Failed to remove the settled entries from the rollback journal of stack ${stack}: ` + safeMsg`${errorDetail(err)}. A cdkd rollback or cdkd destroy could act on them again; run a ` + safeMsg`successful ${cdkdRemedy("cdkd deploy")} of the stack first, which settles them again.`);
33305
34096
  }
33306
34097
  };
33307
34098
  if (kept.length === 0) {
@@ -33564,7 +34355,7 @@ async function revertNestedChildFromJournal(args) {
33564
34355
  const runId = run.runId;
33565
34356
  const shownChild = displayIdent(childStackName);
33566
34357
  const refuse = (detail) => {
33567
- throw markNonRetryable(/* @__PURE__ */ new Error(`Cannot revert nested stack ${shownChild} (row ${displayIdent(logicalId)}): ${detail} The child was NOT (fully) reverted and may still hold the failed deploy's configuration. Inspect it with 'cdkd state show'; re-run the rollback once the cause is fixed (its journal is kept), or re-deploy the parent to converge.`));
34358
+ throw markNonRetryable(/* @__PURE__ */ new Error(`Cannot revert nested stack ${shownChild} (row ${displayIdent(logicalId)}): ${detail} The child was NOT (fully) reverted and may still hold the failed deploy's configuration. Inspect it with ${proseQuoted(cdkdRemedy("cdkd state show"))}; re-run the rollback once the cause is fixed (its journal is kept), or re-deploy the parent to converge.`));
33568
34359
  };
33569
34360
  if (runId === void 0) refuse("the rollback carries no deploy run id to select its journal segments by.");
33570
34361
  await ctx.lockManager.acquireLockWithRetry(childStackName, region, void 0, "rollback");
@@ -34057,8 +34848,8 @@ async function settlePending(params, pending) {
34057
34848
  settlements.set(token, { kind: "resume" });
34058
34849
  break;
34059
34850
  }
34060
- if (params.resume !== void 0 && !unique) logger.warn(safeMsg`The CREATE of ${named} ${ended} in AWS after cdkd stopped waiting, and made ` + safeMsg`${madeShown}. cdkd cannot prove its id is unique (it may be a name, which can ` + safeMsg`since belong to another resource), so this deploy does not take it over, and creating ${logicalIdShown(op.logicalId)} ` + "again will ask for the name it holds. Adopt it with cdkd import (--resource " + safeMsg`${logicalIdShown(op.logicalId)}=<its id>), or delete it, then re-run. It is kept in the ` + "rollback journal as a resource the failed deploy created.");
34061
- else logger.warn(safeMsg`The CREATE of ${named} ${ended} in AWS after cdkd stopped waiting, and made ` + safeMsg`${madeShown}. It is now recorded in the rollback journal as a resource the failed ` + "deploy created: cdkd destroy, cdkd rollback --revert-failed and the next successful deploy delete it as its DeletionPolicy directs when cdkd can prove it is still the resource that create made, and otherwise name it in a warning for you to delete by hand.");
34851
+ if (params.resume !== void 0 && !unique) logger.warn(safeMsg`The CREATE of ${named} ${ended} in AWS after cdkd stopped waiting, and made ` + safeMsg`${madeShown}. cdkd cannot prove its id is unique (it may be a name, which can ` + safeMsg`since belong to another resource), so this deploy does not take it over, and creating ${logicalIdShown(op.logicalId)} ` + safeMsg`again will ask for the name it holds. Adopt it with ${cdkdRemedy("cdkd import")} (--resource ` + safeMsg`${logicalIdShown(op.logicalId)}=<its id>), or delete it, then re-run. It is kept in the ` + "rollback journal as a resource the failed deploy created.");
34852
+ else logger.warn(safeMsg`The CREATE of ${named} ${ended} in AWS after cdkd stopped waiting, and made ` + safeMsg`${madeShown}. It is now recorded in the rollback journal as a resource the failed ` + safeMsg`deploy created: ${cdkdRemedy("cdkd destroy")}, ${cdkdRemedy("cdkd rollback", "--revert-failed")} and the next successful deploy ` + "delete it as its DeletionPolicy directs when cdkd can prove it is still the resource that create made, and otherwise name it in a warning for you to delete by hand.");
34062
34853
  settlements.set(token, {
34063
34854
  kind: "orphan",
34064
34855
  physicalId: made,
@@ -34067,7 +34858,7 @@ async function settlePending(params, pending) {
34067
34858
  break;
34068
34859
  }
34069
34860
  case "not-found":
34070
- logger.warn(safeMsg`Cloud Control no longer has the CREATE request of ${named}: requests expire after ` + "seven days, and a request is not visible from another account or region. cdkd cannot tell whether it created the resource and stops tracking the request. If it exists, adopt it with cdkd import or delete it by hand.");
34861
+ logger.warn(safeMsg`Cloud Control no longer has the CREATE request of ${named}: requests expire after ` + "seven days, and a request is not visible from another account or region. cdkd cannot tell whether it created the resource and stops tracking the request. If it exists, " + safeMsg`adopt it with ${cdkdRemedy("cdkd import")} or delete it by hand.`);
34071
34862
  settlements.set(token, { kind: "drop" });
34072
34863
  break;
34073
34864
  case "unresolved": {
@@ -34153,7 +34944,7 @@ function revertFailedHasNothingToDo(op) {
34153
34944
  return op.changeType === "DELETE" || appliedNothing(op) || revertSkipsFailedCreate(op);
34154
34945
  }
34155
34946
  function unaddressableFailedCreateMessage(op) {
34156
- return safeMsg`${op.logicalId} (${op.resourceType}): the failed CREATE recorded no physical id, ` + `so 'cdkd rollback --revert-failed' cannot address it — if it was partially created in AWS, delete it manually.`;
34947
+ return safeMsg`${op.logicalId} (${op.resourceType}): the failed CREATE recorded no physical id, ` + `so ${proseQuoted(cdkdRemedy("cdkd rollback", "--revert-failed"))} cannot address it — if it was partially created in AWS, delete it manually.`;
34157
34948
  }
34158
34949
 
34159
34950
  // src/deployment/deploy-engine/rollback/journal-write.ts
@@ -34182,7 +34973,7 @@ async function writeRollbackJournalSegment(deps, stackName, completedOperations,
34182
34973
  deps.logger.debug(safeMsg`Rollback journal segment written (${reason})`);
34183
34974
  return true;
34184
34975
  } catch (journalError) {
34185
- deps.logger.warn(safeMsg`Failed to write rollback journal: ${asIsMessage(describeAwsFailure(journalError).detail)}. ` + `'cdkd rollback' will NOT be able to revert this deploy — use 'cdkd deploy' to resume or 'cdkd destroy' to clean up.`);
34976
+ deps.logger.warn(safeMsg`Failed to write rollback journal: ${asIsMessage(describeAwsFailure(journalError).detail)}. ` + safeMsg`'cdkd rollback' will NOT be able to revert this deploy — use ${proseQuoted(cdkdRemedy("cdkd deploy"))} to resume or ${proseQuoted(cdkdRemedy("cdkd destroy"))} to clean up.`);
34186
34977
  return false;
34187
34978
  }
34188
34979
  }
@@ -35539,14 +36330,14 @@ async function refuseUnlicensedGeneratedName(engine, input) {
35539
36330
  case "held": {
35540
36331
  const nested = input.stackName.includes("~");
35541
36332
  const top = input.stackName.split("~")[0];
35542
- const importLine = nested ? `adopt it through the top-level stack ${quotedOrDescribed(top, "stack name")} with \`cdkd import\`` : `adopt it with \`${pasteableCommand("cdkd import", [{
36333
+ const importLine = nested ? `adopt it through the top-level stack ${quotedOrDescribed(top, "stack name")} with ${proseQuoted(cdkdRemedy("cdkd import"), "`")}` : `adopt it with ${proseQuoted(pasteableCommand("cdkd import", [{
35543
36334
  value: input.stackName,
35544
36335
  hole: "stack"
35545
36336
  }, {
35546
36337
  flag: "--resource",
35547
36338
  value: `${logicalId}=${verdict.holder}`,
35548
36339
  hole: "logicalId=physicalId"
35549
- }], recoveryCommandFlags(engine.options.refusalRecovery).flags).command}\``;
36340
+ }], recoveryCommandFlags(engine.options.refusalRecovery).flags).command, "`")}`;
35550
36341
  if (verdict.ownIntent !== void 0) {
35551
36342
  const why = verdict.ownIntent === "abandoned" ? "a deploy of this stack that was killed or force-unlocked" : "a create of this stack that came back failed (a timeout or a server error)";
35552
36343
  return refuse(`${subject} would be created with ${named}, which an existing resource (${displaySafe(verdict.holder)}) already holds. This stack's create-token ledger records that ${why} sent this name, but this type reports no creation time, so cdkd cannot tell that resource is the one it made rather than another deployment's created since. Since ${adoptsText}, creating it would take that resource over. ${displaySafe(logicalId)} was not created. The likely cause: the resource is this stack's own, from that deploy. If it is, ${importLine} and re-run; if it is not, this stack is also deployed under another state backend.`);
@@ -35616,7 +36407,7 @@ async function refuseTakenCreateName(engine, input) {
35616
36407
  hole: "logicalId=physicalId"
35617
36408
  }]);
35618
36409
  const adopt = built !== void 0 && maskName(built.command) === built.command ? built : void 0;
35619
- const ownRemedy = input.stackName.includes("~") ? `${ownCase}, delete it and re-run.` : adopt !== void 0 ? `${ownCase}, delete it, or adopt it with \`cdkd import\` using the command below and re-run.` : `${ownCase}, delete it or adopt it with \`cdkd import\` and re-run.`;
36410
+ 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.`;
35620
36411
  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.";
35621
36412
  return refuse(`${subject} is created with ${named}, and an existing resource (${shown(holderId)}) already holds that name. 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 ? "" : `
35622
36413
  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}`));
@@ -35877,11 +36668,15 @@ function markerMovesInvolving(verdict, stackName, region) {
35877
36668
  return verdict.moves.filter((m) => m.fromStack === stackName && m.fromRegion === region || m.toStack === stackName && m.toRegion === region);
35878
36669
  }
35879
36670
  function refactorMarkerRefusalMessage(verdict, stackName, region, command) {
35880
- if (verdict.kind === "malformed") return safeMsg`${command} refused stack ${stackName} (${region}): the cdkd refactor marker ` + safeMsg`${verdict.key} cannot be read, so whether a move involving this stack is ` + "unfinished is unknown. Inspect it in the state bucket; run cdkd refactor to finish the moves it lists, or delete it once no move is in progress.";
36671
+ if (verdict.kind === "malformed") return safeMsg`${command} refused stack ${stackName} (${region}): the cdkd refactor marker ` + safeMsg`${verdict.key} cannot be read, so whether a move involving this stack is ` + `unfinished is unknown. Inspect it in the state bucket; run ${cdkdRemedy("cdkd refactor")} to finish the moves it lists, or delete it once no move is in progress.`;
35881
36672
  const involved = markerMovesInvolving(verdict, stackName, region);
35882
36673
  if (involved.length === 0) return void 0;
35883
36674
  const sources = [...new Set(involved.map((m) => m.fromStack))];
35884
- return safeMsg`${command} refused stack ${stackName} (${region}): a cdkd refactor moving ` + safeMsg`${involved.map((m) => `${m.fromStack}.${m.from} -> ${m.toStack}.${m.to}`).join(", ")} ` + "did not finish, and acting on this stack now could delete a resource another stack owns or create it a second time. Run " + safeMsg`'cdkd refactor ${sources.join(" ")}' to finish the move, then re-run.`;
36675
+ return safeMsg`${command} refused stack ${stackName} (${region}): a cdkd refactor moving ` + safeMsg`${involved.map((m) => `${m.fromStack}.${m.from} -> ${m.toStack}.${m.to}`).join(", ")} ` + "did not finish, and acting on this stack now could delete a resource another stack owns or create it a second time. Run " + safeMsg`${proseQuoted(pasteableCommand("cdkd refactor", sources.map((source) => ({
36676
+ value: source,
36677
+ hole: "stack",
36678
+ opts: { patternMatched: true }
36679
+ }))).command)} to finish the move, then re-run.`;
35885
36680
  }
35886
36681
  function refuseRefactorMarker(verdict, stackName, region, command) {
35887
36682
  const message = refactorMarkerRefusalMessage(verdict, stackName, region, command);
@@ -35899,7 +36694,7 @@ async function updateRefactorMarker(backend, update) {
35899
36694
  }
35900
36695
  if (await backend.saveRefactorMarker({ moves: update(moves) }, current === null ? null : current.etag) === "saved") return;
35901
36696
  }
35902
- throw new CdkdError("The cdkd refactor marker kept changing under concurrent refactors; re-run cdkd refactor.", "REFACTOR_STATE_CHANGED");
36697
+ throw new CdkdError(`The cdkd refactor marker kept changing under concurrent refactors; re-run ${cdkdRemedy("cdkd refactor")}.`, "REFACTOR_STATE_CHANGED");
35903
36698
  }
35904
36699
  function sameMove(a, b) {
35905
36700
  return a.fromStack === b.fromStack && a.fromRegion === b.fromRegion && a.from === b.from;
@@ -35937,7 +36732,7 @@ async function recordRetainedForReadoption(backend, stackName, region, kept, log
35937
36732
  logger.warn(safeMsg`Recorded the ${String(kept.length)} kept resource(s) of ${displayStackName(stackName)}, ` + safeMsg`but their time could not be confirmed from S3 ` + safeMsg`(${describeAwsFailure(error.cause).summary}); they carry this machine's clock instead.`);
35938
36733
  return;
35939
36734
  }
35940
- logger.warn(safeMsg`Could not record the ${String(kept.length)} kept resource(s) of ${displayStackName(stackName)} ` + safeMsg`(${describeAwsFailure(error).summary}). A later deploy may refuse to create one over ` + `its kept copy, or not name them; adopt a kept one with 'cdkd import'.`);
36735
+ logger.warn(safeMsg`Could not record the ${String(kept.length)} kept resource(s) of ${displayStackName(stackName)} ` + safeMsg`(${describeAwsFailure(error).summary}). A later deploy may refuse to create one over ` + safeMsg`its kept copy, or not name them; adopt a kept one with ${proseQuoted(cdkdRemedy("cdkd import"))}.`);
35941
36736
  }
35942
36737
  }
35943
36738
  var KeptForReadoption = class {
@@ -36108,7 +36903,7 @@ Drop the record with: ${dropCommand}`);
36108
36903
  hole: nested ? "child-stack" : "stack",
36109
36904
  opts: { plainIdent: true }
36110
36905
  };
36111
- 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 '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", [
36906
+ 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", [
36112
36907
  stackArg,
36113
36908
  {
36114
36909
  flag: "--stack-region",
@@ -36204,255 +36999,6 @@ async function retryCarriedSupersededResources(engine, host, carried, resources,
36204
36999
  return changed;
36205
37000
  }
36206
37001
 
36207
- // src/deployment/dag-executor.ts
36208
- var DagExecutor = class {
36209
- nodes = /* @__PURE__ */ new Map();
36210
- logger = getLogger().child("DagExecutor");
36211
- priorityById = null;
36212
- timingScope;
36213
- constructor(timingScope) {
36214
- this.timingScope = timingScope;
36215
- }
36216
- add(node) {
36217
- this.nodes.set(node.id, node);
36218
- }
36219
- computePriorities() {
36220
- if (this.priorityById) return this.priorityById;
36221
- const dependentsOf = /* @__PURE__ */ new Map();
36222
- for (const node of this.nodes.values()) for (const depId of node.dependencies) {
36223
- if (!this.nodes.has(depId)) continue;
36224
- let set = dependentsOf.get(depId);
36225
- if (!set) {
36226
- set = /* @__PURE__ */ new Set();
36227
- dependentsOf.set(depId, set);
36228
- }
36229
- set.add(node.id);
36230
- }
36231
- const memo = /* @__PURE__ */ new Map();
36232
- const visiting = /* @__PURE__ */ new Set();
36233
- const collect = (id) => {
36234
- const cached = memo.get(id);
36235
- if (cached) return cached;
36236
- const acc = /* @__PURE__ */ new Set();
36237
- if (visiting.has(id)) return acc;
36238
- visiting.add(id);
36239
- for (const dependent of dependentsOf.get(id) ?? []) {
36240
- acc.add(dependent);
36241
- for (const t of collect(dependent)) acc.add(t);
36242
- }
36243
- visiting.delete(id);
36244
- memo.set(id, acc);
36245
- return acc;
36246
- };
36247
- const priorities = /* @__PURE__ */ new Map();
36248
- for (const id of this.nodes.keys()) priorities.set(id, collect(id).size);
36249
- this.priorityById = priorities;
36250
- return priorities;
36251
- }
36252
- has(id) {
36253
- return this.nodes.has(id);
36254
- }
36255
- size() {
36256
- return this.nodes.size;
36257
- }
36258
- values() {
36259
- return this.nodes.values();
36260
- }
36261
- async execute(concurrency, fn, cancelled = () => false) {
36262
- let active = 0;
36263
- const errors = [];
36264
- const priority = this.computePriorities();
36265
- const timingScope = phaseTimingsEnabled() ? this.timingScope : void 0;
36266
- const readySince = /* @__PURE__ */ new Map();
36267
- return new Promise((resolve, reject) => {
36268
- const dispatch = () => {
36269
- let changed = true;
36270
- while (changed) {
36271
- changed = false;
36272
- for (const node of this.nodes.values()) {
36273
- if (node.state !== "pending") continue;
36274
- if ([...node.dependencies].some((depId) => {
36275
- const dep = this.nodes.get(depId);
36276
- return dep && (dep.state === "failed" || dep.state === "skipped");
36277
- })) {
36278
- node.state = "skipped";
36279
- changed = true;
36280
- this.logger.debug(`Skipped ${node.id}: dependency failed or was skipped`);
36281
- }
36282
- }
36283
- }
36284
- const ready = [];
36285
- for (const node of this.nodes.values()) {
36286
- if (node.state !== "pending") continue;
36287
- if ([...node.dependencies].every((depId) => {
36288
- const dep = this.nodes.get(depId);
36289
- return !dep || dep.state === "completed";
36290
- })) ready.push(node);
36291
- }
36292
- ready.sort((a, b) => (priority.get(b.id) ?? 0) - (priority.get(a.id) ?? 0));
36293
- if (timingScope !== void 0) {
36294
- const now = performance.now();
36295
- for (const node of ready) if (!readySince.has(node.id)) readySince.set(node.id, now);
36296
- }
36297
- if (!cancelled()) for (const node of ready) {
36298
- if (active >= concurrency) break;
36299
- node.state = "running";
36300
- active++;
36301
- if (timingScope !== void 0) recordPhase(timingScope, "ready, waiting for a --concurrency slot", performance.now() - (readySince.get(node.id) ?? performance.now()), node.id);
36302
- fn(node).then(() => {
36303
- node.state = "completed";
36304
- }).catch((error) => {
36305
- node.state = "failed";
36306
- errors.push({
36307
- id: node.id,
36308
- error
36309
- });
36310
- }).finally(() => {
36311
- active--;
36312
- dispatch();
36313
- });
36314
- }
36315
- if (active === 0) {
36316
- if (errors.length > 0) {
36317
- reject(errors[0].error);
36318
- return;
36319
- }
36320
- if ([...this.nodes.values()].some((n) => n.state === "pending") && !cancelled()) {
36321
- const pending = [...this.nodes.values()].filter((n) => n.state === "pending").map((n) => n.id);
36322
- reject(/* @__PURE__ */ new Error(`Deadlock detected: ${pending.length} node(s) stuck with unresolvable dependencies (${pending.join(", ")})`));
36323
- return;
36324
- }
36325
- resolve();
36326
- }
36327
- };
36328
- dispatch();
36329
- });
36330
- }
36331
- };
36332
-
36333
- // src/analyzer/implicit-delete-deps.ts
36334
- const IMPLICIT_DELETE_DEPENDENCIES = {
36335
- "AWS::EC2::InternetGateway": ["AWS::EC2::VPCGatewayAttachment", "AWS::EC2::NatGateway"],
36336
- "AWS::EC2::VPCGatewayAttachment": ["AWS::EC2::NatGateway"],
36337
- "AWS::Events::EventBus": ["AWS::Events::Rule"],
36338
- "AWS::Athena::WorkGroup": ["AWS::Athena::NamedQuery"],
36339
- "AWS::CloudFront::ResponseHeadersPolicy": ["AWS::CloudFront::Distribution"],
36340
- "AWS::CloudFront::CachePolicy": ["AWS::CloudFront::Distribution"],
36341
- "AWS::CloudFront::OriginAccessControl": ["AWS::CloudFront::Distribution"],
36342
- "AWS::EC2::VPC": [
36343
- "AWS::EC2::Subnet",
36344
- "AWS::EC2::SecurityGroup",
36345
- "AWS::EC2::InternetGateway",
36346
- "AWS::EC2::EgressOnlyInternetGateway",
36347
- "AWS::EC2::VPCGatewayAttachment",
36348
- "AWS::EC2::RouteTable"
36349
- ],
36350
- "AWS::EC2::Subnet": ["AWS::EC2::SubnetRouteTableAssociation", "AWS::Lambda::Function"],
36351
- "AWS::EC2::RouteTable": ["AWS::EC2::Route", "AWS::EC2::SubnetRouteTableAssociation"],
36352
- "AWS::EC2::SecurityGroup": [
36353
- "AWS::EC2::SecurityGroupIngress",
36354
- "AWS::EC2::SecurityGroupEgress",
36355
- "AWS::Lambda::Function"
36356
- ]
36357
- };
36358
- const ALARM_RULE_FUNCTION_REGEX = /\b(?:ALARM|OK|INSUFFICIENT_DATA)\s*\(\s*([^)]*?)\s*\)/gi;
36359
- function extractReferencedAlarmNames(alarmRule) {
36360
- const names = /* @__PURE__ */ new Set();
36361
- for (const match of alarmRule.matchAll(ALARM_RULE_FUNCTION_REGEX)) {
36362
- let arg = (match[1] ?? "").trim();
36363
- if (arg.length === 0) continue;
36364
- if (arg.startsWith("\"") && arg.endsWith("\"") || arg.startsWith("'") && arg.endsWith("'")) arg = arg.slice(1, -1);
36365
- if (arg.length === 0) continue;
36366
- const arnAlarmMatch = /:alarm:(.+)$/.exec(arg);
36367
- if (arnAlarmMatch?.[1]) names.add(arnAlarmMatch[1]);
36368
- else names.add(arg);
36369
- }
36370
- return [...names];
36371
- }
36372
- function computeImplicitDeleteEdges(resources) {
36373
- const edges = [];
36374
- const alarmTypes = /* @__PURE__ */ new Set(["AWS::CloudWatch::Alarm", "AWS::CloudWatch::CompositeAlarm"]);
36375
- const nameToLogicalId = /* @__PURE__ */ new Map();
36376
- for (const [logicalId, resource] of Object.entries(resources)) {
36377
- if (!alarmTypes.has(resource.resourceType)) continue;
36378
- const alarmName = typeof resource.properties?.["AlarmName"] === "string" ? resource.properties["AlarmName"] : resource.physicalId;
36379
- if (alarmName) nameToLogicalId.set(alarmName, logicalId);
36380
- }
36381
- for (const [logicalId, resource] of Object.entries(resources)) {
36382
- if (resource.resourceType !== "AWS::CloudWatch::CompositeAlarm") continue;
36383
- const alarmRule = resource.properties?.["AlarmRule"];
36384
- if (typeof alarmRule !== "string") continue;
36385
- for (const referencedName of extractReferencedAlarmNames(alarmRule)) {
36386
- const referencedLogicalId = nameToLogicalId.get(referencedName);
36387
- if (!referencedLogicalId || referencedLogicalId === logicalId) continue;
36388
- edges.push({
36389
- before: logicalId,
36390
- after: referencedLogicalId
36391
- });
36392
- }
36393
- }
36394
- return edges;
36395
- }
36396
-
36397
- // src/deployment/deploy-engine/dependencies.ts
36398
- function hasPending(executor) {
36399
- for (const node of executor.values()) if (node.state === "pending") return true;
36400
- return false;
36401
- }
36402
- function buildDeletionDependencies(deleteIds, state, logger) {
36403
- const dependedBy = /* @__PURE__ */ new Map();
36404
- for (const id of deleteIds) dependedBy.set(id, /* @__PURE__ */ new Set());
36405
- for (const id of deleteIds) {
36406
- const resource = state.resources[id];
36407
- if (!resource?.dependencies) continue;
36408
- for (const dep of resource.dependencies) {
36409
- if (!deleteIds.has(dep)) continue;
36410
- dependedBy.get(dep).add(id);
36411
- }
36412
- }
36413
- addImplicitDeleteDependencies(deleteIds, state, dependedBy, logger);
36414
- return dependedBy;
36415
- }
36416
- function addImplicitDeleteDependencies(deleteIds, state, dependedBy, logger) {
36417
- const typeToIds = /* @__PURE__ */ new Map();
36418
- for (const id of deleteIds) {
36419
- const resource = state.resources[id];
36420
- if (!resource) continue;
36421
- const ids = typeToIds.get(resource.resourceType) ?? [];
36422
- ids.push(id);
36423
- typeToIds.set(resource.resourceType, ids);
36424
- }
36425
- for (const id of deleteIds) {
36426
- const resource = state.resources[id];
36427
- if (!resource) continue;
36428
- const mustDeleteAfter = IMPLICIT_DELETE_DEPENDENCIES[resource.resourceType];
36429
- if (!mustDeleteAfter) continue;
36430
- for (const depType of mustDeleteAfter) {
36431
- const depIds = typeToIds.get(depType);
36432
- if (!depIds) continue;
36433
- for (const depId of depIds) {
36434
- if (!dependedBy.has(id)) dependedBy.set(id, /* @__PURE__ */ new Set());
36435
- if (!dependedBy.get(id).has(depId)) {
36436
- dependedBy.get(id).add(depId);
36437
- logger.debug(safeMsg`Implicit delete dependency: ${depId} (${depType}) must be deleted before ${id} (${resource.resourceType})`);
36438
- }
36439
- }
36440
- }
36441
- }
36442
- const scoped = {};
36443
- for (const id of deleteIds) {
36444
- const resource = state.resources[id];
36445
- if (resource) scoped[id] = resource;
36446
- }
36447
- for (const { before, after } of computeImplicitDeleteEdges(scoped)) {
36448
- if (!dependedBy.has(after)) dependedBy.set(after, /* @__PURE__ */ new Set());
36449
- if (!dependedBy.get(after).has(before)) {
36450
- dependedBy.get(after).add(before);
36451
- logger.debug(safeMsg`Implicit delete dependency: ${before} (${scoped[before]?.resourceType}) must be deleted before ${after} (${scoped[after]?.resourceType})`);
36452
- }
36453
- }
36454
- }
36455
-
36456
37002
  // src/provisioning/changed-properties-consumers.ts
36457
37003
  const CHANGED_PROPERTIES_CONSUMER_TYPES = /* @__PURE__ */ new Set(["AWS::ServiceDiscovery::Service"]);
36458
37004
 
@@ -38804,7 +39350,7 @@ async function createPhaseCommit(scope) {
38804
39350
  retractCreatedResource(logicalId, resourceType, tableName);
38805
39351
  } catch (cleanupErr) {
38806
39352
  tableLeftBehind = true;
38807
- warn(`Partial-create cleanup failed for ${tableName}: ${this.cleanupFailureText(log, `Partial-create cleanup failed for ${tableName}: `, cleanupErr)} ` + (registeredBeforeReplicas.length > 0 ? "Its write scalable targets and scaling policies may still be registered. To remove the table and them, run cdkd rollback --revert-failed." : `To remove the orphaned AWS-side table, run: ` + pasteableAwsCommand(maskSecrets)`aws dynamodb delete-table --table-name ${tableName}`.render()));
39353
+ warn(`Partial-create cleanup failed for ${tableName}: ${this.cleanupFailureText(log, `Partial-create cleanup failed for ${tableName}: `, cleanupErr)} ` + (registeredBeforeReplicas.length > 0 ? `Its write scalable targets and scaling policies may still be registered. To remove the table and them, run ${cdkdRemedy("cdkd rollback", "--revert-failed")}.` : `To remove the orphaned AWS-side table, run: ` + pasteableAwsCommand(maskSecrets)`aws dynamodb delete-table --table-name ${tableName}`.render()));
38808
39354
  }
38809
39355
  markAuxiliaryFailure(wiringError, logicalId);
38810
39356
  const cause = wiringError instanceof Error ? wiringError : void 0;
@@ -40649,8 +41195,8 @@ async function updateInScope(logicalId, physicalId, resourceType, properties, pr
40649
41195
  if (context?.replayingState !== true && context?.desiredFromAwsReadback !== true) throw new ProvisioningError(log.mask(disassociationRefusal), resourceType, logicalId, physicalId);
40650
41196
  warn(`${disassociationRefusal} Proceeding: this update restores a recorded or read-back configuration.`);
40651
41197
  }
40652
- const replaceFlags = "cdkd deploy --replace --force-stateful-recreation";
40653
41198
  const replaceRemedy = async () => {
41199
+ const replaceFlags = deployReplaceCommand(true);
40654
41200
  let guardRegion = "";
40655
41201
  try {
40656
41202
  guardRegion = await this.dynamoDBClient.config.region() ?? "";
@@ -41395,7 +41941,7 @@ async function readUnsettled(physicalId, logicalId, resourceType, names, recorde
41395
41941
  if (!Object.hasOwn(out, name)) continue;
41396
41942
  out[name] = projectNamed(out[name], recordedProperties?.[name], desiredProperties?.[name], name, unnamed, attemptedItems);
41397
41943
  }
41398
- for (const entry of unnamed.filter((e) => e.ambiguous === true)) this.logger.warn(safeMsg`${logicalId} (${resourceType}): ${entry.path} on AWS has entries cdkd cannot key by an identity, so convergence keeps the recorded ${entry.path} rather than risk removing an entry neither the record nor the template declares. Check it with 'cdkd drift'.`);
41944
+ for (const entry of unnamed.filter((e) => e.ambiguous === true)) this.logger.warn(safeMsg`${logicalId} (${resourceType}): ${entry.path} on AWS has entries cdkd cannot key by an identity, so convergence keeps the recorded ${entry.path} rather than risk removing an entry neither the record nor the template declares. Check it with ${proseQuoted(cdkdRemedy("cdkd drift"))}.`);
41399
41945
  for (const entry of unnamed.filter((e) => e.ambiguous !== true)) this.logger.warn(safeMsg`${logicalId} (${resourceType}): ${entry.path} on AWS holds ${entry.identity} ${entry.value}, which neither the record nor the template declares, so cdkd leaves it in place. If the failed update added it and it should not be there, remove it by hand (for a replica: aws dynamodb update-table --replica-updates Delete; for an index: --global-secondary-index-updates Delete; for a vector index: --vector-index-updates Delete).`);
41400
41946
  return out;
41401
41947
  }
@@ -44401,7 +44947,7 @@ async function replaceCreateFirst(engine, { currentResource, equalIdIsSameResour
44401
44947
  }) + ` Underlying collision: ${createMsg}`, updateSecrets), "NAMED_REPLACEMENT_COLLISION", createError instanceof Error ? createError : void 0));
44402
44948
  }
44403
44949
  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");
44404
- 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 \`cdkd deploy --replace\` 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");
44950
+ 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");
44405
44951
  engine.logger.info(` Create-first collided with the existing resource's name and --replace is ` + safeMsg`set — deleting old ${logicalId} (${currentResource.physicalId}) first...`);
44406
44952
  deletedOldFirst = true;
44407
44953
  createResult = await replaceDeleteFirstAndRecreate(engine.replacementRun, engine.replacementDeps(), logicalId, resourceType, oldResourceType, currentResource, oldDeleteProvider, replaceProvider, replaceProps, updateSecrets, updateReplacePolicy, oldDeleteRoute.provisionedBy, noEchoDeleteValues);
@@ -44409,7 +44955,7 @@ async function replaceCreateFirst(engine, { currentResource, equalIdIsSameResour
44409
44955
  if (equalIdIsSameResource && !deletedOldFirst && createResult.physicalId === currentResource.physicalId) {
44410
44956
  const idempotentNameOrigin = replacementNameOrigin(logicalId, currentResource.physicalId);
44411
44957
  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");
44412
- 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 ` + "`cdkd deploy --replace` 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");
44958
+ 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");
44413
44959
  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...`);
44414
44960
  deletedOldFirst = true;
44415
44961
  createResult = await replaceDeleteFirstAndRecreate(engine.replacementRun, engine.replacementDeps(), logicalId, resourceType, oldResourceType, currentResource, oldDeleteProvider, replaceProvider, replaceProps, updateSecrets, updateReplacePolicy, oldDeleteRoute.provisionedBy, noEchoDeleteValues);
@@ -45388,7 +45934,7 @@ function nowWrittenCreateOnlyRefusal(input) {
45388
45934
  const keep = [.../* @__PURE__ */ new Set([...stillDropped, ...routeDriving])].filter((property) => !nowWritten.includes(property)).sort((a, b) => a.localeCompare(b)).map((property) => `${resourceType}:${property}`).join(",");
45389
45935
  const routed = [...routeDriving].sort((a, b) => a.localeCompare(b)).join(", ");
45390
45936
  const replaceFlags = unwrittenReplaceFlags(logicalId, nested);
45391
- return safeMsg`${logicalId} (${resourceType}): ${list} ${one ? "is" : "are"} create-only, and the ` + `state record holds ${one ? "it" : "them"} although the SDK provider that built the resource did not write ${one ? "it" : "them"} (an earlier deploy accepted dropping ${one ? "it" : "them"} with --prefer-sdk-route), so AWS does not. ` + safeMsg`This cdkd version's SDK provider writes ${written}, so no flag keeps ` + `${writtenOne ? "it" : "them"} dropped any more` + (routed.length > 0 ? safeMsg`, and this deploy routes the resource through Cloud Control (--prefer-sdk-route does not cover ${routed})` : "") + "; applying a create-only property means replacing the resource, which cdkd does not do on its own. This " + safeMsg`resource was not changed. To replace it and apply ${list}, re-run with ${replaceFlags}; a ` + `stateful resource also needs --force-stateful-recreation.` + (protectionEvidence !== void 0 ? safeMsg` ${recordedProtectionNote(protectionEvidence, nested ? "--replace" : `--recreate-via-cc-api ${logicalId} or --replace`)}` : "") + safeMsg` To keep the resource as it is, remove ${written} from the template` + (keep.length > 0 ? safeMsg` and re-run with --prefer-sdk-route ${keep}.` : ".") + (nested || stillDropped.length > 0 || (input.evidence ?? []).some((property) => !nowWritten.includes(property)) ? "" : safeMsg` If AWS already holds ${written} (cdkd drift compares it), re-record the ` + safeMsg`resource instead: cdkd import with --resource '${logicalId}=PHYSICAL_ID' (its physical ` + `id, quoted) and --force writes a record without this evidence and changes nothing in AWS.`);
45937
+ return safeMsg`${logicalId} (${resourceType}): ${list} ${one ? "is" : "are"} create-only, and the ` + `state record holds ${one ? "it" : "them"} although the SDK provider that built the resource did not write ${one ? "it" : "them"} (an earlier deploy accepted dropping ${one ? "it" : "them"} with --prefer-sdk-route), so AWS does not. ` + safeMsg`This cdkd version's SDK provider writes ${written}, so no flag keeps ` + `${writtenOne ? "it" : "them"} dropped any more` + (routed.length > 0 ? safeMsg`, and this deploy routes the resource through Cloud Control (--prefer-sdk-route does not cover ${routed})` : "") + "; applying a create-only property means replacing the resource, which cdkd does not do on its own. This " + safeMsg`resource was not changed. To replace it and apply ${list}, re-run with ${replaceFlags}; a ` + `stateful resource also needs --force-stateful-recreation.` + (protectionEvidence !== void 0 ? safeMsg` ${recordedProtectionNote(protectionEvidence, nested ? "--replace" : `--recreate-via-cc-api ${logicalId} or --replace`)}` : "") + safeMsg` To keep the resource as it is, remove ${written} from the template` + (keep.length > 0 ? safeMsg` and re-run with --prefer-sdk-route ${keep}.` : ".") + (nested || stillDropped.length > 0 || (input.evidence ?? []).some((property) => !nowWritten.includes(property)) ? "" : safeMsg` If AWS already holds ${written} (cdkd drift compares it), re-record the ` + safeMsg`resource instead: ${cdkdRemedy("cdkd import")} with --resource '${logicalId}=PHYSICAL_ID' (its physical ` + `id, quoted) and --force writes a record without this evidence and changes nothing in AWS.`);
45392
45938
  }
45393
45939
 
45394
45940
  // src/deployment/deploy-engine/update/provision-update.ts
@@ -45966,16 +46512,19 @@ function enqueueLostChildren(run, executor) {
45966
46512
  engine.logger.info(survivesParent(change.resourceType) ? safeMsg` ${id} was attached to a resource the update-failure fallback re-created under the same name: attaching it again` : safeMsg` ${id} went with a resource the update-failure fallback re-created under the same id: re-creating it`);
45967
46513
  }
45968
46514
  if (progress) progress.total += lostIds.length;
46515
+ const lost = new Set(lostIds);
46516
+ const isMember = (id) => executor.has(id) || lost.has(id);
46517
+ const dependenciesOf = (id) => engine.dagBuilder.getDirectDependencies(dag, id);
46518
+ const lostDeps = nearestMemberDependencies(lostIds, dependenciesOf, isMember);
45969
46519
  for (const id of lostIds) executor.add({
45970
46520
  id,
45971
- dependencies: new Set(engine.dagBuilder.getDirectDependencies(dag, id).filter((d) => executor.has(d))),
46521
+ dependencies: lostDeps.get(id),
45972
46522
  state: "pending",
45973
46523
  data: changes.get(id)
45974
46524
  });
45975
- for (const node of executor.values()) {
45976
- if (node.state !== "pending") continue;
45977
- for (const dep of engine.dagBuilder.getDirectDependencies(dag, node.id)) if (lostIds.includes(dep)) node.dependencies.add(dep);
45978
- }
46525
+ const pending = [...executor.values()].filter((node) => node.state === "pending" && !lost.has(node.id));
46526
+ const pendingDeps = nearestMemberDependencies(pending.map((node) => node.id), dependenciesOf, isMember);
46527
+ for (const node of pending) for (const dep of pendingDeps.get(node.id)) if (lost.has(dep)) node.dependencies.add(dep);
45979
46528
  }
45980
46529
 
45981
46530
  // src/deployment/deploy-engine/execute/provision-node.ts
@@ -46156,6 +46705,22 @@ async function settleFailedDeployRecords(run) {
46156
46705
  }
46157
46706
 
46158
46707
  // src/deployment/deploy-engine/execute/rollback-after-failure.ts
46708
+ function interruptedRemedy(parentStack, stackName) {
46709
+ if (parentStack === void 0) return partialStateRemedy(stackName);
46710
+ return "This is a nested stack: recover it through its top-level stack. " + partialStateRemedy(parentStack.split("~")[0]);
46711
+ }
46712
+ function partialStateRemedy(stackName) {
46713
+ const stack = {
46714
+ value: stackName,
46715
+ hole: "stack"
46716
+ };
46717
+ const matched = {
46718
+ ...stack,
46719
+ opts: { patternMatched: true }
46720
+ };
46721
+ return `Resume, revert, or clean up with one of:
46722
+ ${pasteableCommand("cdkd deploy", [matched]).command}\n ${pasteableCommand("cdkd rollback", [stack]).command}\n ${pasteableCommand("cdkd destroy", [matched]).command}`;
46723
+ }
46159
46724
  async function rollbackFailedDeploy(run, error, initialDeploy, currentEtag) {
46160
46725
  const { engine, stackName, currentState, newResources, completedOperations, failedOperations } = run;
46161
46726
  let autoRollbackClean = false;
@@ -46167,13 +46732,13 @@ async function rollbackFailedDeploy(run, error, initialDeploy, currentEtag) {
46167
46732
  let rollbackRemainingFailedOps = failedOperations;
46168
46733
  if (error instanceof InterruptedError || isInterruptedWaitError(error) || engine.interruptCause === "user") {
46169
46734
  await writeRollbackJournalSegment(engine.rollbackDeps(), stackName, completedOperations, failedOperations, "interrupted", initialDeploy);
46170
- engine.logger.info(safeMsg`Partial state saved (${Object.keys(newResources).length} resources). ` + "Run deploy again to resume, 'cdkd rollback' to revert, or destroy to clean up.");
46735
+ engine.logger.info(safeMsg`Partial state saved (${Object.keys(newResources).length} resources). ${asIsMessage(interruptedRemedy(engine.rollbackDeps().options.parentStackInfo?.parentStack, stackName))}`);
46171
46736
  throw error;
46172
46737
  }
46173
46738
  if (engine.options.noRollback) {
46174
46739
  await writeRollbackJournalSegment(engine.rollbackDeps(), stackName, completedOperations, failedOperations, "no-rollback-failure", initialDeploy);
46175
46740
  engine.logger.warn("Deployment failed. --no-rollback is set, skipping rollback.");
46176
- engine.logger.warn(safeMsg`Partial state has been saved. ${recoveryHint(engine.rollbackDeps(), "Run 'cdkd deploy' to resume, 'cdkd rollback' to revert, or destroy to clean up.")}`);
46741
+ engine.logger.warn(safeMsg`Partial state has been saved. ${asIsMessage(recoveryHint(engine.rollbackDeps(), partialStateRemedy(stackName)))}`);
46177
46742
  } else {
46178
46743
  autoRollbackJournaled = await writeRollbackJournalSegment(engine.rollbackDeps(), stackName, completedOperations, failedOperations, "auto-rollback-started", initialDeploy);
46179
46744
  const rollbackResult = await performRollback(engine.rollbackDeps(), completedOperations, newResources, stackName, currentState, failedOperations, currentState.orphans ?? [], {
@@ -46367,11 +46932,7 @@ async function executeDeployment(engine, template, currentState, changes, dag, e
46367
46932
  engine.logger.info(safeMsg`${cyan("Deploying")} ${cyan(createUpdateIds.length)} resource(s) (DAG: ${executionLevels.length} levels, max parallel: ${concurrency})`);
46368
46933
  const createUpdateExecutor = new DagExecutor(phaseScope);
46369
46934
  const provisionable = new Set(createUpdateIds);
46370
- const createUpdateDeps = /* @__PURE__ */ new Map();
46371
- for (const id of createUpdateIds) {
46372
- const allDeps = engine.dagBuilder.getDirectDependencies(dag, id);
46373
- createUpdateDeps.set(id, new Set(allDeps.filter((d) => provisionable.has(d))));
46374
- }
46935
+ const createUpdateDeps = nearestMemberDependencies(createUpdateIds, (id) => engine.dagBuilder.getDirectDependencies(dag, id), (id) => provisionable.has(id));
46375
46936
  const levelOf = /* @__PURE__ */ new Map();
46376
46937
  executionLevels.forEach((level, at) => {
46377
46938
  for (const id of level) levelOf.set(id, at);
@@ -46586,7 +47147,12 @@ function hasPendingMovesOut(state) {
46586
47147
  function pendingMovesRefusalMessage(state, stackName, region, command) {
46587
47148
  const { moves } = pendingMovesOutOf(state);
46588
47149
  const listed = moves.length > 0 ? moves.map((m) => `${m.from} -> ${m.toStack}.${m.to}`).join(", ") : "a move this binary cannot read";
46589
- return safeMsg`${command} refused stack ${stackName} (${region}): a cdkd refactor that moved ` + safeMsg`resources out of it did not finish (${listed}). The destination may already hold ` + `them, so acting on this stack now could delete a resource another stack owns. Run ` + safeMsg`'cdkd refactor ${stackName}' to finish the move, then re-run.`;
47150
+ const refactorCommand = pasteableCommand("cdkd refactor", [{
47151
+ value: stackName,
47152
+ hole: "stack",
47153
+ opts: { patternMatched: true }
47154
+ }]).command;
47155
+ return safeMsg`${command} refused stack ${stackName} (${region}): a cdkd refactor that moved ` + safeMsg`resources out of it did not finish (${listed}). The destination may already hold ` + `them, so acting on this stack now could delete a resource another stack owns. Run ${proseQuoted(refactorCommand)} to finish the move, then re-run.`;
46590
47156
  }
46591
47157
  function refusePendingMovesOut(state, stackName, region, command) {
46592
47158
  if (!hasPendingMovesOut(state)) return;
@@ -47388,8 +47954,117 @@ async function scanActiveConsumers(producerStack, producerRegion, ctx, onUnreada
47388
47954
  }))).filter((r) => r !== null).flat();
47389
47955
  }
47390
47956
 
47957
+ // src/deployment/ssm-slashed-name-heal.ts
47958
+ const SSM_PARAMETER = "AWS::SSM::Parameter";
47959
+ function isObject(value) {
47960
+ return typeof value === "object" && value !== null && !Array.isArray(value);
47961
+ }
47962
+ function generatedNames(logicalId, stackName, stackInstanceId, record) {
47963
+ const names = [withStackScope({
47964
+ stackName,
47965
+ stackInstanceId: void 0,
47966
+ nameGenerations: void 0
47967
+ }, () => generatedNameFor(SSM_PARAMETER, logicalId))];
47968
+ if (stackInstanceId !== void 0) {
47969
+ const generation = nameGenerationOf(record, logicalId);
47970
+ names.push(withStackScope({
47971
+ stackName,
47972
+ stackInstanceId,
47973
+ nameGenerations: /* @__PURE__ */ new Map([[logicalId, generation]])
47974
+ }, () => generatedNameFor(SSM_PARAMETER, logicalId)));
47975
+ }
47976
+ return names;
47977
+ }
47978
+ function healedRecord(logicalId, record, template, stackName, stackInstanceId) {
47979
+ if (!isObject(record) || record["resourceType"] !== SSM_PARAMETER) return void 0;
47980
+ const physicalId = record["physicalId"];
47981
+ if (typeof physicalId !== "string" || !/^\/[^/]+$/.test(physicalId)) return void 0;
47982
+ const declared = template.Resources?.[logicalId];
47983
+ if (!isObject(declared) || declared["Type"] !== SSM_PARAMETER) return void 0;
47984
+ const properties = declared["Properties"] ?? {};
47985
+ if (!isObject(properties) || properties["Name"]) return void 0;
47986
+ const recordedProperties = record["properties"];
47987
+ if (isObject(recordedProperties) && recordedProperties["Name"]) return void 0;
47988
+ const state = record;
47989
+ const to = physicalId.slice(1);
47990
+ let names;
47991
+ try {
47992
+ names = generatedNames(logicalId, stackName, stackInstanceId, state);
47993
+ } catch {
47994
+ return;
47995
+ }
47996
+ if (!names.includes(to)) return void 0;
47997
+ const observed = state.observedProperties;
47998
+ return {
47999
+ record: {
48000
+ ...state,
48001
+ physicalId: to,
48002
+ ...isObject(observed) && observed["Name"] === physicalId && { observedProperties: {
48003
+ ...observed,
48004
+ Name: to
48005
+ } }
48006
+ },
48007
+ heal: {
48008
+ logicalId,
48009
+ from: physicalId,
48010
+ to
48011
+ }
48012
+ };
48013
+ }
48014
+ function healSlashedSsmParameterNames(state, template, stackName) {
48015
+ const resources = state.resources ?? {};
48016
+ const heals = [];
48017
+ if (!isObject(resources)) return {
48018
+ resources,
48019
+ heals
48020
+ };
48021
+ let stackInstanceId;
48022
+ try {
48023
+ stackInstanceId = stackInstanceIdOf(state, stackName);
48024
+ } catch {
48025
+ return {
48026
+ resources,
48027
+ heals
48028
+ };
48029
+ }
48030
+ let healedResources;
48031
+ for (const [logicalId, record] of Object.entries(resources)) {
48032
+ const result = healedRecord(logicalId, record, template, stackName, stackInstanceId);
48033
+ if (result === void 0) continue;
48034
+ healedResources ??= { ...resources };
48035
+ healedResources[logicalId] = result.record;
48036
+ heals.push(result.heal);
48037
+ }
48038
+ return {
48039
+ resources: healedResources ?? resources,
48040
+ heals
48041
+ };
48042
+ }
48043
+ function slashedSsmNameHealNote(heal) {
48044
+ return safeMsg`SSM parameter ${heal.logicalId}: its recorded name ${heal.from} is ` + safeMsg`re-spelled ${heal.to} (the same parameter in SSM), so Ref and CDK's ` + "grantRead / grantWrite ARN name it; resources referencing it update to the new spelling (go-to-k/cdkd#6274)";
48045
+ }
48046
+ function slashedSsmNameHealPendingNote(heal, stackName) {
48047
+ return safeMsg`SSM parameter ${heal.logicalId} of nested stack ${stackName}: its recorded name ` + safeMsg`${heal.from} is re-spelled ${heal.to} on the next deploy that updates this nested ` + `stack, not on this one (go-to-k/cdkd#6274)`;
48048
+ }
48049
+ function slashedSsmNameHealAdoptedNote(heal) {
48050
+ return safeMsg`SSM parameter ${heal.logicalId} (adopted back): the deploy re-spells its recorded ` + safeMsg`name ${heal.from} as ${heal.to} and updates resources referencing it; this ` + `preview does not show those updates (go-to-k/cdkd#6274)`;
48051
+ }
48052
+ function readsRef(value, logicalId) {
48053
+ if (Array.isArray(value)) return value.some((item) => readsRef(item, logicalId));
48054
+ if (!isObject(value)) return false;
48055
+ if (value["Ref"] === logicalId) return true;
48056
+ const sub = value["Fn::Sub"];
48057
+ const subText = Array.isArray(sub) ? sub[0] : sub;
48058
+ if (typeof subText === "string" && subText.includes(`\${${logicalId}}`)) return true;
48059
+ return Object.values(value).some((child) => readsRef(child, logicalId));
48060
+ }
48061
+ function healsReadByExports(heals, template) {
48062
+ const exported = Object.values(template.Outputs ?? {}).filter((output) => isObject(output) && output["Export"] !== void 0);
48063
+ return heals.filter((heal) => exported.some((output) => readsRef(output.Value, heal.logicalId)));
48064
+ }
48065
+
47391
48066
  // src/deployment/deploy-engine/deploy-flow/plan-checks.ts
47392
- async function refuseUnsafePlan(engine, { stackName, currentState, effectiveTemplate, parameterValues, conditions, changes, diffResolverContext }) {
48067
+ async function refuseUnsafePlan(engine, { stackName, ssmNameHeals = [], currentState, effectiveTemplate, parameterValues, conditions, changes, diffResolverContext }) {
47393
48068
  const nestedStackTypeChanges = findNestedStackTypeChanges({
47394
48069
  changes,
47395
48070
  stateResources: currentState.resources
@@ -47397,6 +48072,7 @@ async function refuseUnsafePlan(engine, { stackName, currentState, effectiveTemp
47397
48072
  if (nestedStackTypeChanges.length > 0) throw markNonRetryable(new CdkdError(renderNestedStackTypeChangeRefusal(nestedStackTypeChanges, stackName), "TYPE_CHANGE_NESTED_STACK"));
47398
48073
  await refuseInUseExportChanges(engine, {
47399
48074
  stackName,
48075
+ ssmNameHeals,
47400
48076
  currentState,
47401
48077
  effectiveTemplate,
47402
48078
  conditions,
@@ -47424,7 +48100,7 @@ async function refuseUnsafePlan(engine, { stackName, currentState, effectiveTemp
47424
48100
  forceStatefulRecreation: engine.options.forceStatefulRecreation === true
47425
48101
  });
47426
48102
  }
47427
- async function refuseInUseExportChanges(engine, { stackName, currentState, effectiveTemplate, conditions, changes, diffResolverContext }) {
48103
+ async function refuseInUseExportChanges(engine, { stackName, ssmNameHeals, currentState, effectiveTemplate, conditions, changes, diffResolverContext }) {
47428
48104
  const affected = await findAffectedExports({
47429
48105
  template: effectiveTemplate,
47430
48106
  conditions,
@@ -47464,7 +48140,8 @@ async function refuseInUseExportChanges(engine, { stackName, currentState, effec
47464
48140
  if (refused.length > 0 || unreadable.length > 0) throw new ExportInUseError(stackName, engine.stackRegion, refused, {
47465
48141
  unreadable,
47466
48142
  affectedExportNames: affected.map((a) => a.exportName),
47467
- nested: engine.options.parentStackInfo !== void 0
48143
+ nested: engine.options.parentStackInfo !== void 0,
48144
+ respelledSsmParameters: refused.length > 0 ? healsReadByExports(ssmNameHeals, effectiveTemplate).map((heal) => heal.logicalId) : []
47468
48145
  });
47469
48146
  }
47470
48147
 
@@ -47543,7 +48220,7 @@ function keptWholeReasonText(reason) {
47543
48220
  }
47544
48221
 
47545
48222
  // src/deployment/deploy-engine/deploy-flow/no-change.ts
47546
- async function deployWithoutChanges(engine, { stackName, template, currentState, currentEtag, effectiveTemplate, outputsDigestSource, parameterValues, conditions, conditionVerdicts, migrationPending, maskedFingerprintsBackfilled, orphansChanged, terminationProtectionChanged, resolveStackInstanceId, startProvenanceCapture, startTime, clock }) {
48223
+ async function deployWithoutChanges(engine, { stackName, template, currentState, currentEtag, effectiveTemplate, outputsDigestSource, parameterValues, conditions, conditionVerdicts, migrationPending, maskedFingerprintsBackfilled, orphansChanged, terminationProtectionChanged, ssmNamesHealed, resolveStackInstanceId, startProvenanceCapture, startTime, clock }) {
47547
48224
  engine.logger.info("No changes detected. Stack is up to date.");
47548
48225
  startProvenanceCapture();
47549
48226
  const supersededChanged = engine.options.dryRun ? false : await retryCarriedSupersededResources(engine, currentState, supersededResourcesOf(currentState), currentState.resources);
@@ -47585,7 +48262,7 @@ async function deployWithoutChanges(engine, { stackName, template, currentState,
47585
48262
  stackName
47586
48263
  });
47587
48264
  const outputProvenanceBackfill = !outputsChanged && currentState.outputReferenceProvenance === void 0 && engine.provenanceBaseline?.tokenFree === false && engine.outputReferenceProvenanceFor(persistedOutputs, redactOutputs(engine.maskingDeps(), persistedOutputs)) !== void 0;
47588
- if (observedRefresh || outputProvenanceBackfill || maskedFingerprintsBackfilled || conditionVerdictsChanged || outputsChanged || exportSetChanged || skippedOutputsChanged || orphansChanged || supersededChanged || terminationProtectionChanged || healedAttributesPending) {
48265
+ if (observedRefresh || outputProvenanceBackfill || maskedFingerprintsBackfilled || conditionVerdictsChanged || outputsChanged || exportSetChanged || skippedOutputsChanged || orphansChanged || supersededChanged || terminationProtectionChanged || ssmNamesHealed || healedAttributesPending) {
47589
48266
  await resolveStackInstanceId();
47590
48267
  try {
47591
48268
  const refreshedState = {
@@ -47715,7 +48392,7 @@ async function prepareChangeExecution(engine, { stackName, currentState, effecti
47715
48392
  if (idArrivesLater) {
47716
48393
  startGeneratedNameGuard();
47717
48394
  const kept = await retainedForWarning ?? [];
47718
- if (kept.length > 0) engine.logger.warn(safeMsg`An earlier deployment of ${displayStackName(stackName)} kept ${String(kept.length)} ` + "resource(s) here (DeletionPolicy: Retain). This deploy does not take them back: it creates new resources under new names, as CloudFormation does. To manage a kept resource again, adopt it with 'cdkd import'.");
48395
+ if (kept.length > 0) engine.logger.warn(safeMsg`An earlier deployment of ${displayStackName(stackName)} kept ${String(kept.length)} ` + "resource(s) here (DeletionPolicy: Retain). This deploy does not take them back: it creates new resources under new names, as CloudFormation does. To manage a " + safeMsg`kept resource again, adopt it with: ${cdkdRemedy("cdkd import")}`);
47719
48396
  }
47720
48397
  engine.generatedNameGuard?.recordPlannedIntents();
47721
48398
  }
@@ -47828,6 +48505,15 @@ async function doDeployWithPrefetch(engine, stackName, template, createOnlyPrefe
47828
48505
  const retainedAtFirstDeploy = idArrivesLater && !engine.options.dryRun ? Promise.resolve().then(() => engine.stateBackend.loadRetainedRecord(stackName, engine.stackRegion)) : void 0;
47829
48506
  const retainedForWarning = retainedAtFirstDeploy?.then((retained) => retained ?? loadKeptForWarning(keptHistorySources(engine), stackName, engine.stackRegion)).catch(() => null);
47830
48507
  if (idArrivesLater && !engine.options.dryRun) engine.stateBackend.prefetchStackInstanceSibling?.(stackName, engine.stackRegion);
48508
+ const ssmNameHeals = [];
48509
+ const healSsmNames = () => {
48510
+ const healed = healSlashedSsmParameterNames(currentState, template, stackName);
48511
+ if (healed.heals.length === 0) return;
48512
+ currentState.resources = healed.resources;
48513
+ for (const heal of healed.heals) engine.logger.info(slashedSsmNameHealNote(heal));
48514
+ ssmNameHeals.push(...healed.heals);
48515
+ };
48516
+ healSsmNames();
47831
48517
  engine.rebaseline(currentState.resources ?? {});
47832
48518
  engine.runProducerRegionEvidence = () => producerRegionEvidence(engine.rollbackDeps(), currentState);
47833
48519
  const firstDeployIdentityRead = idArrivesLater && engine.stateBackend.peekStackInstanceSibling ? engine.options.dryRun ? Promise.resolve(null) : engine.stateBackend.peekStackInstanceSibling(stackName, engine.stackRegion) : void 0;
@@ -47909,6 +48595,7 @@ async function doDeployWithPrefetch(engine, stackName, template, createOnlyPrefe
47909
48595
  captureStoredNoEchoNamingValues(engine.secretsRun, engine.maskingDeps(), currentState.resources, effectiveTemplate, conditions);
47910
48596
  engine.secretsRun.preDeploySecretNamedRecords = secretNamedRecordNeedles(currentState.resources, stateNamingSecrets(engine.secretsRun));
47911
48597
  if (Object.keys(orphanPlan.adopted).length > 0) {
48598
+ healSsmNames();
47912
48599
  stampReasonlessParameterRefusals(engine.logger, currentState.resources, template);
47913
48600
  if (backfillMaskedPropertyFingerprints(currentState.resources, template, backfillNoEchoValues) > 0) maskedFingerprintsBackfilled = true;
47914
48601
  }
@@ -47935,6 +48622,7 @@ async function doDeployWithPrefetch(engine, stackName, template, createOnlyPrefe
47935
48622
  }
47936
48623
  await refuseUnsafePlan(engine, {
47937
48624
  stackName,
48625
+ ssmNameHeals,
47938
48626
  currentState,
47939
48627
  effectiveTemplate,
47940
48628
  parameterValues,
@@ -47985,6 +48673,7 @@ async function doDeployWithPrefetch(engine, stackName, template, createOnlyPrefe
47985
48673
  maskedFingerprintsBackfilled,
47986
48674
  orphansChanged,
47987
48675
  terminationProtectionChanged,
48676
+ ssmNamesHealed: ssmNameHeals.length > 0,
47988
48677
  resolveStackInstanceId,
47989
48678
  startProvenanceCapture,
47990
48679
  startTime,
@@ -48320,5 +49009,5 @@ var DeployEngine = class {
48320
49009
  }
48321
49010
  };
48322
49011
 
48323
- export { vectorIndexesForCreate as $, applyCallerIdentityCredentials as $a, isDefaultBootstrapRepoName as $c, isFinalSnapshotError as $i, withUnprovenUnsettled as $n, toFiniteNumber as $o, noEchoParameterValueSeed as $r, malformedOutputsRefusalMessage as $s, displacedOpClause as $t, PROTECTION_PROPERTY_BY_TYPE as A, UNSPECIFIED_SKIP_REASON as Aa, NO_CC_HANDLERS_REASON as Ac, withAttemptedItemsMasked as Ai, hasPlainPrototype as Al, findDestructiveChanges as An, isImpossibleEmptyStoredAttribute as Ao, nameGenerationCarriedFrom as Ar, refuseMalformedResourceEntriesForImport as As, IMPLICIT_DELETE_DEPENDENCIES as At, reverseMapStreamPolicy as B, stackIdTailOf as Ba, CrossPrefixScanCache as Bc, secretNamedRecordNeedles as Bi, clearBucketRegionCache as Bl, differingRemedy as Bn, replacementSidesForLog as Bo, namesAnyDeclaredParameter as Br, refuseMalformedResourcePropertiesForExport as Bs, updateRefactorMarker as Bt, refusePendingMovesOut as C, withPrintingSecrets as Ca, findActionableSdkUnwired as Cc, green as Ci, isListParameterType as Cl, NOECHO_MAC_KEY_ALIAS as Cn, outputReferenceProvenanceOf as Co, REDACTED_DELETE_ADDRESS_SKIP_REASON as Cr, malformedLocalResourcesWarning as Cs, maskedLogger as Ct, diffSecurity as D, resolvedResourceTimeoutMs as Da, withoutAcceptedSdkUnwiredProperties as Dc, noEchoComparisonForTemplate as Di, decodeListingKey as Dl, noEchoMacVerdict as Dn, referenceProvenanceOf as Do, segmentCleanupOptions as Dr, refuseMalformedResourceEntries as Ds, S3_AUTO_DELETE_OBJECTS_TAG as Dt, serviceTokenBlockingReason as E, waitForGoneAfterDelete as Ea, unwrittenCreateOnlyReplacement as Ec, noEchoAttributeNamesOf as Ei, purgeNoncurrentKeyVersions as El, noEchoMacParametersOf as En, recordedReferenceRegions as Eo, redactedDeleteAddressSkip as Er, refuseMalformedResourceAttributesForOrphan as Es, ECR_AUTO_DELETE_IMAGES_TAG as Et, STREAM_POLICY_KEY as F, isWaitAbandonedError as Fa, isKnownTokenFreeState as Fc, namingSecretsWithRecordedNoEcho as Fi, describeFileReadFailure as Fl, rollbackOrphanIds as Fn, withSharedDrainBudget as Fo, retiredNameGenerationsLeaving as Fr, malformedDriftResourcePropertiesWarning as Fs, readRefactorMarkerOnce as Ft, streamTagsMatchDeclared as G, applyRoleArnIfSet as Ga, stackInstanceIdOf as Gc, maskedSecretSegment as Gi, propertiesChangedReason as Gn, MULTI_REGION_RECREATE_BLOCKED_TYPES as Go, exportAliasCollisionScrubWarning as Gr, malformedOrphansRefusalMessage as Gs, formatResourceLine as Gt, streamDeclaresTags as H, resolveDynamicReferences as Ha, crossPrefixDeniedWarning as Hc, storedSecretNameNeedles as Hi, looselyEqual as Hn, findReplacedReadersOfRecreateTargets as Ho, resourcesNamingDeclaredParameter as Hr, repairMalformedResourcePropertiesForReadOnly as Hs, readsOnlyNoEchoParameters as Ht, STREAM_TAGS_KEY as I, IntrinsicFunctionResolver as Ia, hasReasonlessBaselineRefusal as Ic, orphanRecordsPrintingBag as Ii, displayAssemblyPath as Il, withMovedTo as In, namesRecreatedParent as Io, withNameGenerationReached as Ir, malformedResourcePropertiesWarning as Is, refactorMarkerMovesOf as It, planTimeToLive as J, explicitRoleArnOrThrow as Ja, stringifyValue as Jc, ATOMIC_FINAL_SNAPSHOT_TYPES as Ji, replayFailedOperations as Jn, renderStatefulReason as Jo, secretSafeKeyDisplay as Jr, refuseMalformedOrphansForDestroy as Js, lookupEachName as Jt, isTtlAlreadyDisabled as K, assertFlagRoleArn as Ka, withStackInstanceIdWithheld as Kc, secretSegmentsOfState as Ki, proposeRenames as Kn, isStatefulRecreateTargetForReplace as Ko, secretBearing as Kr, malformedOrphansWarning as Ks, chunks as Kt, declaredStreamPolicyMember as L, isSelectOutOfBounds as La, hasUnverifiableParameterRefusal as Lc, secretNamePrintingBag as Li, namesTheSameDirectory as Ll, changedReferenceInDiff as Ln, INTRINSIC_KEYS as Lo, getCurrentProducerRegions as Lr, refuseMalformedResourceProperties as Ls, refactorMarkerRefusalMessage as Lt, perType as M, deleteLeftInPlace as Ma, TemplateParser as Mc, completedReplayEntries as Mi, ownValue as Ml, findRefactorHints as Mn, isNamelessDynamicReferenceError as Mo, nameScopeOf as Mr, refuseMalformedResourceEntriesForOrphan as Ms, keptForRetainedRecord as Mt, readProtection as N, deleteSkipReason as Na, S3StateBackend as Nc, journaledOrphanPrintingBag as Ni, absoluteAssemblyPathEscape as Nl, hintSidesOf as Nn, carriesDynamicReference as No, retiredAfterRollback as Nr, repairMalformedResourceEntriesForReadOnly as Ns, recordRetainedForReadoption as Nt, recordedProtectionEvidence as O, setResolvedResourceTimeouts as Oa, withoutSdkUnwiredProperties as Oc, noEchoExactEchoLeavesOf as Oi, defineOwnKey as Ol, noEchoValueMacsOf as On, referenceTokensIn as Oo, removeProtectionTypeList as Or, refuseMalformedResourceEntriesForDeploy as Os, hasCdkAutoDeleteTag as Ot, DynamoDBGlobalTableProvider as P, withIndeterminateGuard as Pa, splitImportedOps as Pc, maskEventTextWithBoundBags as Pi, assemblyPathEscape as Pl, movedToHint as Pn, keepsSecretReferenceToken as Po, retiredNameGenerationsAfter as Pr, unreadableResourceEntries as Ps, readRefactorMarker as Pt, readbackVectorIndexes as Q, AWS_CREDENTIAL_ENV_KEYS as Qa, isDefaultBootstrapBucketName as Qc, effectiveDeletionPolicy as Qi, settleUnsettledPrevious as Qn, toCfnInteger as Qo, isWholeDynamicReferenceValue as Qr, malformedLocalOutputsWarning as Qs, NESTED_PENDING_PARENT_REASON as Qt, declaredStreamTagsMember as R, isAlwaysLiveAttribute as Ra, rebuildClientForBucketRegion as Rc, secretNamePrintingBags as Ri, renderAssemblyPathEscape as Rl, changedReferencePath as Rn, containsIntrinsic as Ro, inheritProducerRegions as Rr, refuseMalformedResourcePropertiesForDestroy as Rs, refuseRefactorMarker as Rt, pendingMovesRefusalMessage as S, getCurrentResourceSecrets as Sa, hasReadableResources as Sc, gray as Si, SSM_PARAMETER_VALUE_PREFIX as Sl, DeploymentEventsStore as Sn, keepHeldTokenProvenance as So, findNestedStackTypeChanges as Sr, malformedLocalResourceEntriesWarning as Ss, deleteTableWithIndexBusyRetry as St, findServiceTokenRefusals as T, CloudControlProvider as Ta, findSdkUnwiredProperties as Tc, yellow as Ti, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as Tl, noEchoMacBinding as Tn, recordedProvenanceOf as To, redactedDeleteAddressFields as Tr, malformedScrubResourceEntriesRefusalMessage as Ts, waitForIndexesSettled as Tt, streamMemberRefusals as U, producerLookupOver as Ua, isAccessDenied$1 as Uc, extractDeploymentEventError as Ui, mappingPairs as Un, isPlainReferenceTo as Uo, WITHHELD_NAME_DISPLAY as Ur, UNREADABLE_ORPHANS_CONTAINER_ROW as Us, getPriorAttempts as Ut, streamDeclaresPolicy as V, isSettledInstanceState as Va, applyCrossPrefixScan as Vc, stateSecretNameNeedles as Vi, resolveBucketRegion as Vl, isPairableType as Vn, siblingsOf as Vo, reachableDivergentParameters as Vr, refuseMalformedResourcePropertiesForOrphan as Vs, macWriteOnlyKeys as Vt, streamPolicyMatchesDeclared as W, refuseUnreadableCdkCrossAccountRefs as Wa, isNotImplemented as Wc, APPSYNC_APIKEY_ARN_RESOURCE_PATH as Wi, parseMappingFile as Wn, shownType as Wo, displayTextOrWithheld as Wr, hasReadableOrphans as Ws, markRefusedBeforeApplying as Wt, sendTtlWaitingOutRateLimit as X, parseIamRoleArn as Xa, createAssetRedirectResolver as Xc, ccRoutedFinalSnapshotError as Xi, DELETED_RESOURCE_REMEDY as Xn, coerceWarmThroughput as Xo, exportNameNoEchoParameters as Xr, malformedExportNamesWarning as Xs, pendingRequestCount as Xt, readTtlSpec as Y, isIamRoleArn as Ya, buildAssetRedirectMap as Yc, PRE_DELETE_SNAPSHOT_TYPES as Yi, replayRollback as Yn, WARM_THROUGHPUT_MEMBERS as Yo, carriedExportAliasExposure as Yr, repairMalformedOrphansForReadOnly as Ys, withApiLimit as Yt, planVectorIndexUpdates as Z, sendableAssumeRoleCommand as Za, flattenAssetPlaceholders as Zc, ccRoutedInstanceTakesNoSnapshot as Zi, recordAfterRollbackUpdate as Zn, isWarmThroughputDecrease as Zo, exportNameSecretExposure as Zr, malformedExportSourceWarning as Zs, resolvePendingCloudControlRequests as Zt, listNestedTemplateRows as _, customResourceResponseExpirationWarning as _a, withheldAccountClause as _c, supersededHolderOf as _i, isCfnTemplateAssetPath as _l, sameJournaledOrphans as _n, lacksRecordedTableArn as _o, recheckFailedPlan as _r, refuseMalformedOrphansForOrphan as _s, resolveDynamoDbDeleteBudgetClock as _t, scanActiveConsumers as a, ProviderRegistry as aa, STATE_REGION_DIVERGED as ac, DEFAULT_RESOURCE_WARN_AFTER_MS as ai, ensureAssetStorage as al, revertNestedChildFromJournal as an, regionLessSecretName as ao, updatePartialReason as ar, maskedInputProof as as, planContributorInsightsOp as at, hasPendingMovesOut as b, readsNoEchoDeleteValues as ba, displayLogicalId as bc, bold as bi, warnAbsoluteAssetPath as bl, planOrphanAdoption as bn, extractGetAttRefs as bo, resolveReplacementOldType as br, unreadableOrphanRecords as bs, INDEX_SETTLE_POLL_INTERVAL_MS as bt, inheritedProvenanceForChildDiff as c, wouldReturnToSdkProvider as ca, malformedResourcesWarning as cc, destroyStackRecordsView as ci, isCrossRegionRedirect as cl, collectNestedChildUnaddressed as cn, s3BucketDualStackDomainName as co, reserveStackCreateToken as cr, maskedPropertyFingerprint as cs, reverseMapIndexContributorInsights as ct, conditionInputsFrom as d, localCustomResourceCommand as da, refuseMalformedResourcesForDestroy as dc, replacedDeleteFailureVerdict as di, readBootstrapMarkerBody as dl, deleteJournaledOrphans as dn, coerceParameterTypedValue as do, planRollback as dr, malformedOrphanRecordsRefusalMessage as ds, DYNAMODB_DELETE_DEADLINE_MARGIN_MS as dt, refusesFinalSnapshot as ea, malformedOutputsWarning as ec, collectDeclaredOutputNames as ei, loadPublishableAssetManifest as el, displacedPhysicalIdShown as en, callerEnvCredentials as eo, calculateResourceDrift as er, tryGetTopLevelWriteOnlyProperties as es, vectorIndexesSettled as et, parentSuppliedValues as f, localCustomResourceRuntimeActive as fa, refuseMalformedResourcesForExport as fc, deleteSupersededEntry as fi, validateAssetBucketName as fl, dropFailedCommands as fn, isUnboundTemplateParameter as fo, seedsDeleteFirstGuard as fr, malformedOrphanRecordsWarning as fs, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as ft, isAbsoluteAssetPath as g, applyCustomResourceResponseExpiration as ga, accountArgs as gc, supersededHeldByOtherTypeWarning as gi, getDockerImageBySourceHash as gl, loadJournaledOrphans as gn, isStalePlaceholderArnAttribute as go, planFailedOps as gr, refuseMalformedOrphanRecordsForDestroy as gs, deleteBudgetKey as gt, findNestedTemplateTreeDefect as h, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as ha, JSON_LISTING_HOLE_VALUE as hc, supersededAfterRollback as hi, AssetManifestLoader as hl, journaledOrphanLines as hn, cfnRefValueFromPhysicalId as ho, isReplacementOrphan as hr, refuseMalformedOrphanRecords as hs, compensateRemovedDeletionProtection as ht, mergeNoChangeOutputs as i, CC_BROKEN_REASON as ia, repairMalformedOutputsForReadOnly as ic, DEFAULT_RESOURCE_TIMEOUT_MS as ii, AssetModeResolver as il, recordDisplacedSkips as in, producerRegionsFromState as io, updatePartialMessage as ir, parameterInputsFor as is, indexDeclaresContributorInsights as it, isProtectionValueActive as j, deleteIndeterminateGuards as ja, hasNoCloudControlHandlers as jc, createReadOnlyAttributeHealerFactory as ji, nullPrototypeRecord as jl, formatDestructiveChange as jn, carriesFetchableDynamicReference as jo, nameGenerationHighWaterOf as jr, refuseMalformedResourceEntriesForImportSave as js, computeImplicitDeleteEdges as jt, recordedProtectionNote as k, RollbackInlinePolicyWriters as ka, withoutUnwrittenSdkUnwiredProperties as kc, noEchoParameterNamesOf as ki, hasOwnKey as kl, constructPathOf as kn, getAccountInfo as ko, orphanNeedsIdentity as kr, refuseMalformedResourceEntriesForDestroy as ks, isTruthyCfnBoolean as kt, makeCanonicalizePropertiesFn as l, NO_LOCAL_CUSTOM_RESOURCES_FLAG as la, malformedStateRefusalMessage as lc, getStackRecords as li, getBootstrapMarkerKey as ll, getCurrentNestedStackContext as ln, s3BucketRegionalDomainName as lo, withCreateTokenLedger as lr, deployRefusesOrphanRowsReason as ls, reverseMapTableContributorInsights as lt, childTemplateLoader as m, withCustomResourceStack as ma, repairMalformedResourcesForReadOnly as mc, isSupersededResourceRecord as mi, BOOTSTRAP_MARKER_PREFIX as ml, isHandledOrphan as mn, AWS_NO_VALUE as mo, isJournaledOrphan as mr, previewableOrphanRecords as ms, beginDeleteWait as mt, isSecretBearingReferenceString as n, createPreDeleteFinalSnapshot as na, refuseMalformedOutputs as nc, isExportAliasCollision as ni, redirectFileAsset as nl, getNestedRevertRun as nn, classifyRecordedSecretRegion as no, equalModuloMask as nr, maskedPropertyFingerprintsOf as ns, CONTRIBUTOR_INSIGHTS_KEY as nt, inRunStackKey as o, ccBrokenReason as oa, refuseDivergentRecordRegionForDestroy as oc, maskingRetryLogger as oi, buildDenyExternalAccessPolicy as ol, revertedNestedRowIds as on, s3BucketArn as oo, earliestDefined as or, passedParameterClassesOf as os, planIndexContributorInsightsOps as ot, readRecordedConditionVerdicts as p, setLocalCustomResourceRuntimeEnabled as pa, refuseMalformedState as pc, holdsSupersededResources as pi, validateContainerRepoName as pl, dropFailedHint as pn, parameterTypeMayLoseSecretIdentity as po, demoteSupersededOrphans as pr, malformedOrphanRowsKeptWarning as ps, DYNAMODB_DELETE_POLL_COST_MS as pt, isTtlRateLimited as q, assertSendableRoleArn as qa, isSensitiveAttributeName as qc, withSecretPhysicalIdsMaskedInState as qi, referencedLogicalIds as qn, isStatefulRecreateTargetSync as qo, secretBearingStateKeyWarning as qr, refuseMalformedOrphans as qs, isAccessDeniedError as qt, keptWholeReasonText as r, buildFinalSnapshotIdentifier as ra, refuseMalformedOutputsForDestroy as rc, bindingSkippedOutputs as ri, rewriteTemplateAssetReferences as rl, nestedChildStackName as rn, classifyReplaySecretRegion as ro, undeclaredEmptyObservedKeys as rr, movedMaskedProperties as rs, contributorInsightsRefusals as rt, crossStackOutputProvenanceSource as s, isCustomResource as sa, malformedRenderedContainersWarning as sc, awaitInFlightSibling as si, assertAssetBucketRegion as sl, withNestedRevertRun as sn, s3BucketDomainName as so, ledgerForStack as sr, declaresNoEcho as ss, readContributorInsightsSpec as st, DeployEngine as t, unsupportedFinalSnapshotError as ta, refuseMalformedNestedChildOutputs as tc, collectPublishedOutputNames as ti, redirectDockerAsset as tl, dropSettledNestedJournals as tn, envCredentialsAreAssumedRole as to, equalModuloMarkedMask as tr, inputFingerprinter as ts, vectorIndexesShapeDetail as tt, conditionFingerprint as u, customResourceStackName as ua, refuseMalformedResourcesForDeploy as uc, withStackRecords as ui, parseBootstrapMarker as ul, withNestedStackContext as un, s3BucketWebsiteUrl as uo, acquireIdempotencyToken as ur, isReadableOrphanRecord as us, stripIndexContributorInsights as ut, renderNestedTemplateTreeDefect as v, responsePresignClient as va, STATE_RESOURCES_MALFORMED as vc, supersededResourcesOf as vi, parseAssetManifestBody as vl, makeForeignHolderScan as vn, refStateLookupFromResource as vo, recordUnderIdIsNotOwn as vr, repairMalformedOrphanRecordsForReadOnly as vs, resolveDynamoDbDeleteBudgetMs as vt, deferredServiceTokenWarning as w, waitForLambdaFunctionActive as wa, findHandledUnwrittenCreateOnly as wc, red as wi, ssmResolvedValueType as wl, createNoEchoValueMacs as wn, recordedOutputReferenceRegions as wo, isRedactedRecordedValue as wr, malformedResourceEntriesWarning as ws, relayedIndexBusyDelete as wt, pendingMovesOutOf as x, isCustomResourceType as xa, hasReadableOutputs as xc, cyan as xi, warnWholeAssemblyAsSource as xl, DeploymentEventsReader as xn, promoteInPlaceAttributeDependents as xo, withPreviousPolicies as xr, isReadableResourceEntry as xs, TABLE_INDEX_NOUN as xt, templateIdentity as y, TemplateNoEchoReresolver as ya, UNREADABLE_RESOURCES_MAP_ROW as yc, withoutSuperseded as yi, resolveFileAssetSourcePath as yl, makeSiblingClaimReader as yn, parseWebACLArn as yo, replacementNeverSwapped as yr, unpreviewableOrphanRecords as ys, DELETE_INDEX_WAIT_PROCEED_NOTE as yt, planStreamMemberOps as z, poisonRenderedSpellingsCollidingIn as za, CrossPrefixReadError as zc, secretNamedAttributeNamesOf as zi, resolveAssemblyPath as zl, changedReferenceReason as zn, markNewValueKnownAfterDeploy as zo, computeParameterTaint as zr, refuseMalformedResourcePropertiesForDrift as zs, sameMove as zt };
48324
- //# sourceMappingURL=deploy-engine-BwlO3Jv_.js.map
49012
+ export { readTtlSpec as $, assertSendableRoleArn as $a, withStackInstanceIdWithheld as $c, isFinalSnapshotError as $i, recordAfterRollbackUpdate as $n, isStatefulRecreateTargetForReplace as $o, carriedExportAliasExposure as $r, malformedOrphansWarning as $s, resolvePendingCloudControlRequests as $t, serviceTokenBlockingReason as A, setResolvedResourceTimeouts as Aa, findActionableSdkUnwired as Ac, noEchoAttributeNamesOf as Ai, missingStateBucketRemedy as Al, noEchoValueMacsOf as An, outputReferenceProvenanceOf as Ao, redactedDeleteAddressSkip as Ar, malformedLocalResourcesWarning as As, ECR_AUTO_DELETE_IMAGES_TAG as At, STREAM_TAGS_KEY as B, isAlwaysLiveAttribute as Ba, S3StateBackend as Bc, orphanRecordsPrintingBag as Bi, hasOwnKey as Bl, changedReferencePath as Bn, carriesDynamicReference as Bo, withNameGenerationReached as Br, repairMalformedResourceEntriesForReadOnly as Bs, refuseRefactorMarker as Bt, templateIdentity as C, localCustomResourceRuntimeActive as Ca, accountArgs as Cc, withoutSuperseded as Ci, AssetManifestLoader as Cl, DeploymentEventsReader as Cn, refStateLookupFromResource as Co, computeImplicitDeleteEdges as Cr, refuseMalformedOrphanRecordsForDestroy as Cs, DELETE_INDEX_WAIT_PROCEED_NOTE as Ct, refusePendingMovesOut as D, CloudControlProvider as Da, displayLogicalId as Dc, green as Di, resolveFileAssetSourcePath as Dl, noEchoMacBinding as Dn, extractGetAttRefs as Do, REDACTED_DELETE_ADDRESS_SKIP_REASON as Dr, unreadableOrphanRecords as Ds, maskedLogger as Dt, pendingMovesRefusalMessage as E, waitForLambdaFunctionActive as Ea, UNREADABLE_RESOURCES_MAP_ROW as Ec, gray as Ei, parseAssetManifestBody as El, createNoEchoValueMacs as En, parseWebACLArn as Eo, findNestedStackTypeChanges as Er, unpreviewableOrphanRecords as Es, deleteTableWithIndexBusyRetry as Et, isProtectionValueActive as F, deleteSkipReason as Fa, withoutSdkUnwiredProperties as Fc, createReadOnlyAttributeHealerFactory as Fi, purgeNoncurrentKeyVersions as Fl, hintSidesOf as Fn, referenceTokensIn as Fo, nameGenerationHighWaterOf as Fr, refuseMalformedResourceEntriesForDeploy as Fs, recordRetainedForReadoption as Ft, streamDeclaresPolicy as G, maskedSecretSegment as Ga, rebuildClientForBucketRegion as Gc, stateSecretNameNeedles as Gi, assemblyPathEscape as Gl, mappingPairs as Gn, containsIntrinsic as Go, reachableDivergentParameters as Gr, refuseMalformedResourcePropertiesForDestroy as Gs, getPriorAttempts as Gt, declaredStreamTagsMember as H, stackIdTailOf as Ha, isKnownTokenFreeState as Hc, secretNamePrintingBags as Hi, nullPrototypeRecord as Hl, differingRemedy as Hn, withSharedDrainBudget as Ho, inheritProducerRegions as Hr, malformedDriftResourcePropertiesWarning as Hs, updateRefactorMarker as Ht, perType as I, withIndeterminateGuard as Ia, withoutUnwrittenSdkUnwiredProperties as Ic, completedReplayEntries as Ii, decodeListingKey as Il, movedToHint as In, getAccountInfo as Io, nameScopeOf as Ir, refuseMalformedResourceEntriesForDestroy as Is, readRefactorMarker as It, streamPolicyMatchesDeclared as J, resolveDynamicReferences as Ja, applyCrossPrefixScan as Jc, ATOMIC_FINAL_SNAPSHOT_TYPES as Ji, namesTheSameDirectory as Jl, proposeRenames as Jn, siblingsOf as Jo, displayTextOrWithheld as Jr, refuseMalformedResourcePropertiesForOrphan as Js, chunks as Jt, streamDeclaresTags as K, secretSegmentsOfState as Ka, CrossPrefixReadError as Kc, storedSecretNameNeedles as Ki, describeFileReadFailure as Kl, parseMappingFile as Kn, markNewValueKnownAfterDeploy as Ko, resourcesNamingDeclaredParameter as Kr, refuseMalformedResourcePropertiesForDrift as Ks, markRefusedBeforeApplying as Kt, readProtection as L, isWaitAbandonedError as La, NO_CC_HANDLERS_REASON as Lc, journaledOrphanPrintingBag as Li, rememberSynthesizedStacks as Ll, rollbackOrphanIds as Ln, isImpossibleEmptyStoredAttribute as Lo, retiredAfterRollback as Lr, refuseMalformedResourceEntriesForImport as Ls, readRefactorMarkerOnce as Lt, recordedProtectionEvidence as M, UNSPECIFIED_SKIP_REASON as Ma, findSdkUnwiredProperties as Mc, noEchoExactEchoLeavesOf as Mi, isListParameterType as Ml, findDestructiveChanges as Mn, recordedProvenanceOf as Mo, removeProtectionTypeList as Mr, malformedScrubResourceEntriesRefusalMessage as Ms, hasCdkAutoDeleteTag as Mt, recordedProtectionNote as N, deleteIndeterminateGuards as Na, unwrittenCreateOnlyReplacement as Nc, noEchoParameterNamesOf as Ni, ssmResolvedValueType as Nl, formatDestructiveChange as Nn, recordedReferenceRegions as No, orphanNeedsIdentity as Nr, refuseMalformedResourceAttributesForOrphan as Ns, isTruthyCfnBoolean as Nt, deferredServiceTokenWarning as O, waitForGoneAfterDelete as Oa, hasReadableOutputs as Oc, red as Oi, warnAbsoluteAssetPath as Ol, noEchoMacParametersOf as On, promoteInPlaceAttributeDependents as Oo, isRedactedRecordedValue as Or, isReadableResourceEntry as Os, relayedIndexBusyDelete as Ot, PROTECTION_PROPERTY_BY_TYPE as P, deleteLeftInPlace as Pa, withoutAcceptedSdkUnwiredProperties as Pc, withAttemptedItemsMasked as Pi, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as Pl, findRefactorHints as Pn, referenceProvenanceOf as Po, nameGenerationCarriedFrom as Pr, refuseMalformedResourceEntries as Ps, keptForRetainedRecord as Pt, planTimeToLive as Q, assertFlagRoleArn as Qa, stackInstanceIdOf as Qc, effectiveDeletionPolicy as Qi, resolveBucketRegion as Ql, DELETED_RESOURCE_REMEDY as Qn, MULTI_REGION_RECREATE_BLOCKED_TYPES as Qo, secretSafeKeyDisplay as Qr, malformedOrphansRefusalMessage as Qs, pendingRequestCount as Qt, DynamoDBGlobalTableProvider as R, IntrinsicFunctionResolver as Ra, hasNoCloudControlHandlers as Rc, maskEventTextWithBoundBags as Ri, synthesizedStacks as Rl, withMovedTo as Rn, carriesFetchableDynamicReference as Ro, retiredNameGenerationsAfter as Rr, refuseMalformedResourceEntriesForImportSave as Rs, refactorMarkerMovesOf as Rt, renderNestedTemplateTreeDefect as S, localCustomResourceCommand as Sa, JSON_LISTING_HOLE_VALUE as Sc, supersededResourcesOf as Si, BOOTSTRAP_MARKER_PREFIX as Sl, planOrphanAdoption as Sn, isStalePlaceholderArnAttribute as So, IMPLICIT_DELETE_DEPENDENCIES as Sr, refuseMalformedOrphanRecords as Ss, resolveDynamoDbDeleteBudgetMs as St, pendingMovesOutOf as T, withCustomResourceStack as Ta, STATE_RESOURCES_MALFORMED as Tc, cyan as Ti, isCfnTemplateAssetPath as Tl, NOECHO_MAC_KEY_ALIAS as Tn, lacksRecordedTableArn as To, withPreviousPolicies as Tr, repairMalformedOrphanRecordsForReadOnly as Ts, TABLE_INDEX_NOUN as Tt, planStreamMemberOps as U, isSettledInstanceState as Ua, hasReasonlessBaselineRefusal as Uc, secretNamedAttributeNamesOf as Ui, ownValue as Ul, isPairableType as Un, namesRecreatedParent as Uo, computeParameterTaint as Ur, malformedResourcePropertiesWarning as Us, macWriteOnlyKeys as Ut, declaredStreamPolicyMember as V, poisonRenderedSpellingsCollidingIn as Va, splitImportedOps as Vc, secretNamePrintingBag as Vi, hasPlainPrototype as Vl, changedReferenceReason as Vn, keepsSecretReferenceToken as Vo, getCurrentProducerRegions as Vr, unreadableResourceEntries as Vs, sameMove as Vt, reverseMapStreamPolicy as W, APPSYNC_APIKEY_ARN_RESOURCE_PATH as Wa, hasUnverifiableParameterRefusal as Wc, secretNamedRecordNeedles as Wi, absoluteAssemblyPathEscape as Wl, looselyEqual as Wn, INTRINSIC_KEYS as Wo, namesAnyDeclaredParameter as Wr, refuseMalformedResourceProperties as Ws, readsOnlyNoEchoParameters as Wt, isTtlAlreadyDisabled as X, refuseUnreadableCdkCrossAccountRefs as Xa, isAccessDenied$1 as Xc, ccRoutedFinalSnapshotError as Xi, resolveAssemblyPath as Xl, replayFailedOperations as Xn, isPlainReferenceTo as Xo, secretBearing as Xr, UNREADABLE_ORPHANS_CONTAINER_ROW as Xs, lookupEachName as Xt, streamTagsMatchDeclared as Y, producerLookupOver as Ya, crossPrefixDeniedWarning as Yc, PRE_DELETE_SNAPSHOT_TYPES as Yi, renderAssemblyPathEscape as Yl, referencedLogicalIds as Yn, findReplacedReadersOfRecreateTargets as Yo, exportAliasCollisionScrubWarning as Yr, repairMalformedResourcePropertiesForReadOnly as Ys, isAccessDeniedError as Yt, isTtlRateLimited as Z, applyRoleArnIfSet as Za, isNotImplemented as Zc, ccRoutedInstanceTakesNoSnapshot as Zi, clearBucketRegionCache as Zl, replayRollback as Zn, shownType as Zo, secretBearingStateKeyWarning as Zr, hasReadableOrphans as Zs, withApiLimit as Zt, readRecordedConditionVerdicts as _, withPrintingSecrets as _a, refuseMalformedResourcesForDeploy as _c, holdsSupersededResources as _i, getBootstrapMarkerKey as _l, journaledOrphanLines as _n, coerceParameterTypedValue as _o, isReplacementOrphan as _r, isReadableOrphanRecord as _s, DYNAMODB_DELETE_POLL_COST_MS as _t, healSlashedSsmParameterNames as a, ProviderRegistry as aa, malformedLocalOutputsWarning as ac, collectPublishedOutputNames as ai, flattenAssetPlaceholders as al, nestedChildStackName as an, applyCallerIdentityCredentials as ao, undeclaredEmptyObservedKeys as ar, toCfnInteger as as, vectorIndexesShapeDetail as at, isAbsoluteAssetPath as b, customResourcesFailedWithoutApp as ba, refuseMalformedState as bc, supersededHeldByOtherTypeWarning as bi, validateAssetBucketName as bl, makeForeignHolderScan as bn, AWS_NO_VALUE as bo, recordUnderIdIsNotOwn as br, malformedOrphanRowsKeptWarning as bs, deleteBudgetKey as bt, slashedSsmNameHealPendingNote as c, wouldReturnToSdkProvider as ca, refuseMalformedNestedChildOutputs as cc, DEFAULT_RESOURCE_TIMEOUT_MS as ci, loadPublishableAssetManifest as cl, revertedNestedRowIds as cn, classifyRecordedSecretRegion as co, earliestDefined as cr, inputFingerprinter as cs, indexDeclaresContributorInsights as ct, crossStackOutputProvenanceSource as d, customResourceResponseExpirationWarning as da, repairMalformedOutputsForReadOnly as dc, awaitInFlightSibling as di, rewriteTemplateAssetReferences as dl, getCurrentNestedStackContext as dn, regionLessSecretName as do, withCreateTokenLedger as dr, parameterInputsFor as ds, readContributorInsightsSpec as dt, refusesFinalSnapshot as ea, refuseMalformedOrphans as ec, exportNameNoEchoParameters as ei, isSecretValuedAttribute as el, NESTED_PENDING_PARENT_REASON as en, explicitRoleArnOrThrow as eo, settleUnsettledPrevious as er, isStatefulRecreateTargetSync as es, sendTtlWaitingOutRateLimit as et, inheritedProvenanceForChildDiff as f, responsePresignClient as fa, STATE_REGION_DIVERGED as fc, destroyStackRecordsView as fi, AssetModeResolver as fl, withNestedStackContext as fn, s3BucketArn as fo, acquireIdempotencyToken as fr, maskedInputProof as fs, reverseMapIndexContributorInsights as ft, parentSuppliedValues as g, getCurrentResourceSecrets as ga, malformedStateRefusalMessage as gc, deleteSupersededEntry as gi, isCrossRegionRedirect as gl, isHandledOrphan as gn, s3BucketWebsiteUrl as go, isJournaledOrphan as gr, deployRefusesOrphanRowsReason as gs, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as gt, conditionInputsFrom as h, isCustomResourceType as ha, malformedResourcesWarning as hc, replacedDeleteFailureVerdict as hi, assertAssetBucketRegion as hl, dropFailedHint as hn, s3BucketRegionalDomainName as ho, demoteSupersededOrphans as hr, maskedPropertyFingerprint as hs, DYNAMODB_DELETE_DEADLINE_MARGIN_MS as ht, mergeNoChangeOutputs as i, CC_BROKEN_REASON as ia, malformedExportSourceWarning as ic, collectDeclaredOutputNames as ii, createAssetRedirectResolver as il, getNestedRevertRun as in, AWS_CREDENTIAL_ENV_KEYS as io, equalModuloMask as ir, isWarmThroughputDecrease as is, vectorIndexesSettled as it, diffSecurity as j, RollbackInlinePolicyWriters as ja, findHandledUnwrittenCreateOnly as jc, noEchoComparisonForTemplate as ji, SSM_PARAMETER_VALUE_PREFIX as jl, constructPathOf as jn, recordedOutputReferenceRegions as jo, segmentCleanupOptions as jr, malformedResourceEntriesWarning as js, S3_AUTO_DELETE_OBJECTS_TAG as jt, findServiceTokenRefusals as k, resolvedResourceTimeoutMs as ka, hasReadableResources as kc, yellow as ki, warnWholeAssemblyAsSource as kl, noEchoMacVerdict as kn, keepHeldTokenProvenance as ko, redactedDeleteAddressFields as kr, malformedLocalResourceEntriesWarning as ks, waitForIndexesSettled as kt, scanActiveConsumers as l, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as la, refuseMalformedOutputs as lc, DEFAULT_RESOURCE_WARN_AFTER_MS as li, redirectDockerAsset as ll, withNestedRevertRun as ln, classifyReplaySecretRegion as lo, ledgerForStack as lr, maskedPropertyFingerprintsOf as ls, planContributorInsightsOp as lt, conditionFingerprint as m, readsNoEchoDeleteValues as ma, malformedRenderedContainersWarning as mc, withStackRecords as mi, buildDenyExternalAccessPolicy as ml, dropFailedCommands as mn, s3BucketDualStackDomainName as mo, seedsDeleteFirstGuard as mr, declaresNoEcho as ms, stripIndexContributorInsights as mt, isSecretBearingReferenceString as n, createPreDeleteFinalSnapshot as na, repairMalformedOrphansForReadOnly as nc, isWholeDynamicReferenceValue as ni, stringifyValue as nl, displacedPhysicalIdShown as nn, parseIamRoleArn as no, calculateResourceDrift as nr, WARM_THROUGHPUT_MEMBERS as ns, readbackVectorIndexes as nt, slashedSsmNameHealAdoptedNote as o, ccBrokenReason as oa, malformedOutputsRefusalMessage as oc, isExportAliasCollision as oi, isDefaultBootstrapBucketName as ol, recordDisplacedSkips as on, callerEnvCredentials as oo, updatePartialMessage as or, toFiniteNumber as os, CONTRIBUTOR_INSIGHTS_KEY as ot, makeCanonicalizePropertiesFn as p, TemplateNoEchoReresolver as pa, refuseDivergentRecordRegionForDestroy as pc, getStackRecords as pi, ensureAssetStorage as pl, deleteJournaledOrphans as pn, s3BucketDomainName as po, planRollback as pr, passedParameterClassesOf as ps, reverseMapTableContributorInsights as pt, streamMemberRefusals as q, withSecretPhysicalIdsMaskedInState as qa, CrossPrefixScanCache as qc, extractDeploymentEventError as qi, displayAssemblyPath as ql, propertiesChangedReason as qn, replacementSidesForLog as qo, WITHHELD_NAME_DISPLAY as qr, refuseMalformedResourcePropertiesForExport as qs, formatResourceLine as qt, keptWholeReasonText as r, buildFinalSnapshotIdentifier as ra, malformedExportNamesWarning as rc, noEchoParameterValueSeed as ri, buildAssetRedirectMap as rl, dropSettledNestedJournals as rn, sendableAssumeRoleCommand as ro, equalModuloMarkedMask as rr, coerceWarmThroughput as rs, vectorIndexesForCreate as rt, slashedSsmNameHealNote as s, isCustomResource as sa, malformedOutputsWarning as sc, bindingSkippedOutputs as si, isDefaultBootstrapRepoName as sl, revertNestedChildFromJournal as sn, envCredentialsAreAssumedRole as so, updatePartialReason as sr, tryGetTopLevelWriteOnlyProperties as ss, contributorInsightsRefusals as st, DeployEngine as t, unsupportedFinalSnapshotError as ta, refuseMalformedOrphansForDestroy as tc, exportNameSecretExposure as ti, isSensitiveAttributeName as tl, displacedOpClause as tn, isIamRoleArn as to, withUnprovenUnsettled as tr, renderStatefulReason as ts, planVectorIndexUpdates as tt, inRunStackKey as u, applyCustomResourceResponseExpiration as ua, refuseMalformedOutputsForDestroy as uc, maskingRetryLogger as ui, redirectFileAsset as ul, collectNestedChildUnaddressed as un, producerRegionsFromState as uo, reserveStackCreateToken as ur, movedMaskedProperties as us, planIndexContributorInsightsOps as ut, childTemplateLoader as v, NO_LOCAL_CUSTOM_RESOURCES_FLAG as va, refuseMalformedResourcesForDestroy as vc, isSupersededResourceRecord as vi, parseBootstrapMarker as vl, loadJournaledOrphans as vn, isUnboundTemplateParameter as vo, planFailedOps as vr, malformedOrphanRecordsRefusalMessage as vs, beginDeleteWait as vt, hasPendingMovesOut as w, setLocalCustomResourceRuntimeEnabled as wa, withheldAccountClause as wc, bold as wi, getDockerImageBySourceHash as wl, DeploymentEventsStore as wn, lacksRecordedRefArn as wo, resolveReplacementOldType as wr, refuseMalformedOrphansForOrphan as ws, INDEX_SETTLE_POLL_INTERVAL_MS as wt, listNestedTemplateRows as x, customResourcesRunWithoutApp as xa, repairMalformedResourcesForReadOnly as xc, supersededHolderOf as xi, validateContainerRepoName as xl, makeSiblingClaimReader as xn, cfnRefValueFromPhysicalId as xo, replacementNeverSwapped as xr, previewableOrphanRecords as xs, resolveDynamoDbDeleteBudgetClock as xt, findNestedTemplateTreeDefect as y, customResourceStackName as ya, refuseMalformedResourcesForExport as yc, supersededAfterRollback as yi, readBootstrapMarkerBody as yl, sameJournaledOrphans as yn, parameterTypeMayLoseSecretIdentity as yo, recheckFailedPlan as yr, malformedOrphanRecordsWarning as ys, compensateRemovedDeletionProtection as yt, STREAM_POLICY_KEY as z, isSelectOutOfBounds as za, TemplateParser as zc, namingSecretsWithRecordedNoEcho as zi, defineOwnKey as zl, changedReferenceInDiff as zn, isNamelessDynamicReferenceError as zo, retiredNameGenerationsLeaving as zr, refuseMalformedResourceEntriesForOrphan as zs, refactorMarkerRefusalMessage as zt };
49013
+ //# sourceMappingURL=deploy-engine-Sw2eta-t.js.map