@go-to-k/cdkd 0.301.15 → 0.302.1
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/{asg-provider-ClDYCUia.js → asg-provider-BpRcm_UB.js} +5 -5
- package/dist/asg-provider-BpRcm_UB.js.map +1 -0
- package/dist/{aws-failure-text-CdgZn80O.js → aws-failure-text-e_ddrDDo.js} +313 -35
- package/dist/aws-failure-text-e_ddrDDo.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-Dy7N7-Il.js → deploy-engine-CYVt2NQR.js} +2189 -1104
- package/dist/deploy-engine-CYVt2NQR.js.map +1 -0
- package/dist/{iam-policy-targets-Dap4bLyq.js → iam-policy-targets-CmHNH1DY.js} +17 -4
- package/dist/iam-policy-targets-CmHNH1DY.js.map +1 -0
- package/dist/{iam-role-provider-C8Icvrf7.js → iam-role-provider-R1GC6KcT.js} +14 -5
- package/dist/iam-role-provider-R1GC6KcT.js.map +1 -0
- package/dist/index.d.ts +32 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/{neptune-provider-CtnwSAGM.js → neptune-provider-DzTl6-74.js} +7 -16
- package/dist/neptune-provider-DzTl6-74.js.map +1 -0
- package/dist/{program-CXvao3wc.js → program-CvRs5pV_.js} +172 -30
- package/dist/program-CvRs5pV_.js.map +1 -0
- package/dist/{provider-classes-CBbWGsK0.js → provider-classes-B2_u4Fg0.js} +268 -150
- package/dist/provider-classes-B2_u4Fg0.js.map +1 -0
- package/dist/{rds-provider-BMQvQTTS.js → rds-provider-CmKbYAvr.js} +7 -16
- package/dist/rds-provider-CmKbYAvr.js.map +1 -0
- package/dist/{version-DadUoJjK.js → version-CaejipV3.js} +2 -2
- package/dist/{version-DadUoJjK.js.map → version-CaejipV3.js.map} +1 -1
- package/package.json +1 -1
- package/dist/asg-provider-ClDYCUia.js.map +0 -1
- package/dist/aws-failure-text-CdgZn80O.js.map +0 -1
- package/dist/deploy-engine-Dy7N7-Il.js.map +0 -1
- package/dist/iam-policy-targets-Dap4bLyq.js.map +0 -1
- package/dist/iam-role-provider-C8Icvrf7.js.map +0 -1
- package/dist/neptune-provider-CtnwSAGM.js.map +0 -1
- package/dist/program-CXvao3wc.js.map +0 -1
- package/dist/provider-classes-CBbWGsK0.js.map +0 -1
- package/dist/rds-provider-BMQvQTTS.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as runWithStackAwsClients, i as resetAwsClients, o as setAwsClients, t as AwsClients } from "./aws-clients-B_CEQGE1.js";
|
|
2
|
-
import { A as
|
|
3
|
-
import { $t as ambientCredentialConfig, Bn as
|
|
2
|
+
import { $ as stringifyJsonPayload, A as isNameGeneration, B as SECRET_REF_MAX_CODE_POINTS, C as generateResourceName, F as withSkipPrefix, G as displayAwsMessage, H as UNRENDERABLE, I as withStackScope, J as displayStackName, K as displayIdent, Q as safeMsg, V as STACK_REF_MAX_CODE_POINTS, W as cutMarker, Y as isPasteableIdent, Z as plainIdentOr, _ as PATTERN_B_RESOURCE_TYPES, a as safeStringify, b as derivesPatternBName, c as isStdoutReservedForPayload, d as runStackBuffered, et as terminalSafe, g as PATTERN_B_NAME_PROPERTIES, h as PATTERN_B_NAME_OPTIONS, l as reserveStdoutForPayload, m as getLiveRenderer, n as describeAwsFailure, q as displaySafe, s as getLogger, tt as truncateCodePoints, x as explicitNamePropertyFor, z as SAFE_MSG_ALTERED_CHAR } from "./aws-failure-text-e_ddrDDo.js";
|
|
3
|
+
import { $t as ambientCredentialConfig, An as withErrorHandling, Bn as plainOrDescribed, Bt as formatLockOperation, Cn as StackTerminationProtectionError, D as VALUE_NOT_SHOWN, E as assertRegionMatch, Fn as commandHole, Ft as UNREPRODUCIBLE_LOCK_CLAUSE, G as runDeleteAttempt, Gn as setPasteableRunFlags, Gt as DEFAULT_STATE_PREFIX, Hn as shellBoundedDisplay, It as buildForceUnlockCommand, Jt as producerCoordinateKey, Kn as setPasteableVerbFlags, Kt as injectiveKey, Ln as isInertUnquoted, Lt as buildLockContentionMessage, Nn as SHELL_ACTIVE_WHY, P as remedyLogicalId, Qt as ambientClientDefaults, Rn as pasteableCommand, Rt as forceQuitRecoveryClause, Sn as StackHasActiveImportsError, T as RESOURCE_NOT_FOUND, Tn as SynthesisError, Un as shellQuote, Vn as quotedOrDescribed, Vt as formatLockOwner, Wn as withheldTargetClause, Wt as CUSTOM_RESOURCE_RESPONSE_PREFIX, Xt as setPasteableAwsProfile, Yt as producerRecordKey, Z as isAwsCliLiteral, Zt as withPasteableAwsProfile, _n as NestedStackChildDirectDestroyError, _r as isThrottlingError, ar as stripForDisplay, bn as ResourceTimeoutError, cn as DeployCancelledError, dn as IntrinsicResolutionRefusalError, en as clientDefaultsFor, fn as LocalInvokeBuildError$1, fr as isRetryableTransientError, ft as logicalIdShown, gn as MalformedProducerRecordRefusalError, gr as isMarkedNonRetryable, in as CdkdError, ir as stripControlChars, it as isInterruptedWaitError, jn as TIMEOUT_FLAG_RESOURCE_TYPE, kn as normalizeAwsError, lr as isAmbiguousOutcomeError, mr as retryClassificationText, mt as resourceTypeShown, n as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, nn as AccountIdUnavailableError, nt as endCommandInterruptScope, on as CrossAccountSecretRefusalError, pn as LocalStartServiceError, pr as isTransientServerError, rr as escapeRegExp, rt as interruptWatchListenerCount, s as readRecordedPrincipals, t as IAM_PRINCIPAL_NAME, tn as credentialFingerprint, tt as beginCommandInterruptScope, un as DynamicReferenceRegionAmbiguousError, vn as PartialFailureError, vr as markNonRetryable, wn as StateError, xn as ResourceUpdateNotSupportedError, yn as ProvisioningError, zt as formatLockExpiry } from "./iam-policy-targets-CmHNH1DY.js";
|
|
4
4
|
import { a as setAssumedRoleCredentials, i as getPreAssumeEnvCredentials, l as runInStackAwsScope, n as awsClientDefaults, r as getAssumedRoleCredentials, u as formatAuthority } from "./aws-client-defaults-DBXBcg0J.js";
|
|
5
|
-
import { $ as DeploymentEventsStore, $a as repairMalformedOrphanRecordsForReadOnly, $c as runDockerStreaming, $i as UNREADABLE_ORPHANS_CONTAINER_ROW, $n as ATOMIC_FINAL_SNAPSHOT_TYPES, $o as noEchoOutputsComparison, $s as CrossPrefixReadError, $t as updatePartialReason, A as inheritedProvenanceForChildDiff, Ac as getBootstrapMarkerKey, Ai as producerRegionsFromState, Al as StageLoadError, An as bold, Ar as TemplateNoEchoReresolver, As as pathCrossesDottedKey, At as replayFailedOperations, B as conditionFingerprint, Ba as refuseMalformedResourceEntriesForDeploy, Bc as describeDockerExecFailure, Bi as keepsSecretReferenceToken, Bl as renderAssemblyPathEscape, Bn as createReadOnlyAttributeHealerFactory, Bs as provenPublicValue, Bt as recordUnderIdIsNotOwn, Ca as malformedResourceEntriesWarning, Cc as createAssetRedirectResolver, Ci as sendableAssumeRoleCommand, Cl as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Cn as findDestructiveChanges, Cs as maskSecretsInText, Ct as makeForeignHolderScan, D as IMPLICIT_DELETE_DEPENDENCIES, Da as malformedStateRefusalMessage, Dc as BOOTSTRAP_MARKER_PREFIX, Di as envCredentialsAreAssumedRole, Dl as canonicalizeRegion, Dr as isCustomResource, Ds as DYNAMIC_REFERENCE_TOKEN_SCAN, Ea as malformedScrubResourceEntriesRefusalMessage, Ec as AssetModeResolver, Ei as callerEnvCredentials, El as PARTITION_TABLE, En as destroyStackRecordsView, Er as ccBrokenReason, F as findNestedTemplateTreeDefect, Fa as refuseMalformedOrphansForOrphan, Fc as validateContainerRepoName, Fi as getAccountInfo, Fl as nullPrototypeRecord, Fn as yellow, Fr as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, Fs as physicalNameCopiesOf, Ft as isJournaledOrphan, G as diffSecurity, Ga as refuseMalformedResourcePropertiesForDestroy, Gc as getDockerCmd, Gl as resolveBucketRegion, Gn as orphanRecordsPrintingBag, Go as canonicalCoordinates, Gr as deleteSkipReason, Gs as recordProvenPublicExpression, Gt as findNestedStackTypeChanges, H as parentSuppliedValues, Ha as refuseMalformedResourceEntriesForImport, Hc as dockerSpawnEnvWithSensitive, Hi as cfnRefValueFromPhysicalId, Hl as injectAwsRegion, Hn as journaledOrphanPrintingBag, Hr as UNSPECIFIED_SKIP_REASON, Hs as recordMaskOnlyValuesIn, Ht as resolveReplacementOldType, I as isAbsoluteAssetPath, Ia as refuseMalformedOutputs, Ic as buildDenyExternalAccessPolicy, Ii as isImpossibleEmptyStoredAttribute, Il as ownValue, In as noEchoAttributeNamesOf, Io as prefetchCreateOnlyPropertyPaths, Ir as applyCustomResourceResponseExpiration, It as isReplacementOrphan, J as mergeNoChangeOutputs, Ja as refuseMalformedResourcePropertiesForOrphan, Jc as partitionSensitiveEnv, Jo as maskReadbackAtCoordinates, Js as isSingleDynamicReferenceToken, K as isSecretBearingReferenceString, Ka as refuseMalformedResourcePropertiesForDrift, Kc as isDockerClientEnvKey, Ki as withSharedDrainBudget, Kn as secretNamePrintingBag, Ko as isMarkedCoordinate, Ks as wholeStringLeavesOf, L as listNestedTemplateRows, La as refuseMalformedOutputsForDestroy, Lc as buildDockerImage, Li as carriesDynamicReference, Ll as absoluteAssemblyPathEscape, Ln as noEchoComparisonForTemplate, Lo as templateResourceTypes, Lr as customResourceResponseExpirationWarning, Ls as recordPhysicalNameCopy, Lt as planFailedOps, M as findServiceTokenRefusals, Ma as refuseMalformedOrphanRecordsForDestroy, Mc as parseBootstrapMarker, Mi as coerceParameterTypedValue, Ml as defineOwnKey, Mn as gray, Mr as isCustomResourceType$1, Ms as inheritNestedStackParameterAssociations, Mt as removeProtectionTypeList, N as serviceTokenBlockingReason, Na as refuseMalformedOrphans, Nc as readBootstrapMarkerBody, Ni as isUnboundTemplateParameter, Nl as hasOwnKey, Nn as green, Ns as recordNestedStackParameterExpressions, Nt as recordAfterRollbackUpdate, O as computeImplicitDeleteEdges, Oa as previewableOrphanRecords, Oc as assertAssetBucketRegion, Oi as classifyRecordedSecretRegion, Ol as derivePartitionAndUrlSuffix, On as withStackRecords, Or as wouldReturnToSdkProvider, Os as dynamicReferenceTokens, P as childTemplateLoader, Pa as refuseMalformedOrphansForDestroy, Pc as validateAssetBucketName, Pi as parameterTypeMayLoseSecretIdentity, Pl as hasPlainPrototype, Pn as red, Pr as withPrintingSecrets, Pt as demoteSupersededOrphans, Q as DeploymentEventsReader, Qa as refuseMalformedState, Qc as runDockerForeground, Qi as STATE_RESOURCES_MALFORMED, Qn as extractDeploymentEventError, Qo as noEchoLeavesOf, Qs as rebuildClientForBucketRegion, Qt as updatePartialMessage, R as renderNestedTemplateTreeDefect, Ra as refuseMalformedResourceAttributesForOrphan, Rc as resolveDockerContextDirectory, Ri as carriesFetchableDynamicReference, Rl as describeFileReadFailure, Rn as noEchoExactEchoLeavesOf, Ro as describeTypeWithThrottleRetry, Rr as CloudControlProvider, Rs as splitGetAttStringForm, Rt as planRollback, Sa as malformedRenderedContainersWarning, Sc as buildAssetRedirectMap, Si as isIamRoleArn, Sl as uploadCfnTemplate, Sn as constructPathOf, Ss as maskSecretsInError, St as loadJournaledOrphans, Ta as malformedResourcesWarning, Tc as rewriteTemplateAssetReferences, Ti as applyCallerIdentityCredentials, Tl as expectedOwnerParam, Tr as ProviderRegistry, Ts as withPhysicalNameCopies, Tt as formatResourceLine, U as readRecordedConditionVerdicts, Ua as refuseMalformedResourceEntriesForImportSave, Uc as finchSecretArgvRefusal, Ui as isStalePlaceholderArnAttribute, Ul as injectedAwsRegionValue, Un as maskEventTextWithBoundBags, Uo as DagBuilder, Ur as deleteIndeterminateGuards, Us as recordNoEchoAttributeValues, Ut as seedsDeleteFirstGuard, V as conditionInputsFrom, Va as refuseMalformedResourceEntriesForDestroy, Vc as describeDockerFailure, Vi as AWS_NO_VALUE, Vl as resolveAssemblyPath, Vn as completedReplayEntries, Vr as RollbackInlinePolicyWriters, Vs as recordMaskOnlyValue, Vt as replacementNeverSwapped, W as withResourceDeadline, Wa as refuseMalformedResourceEntriesForOrphan, Wc as formatDockerLoginError, Wi as refStateLookupFromResource, Wn as namingSecretsWithRecordedNoEcho, Wo as TemplateParser, Wr as deleteLeftInPlace, Ws as recordNoEchoParameterFreshValue, Wt as orphanNeedsIdentity, X as makeSiblingClaimReader, Xa as refuseMalformedResourcesForDestroy, Xc as redactedCause, Xi as JSON_LISTING_HOLE_VALUE, Xn as stateSecretNameNeedles, Xo as maskedLeafCoordinatesOf, Xs as isLockInfoExpired, Y as makeCanonicalizePropertiesFn, Ya as refuseMalformedResourcesForDeploy, Yc as redactDockerArgvValues, Yi as declaresNoEcho, Yn as secretNamedRecordNeedles, Yo as maskWholeValue, Ys as LockManager, Z as planOrphanAdoption, Za as refuseMalformedResourcesForExport, Zc as redactedDockerCause, Zi as STATE_REGION_DIVERGED, Zn as storedSecretNameNeedles, Zo as noEchoCoordinatesOf, Zs as S3StateBackend, _a as malformedOrphanRowsKeptWarning, _c as shouldRetainResource, _i as recordedReferenceRegions, _l as ssmResolvedValueType, _n as isExportAliasCollision, _o as MULTI_REGION_RECREATE_BLOCKED_TYPES, _s as recordLogOnlyValue, _t as deleteJournaledOrphans, a as isProtectionValueActive, aa as hasReadableOutputs, ac as splitImportedOps, al as getDefaultStateBucketName, an as displayTextOrWithheld, ao as unpreviewableOrphanRecords, ar as isFinalSnapshotError, as as liveMatchesUnresolvedTokenFrame, at as displacedOpClause, ba as malformedOutputsRefusalMessage, bc as stringifyValue, bi as assertSendableRoleArn, bl as MIGRATE_TMP_PREFIX, bn as DEFAULT_RESOURCE_WARN_AFTER_MS, bo as renderStatefulReason, bs as createSecretMasker, bt as isHandledOrphan, ca as isReadableResourceEntry, cc as exportNamesCarriedFrom, cl as resolveApp, cn as secretBearingStateKeyWarning, co as withheldAccountClause, da as malformedExportSourceWarning, dc as hasUnverifiableParameterRefusal, di as resolveDynamicReferences, dl as resolveSkipPrefix, dn as exportNameNoEchoParameters, do as unwrittenCreateOnlyReplacement, dr as withCreateTokenLedger, ds as createUnionSecretMasker, ea as UNREADABLE_RESOURCES_MAP_ROW, ec as CrossPrefixScanCache, el as warnFinchArgvExposure, en as computeParameterTaint, eo as repairMalformedOrphansForReadOnly, er as PRE_DELETE_SNAPSHOT_TYPES, et as pendingRequestCount, fa as malformedLocalOutputsWarning, fc as importableOutputKeys, fi as producerLookupOver, fl as resolveStateBucketWithDefault, fn as exportNameSecretExposure, fs as hasMaskableValues, ft as revertedNestedRowIds, ga as malformedOrphanRecordsWarning, gc as orphansCarriedFrom, gi as recordedOutputReferenceRegions, gl as warnDeprecatedNoPrefixCliFlag, gn as collectPublishedOutputNames, go as shownType, gs as recordLogOnlyParameterValue, gt as withNestedStackContext, ha as malformedOrphanRecordsRefusalMessage, hc as orphansAfterRollback, hl as stateBucketExistenceConfirmed, hn as collectDeclaredOutputNames, ho as findReplacedReadersOfRecreateTargets, hs as printingCorpusOf, ht as getCurrentNestedStackContext, i as PROTECTION_PROPERTY_BY_TYPE, ia as hasReadableOrphans, ic as isNotImplemented, ii as poisonRenderedSpellingsCollidingIn, il as synthesisStatusMessage, in as WITHHELD_NAME_DISPLAY, io as repairMalformedResourcesForReadOnly, ir as effectiveDeletionPolicy, is as valueAtCoordinate, it as NESTED_PENDING_PARENT_REASON, j as deferredServiceTokenWarning, ja as refuseMalformedOrphanRecords, jc as isCrossRegionRedirect, ji as regionLessSecretName, jl as processStackMessages, jn as cyan, jr as readsNoEchoDeleteValues, js as identityKeyFor, jt as replayRollback, k as crossStackOutputProvenanceSource, ka as refuseDivergentRecordRegionForDestroy, kc as ensureAssetStorage, ki as classifyReplaySecretRegion, kl as AssemblyReader, ks as isUncertifiedBaselineMaskPosition, la as malformedDriftResourcePropertiesWarning, lc as hasReadableExportSet, ll as resolveAutoAssetStorage, ln as secretSafeKeyDisplay, lo as findActionableSilentDrops, lr as ledgerForStack, lt as nestedChildStackName$1, ma as malformedLocalResourcesWarning, mc as isReadableBag, mi as keepHeldTokenProvenance, ml as resolveUseCdkBootstrapAssets, mn as noEchoParameterValueSeed, mo as hasNoCloudControlHandlers, ms as logOnlyValueCount, mt as collectNestedChildUnaddressed, n as recordedProtectionEvidence, na as deployRefusesOrphanRowsReason, nc as crossPrefixDeniedWarning, ni as INTRINSIC_KEYS, nl as getDockerImageBySourceHash, nn as reachableDivergentParameters, no as repairMalformedResourceEntriesForReadOnly, nr as ccRoutedFinalSnapshotError, ns as readsNoEchoSource, nt as keptForReadoption, o as perType, oa as hasReadableResources, oc as acceptedCreateOnlyDropsOf, ol as getLegacyStateBucketName, on as exportAliasCollisionScrubWarning, oo as unreadableOrphanRecords, or as refusesFinalSnapshot, ot as displacedPhysicalIdShown, pa as malformedLocalResourceEntriesWarning, pc as importableOutputs, pi as refuseUnreadableCdkCrossAccountRefs, pl as resolveStateBucketWithDefaultAndSource, pn as isWholeDynamicReferenceValue, po as NO_CC_HANDLERS_REASON, ps as literalSplitDelimitersOf, pt as withNestedRevertRun, q as keptWholeReasonText, qa as refuseMalformedResourcePropertiesForExport, qc as isMalformedEnvKey, qi as parameterInputsFor, qn as secretNamePrintingBags, qo as maskAtCoordinates, qr as isWaitAbandonedError, qs as WHOLE_DYNAMIC_REFERENCE_PATTERN, qt as inheritProducerRegions, r as recordedProtectionNote, ra as displayLogicalId, rc as isAccessDenied, ri as IntrinsicFunctionResolver, rl as Synthesizer, rn as resourcesNamingDeclaredParameter, ro as repairMalformedResourcePropertiesForReadOnly, rr as createPreDeleteFinalSnapshot, rs as recordedNoEchoValuesOf, rt as recordRetainedForReadoption, s as readProtection, sa as isReadableOrphanRecord, sc as describeRegionValueKind, sl as loadCdkJson, sn as secretBearing, so as unreadableResourceEntries, sr as unsupportedFinalSnapshotError, ss as redactForState, st as dropSettledNestedJournals, t as DeployEngine, ta as accountArgs, tc as applyCrossPrefixScan, ti as DiffCalculator, tl as AssetManifestLoader, tn as namesAnyDeclaredParameter, to as repairMalformedOutputsForReadOnly, tr as buildFinalSnapshotIdentifier, ts as readbackPathFor, tt as resolvePendingCloudControlRequests, ua as malformedExportNamesWarning, uc as hasReasonlessBaselineRefusal, ul as resolveCaptureObservedState, un as carriedExportAliasExposure, us as carryLogOnlyValues, ut as recordDisplacedSkips, va as malformedOrphansRefusalMessage, vc as AssetPublisher, vi as applyRoleArnIfSet, vl as CFN_TEMPLATE_BODY_LIMIT, vn as bindingSkippedOutputs, vo as isStatefulRecreateTargetForReplace, vs as shareLogOnlyValues, vt as dropFailedCommands, wa as malformedResourcePropertiesWarning, wc as loadPublishableAssetManifest, wi as AWS_CREDENTIAL_ENV_KEYS, wl as decodeListingKey, wn as formatDestructiveChange, wr as CC_BROKEN_REASON, ws as scrubResourceRecord, wt as sameJournaledOrphans, xa as malformedOutputsWarning, xc as WorkGraph, xi as explicitRoleArnOrThrow, xl as findLargeInlineResources, xn as maskingRetryLogger, xs as errorCauseChain, xt as journaledOrphanLines, ya as malformedOrphansWarning, yc as isSensitiveAttributeName, yi as assertFlagRoleArn, yl as CFN_TEMPLATE_URL_LIMIT, yn as DEFAULT_RESOURCE_TIMEOUT_MS, yo as isStatefulRecreateTargetSync, ys as unionOfSecretBags, yt as dropFailedHint, z as templateIdentity, za as refuseMalformedResourceEntries, zc as describeDockerCapturedOutput, zi as isNamelessDynamicReferenceError, zl as displayAssemblyPath, zn as noEchoParameterNamesOf, zo as withRetry, zr as slowCcOperationTimeoutMs, zs as carriesSecretMask, zt as recheckFailedPlan } from "./deploy-engine-Dy7N7-Il.js";
|
|
6
|
-
import { t as getCdkdVersion } from "./version-
|
|
5
|
+
import { $ as resolvePendingCloudControlRequests, $a as refuseMalformedOutputsForDestroy, $c as validateAssetBucketName, $i as carriesDynamicReference, $l as hasPlainPrototype, $n as noEchoParameterNamesOf, $o as templateResourceTypes, $r as customResourceResponseExpirationWarning, $s as recordPhysicalNameCopy, $t as nameGenerationHighWaterOf, A as inheritedProvenanceForChildDiff, Aa as malformedLocalResourcesWarning, Ac as importableOutputKeys, Ai as keepHeldTokenProvenance, Al as resolveSkipPrefix, An as destroyStackRecordsView, Ao as hasNoCloudControlHandlers, As as logOnlyValueCount, At as removeProtectionTypeList, B as conditionFingerprint, Ba as malformedResourcePropertiesWarning, Bc as WorkGraph, Bi as AWS_CREDENTIAL_ENV_KEYS, Bl as findLargeInlineResources, Bn as addSuperseded, Br as CC_BROKEN_REASON, Bs as scrubResourceRecord, Bt as resolveReplacementOldType, Ca as isReadableOrphanRecord, Cc as splitImportedOps, Cl as synthesisStatusMessage, Cn as DEFAULT_RESOURCE_TIMEOUT_MS, Co as unreadableResourceEntries, Cs as redactForState, Ct as formatResourceLine, D as IMPLICIT_DELETE_DEPENDENCIES, Da as malformedExportSourceWarning, Dc as hasReadableExportSet, Di as resolveDynamicReferences, Dl as resolveApp, Dn as findDestructiveChanges, Do as unwrittenCreateOnlyReplacement, Dr as DeploymentEventsStore, Ds as createUnionSecretMasker, Ea as malformedExportNamesWarning, Ec as exportNamesCarriedFrom, El as loadCdkJson, En as constructPathOf, Er as DeploymentEventsReader, Es as carryLogOnlyValues, F as findNestedTemplateTreeDefect, Fa as malformedOrphansWarning, Fc as shouldRetainResource, Fi as assertFlagRoleArn, Fl as warnDeprecatedNoPrefixCliFlag, Fn as cyan, Fo as isStatefulRecreateTargetSync, Fs as unionOfSecretBags, Ft as planFailedOps, G as diffSecurity, Ga as refuseDivergentRecordRegionForDestroy, Gc as AssetModeResolver, Gi as classifyReplaySecretRegion, Gl as PARTITION_TABLE, Gn as supersededAfterRollback, Gs as isUncertifiedBaselineMaskPosition, Gt as inheritProducerRegions, H as parentSuppliedValues, Ha as malformedScrubResourceEntriesRefusalMessage, Hc as createAssetRedirectResolver, Hi as callerEnvCredentials, Hl as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Hn as holdsSupersededResources, Hr as ccBrokenReason, Ht as orphanNeedsIdentity, I as isAbsoluteAssetPath, Ia as malformedOutputsRefusalMessage, Ic as stackInstanceIdCarriedFrom, Ii as assertSendableRoleArn, Il as ssmResolvedValueType, In as gray, Io as renderStatefulReason, Is as createSecretMasker, It as planRollback, J as mergeNoChangeOutputs, Ja as refuseMalformedOrphanRecordsForDestroy, Jc as ensureAssetStorage, Ji as coerceParameterTypedValue, Jl as AssemblyReader, Jn as supersededResourcesOf, Jr as isCustomResourceType$1, Js as inheritNestedStackParameterAssociations, K as isSecretBearingReferenceString, Kc as BOOTSTRAP_MARKER_PREFIX, Ki as producerRegionsFromState, Kl as canonicalizeRegion, Kn as supersededHeldByOtherTypeWarning, Kr as TemplateNoEchoReresolver, Ks as pathCrossesDottedKey, L as listNestedTemplateRows, La as malformedOutputsWarning, Lc as AssetPublisher, Li as explicitRoleArnOrThrow, Ll as CFN_TEMPLATE_BODY_LIMIT, Ln as green, Ls as errorCauseChain, Lt as recheckFailedPlan, M as findServiceTokenRefusals, Ma as malformedOrphanRecordsWarning, Mc as isReadableBag, Mi as recordedOutputReferenceRegions, Ml as resolveStateBucketWithDefaultAndSource, Mn as withStackRecords, Mo as shownType, Ms as recordLogOnlyParameterValue, Mt as demoteSupersededOrphans, N as serviceTokenBlockingReason, Na as malformedOrphanRowsKeptWarning, Nc as orphansAfterRollback, Ni as recordedReferenceRegions, Nl as resolveUseCdkBootstrapAssets, No as MULTI_REGION_RECREATE_BLOCKED_TYPES, Ns as recordLogOnlyValue, Nt as isJournaledOrphan, O as computeImplicitDeleteEdges, Oa as malformedLocalOutputsWarning, Oc as hasReasonlessBaselineRefusal, Oi as producerLookupOver, Ol as resolveAutoAssetStorage, On as formatDestructiveChange, Or as extractDeploymentEventError, Os as hasMaskableValues, Ot as replayFailedOperations, P as childTemplateLoader, Pa as malformedOrphansRefusalMessage, Pc as orphansCarriedFrom, Pi as applyRoleArnIfSet, Pl as stateBucketExistenceConfirmed, Pn as bold, Po as isStatefulRecreateTargetForReplace, Ps as shareLogOnlyValues, Pt as isReplacementOrphan, Q as pendingRequestCount, Qa as refuseMalformedOutputs, Qc as readBootstrapMarkerBody, Qi as isImpossibleEmptyStoredAttribute, Ql as hasOwnKey, Qn as noEchoExactEchoLeavesOf, Qo as prefetchCreateOnlyPropertyPaths, Qr as applyCustomResourceResponseExpiration, Qt as nameGenerationCarriedFrom, R as renderNestedTemplateTreeDefect, Ra as malformedRenderedContainersWarning, Rc as isSensitiveAttributeName, Ri as isIamRoleArn, Rl as CFN_TEMPLATE_URL_LIMIT, Rn as red, Rs as maskSecretsInError, Rt as recordUnderIdIsNotOwn, Sa as hasReadableResources, Sc as withStackInstanceIdWithheld, Sl as Synthesizer, Sn as bindingSkippedOutputs, So as unreadableOrphanRecords, Sr as ledgerForStack, St as sameJournaledOrphans, Ta as malformedDriftResourcePropertiesWarning, Tc as describeRegionValueKind, Tl as getLegacyStateBucketName, Tn as maskingRetryLogger, To as findActionableSilentDrops, U as readRecordedConditionVerdicts, Ua as malformedStateRefusalMessage, Uc as loadPublishableAssetManifest, Ui as envCredentialsAreAssumedRole, Ul as decodeListingKey, Un as isSupersededResourceRecord, Ur as isCustomResource, Us as DYNAMIC_REFERENCE_TOKEN_SCAN, Ut as findNestedStackTypeChanges, V as conditionInputsFrom, Va as malformedResourcesWarning, Vc as buildAssetRedirectMap, Vi as applyCallerIdentityCredentials, Vl as uploadCfnTemplate, Vn as deleteSupersededEntry, Vr as ProviderRegistry, Vs as withPhysicalNameCopies, Vt as seedsDeleteFirstGuard, W as withResourceDeadline, Wa as previewableOrphanRecords, Wc as rewriteTemplateAssetReferences, Wi as classifyRecordedSecretRegion, Wl as expectedOwnerParam, Wn as removeSuperseded, Wr as wouldReturnToSdkProvider, Ws as dynamicReferenceTokens, X as makeSiblingClaimReader, Xa as refuseMalformedOrphansForDestroy, Xc as isCrossRegionRedirect, Xi as parameterTypeMayLoseSecretIdentity, Xl as processStackMessages, Xn as noEchoAttributeNamesOf, Xr as withPrintingSecrets, Xt as updatePartialMessage, Y as makeCanonicalizePropertiesFn, Ya as refuseMalformedOrphans, Yc as getBootstrapMarkerKey, Yi as isUnboundTemplateParameter, Yl as StageLoadError, Yn as withoutSuperseded, Ys as recordNestedStackParameterExpressions, Z as planOrphanAdoption, Za as refuseMalformedOrphansForOrphan, Zc as parseBootstrapMarker, Zi as getAccountInfo, Zl as defineOwnKey, Zn as noEchoComparisonForTemplate, Zr as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, Zs as physicalNameCopiesOf, Zt as updatePartialReason, _a as accountArgs, _c as applyCrossPrefixScan, _i as DiffCalculator, _l as runDockerForeground, _n as isWholeDynamicReferenceValue, _o as repairMalformedOutputsForReadOnly, _r as effectiveDeletionPolicy, _s as readbackPathFor, _t as dropFailedHint, a as isProtectionValueActive, aa as isStalePlaceholderArnAttribute, ac as recordNoEchoAttributeValues, ai as deleteIndeterminateGuards, al as describeDockerExecFailure, an as namesAnyDeclaredParameter, ao as refuseMalformedResourceEntriesForImportSave, ar as orphanRecordsPrintingBag, as as DagBuilder, at as dropSettledNestedJournals, au as renderAssemblyPathEscape, ba as hasReadableOrphans, bc as isNotImplemented, bi as poisonRenderedSpellingsCollidingIn, bl as AssetManifestLoader, bn as collectPublishedOutputNames, bo as repairMalformedResourcesForReadOnly, br as unsupportedFinalSnapshotError, bs as valueAtCoordinate, bt as loadJournaledOrphans, ca as withSharedDrainBudget, cc as wholeStringLeavesOf, cl as finchSecretArgvRefusal, cn as WITHHELD_NAME_DISPLAY, co as refuseMalformedResourcePropertiesForDrift, cs as isMarkedCoordinate, ct as recordDisplacedSkips, cu as injectedAwsRegionValue, da as declaresNoEcho, dc as LockManager, dl as isDockerClientEnvKey, dn as secretBearing, do as refuseMalformedResourcesForDeploy, dr as storedSecretNameNeedles, ds as maskWholeValue, dt as withNestedRevertRun, ea as carriesFetchableDynamicReference, ec as splitGetAttStringForm, ei as CloudControlProvider, el as validateContainerRepoName, en as nameScopeOf, eo as refuseMalformedResourceAttributesForOrphan, er as createReadOnlyAttributeHealerFactory, es as describeTypeWithThrottleRetry, et as keptForRetainedRecord, eu as nullPrototypeRecord, fa as JSON_LISTING_HOLE_VALUE, fc as isLockInfoExpired, fl as isMalformedEnvKey, fn as secretBearingStateKeyWarning, fo as refuseMalformedResourcesForDestroy, fr as ATOMIC_FINAL_SNAPSHOT_TYPES, fs as maskedLeafCoordinatesOf, ft as collectNestedChildUnaddressed, ga as UNREADABLE_RESOURCES_MAP_ROW, gc as CrossPrefixScanCache, gl as redactedDockerCause, gn as exportNameSecretExposure, go as repairMalformedOrphansForReadOnly, gr as createPreDeleteFinalSnapshot, gt as dropFailedCommands, ha as UNREADABLE_ORPHANS_CONTAINER_ROW, hc as CrossPrefixReadError, hl as redactedCause, hn as exportNameNoEchoParameters, ho as repairMalformedOrphanRecordsForReadOnly, hr as ccRoutedFinalSnapshotError, hs as noEchoOutputsComparison, ht as deleteJournaledOrphans, i as PROTECTION_PROPERTY_BY_TYPE, ia as cfnRefValueFromPhysicalId, ic as recordMaskOnlyValuesIn, ii as UNSPECIFIED_SKIP_REASON, il as describeDockerCapturedOutput, in as computeParameterTaint, io as refuseMalformedResourceEntriesForImport, ir as namingSecretsWithRecordedNoEcho, it as displacedPhysicalIdShown, iu as displayAssemblyPath, j as deferredServiceTokenWarning, ja as malformedOrphanRecordsRefusalMessage, jc as importableOutputs, jl as resolveStateBucketWithDefault, jo as findReplacedReadersOfRecreateTargets, js as printingCorpusOf, jt as recordAfterRollbackUpdate, k as crossStackOutputProvenanceSource, ka as malformedLocalResourceEntriesWarning, kc as hasUnverifiableParameterRefusal, ki as refuseUnreadableCdkCrossAccountRefs, kl as resolveCaptureObservedState, ko as NO_CC_HANDLERS_REASON, ks as literalSplitDelimitersOf, kt as replayRollback, la as parameterInputsFor, lc as WHOLE_DYNAMIC_REFERENCE_PATTERN, li as isWaitAbandonedError, ll as formatDockerLoginError, ln as displayTextOrWithheld, lo as refuseMalformedResourcePropertiesForExport, lr as secretNamedRecordNeedles, ls as maskAtCoordinates, ma as STATE_RESOURCES_MALFORMED, mc as rebuildClientForBucketRegion, ml as redactDockerArgvValues, mn as carriedExportAliasExposure, mo as refuseMalformedState, mr as buildFinalSnapshotIdentifier, ms as noEchoLeavesOf, mt as withNestedStackContext, n as recordedProtectionEvidence, na as keepsSecretReferenceToken, nc as provenPublicValue, nl as buildDockerImage, nn as retiredNameGenerationsAfter, no as refuseMalformedResourceEntriesForDeploy, nr as journaledOrphanPrintingBag, nt as NESTED_PENDING_PARENT_REASON, nu as absoluteAssemblyPathEscape, o as perType, oa as refStateLookupFromResource, oc as recordNoEchoParameterFreshValue, oi as deleteLeftInPlace, ol as describeDockerFailure, on as reachableDivergentParameters, oo as refuseMalformedResourceEntriesForOrphan, or as secretNamePrintingBag, os as TemplateParser, ou as resolveAssemblyPath, pa as STATE_REGION_DIVERGED, pc as S3StateBackend, pl as partitionSensitiveEnv, pn as secretSafeKeyDisplay, po as refuseMalformedResourcesForExport, pr as PRE_DELETE_SNAPSHOT_TYPES, ps as noEchoCoordinatesOf, pt as getCurrentNestedStackContext, q as keptWholeReasonText, qa as refuseMalformedOrphanRecords, qc as assertAssetBucketRegion, qi as regionLessSecretName, ql as derivePartitionAndUrlSuffix, qn as supersededHolderOf, qr as readsNoEchoDeleteValues, qs as identityKeyFor, r as recordedProtectionNote, ra as AWS_NO_VALUE, rc as recordMaskOnlyValue, ri as RollbackInlinePolicyWriters, rl as resolveDockerContextDirectory, rn as retiredNameGenerationsLeaving, ro as refuseMalformedResourceEntriesForDestroy, rr as maskEventTextWithBoundBags, rt as displacedOpClause, ru as describeFileReadFailure, s as readProtection, sc as recordProvenPublicExpression, si as deleteSkipReason, sl as dockerSpawnEnvWithSensitive, sn as resourcesNamingDeclaredParameter, so as refuseMalformedResourcePropertiesForDestroy, sr as secretNamePrintingBags, ss as canonicalCoordinates, st as nestedChildStackName$1, su as injectAwsRegion, t as DeployEngine, ta as isNamelessDynamicReferenceError, tc as carriesSecretMask, ti as slowCcOperationTimeoutMs, tl as buildDenyExternalAccessPolicy, tn as retiredAfterRollback, to as refuseMalformedResourceEntries, tr as completedReplayEntries, ts as withRetry, tt as recordRetainedForReadoption, tu as ownValue, uc as isSingleDynamicReferenceToken, ul as getDockerCmd, un as exportAliasCollisionScrubWarning, uo as refuseMalformedResourcePropertiesForOrphan, ur as stateSecretNameNeedles, us as maskReadbackAtCoordinates, ut as revertedNestedRowIds, uu as resolveBucketRegion, va as deployRefusesOrphanRowsReason, vc as crossPrefixDeniedWarning, vi as INTRINSIC_KEYS, vl as runDockerStreaming, vn as noEchoParameterValueSeed, vo as repairMalformedResourceEntriesForReadOnly, vr as isFinalSnapshotError, vs as readsNoEchoSource, vt as isHandledOrphan, wa as isReadableResourceEntry, wc as acceptedCreateOnlyDropsOf, wl as getDefaultStateBucketName, wn as DEFAULT_RESOURCE_WARN_AFTER_MS, wo as withheldAccountClause, wr as withCreateTokenLedger, xa as hasReadableOutputs, xc as stackInstanceIdOf, xl as getDockerImageBySourceHash, xn as isExportAliasCollision, xo as unpreviewableOrphanRecords, xs as liveMatchesUnresolvedTokenFrame, xt as makeForeignHolderScan, ya as displayLogicalId, yc as isAccessDenied, yi as IntrinsicFunctionResolver, yl as warnFinchArgvExposure, yn as collectDeclaredOutputNames, yo as repairMalformedResourcePropertiesForReadOnly, yr as refusesFinalSnapshot, ys as recordedNoEchoValuesOf, yt as journaledOrphanLines, z as templateIdentity, za as malformedResourceEntriesWarning, zc as stringifyValue, zi as sendableAssumeRoleCommand, zl as MIGRATE_TMP_PREFIX, zn as yellow, zs as maskSecretsInText, zt as replacementNeverSwapped } from "./deploy-engine-CYVt2NQR.js";
|
|
6
|
+
import { t as getCdkdVersion } from "./version-CaejipV3.js";
|
|
7
7
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
8
8
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetObjectCommand, HeadBucketCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutBucketVersioningCommand, PutObjectCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
9
9
|
import { GetRoleCommand, GetUserCommand } from "@aws-sdk/client-iam";
|
|
@@ -2559,7 +2559,7 @@ function collectCrossStackRefs(node, onRef, unconditional) {
|
|
|
2559
2559
|
//#region src/provisioning/register-providers.ts
|
|
2560
2560
|
let providerClasses;
|
|
2561
2561
|
function loadProviderClasses() {
|
|
2562
|
-
providerClasses ??= import("./provider-classes-
|
|
2562
|
+
providerClasses ??= import("./provider-classes-B2_u4Fg0.js");
|
|
2563
2563
|
return providerClasses;
|
|
2564
2564
|
}
|
|
2565
2565
|
function registerAllProviders(registry, classes) {
|
|
@@ -2749,11 +2749,16 @@ function findPendingPrefixRenames(stackName, state) {
|
|
|
2749
2749
|
if (typeof userSuppliedName !== "string" || userSuppliedName === "") continue;
|
|
2750
2750
|
const nameOptions = PATTERN_B_NAME_OPTIONS[resource.resourceType];
|
|
2751
2751
|
if (!nameOptions) continue;
|
|
2752
|
-
const
|
|
2752
|
+
const scope = {
|
|
2753
|
+
stackName,
|
|
2754
|
+
stackInstanceId: void 0,
|
|
2755
|
+
nameGenerations: void 0
|
|
2756
|
+
};
|
|
2757
|
+
const legacyName = withStackScope(scope, () => withSkipPrefix(false, () => generateResourceName(userSuppliedName, {
|
|
2753
2758
|
...nameOptions,
|
|
2754
2759
|
userSupplied: true
|
|
2755
2760
|
})));
|
|
2756
|
-
const newName =
|
|
2761
|
+
const newName = withStackScope(scope, () => withSkipPrefix(true, () => generateResourceName(userSuppliedName, {
|
|
2757
2762
|
...nameOptions,
|
|
2758
2763
|
userSupplied: true
|
|
2759
2764
|
})));
|
|
@@ -3387,7 +3392,7 @@ Force-quit: stack locks may not be released. If the next run reports a lock, run
|
|
|
3387
3392
|
const syncValidation = validateRecreateTargets({
|
|
3388
3393
|
template: stackInfo.template,
|
|
3389
3394
|
state: stateForRecreateCheck?.state ?? {
|
|
3390
|
-
version:
|
|
3395
|
+
version: 13,
|
|
3391
3396
|
stackName: stackInfo.stackName,
|
|
3392
3397
|
region: stackRegion,
|
|
3393
3398
|
resources: {},
|
|
@@ -3422,7 +3427,7 @@ Force-quit: stack locks may not be released. If the next run reports a lock, run
|
|
|
3422
3427
|
const replacedReaders = await findReplacedReadersOfRecreateTargets({
|
|
3423
3428
|
template: stackInfo.template,
|
|
3424
3429
|
state: stateForRecreateCheck?.state ?? {
|
|
3425
|
-
version:
|
|
3430
|
+
version: 13,
|
|
3426
3431
|
stackName: stackInfo.stackName,
|
|
3427
3432
|
region: stackRegion,
|
|
3428
3433
|
resources: {},
|
|
@@ -4797,7 +4802,7 @@ async function loadStateOrEmpty(stackName, region, stateBackend, refusalRecovery
|
|
|
4797
4802
|
region,
|
|
4798
4803
|
resources: {},
|
|
4799
4804
|
outputs: {},
|
|
4800
|
-
version:
|
|
4805
|
+
version: 13,
|
|
4801
4806
|
lastModified: Date.now()
|
|
4802
4807
|
},
|
|
4803
4808
|
unreadable: [],
|
|
@@ -6205,7 +6210,8 @@ async function diffCommand(stacks, options) {
|
|
|
6205
6210
|
selfRegion: orphanRegion,
|
|
6206
6211
|
logger
|
|
6207
6212
|
}),
|
|
6208
|
-
logger
|
|
6213
|
+
logger,
|
|
6214
|
+
newScheme: state.stackInstanceId !== void 0
|
|
6209
6215
|
})));
|
|
6210
6216
|
return {
|
|
6211
6217
|
adopted: outcome.adopted,
|
|
@@ -6612,6 +6618,7 @@ async function repairParentOutputAttributes(parentRow, region, stateBackend, loc
|
|
|
6612
6618
|
const row = locked.state.resources[parentRow.logicalId];
|
|
6613
6619
|
await saveScrubbedState(stateBackend, parentRow.stackName, region, {
|
|
6614
6620
|
...locked.state,
|
|
6621
|
+
...stackInstanceIdCarriedFrom(locked.state),
|
|
6615
6622
|
resources: {
|
|
6616
6623
|
...locked.state.resources,
|
|
6617
6624
|
[parentRow.logicalId]: {
|
|
@@ -8473,6 +8480,21 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
8473
8480
|
state: scrubbed
|
|
8474
8481
|
};
|
|
8475
8482
|
});
|
|
8483
|
+
const newSuperseded = Array.isArray(state.supersededResources) ? state.supersededResources.map((entry) => {
|
|
8484
|
+
if (!isSupersededResourceRecord(entry)) return entry;
|
|
8485
|
+
const needles = new Map(allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets));
|
|
8486
|
+
if (needles.size === 0) return entry;
|
|
8487
|
+
const scrubbed = keepHeldTokenProvenance(scrubResourceRecord(entry.state, needles, void 0, "state-cross-generation", {
|
|
8488
|
+
properties: "unproven",
|
|
8489
|
+
observed: "unproven"
|
|
8490
|
+
}));
|
|
8491
|
+
if (JSON.stringify(scrubbed) === JSON.stringify(entry.state)) return entry;
|
|
8492
|
+
recordsChanged++;
|
|
8493
|
+
return {
|
|
8494
|
+
...entry,
|
|
8495
|
+
state: scrubbed
|
|
8496
|
+
};
|
|
8497
|
+
}) : void 0;
|
|
8476
8498
|
const crossStackNeedles = allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets);
|
|
8477
8499
|
const redactCrossStackName = (name) => redactForState(name, {
|
|
8478
8500
|
provenance: "value-scan",
|
|
@@ -8587,8 +8609,10 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
8587
8609
|
const { skippedOutputs: _droppedByScrub, ...carriedState } = state;
|
|
8588
8610
|
const nextState = {
|
|
8589
8611
|
...carriedState,
|
|
8612
|
+
...stackInstanceIdCarriedFrom(state),
|
|
8590
8613
|
resources: newResources,
|
|
8591
8614
|
...state.orphans !== void 0 && { orphans: newOrphans },
|
|
8615
|
+
...newSuperseded !== void 0 && { supersededResources: newSuperseded },
|
|
8592
8616
|
...newImports !== void 0 && { imports: newImports },
|
|
8593
8617
|
...newOutputReads !== void 0 && { outputReads: newOutputReads },
|
|
8594
8618
|
outputs: newOutputs,
|
|
@@ -10054,7 +10078,8 @@ function redactDriftChanges(changes, secrets, secretPaths, maskPaths) {
|
|
|
10054
10078
|
async function runDriftForStack(stackName, region, stateBackend, providerRegistry, ccApiFallback, resolvePrincipalUniqueId, malformedRecordMode, nestedChildRecord, refusalRecovery) {
|
|
10055
10079
|
const result = await stateBackend.getState(stackName, region);
|
|
10056
10080
|
if (!result) throw new Error(`No state found for stack '${stackName}' (${region}). Run 'cdkd state list' to see available stacks.`);
|
|
10057
|
-
|
|
10081
|
+
const namingScope = nameScopeOf(stackName, stackInstanceIdOf(result.state, displayStackName(stackName)), result.state);
|
|
10082
|
+
return await withStackScope(namingScope, async () => {
|
|
10058
10083
|
const outcomes = [];
|
|
10059
10084
|
const state = result.state;
|
|
10060
10085
|
const logger = getLogger();
|
|
@@ -10520,6 +10545,7 @@ async function runAccept(reports, stateBackend, stateConfig, awsClients, options
|
|
|
10520
10545
|
const { skippedOutputs: _droppedByAccept, ...carriedState } = report.state;
|
|
10521
10546
|
const newState = {
|
|
10522
10547
|
...carriedState,
|
|
10548
|
+
...stackInstanceIdCarriedFrom(report.state),
|
|
10523
10549
|
resources,
|
|
10524
10550
|
lastModified: Date.now()
|
|
10525
10551
|
};
|
|
@@ -11164,6 +11190,7 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
|
|
|
11164
11190
|
const { skippedOutputs: _droppedByRevert, ...carriedState } = report.state;
|
|
11165
11191
|
const newState = {
|
|
11166
11192
|
...carriedState,
|
|
11193
|
+
...stackInstanceIdCarriedFrom(report.state),
|
|
11167
11194
|
resources,
|
|
11168
11195
|
lastModified: Date.now()
|
|
11169
11196
|
};
|
|
@@ -11810,7 +11837,8 @@ function recordDestroyEvent(recorder, event) {
|
|
|
11810
11837
|
const SKIPPED_REMEDY = "Each 'skipped (...)' line above names its cause, and its warning says whether repairing the record in state.json helps. Where it does, repair it and re-run. Otherwise (for example a custom-resource Delete handler that reported FAILED), delete the resources by hand, then drop the records.";
|
|
11811
11838
|
function countProtectedResources(state) {
|
|
11812
11839
|
let count = 0;
|
|
11813
|
-
|
|
11840
|
+
const records = [...Object.values(state.resources ?? {}), ...supersededResourcesOf(state).map((entry) => entry.state)];
|
|
11841
|
+
for (const resource of records) {
|
|
11814
11842
|
const locator = perType(PROTECTION_PROPERTY_BY_TYPE, resource.resourceType);
|
|
11815
11843
|
if (locator) {
|
|
11816
11844
|
const isActive = (recorded) => isProtectionValueActive(resource.resourceType, recorded);
|
|
@@ -11931,6 +11959,7 @@ async function destroyStackInRegion(stackName, state, ctx, stackScope) {
|
|
|
11931
11959
|
command: "destroy",
|
|
11932
11960
|
logger,
|
|
11933
11961
|
stateResources: state.resources,
|
|
11962
|
+
stackInstanceId: stackInstanceIdOf(state, displayStackName(stackName)),
|
|
11934
11963
|
underLock: async (settle) => {
|
|
11935
11964
|
const held = await acquireStackLock({
|
|
11936
11965
|
...stackLockBase,
|
|
@@ -11950,6 +11979,7 @@ async function destroyStackInRegion(stackName, state, ctx, stackScope) {
|
|
|
11950
11979
|
refuseDivergentRecordRegionForDestroy(state, stackName, regionForState, ctx.divergentBodyRegion, refusalRecovery, journaledOrphans.segments.flatMap((g) => g.ops).filter((op) => op.physicalIdRecoveredFromError === true).length);
|
|
11951
11980
|
const resourceCount = Object.keys(state.resources).length;
|
|
11952
11981
|
const orphanCount = (state.orphans ?? []).length;
|
|
11982
|
+
const supersededCount = supersededResourcesOf(state).length;
|
|
11953
11983
|
refuseMalformedOutputsForDestroy(state, stackName, regionForState, refusalRecovery);
|
|
11954
11984
|
if (crossPrefixScan) applyCrossPrefixScan(await crossPrefixScan, {
|
|
11955
11985
|
stackName,
|
|
@@ -11960,7 +11990,7 @@ async function destroyStackInRegion(stackName, state, ctx, stackScope) {
|
|
|
11960
11990
|
stateBucket: ctx.stateBucket
|
|
11961
11991
|
}
|
|
11962
11992
|
}, "destroy", (message) => logger.warn(message), (message) => logger.info(message));
|
|
11963
|
-
if (resourceCount === 0 && orphanCount === 0 && journaledOrphans.count === 0) {
|
|
11993
|
+
if (resourceCount === 0 && orphanCount === 0 && !holdsSupersededResources(state) && journaledOrphans.count === 0) {
|
|
11964
11994
|
logger.info(`Stack ${displayStackName(stackName)} has no resources, cleaning up state...`);
|
|
11965
11995
|
const emptyLock = await acquireStackLock({
|
|
11966
11996
|
...stackLockBase,
|
|
@@ -11982,7 +12012,7 @@ async function destroyStackInRegion(stackName, state, ctx, stackScope) {
|
|
|
11982
12012
|
const recheckJournaled = recheckRead.count;
|
|
11983
12013
|
refuseNewPendingRequests(recheckRead, stackName, regionForState);
|
|
11984
12014
|
if (recheckJournaled > 0) throw new Error(`Stack ${displayStackName(stackName)} (${displaySafe(regionForState, { asciiOnly: true })}) was empty when this run started but its rollback journal now records ${recheckJournaled} resource(s) a failed deploy created — another cdkd process wrote to it. Re-run the destroy to act on the current state.`);
|
|
11985
|
-
if (!(!recheck || recheckResources === 0 && recheckOrphans === 0)) throw new Error(`Stack ${displayStackName(stackName)} (${displaySafe(regionForState, { asciiOnly: true })}) was empty when this run started but now has ${recheckResources} resource(s) and ${recheckOrphans} rollback-orphaned resource(s) — another cdkd process wrote to it. Re-run the destroy to act on the current state.`);
|
|
12015
|
+
if (!(!recheck || recheckResources === 0 && recheckOrphans === 0 && !holdsSupersededResources(recheck.state))) throw new Error(`Stack ${displayStackName(stackName)} (${displaySafe(regionForState, { asciiOnly: true })}) was empty when this run started but now has ${recheckResources} resource(s) and ${recheckOrphans} rollback-orphaned resource(s) — another cdkd process wrote to it. Re-run the destroy to act on the current state.`);
|
|
11986
12016
|
await ctx.stateBackend.deleteState(stackName, regionForState);
|
|
11987
12017
|
result.stateDeleted = true;
|
|
11988
12018
|
logger.info(`${green("✓")} State deleted`);
|
|
@@ -12000,6 +12030,10 @@ async function destroyStackInRegion(stackName, state, ctx, stackScope) {
|
|
|
12000
12030
|
}
|
|
12001
12031
|
logger.info(`\nResources to be deleted (${resourceCount}):`);
|
|
12002
12032
|
for (const [logicalId, resource] of Object.entries(state.resources)) logger.info(` - ${displaySafe(logicalId)} (${displaySafe(resource.resourceType)})`);
|
|
12033
|
+
if (supersededCount > 0) {
|
|
12034
|
+
logger.info(safeMsg`\nOld resources a replacement left to delete (${supersededCount}):`);
|
|
12035
|
+
for (const entry of supersededResourcesOf(state)) logger.info(safeMsg` - ${entry.logicalId} (${entry.state.resourceType}), superseded`);
|
|
12036
|
+
}
|
|
12003
12037
|
const protectedCount = ctx.removeProtection ? countProtectedResources(state) + countProtectedJournaledOrphans(journaledOrphans, state.region) : 0;
|
|
12004
12038
|
let binding;
|
|
12005
12039
|
const stackNoEchoValues = () => {
|
|
@@ -12121,6 +12155,7 @@ async function destroyStackInRegion(stackName, state, ctx, stackScope) {
|
|
|
12121
12155
|
}
|
|
12122
12156
|
}
|
|
12123
12157
|
const remainingResources = { ...state.resources };
|
|
12158
|
+
let remainingSuperseded = state.supersededResources;
|
|
12124
12159
|
const stateTargetFor = (logicalId, resourceType) => resourceType === NESTED_STACK_TYPE ? `${stackName}~${logicalId}` : stackName;
|
|
12125
12160
|
const skippedStateTargets = /* @__PURE__ */ new Set();
|
|
12126
12161
|
const failedStateTargets = /* @__PURE__ */ new Set();
|
|
@@ -12143,13 +12178,16 @@ async function destroyStackInRegion(stackName, state, ctx, stackScope) {
|
|
|
12143
12178
|
let secretPrincipalRegions;
|
|
12144
12179
|
let secretPrincipalRegionsIncomplete = false;
|
|
12145
12180
|
const buildDestroySnapshot = () => {
|
|
12146
|
-
const { imports: _imports, outputReads: _outputReads, ...rest } = state;
|
|
12181
|
+
const { imports: _imports, outputReads: _outputReads, supersededResources: _superseded, ...rest } = state;
|
|
12147
12182
|
const keepEvidence = Object.values(remainingResources).some((r) => holdsSecretDerivedPrincipalRecord(r) || secretPrincipalRegions !== void 0 && typeof r === "object" && r !== null && r.resourceType === "AWS::CloudFormation::Stack");
|
|
12148
12183
|
return {
|
|
12149
12184
|
...rest,
|
|
12185
|
+
...stackInstanceIdCarriedFrom(withoutSuperseded(state)),
|
|
12186
|
+
...retiredNameGenerationsLeaving(state, remainingResources),
|
|
12150
12187
|
...keepEvidence && _imports !== void 0 && { imports: _imports },
|
|
12151
12188
|
...keepEvidence && _outputReads !== void 0 && { outputReads: _outputReads },
|
|
12152
12189
|
resources: { ...remainingResources },
|
|
12190
|
+
...remainingSuperseded !== void 0 && !(Array.isArray(remainingSuperseded) && remainingSuperseded.length === 0) && { supersededResources: remainingSuperseded },
|
|
12153
12191
|
outputs: {},
|
|
12154
12192
|
exportNames: [],
|
|
12155
12193
|
lastModified: Date.now()
|
|
@@ -12179,7 +12217,7 @@ async function destroyStackInRegion(stackName, state, ctx, stackScope) {
|
|
|
12179
12217
|
if (!sameJournaledOrphans(journaledUnderLock, journaledOrphans)) throw new Error(`The rollback journal of stack ${displayStackName(stackName)} (${displaySafe(regionForState, { asciiOnly: true })}) recorded ${journaledOrphans.count} resource(s) a failed deploy created when this run started and ${journaledUnderLock.count} now, not the same ones — another cdkd process wrote to it. Nothing was deleted; re-run the destroy to act on the current journal.`);
|
|
12180
12218
|
const noEchoValues = await stackNoEchoValues();
|
|
12181
12219
|
if (journaledUnderLock.count > 0) {
|
|
12182
|
-
const orphanOutcome = await deleteJournaledOrphans(journaledUnderLock, { ...state.resources }, stackName, {
|
|
12220
|
+
const orphanOutcome = await deleteJournaledOrphans(journaledUnderLock, { ...state.resources }, stackName, stackInstanceIdOf(state, displayStackName(stackName)), {
|
|
12183
12221
|
providerRegistry: destroyProviderRegistry,
|
|
12184
12222
|
region: regionForState,
|
|
12185
12223
|
logger,
|
|
@@ -12195,7 +12233,8 @@ async function destroyStackInRegion(stackName, state, ctx, stackScope) {
|
|
|
12195
12233
|
...state.parentStack !== void 0 && { producerRegionsIncomplete: true }
|
|
12196
12234
|
}, {
|
|
12197
12235
|
isInterrupted: () => lock.interrupted,
|
|
12198
|
-
noEchoValues
|
|
12236
|
+
noEchoValues,
|
|
12237
|
+
retiredNameGenerations: state.retiredNameGenerations
|
|
12199
12238
|
});
|
|
12200
12239
|
result.errorCount += orphanOutcome.failures;
|
|
12201
12240
|
journaledOrphanFailures = orphanOutcome.failures;
|
|
@@ -12266,7 +12305,8 @@ async function destroyStackInRegion(stackName, state, ctx, stackScope) {
|
|
|
12266
12305
|
return;
|
|
12267
12306
|
}
|
|
12268
12307
|
}));
|
|
12269
|
-
const
|
|
12308
|
+
const namingScope = nameScopeOf(stackName, stackInstanceIdOf(state, displayStackName(stackName)), state);
|
|
12309
|
+
const printingBagOf = (logicalId) => withStackScope(namingScope, () => judgedBagOf(logicalId));
|
|
12270
12310
|
for (let levelIndex = executionLevels.length - 1; levelIndex >= 0; levelIndex--) {
|
|
12271
12311
|
if (lock.interrupted) {
|
|
12272
12312
|
logger.debug("Interrupted (draining) — not scheduling further deletion levels");
|
|
@@ -12286,7 +12326,7 @@ async function destroyStackInRegion(stackName, state, ctx, stackScope) {
|
|
|
12286
12326
|
if (shouldRetainResource(resource.deletionPolicy)) {
|
|
12287
12327
|
logger.info(` ⊘ ${displaySafe(logicalId)} (${displaySafe(resource.resourceType)}) retained — DeletionPolicy: ${displaySafe(resource.deletionPolicy)}`);
|
|
12288
12328
|
result.retainedCount++;
|
|
12289
|
-
if (
|
|
12329
|
+
if (keptForRetainedRecord(resource)) {
|
|
12290
12330
|
retainedForReadoption.push({
|
|
12291
12331
|
logicalId,
|
|
12292
12332
|
resourceType: resource.resourceType,
|
|
@@ -12522,6 +12562,69 @@ async function destroyStackInRegion(stackName, state, ctx, stackScope) {
|
|
|
12522
12562
|
}));
|
|
12523
12563
|
await Promise.all(deletePromises);
|
|
12524
12564
|
}
|
|
12565
|
+
for (const entry of supersededResourcesOf(state)) {
|
|
12566
|
+
if (lock.interrupted) break;
|
|
12567
|
+
const { logicalId } = entry;
|
|
12568
|
+
const { physicalId, resourceType } = entry.state;
|
|
12569
|
+
const drop = () => {
|
|
12570
|
+
remainingSuperseded = (remainingSuperseded ?? []).filter((row) => row !== entry);
|
|
12571
|
+
};
|
|
12572
|
+
const bag = unionOfSecretBags([printingBagOf(logicalId), orphanRecordsPrintingBag([entry], noEchoValues)]);
|
|
12573
|
+
const holder = supersededHolderOf(entry, state.resources);
|
|
12574
|
+
if (holder !== void 0) {
|
|
12575
|
+
drop();
|
|
12576
|
+
if (holder.resourceType !== resourceType) withPrintingSecrets(bag, () => logger.warn(safeMsg` ⚠ ${supersededHeldByOtherTypeWarning(entry, holder.resourceType)}`));
|
|
12577
|
+
continue;
|
|
12578
|
+
}
|
|
12579
|
+
await withPrintingSecrets(bag, async () => {
|
|
12580
|
+
logger.info(safeMsg`Deleting ${logicalId}'s superseded ${resourceType} (${physicalId})...`);
|
|
12581
|
+
let outcome;
|
|
12582
|
+
try {
|
|
12583
|
+
outcome = await withStackRecords({
|
|
12584
|
+
live: () => Object.entries(remainingResources),
|
|
12585
|
+
survivors: () => Object.entries(remainingResources)
|
|
12586
|
+
}, () => deleteSupersededEntry(entry, {
|
|
12587
|
+
provider: destroyProviderRegistry.getProviderFor({
|
|
12588
|
+
resourceType,
|
|
12589
|
+
...entry.state.provisionedBy !== void 0 && { provisionedBy: entry.state.provisionedBy }
|
|
12590
|
+
}).provider,
|
|
12591
|
+
region: state.region ?? regionForState,
|
|
12592
|
+
...ctx.removeProtection === true && { removeProtection: true },
|
|
12593
|
+
...ctx.stackDestroy === true && { stackDestroy: true },
|
|
12594
|
+
maskSecrets: createUnionSecretMasker([bag]),
|
|
12595
|
+
stop: () => lock.interrupted
|
|
12596
|
+
}));
|
|
12597
|
+
} catch (error) {
|
|
12598
|
+
outcome = {
|
|
12599
|
+
kind: "failed",
|
|
12600
|
+
error
|
|
12601
|
+
};
|
|
12602
|
+
}
|
|
12603
|
+
if (outcome.kind === "deleted") {
|
|
12604
|
+
result.deletedCount++;
|
|
12605
|
+
drop();
|
|
12606
|
+
logger.info(safeMsg` ✓ Deleted ${logicalId}'s superseded ${resourceType}`);
|
|
12607
|
+
return;
|
|
12608
|
+
}
|
|
12609
|
+
const why = outcome.kind === "notDeleted" ? outcome.reason : maskSecretsInText(describeAwsFailure(outcome.error).detail, bag);
|
|
12610
|
+
if (outcome.kind === "notDeleted") {
|
|
12611
|
+
drop();
|
|
12612
|
+
result.skippedCount++;
|
|
12613
|
+
result.journaledOrphanSkips++;
|
|
12614
|
+
logger.warn(safeMsg` ⚠ ${logicalId}'s superseded ${resourceType} (${physicalId}) was not deleted: ${why}. ` + "Delete it manually — it is no longer tracked in state.");
|
|
12615
|
+
return;
|
|
12616
|
+
}
|
|
12617
|
+
result.errorCount++;
|
|
12618
|
+
logger.warn(safeMsg` ⚠ ${logicalId}'s superseded ${resourceType} (${physicalId}) was not deleted: ${why}. ` + "State preserved: it stays recorded, and a re-run of the destroy retries it.");
|
|
12619
|
+
});
|
|
12620
|
+
}
|
|
12621
|
+
const unreadableSuperseded = Array.isArray(state.supersededResources) ? state.supersededResources.filter((row) => !isSupersededResourceRecord(row)).length : holdsSupersededResources(state) ? 1 : 0;
|
|
12622
|
+
if (unreadableSuperseded > 0) {
|
|
12623
|
+
result.skippedCount += unreadableSuperseded;
|
|
12624
|
+
skippedStateTargets.add(stackName);
|
|
12625
|
+
const one = unreadableSuperseded === 1;
|
|
12626
|
+
logger.warn(safeMsg` ⚠ ${unreadableSuperseded} superseded resource ` + (one ? "entry" : "entries") + " in state could not be read, so nothing was deleted for " + (one ? "it" : "them") + ". State preserved: it may name a resource still in AWS.");
|
|
12627
|
+
}
|
|
12525
12628
|
result.interrupted = lock.interrupted;
|
|
12526
12629
|
await saveChain;
|
|
12527
12630
|
const preserveState = result.errorCount > 0 || result.interrupted || result.skippedCount > result.journaledOrphanSkips;
|
|
@@ -13556,6 +13659,11 @@ async function rewriteResourceReferences(state, orphanLogicalIds, providerRegist
|
|
|
13556
13659
|
return {
|
|
13557
13660
|
state: {
|
|
13558
13661
|
...carriedState,
|
|
13662
|
+
...stackInstanceIdCarriedFrom(state),
|
|
13663
|
+
...retiredNameGenerationsAfter(state, orphanLogicalIds.map((logicalId) => ({
|
|
13664
|
+
logicalId,
|
|
13665
|
+
record: orphans[logicalId]
|
|
13666
|
+
})).filter((entry) => entry.record !== null && typeof entry.record === "object")),
|
|
13559
13667
|
resources: newResources,
|
|
13560
13668
|
outputs: newOutputs,
|
|
13561
13669
|
lastModified: Date.now()
|
|
@@ -18024,7 +18132,7 @@ async function stateShowCommand(stackName, options) {
|
|
|
18024
18132
|
}
|
|
18025
18133
|
if (options.json) {
|
|
18026
18134
|
process.stdout.write(`${stringifyJsonPayload({
|
|
18027
|
-
state: stateResult.state,
|
|
18135
|
+
state: withStackInstanceIdWithheld(stateResult.state),
|
|
18028
18136
|
lock: lockInfo
|
|
18029
18137
|
})}\n`);
|
|
18030
18138
|
return;
|
|
@@ -18206,7 +18314,7 @@ function appendDescendants(children, out) {
|
|
|
18206
18314
|
}
|
|
18207
18315
|
function treeToShowJson(node) {
|
|
18208
18316
|
return {
|
|
18209
|
-
state: node.state,
|
|
18317
|
+
state: withStackInstanceIdWithheld(node.state),
|
|
18210
18318
|
lock: node.lock,
|
|
18211
18319
|
children: node.children.map(treeToShowJson)
|
|
18212
18320
|
};
|
|
@@ -19052,7 +19160,8 @@ async function refreshObservedForStack(stackName, region, stateBackend, lockMana
|
|
|
19052
19160
|
let refusedBaseline = 0;
|
|
19053
19161
|
let refusedSticky = 0;
|
|
19054
19162
|
const publicSsmProver = new PublicSsmProver(region, () => driftProducerRegionEvidence(state, stackName, region, stateBackend), logger);
|
|
19055
|
-
|
|
19163
|
+
const stackInstanceId = stackInstanceIdOf(state, displayStackName(stackName));
|
|
19164
|
+
await withStackScope(nameScopeOf(stackName, stackInstanceId, state), async () => {
|
|
19056
19165
|
const printingBagOf = secretNamePrintingBags(state.resources, void 0);
|
|
19057
19166
|
const tasks = entries.map(([logicalId, resource]) => withPrintingSecrets(printingBagOf(logicalId), async () => {
|
|
19058
19167
|
if (resource.observedBaselineRefused === true && logicalId !== acceptId) {
|
|
@@ -19374,6 +19483,7 @@ async function rollbackCommand(stackArg, options) {
|
|
|
19374
19483
|
}
|
|
19375
19484
|
try {
|
|
19376
19485
|
const stateData = await setup.stateBackend.getState(stackName, region);
|
|
19486
|
+
const stackInstanceId = stackInstanceIdOf(stateData?.state, displayStackName(stackName));
|
|
19377
19487
|
let journal = await setup.stateBackend.loadRollbackJournal(stackName, region);
|
|
19378
19488
|
if (await resolvePendingCloudControlRequests({
|
|
19379
19489
|
journal: setup.stateBackend,
|
|
@@ -19383,7 +19493,8 @@ async function rollbackCommand(stackArg, options) {
|
|
|
19383
19493
|
region,
|
|
19384
19494
|
command: "rollback",
|
|
19385
19495
|
logger,
|
|
19386
|
-
stateResources: stateData?.state.resources
|
|
19496
|
+
stateResources: stateData?.state.resources,
|
|
19497
|
+
stackInstanceId: stateData === null ? () => setup.stateBackend.readStackInstanceSibling(stackName, region) : stackInstanceId
|
|
19387
19498
|
})) journal = await setup.stateBackend.loadRollbackJournal(stackName, region);
|
|
19388
19499
|
const orphanedPending = journal ? await judgeNestedPendingRecords(setup, stackName, region, journal.segments) : 0;
|
|
19389
19500
|
if (journal && orphanedPending > 0) journal = {
|
|
@@ -19421,6 +19532,8 @@ async function rollbackCommand(stackArg, options) {
|
|
|
19421
19532
|
refuseDivergentRecordRegionForRollback(baseState, stackName, region, stateData.divergentBodyRegion, journal.segments.flatMap((seg) => seg.failedOperations ?? []).filter((op) => op.physicalIdRecoveredFromError === true).length);
|
|
19422
19533
|
const stateResources = { ...baseState.resources };
|
|
19423
19534
|
const mintedOrphans = [];
|
|
19535
|
+
const rolledBackCreates = [];
|
|
19536
|
+
const supersededHost = {};
|
|
19424
19537
|
const orphanLogicalIds = new Set(options.orphan ?? []);
|
|
19425
19538
|
const newestSegment = journal.segments[journal.segments.length - 1];
|
|
19426
19539
|
if (newestSegment?.roleArn && !options.roleArn) {
|
|
@@ -19432,7 +19545,7 @@ async function rollbackCommand(stackArg, options) {
|
|
|
19432
19545
|
const legacySegments = journal.segments.filter((s) => s.skipPrefix === void 0).length;
|
|
19433
19546
|
if (legacySegments > 0) logger.warn(safeMsg`${legacySegments} of ${journal.segments.length} rollback journal segment(s) ` + "were recorded by a cdkd that did not record the user-supplied-name prefix setting; replaying them with the stack-name prefix " + (legacySkipPrefix() ? "SKIPPED" : "KEPT") + " on user-supplied physical names (CDKD_PREFIX_USER_SUPPLIED_NAMES / context.cdkd.prefixUserSuppliedNames in ./cdk.json / the default). If the failed deploy ran with --prefix-user-supplied-names, re-run with CDKD_PREFIX_USER_SUPPLIED_NAMES=true instead.");
|
|
19434
19547
|
const createTokenLedger = ledgerForStack(setup.stateBackend, stackName, region);
|
|
19435
|
-
const inSegmentScope = (segment, fn) => withSkipPrefix(segment.skipPrefix ?? legacySkipPrefix(), () =>
|
|
19548
|
+
const inSegmentScope = (segment, fn) => withSkipPrefix(segment.skipPrefix ?? legacySkipPrefix(), () => withStackScope(nameScopeOf(stackName, stackInstanceId, stateData?.state), () => withCreateTokenLedger(createTokenLedger, fn)));
|
|
19436
19549
|
logger.info(`\nRollback plan for ${stackRegionShown(stackName, region)}:`);
|
|
19437
19550
|
if (!stackRegionIsPlain(stackName, region)) logger.info(STACK_REGION_DESCRIBED_NOTE);
|
|
19438
19551
|
if (orphanedPending > 0) logger.info(safeMsg`\n Discard ${orphanedPending} record(s) of nested deploys whose parent run no longer ` + `has a journal to replay them (nothing else would ever replay them).`);
|
|
@@ -19505,10 +19618,13 @@ async function rollbackCommand(stackArg, options) {
|
|
|
19505
19618
|
const { skippedOutputs: _droppedByRollback, ...carriedState } = baseState;
|
|
19506
19619
|
const next = () => ({
|
|
19507
19620
|
...carriedState,
|
|
19508
|
-
|
|
19621
|
+
...stackInstanceIdCarriedFrom(baseState),
|
|
19622
|
+
...supersededAfterRollback(baseState, supersededHost),
|
|
19623
|
+
version: 13,
|
|
19509
19624
|
region,
|
|
19510
19625
|
resources: { ...stateResources },
|
|
19511
19626
|
...orphansAfterRollback(baseState, mintedOrphans),
|
|
19627
|
+
...retiredAfterRollback(baseState, mintedOrphans, rolledBackCreates),
|
|
19512
19628
|
lastModified: Date.now()
|
|
19513
19629
|
});
|
|
19514
19630
|
try {
|
|
@@ -19577,6 +19693,7 @@ async function rollbackCommand(stackArg, options) {
|
|
|
19577
19693
|
isInterrupted: () => interrupted,
|
|
19578
19694
|
emitEnvelope: completedOps.length === 0,
|
|
19579
19695
|
onOrphan: (record) => mintedOrphans.push(record),
|
|
19696
|
+
onRolledBackCreate: (create) => rolledBackCreates.push(create),
|
|
19580
19697
|
inlinePolicyWriters
|
|
19581
19698
|
})));
|
|
19582
19699
|
failedOpFailures = failedResult.failures;
|
|
@@ -19607,8 +19724,11 @@ async function rollbackCommand(stackArg, options) {
|
|
|
19607
19724
|
afterOp: saveState,
|
|
19608
19725
|
isInterrupted: () => interrupted,
|
|
19609
19726
|
onOrphan: (record) => mintedOrphans.push(record),
|
|
19727
|
+
onRolledBackCreate: (create) => rolledBackCreates.push(create),
|
|
19610
19728
|
inlinePolicyWriters,
|
|
19611
|
-
failedOperations: failedForGuard
|
|
19729
|
+
failedOperations: failedForGuard,
|
|
19730
|
+
onSuperseded: (entry) => addSuperseded(supersededHost, entry),
|
|
19731
|
+
onSupersededSettled: (entry) => removeSuperseded(supersededHost, entry)
|
|
19612
19732
|
}));
|
|
19613
19733
|
return {
|
|
19614
19734
|
failures: replayResult.failures + failedOpFailures,
|
|
@@ -19641,7 +19761,7 @@ async function rollbackCommand(stackArg, options) {
|
|
|
19641
19761
|
await eventRecorder.finalize(totalFailures > 0 || interrupted || declinedDivergentRewrite ? "FAILED" : "SUCCEEDED");
|
|
19642
19762
|
}
|
|
19643
19763
|
const survivingOrphans = orphansAfterRollback(baseState, mintedOrphans).orphans ?? [];
|
|
19644
|
-
if (journal.segments.length === 0 && oldestInitialDeploy && Object.keys(stateResources).length === 0 && survivingOrphans.length === 0) {
|
|
19764
|
+
if (journal.segments.length === 0 && oldestInitialDeploy && Object.keys(stateResources).length === 0 && survivingOrphans.length === 0 && !holdsSupersededResources(baseState)) {
|
|
19645
19765
|
await setup.stateBackend.deleteState(stackName, region);
|
|
19646
19766
|
await recordRetainedForReadoption(setup.stateBackend, stackName, region, [], logger);
|
|
19647
19767
|
await releaseRegistryMarkerQuietly(setup.stateBackend, stackName, region, logger);
|
|
@@ -21244,6 +21364,10 @@ async function importCommand(stackArg, options) {
|
|
|
21244
21364
|
const saveOptions = {};
|
|
21245
21365
|
if (existingEtag) saveOptions.expectedEtag = existingEtag;
|
|
21246
21366
|
if (migrationPending) saveOptions.migrateLegacy = true;
|
|
21367
|
+
if (existingState === null) stackState = {
|
|
21368
|
+
...stackState,
|
|
21369
|
+
stackInstanceId: await stateBackend.stackInstanceIdForFirstWrite(stackInfo.stackName, targetRegion, { writeAhead: false })
|
|
21370
|
+
};
|
|
21247
21371
|
await recordImportOnRollbackJournal(stateBackend, stackInfo.stackName, targetRegion, importedRows.map((r) => r.logicalId), stackState.resources, logger);
|
|
21248
21372
|
await stateBackend.saveState(stackInfo.stackName, targetRegion, stackState, saveOptions);
|
|
21249
21373
|
logger.info(`✓ State written: ${stackInfo.stackName} (${targetRegion})`);
|
|
@@ -21695,6 +21819,7 @@ function buildStackState(stackName, region, rows, templateParser, template, exis
|
|
|
21695
21819
|
}
|
|
21696
21820
|
resources[row.logicalId] = {
|
|
21697
21821
|
physicalId: row.physicalId,
|
|
21822
|
+
...importedNameGenerationFields(prior, row, existingState?.retiredNameGenerations?.[row.logicalId]),
|
|
21698
21823
|
resourceType: row.resourceType,
|
|
21699
21824
|
properties: tmplResource.Properties ?? {},
|
|
21700
21825
|
attributes,
|
|
@@ -21712,7 +21837,7 @@ function buildStackState(stackName, region, rows, templateParser, template, exis
|
|
|
21712
21837
|
}
|
|
21713
21838
|
if (namesParameter?.failedClosed !== void 0) getLogger().debug(`The template's parameter dependence could not be judged (${namesParameter.failedClosed}): every prior observed-baseline refusal recorded without a reason is carried as an unverifiable-parameter refusal.`);
|
|
21714
21839
|
return {
|
|
21715
|
-
version:
|
|
21840
|
+
version: 13,
|
|
21716
21841
|
stackName,
|
|
21717
21842
|
region,
|
|
21718
21843
|
resources,
|
|
@@ -21720,6 +21845,7 @@ function buildStackState(stackName, region, rows, templateParser, template, exis
|
|
|
21720
21845
|
...existingState ? exportNamesCarriedFrom(existingState) : { exportNames: [] },
|
|
21721
21846
|
...existingState?.outputReferenceProvenance !== void 0 && { outputReferenceProvenance: existingState.outputReferenceProvenance },
|
|
21722
21847
|
...existingState ? orphansCarriedFrom(existingState) : {},
|
|
21848
|
+
...existingState ? stackInstanceIdCarriedFrom(existingState) : {},
|
|
21723
21849
|
lastModified: Date.now()
|
|
21724
21850
|
};
|
|
21725
21851
|
}
|
|
@@ -22182,6 +22308,10 @@ async function importNestedStackChildrenRecursive(args) {
|
|
|
22182
22308
|
childStackState.parentStack = parentStackName;
|
|
22183
22309
|
childStackState.parentLogicalId = childLogicalId;
|
|
22184
22310
|
childStackState.parentRegion = parentRegion;
|
|
22311
|
+
const childPrior = await stateBackend.getState(childStackName, childRegion);
|
|
22312
|
+
const childStackInstanceId = childPrior ? stackInstanceIdOf(childPrior.state, displaySafe(childStackName)) : await stateBackend.stackInstanceIdForFirstWrite(childStackName, childRegion, { writeAhead: false });
|
|
22313
|
+
if (childPrior) Object.assign(childStackState, stackInstanceIdCarriedFrom(childPrior.state));
|
|
22314
|
+
else if (childStackInstanceId !== void 0) childStackState.stackInstanceId = childStackInstanceId;
|
|
22185
22315
|
const childDeployedParameters = namesAnyDeclaredParameter(childStateTemplate) ? await readDeployedParameters(childTreeNode.stackName, args.cfnClient, logger, displaySafe(childStackName)) : void 0;
|
|
22186
22316
|
await captureObservedForImportedResources(childStackState, providerRegistry, logger, await withSharedDrainBudget(() => resolveImportedProperties(childStackState, childStateTemplate, childRegion, stateBackend, logger, childDeployedParameters)), rebuiltLogicalIdsFrom(rows, childTemplate));
|
|
22187
22317
|
await recordImportOnRollbackJournal(stateBackend, childStackName, childRegion, rows.filter((r) => r.outcome === "imported").map((r) => r.logicalId), childStackState.resources, logger);
|
|
@@ -22242,6 +22372,18 @@ function indexGrandchildTemplatePaths(childTemplate, childTemplatePath) {
|
|
|
22242
22372
|
function constructPathField(path) {
|
|
22243
22373
|
return path === void 0 ? {} : { constructPath: path };
|
|
22244
22374
|
}
|
|
22375
|
+
function importedNameGenerationFields(prior, row, retired) {
|
|
22376
|
+
const retiredReached = isNameGeneration(retired) ? retired : 0;
|
|
22377
|
+
const reachedField = (reached) => reached === 0 ? {} : { nameGenerationHigh: reached };
|
|
22378
|
+
if (prior === null || typeof prior !== "object") return reachedField(retiredReached);
|
|
22379
|
+
try {
|
|
22380
|
+
if (prior.physicalId !== row.physicalId) return reachedField(Math.max(retiredReached, nameGenerationHighWaterOf(prior, row.logicalId)));
|
|
22381
|
+
nameGenerationHighWaterOf(prior, row.logicalId);
|
|
22382
|
+
return nameGenerationCarriedFrom(prior);
|
|
22383
|
+
} catch {
|
|
22384
|
+
return reachedField(retiredReached);
|
|
22385
|
+
}
|
|
22386
|
+
}
|
|
22245
22387
|
|
|
22246
22388
|
//#endregion
|
|
22247
22389
|
//#region src/utils/local-aws-failure.ts
|
|
@@ -29564,4 +29706,4 @@ function collectVerbFlags(program) {
|
|
|
29564
29706
|
|
|
29565
29707
|
//#endregion
|
|
29566
29708
|
export { resolveSecretDerivedPrincipals as a, buildProgram, isResolvableSecretPrincipalList as i, runDestroyForStack as n, canonicalizeIpProtocolValue as o, holdsUnprovenSecretPrincipalToken as r, resolvedResourceTimeoutMs as s, canonicalizeIpv4Cidr as t };
|
|
29567
|
-
//# sourceMappingURL=program-
|
|
29709
|
+
//# sourceMappingURL=program-CvRs5pV_.js.map
|