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