@go-to-k/cdkd 0.296.7 → 0.296.8
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-BU0YONBp.js → asg-provider-BDJ1qN0J.js} +2 -2
- package/dist/{asg-provider-BU0YONBp.js.map → asg-provider-BDJ1qN0J.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-wyaJUA8V.js → deploy-engine-iXgQFHYR.js} +105 -76
- package/dist/deploy-engine-iXgQFHYR.js.map +1 -0
- package/dist/{iam-role-provider-obY72uH2.js → iam-role-provider-B1Ma2zVK.js} +2 -2
- package/dist/{iam-role-provider-obY72uH2.js.map → iam-role-provider-B1Ma2zVK.js.map} +1 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{neptune-provider-C3f-vDOh.js → neptune-provider-C-WMp2hQ.js} +2 -2
- package/dist/{neptune-provider-C3f-vDOh.js.map → neptune-provider-C-WMp2hQ.js.map} +1 -1
- package/dist/{program-DEnDp4o0.js → program-CPziYRDp.js} +130 -78
- package/dist/program-CPziYRDp.js.map +1 -0
- package/dist/{provider-classes-CsF7Ia5F.js → provider-classes-CxXTKgEM.js} +123 -14
- package/dist/provider-classes-CxXTKgEM.js.map +1 -0
- package/dist/{rds-provider-Cf5P2so_.js → rds-provider-C193wAF8.js} +2 -2
- package/dist/{rds-provider-Cf5P2so_.js.map → rds-provider-C193wAF8.js.map} +1 -1
- package/dist/{version-LalLOhpQ.js → version-Br6yDF8t.js} +2 -2
- package/dist/{version-LalLOhpQ.js.map → version-Br6yDF8t.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-wyaJUA8V.js.map +0 -1
- package/dist/program-DEnDp4o0.js.map +0 -1
- package/dist/provider-classes-CsF7Ia5F.js.map +0 -1
|
@@ -2,8 +2,8 @@ import { a as runWithStackAwsClients, i as resetAwsClients, o as setAwsClients,
|
|
|
2
2
|
import { A as displayIdent, D as UNRENDERABLE, E as STACK_REF_MAX_CODE_POINTS, F as plainIdentOr, I as safeMsg, L as stringifyJsonPayload, M as displayStackName, N as isPasteableIdent, O as cutMarker, R as truncateCodePoints, S as withStackName, T as SECRET_REF_MAX_CODE_POINTS, d as PATTERN_B_NAME_PROPERTIES, f as PATTERN_B_RESOURCE_TYPES, g as generateResourceName, h as explicitNamePropertyFor, i as reserveStdoutForPayload, j as displaySafe, k as displayAwsMessage, l as getLiveRenderer, m as derivesPatternBName, n as getLogger, o as runStackBuffered, r as isStdoutReservedForPayload, u as PATTERN_B_NAME_OPTIONS, w as SAFE_MSG_ALTERED_CHAR, x as withSkipPrefix } from "./logger-DAaB7GFO.js";
|
|
3
3
|
import { An as setPasteableVerbFlags, At as CUSTOM_RESOURCE_RESPONSE_PREFIX, Bt as clientDefaultsFor, Ct as buildForceUnlockCommand, Dn as shellQuote, Dt as formatLockOperation, En as shellBoundedDisplay, Et as formatLockExpiry, F as runDeleteAttempt, Ft as producerRecordKey, G as beginCommandInterruptScope, Gn as retryClassificationText, Ht as AccountIdUnavailableError, It as setPasteableAwsProfile, J as isInterruptedWaitError, Jn as safeStringify, Jt as DeployCancelledError, K as endCommandInterruptScope, Kn as describeAwsFailure, Kt as CrossAccountSecretRefusalError, Lt as withPasteableAwsProfile, Mt as injectiveKey, On as withheldTargetClause, Ot as formatLockOwner, Pt as producerCoordinateKey, Qn as markNonRetryable, Qt as LocalStartServiceError, Rt as ambientClientDefaults, Sn as pasteableCommand, St as UNREPRODUCIBLE_LOCK_CLAUSE, Tn as quotedOrDescribed, Tt as forceQuitRecoveryClause, Un as isRetryableTransientError, V as isAwsCliLiteral, Vn as isAmbiguousOutcomeError, Vt as credentialFingerprint, Wn as isTransientServerError, Wt as CdkdError, Xn as isMarkedNonRetryable, Xt as IntrinsicResolutionRefusalError, Yt as DynamicReferenceRegionAmbiguousError, Zn as isThrottlingError, Zt as LocalInvokeBuildError$1, _ as VALUE_NOT_SHOWN, _n as SHELL_ACTIVE_WHY, an as ResourceTimeoutError, cn as StackTerminationProtectionError, g as assertRegionMatch, h as RESOURCE_NOT_FOUND, hn as TIMEOUT_FLAG_RESOURCE_TYPE, in as ProvisioningError, it as resourceTypeShown, jt as DEFAULT_STATE_PREFIX, kn as setPasteableRunFlags, mn as withErrorHandling, n as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, nn as NestedStackChildDirectDestroyError, nt as logicalIdShown, on as ResourceUpdateNotSupportedError, pn as normalizeAwsError, q as interruptWatchListenerCount, rn as PartialFailureError, s as readRecordedPrincipals, sn as StackHasActiveImportsError, t as IAM_PRINCIPAL_NAME, tn as MalformedProducerRecordRefusalError, un as SynthesisError, w as remedyLogicalId, wn as plainOrDescribed, wt as buildLockContentionMessage, xn as isInertUnquoted, yn as commandHole, zt as ambientCredentialConfig } from "./iam-policy-targets-td1X_kKN.js";
|
|
4
4
|
import { n as awsClientDefaults, r as getAssumedRoleCredentials, u as formatAuthority } from "./aws-client-defaults-D0q0z4dG.js";
|
|
5
|
-
import { $ as resourcesNamingDeclaredParameter, $a as maskSecretsInError, $i as repairMalformedResourceEntriesForReadOnly, $n as deleteSkipReason, $o as ensureAssetStorage, $r as deployRefusesOrphanRowsReason, $s as derivePartitionAndUrlSuffix, $t as effectiveDeletionPolicy, Ai as refuseMalformedOrphans, Ao as acceptedCreateOnlyDropsOf, As as getDefaultStateBucketName, At as planRollback, Ba as TemplateParser, Bi as refuseMalformedResourceEntriesForImportSave, Bn as CC_BROKEN_REASON, Bo as orphansCarriedFrom, Br as AWS_NO_VALUE, Bs as stateBucketExistenceConfirmed, Bt as updatePartialMessage, C as perType, Ci as malformedScrubResourceEntriesRefusalMessage, Cn as findDestructiveChanges, Co as WHOLE_DYNAMIC_REFERENCE_PATTERN, Cr as callerEnvCredentials, Cs as warnFinchArgvExposure, Dn as ledgerForStack, Do as S3StateBackend, Ds as getDockerImageBySourceHash, Dt as isJournaledOrphan, Ei as refuseDivergentRecordRegionForDestroy, Eo as isLockInfoExpired, Es as AssetManifestLoader, Et as demoteSupersededOrphans, Fa as withRetry, Fi as refuseMalformedResourceAttributesForOrphan, Fo as hasUnverifiableParameterRefusal, Fr as isImpossibleEmptyStoredAttribute, Fs as resolveCaptureObservedState, Ft as inheritProducerRegions, G as cyan, Ga as literalSplitDelimitersOf, Gi as refuseMalformedResourcePropertiesForOrphan, Go as WorkGraph, Gr as withSharedDrainBudget, Gs as MIGRATE_TMP_PREFIX, Gt as orphanRecordsPrintingBag, H as formatResourceLine, Ha as carryLogOnlyValues, Hi as refuseMalformedResourcePropertiesForDestroy, Hn as ccBrokenReason, Ho as AssetPublisher, Hr as isStalePlaceholderArnAttribute, Hs as ssmResolvedValueType, Ht as completedReplayEntries, Ii as refuseMalformedResourceEntries, Io as importableOutputKeys, Ir as carriesDynamicReference, Is as resolveSkipPrefix, J as red, Ja as recordLogOnlyParameterValue, Ji as refuseMalformedResourcesForExport, Jn as slowCcOperationTimeoutMs, Jo as loadPublishableAssetManifest, Jr as JSON_LISTING_HOLE_VALUE, Js as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Jt as ATOMIC_FINAL_SNAPSHOT_TYPES, K as gray, Ka as logOnlyValueCount, Ki as refuseMalformedResourcesForDeploy, Kn as withPrintingSecrets, Ko as buildAssetRedirectMap, Kr as parameterInputsFor, Ks as findLargeInlineResources, Kt as secretNamePrintingBag, Li as refuseMalformedResourceEntriesForDeploy, Lo as importableOutputs, Lr as carriesFetchableDynamicReference, Ls as resolveStateBucketWithDefault, Ma as prefetchCreateOnlyPropertyPaths, Mi as refuseMalformedOrphansForOrphan, Mo as exportNamesCarriedFrom, Mr as isUnboundTemplateParameter, Ms as loadCdkJson, Mt as resolveReplacementOldType, Na as templateResourceTypes, Ni as refuseMalformedOutputs, No as hasReadableExportSet, Nr as parameterTypeMayLoseSecretIdentity, Ns as resolveApp, Nt as findNestedStackTypeChanges, Oi as refuseMalformedOrphanRecords, Oo as rebuildClientForBucketRegion, Os as Synthesizer, Ot as isReplacementOrphan, Pa as describeTypeWithThrottleRetry, Pi as refuseMalformedOutputsForDestroy, Po as hasReasonlessBaselineRefusal, Pr as getAccountInfo, Ps as resolveAutoAssetStorage, Q as reachableDivergentParameters, Qa as errorCauseChain, Qi as repairMalformedOutputsForReadOnly, Qn as deleteIndeterminateGuards, Qo as assertAssetBucketRegion, Qr as UNREADABLE_RESOURCES_MAP_ROW, Qs as canonicalizeRegion, Qt as createPreDeleteFinalSnapshot, Ri as refuseMalformedResourceEntriesForDestroy, Ro as isReadableBag, Rr as isNamelessDynamicReferenceError, Rs as resolveStateBucketWithDefaultAndSource, S as isProtectionValueActive, Si as malformedResourcesWarning, Sn as constructPathOf, So as TEMPLATE_SOURCED_RULES, Sr as applyCallerIdentityCredentials, Ss as runDockerStreaming, St as destroyStackRecordsView, Ti as previewableOrphanRecords, Tn as RollbackInlinePolicyWriters, To as LockManager, Ts as stripControlChars, Tt as recordAfterRollbackUpdate, U as createReadOnlyAttributeHealerFactory, Ua as createUnionSecretMasker, Ui as refuseMalformedResourcePropertiesForDrift, Un as wouldReturnToSdkProvider, Uo as isSensitiveAttributeName, Ur as refStateLookupFromResource, Us as CFN_TEMPLATE_BODY_LIMIT, Ut as journaledOrphanPrintingBag, Va as liveMatchesUnresolvedTokenFrame, Vi as refuseMalformedResourceEntriesForOrphan, Vn as ProviderRegistry, Vo as shouldRetainResource, Vr as cfnRefValueFromPhysicalId, Vs as warnDeprecatedNoPrefixCliFlag, Vt as updatePartialReason, W as bold, Wa as hasMaskableValues, Wi as refuseMalformedResourcePropertiesForExport, Wn as isCustomResourceType$1, Wo as stringifyValue, Ws as CFN_TEMPLATE_URL_LIMIT, Wt as maskEventTextWithBoundBags, X as computeParameterTaint, Xa as shareLogOnlyValues, Xi as repairMalformedOrphanRecordsForReadOnly, Xo as AssetModeResolver, Xr as STATE_RESOURCES_MALFORMED, Xs as expectedOwnerParam, Xt as buildFinalSnapshotIdentifier, Y as yellow, Ya as recordLogOnlyValue, Yi as refuseMalformedState, Yn as ccProtectionRegistryTypes, Yo as rewriteTemplateAssetReferences, Yr as STATE_REGION_DIVERGED, Ys as decodeListingKey, Yt as PRE_DELETE_SNAPSHOT_TYPES, Z as namesAnyDeclaredParameter, Za as createSecretMasker, Zi as repairMalformedOrphansForReadOnly, Zn as UNSPECIFIED_SKIP_REASON, Zo as BOOTSTRAP_MARKER_PREFIX, Zr as UNREADABLE_ORPHANS_CONTAINER_ROW, Zs as PARTITION_TABLE, Zt as ccRoutedFinalSnapshotError, _ as makeCanonicalizePropertiesFn, _i as malformedOutputsRefusalMessage, _n as isExportAliasCollision, _o as recordProvenPublicExpression, _r as assertSendableRoleArn, _s as isMalformedEnvKey, a as findNestedTemplateTreeDefect, aa as findActionableSilentDrops, ac as hasPlainPrototype, ai as isReadableResourceEntry, an as extractDeploymentEventError, ao as dynamicReferenceTokens, as as validateContainerRepoName, at as makeSiblingClaimReader, b as recordedProtectionNote, bi as malformedResourceEntriesWarning, bn as DEFAULT_RESOURCE_WARN_AFTER_MS, bo as STATE_SOURCED_CROSS_GENERATION_RULES, br as sendableAssumeRoleCommand, bs as redactedDockerCause, bt as replayRollback, c as renderNestedTemplateTreeDefect, cc as absoluteAssemblyPathEscape, ci as malformedExportSourceWarning, cn as exportAliasCollisionScrubWarning, co as inheritNestedStackParameterAssociations, cs as resolveDockerContextDirectory, ct as displacedOpClause, d as conditionInputsFrom, da as findReplacedReadersOfRecreateTargets, dc as renderAssemblyPathEscape, di as malformedLocalResourcesWarning, dn as secretSafeKeyDisplay, do as identityKeyFor, dr as IntrinsicFunctionResolver, ds as describeDockerFailure, ea as repairMalformedResourcePropertiesForReadOnly, ec as AssemblyReader, ei as displayLogicalId, en as isFinalSnapshotError, eo as maskSecretsInText, es as getBootstrapMarkerKey, et as deleteJournaledOrphans, f as parentSuppliedValues, fa as shownType, fc as resolveAssemblyPath, fi as malformedOrphanRecordsRefusalMessage, fn as exportNameSecretExposure, fo as carriesSecretMask, fr as classifyReplaySecretRegion, fs as dockerSpawnEnvWithSensitive, ft as nestedChildStackName$1, g as mergeNoChangeOutputs, ga as renderStatefulReason, gi as malformedOrphansWarning, gn as collectPublishedOutputNames, go as recordNoEchoAttributeValues, gr as assertFlagRoleArn, gs as isDockerClientEnvKey, gt as withNestedRevertRun, h as keptWholeReasonText, ha as isStatefulRecreateTargetSync, hi as malformedOrphansRefusalMessage, hn as collectDeclaredOutputNames, ho as recordMaskOnlyValuesIn, hr as applyRoleArnIfSet, hs as getDockerCmd, ht as revertedNestedRowIds, i as childTemplateLoader, ia as unreadableResourceEntries, ic as hasOwnKey, ii as isReadableOrphanRecord, in as DeploymentEventsStore, io as DYNAMIC_REFERENCE_TOKEN_SCAN, is as validateAssetBucketName, it as sameJournaledOrphans, ji as refuseMalformedOrphansForDestroy, jo as describeRegionValueKind, jr as coerceParameterTypedValue, js as getLegacyStateBucketName, jt as replacementNeverSwapped, ki as refuseMalformedOrphanRecordsForDestroy, kn as withCreateTokenLedger, ko as splitImportedOps, ks as synthesisStatusMessage, kt as planFailedOps, l as templateIdentity, la as NO_CC_HANDLERS_REASON, lc as describeFileReadFailure, li as malformedLocalOutputsWarning, ln as secretBearing, lo as recordNestedStackParameterExpressions, lr as DiffCalculator, ls as describeDockerCapturedOutput, lt as displacedPhysicalIdShown, m as isSecretBearingReferenceString, ma as isStatefulRecreateTargetForReplace, mc as resolveBucketRegion, mi as malformedOrphanRowsKeptWarning, mn as noEchoParameterValueSeed, mo as recordMaskOnlyValue, mr as regionLessSecretName, ms as formatDockerLoginError, n as IMPLICIT_DELETE_DEPENDENCIES, na as unpreviewableOrphanRecords, nc as processStackMessages, ni as hasReadableOutputs, nn as unsupportedFinalSnapshotError, no as redactSecretsForState, ns as parseBootstrapMarker, nt as journaledOrphanLines, o as isAbsoluteAssetPath, oc as nullPrototypeRecord, oi as malformedDriftResourcePropertiesWarning, on as WITHHELD_NAME_DISPLAY, oo as isUncertifiedBaselineMaskPosition, os as buildDenyExternalAccessPolicy, ot as planOrphanAdoption, p as readRecordedConditionVerdicts, pa as MULTI_REGION_RECREATE_BLOCKED_TYPES, pi as malformedOrphanRecordsWarning, pn as isWholeDynamicReferenceValue, po as provenPublicValue, pr as producerRegionsFromState, ps as finchSecretArgvRefusal, pt as recordDisplacedSkips, q as green, qa as printingCorpusOf, qi as refuseMalformedResourcesForDestroy, qn as CloudControlProvider, qo as createAssetRedirectResolver, qs as uploadCfnTemplate, qt as stateSecretNameNeedles, r as computeImplicitDeleteEdges, ra as unreadableOrphanRecords, rc as defineOwnKey, ri as hasReadableResources, rn as DeploymentEventsReader, ro as scrubResourceRecord, rs as readBootstrapMarkerBody, rt as loadJournaledOrphans, s as listNestedTemplateRows, sa as unwrittenCreateOnlyReplacement, sc as ownValue, si as malformedExportNamesWarning, sn as displayTextOrWithheld, so as pathCrossesDottedKey, ss as buildDockerImage, st as NESTED_PENDING_PARENT_REASON, t as DeployEngine, ta as repairMalformedResourcesForReadOnly, tc as StageLoadError, ti as hasReadableOrphans, tn as refusesFinalSnapshot, to as markSameGenerationBag, tr as isWaitAbandonedError, ts as isCrossRegionRedirect, tt as isHandledOrphan, u as conditionFingerprint, ua as hasNoCloudControlHandlers, uc as displayAssemblyPath, ui as malformedLocalResourceEntriesWarning, un as secretBearingStateKeyWarning, ur as INTRINSIC_KEYS, us as describeDockerExecFailure, ut as dropSettledNestedJournals, v as withResourceDeadline, vi as malformedOutputsWarning, vn as bindingSkippedOutputs, vo as wholeStringLeavesOf, vr as explicitRoleArnOrThrow, vs as partitionSensitiveEnv, vt as withNestedStackContext, w as readProtection, wi as malformedStateRefusalMessage, wn as formatDestructiveChange, wo as isSingleDynamicReferenceToken, wr as envCredentialsAreAssumedRole, ws as escapeRegExp, wt as withStackRecords, x as PROTECTION_PROPERTY_BY_TYPE, xi as malformedResourcePropertiesWarning, xn as maskingRetryLogger, xo as STATE_SOURCED_READBACK_RULES, xr as AWS_CREDENTIAL_ENV_KEYS, xs as runDockerForeground, y as recordedProtectionEvidence, yi as malformedRenderedContainersWarning, yn as DEFAULT_RESOURCE_TIMEOUT_MS, yo as STATE_SOURCED_BASELINE_RULES, yr as isIamRoleArn, ys as redactDockerArgvValues, yt as replayFailedOperations, za as DagBuilder, zi as refuseMalformedResourceEntriesForImport, zo as orphansAfterRollback, zr as keepsSecretReferenceToken, zs as resolveUseCdkBootstrapAssets } from "./deploy-engine-wyaJUA8V.js";
|
|
6
|
-
import { t as getCdkdVersion } from "./version-
|
|
5
|
+
import { $ as resourcesNamingDeclaredParameter, $a as maskSecretsInError, $i as repairMalformedResourceEntriesForReadOnly, $n as deleteSkipReason, $o as ensureAssetStorage, $r as deployRefusesOrphanRowsReason, $s as derivePartitionAndUrlSuffix, $t as effectiveDeletionPolicy, Ai as refuseMalformedOrphans, Ao as acceptedCreateOnlyDropsOf, As as getDefaultStateBucketName, At as planRollback, Ba as TemplateParser, Bi as refuseMalformedResourceEntriesForImportSave, Bn as CC_BROKEN_REASON, Bo as orphansCarriedFrom, Br as AWS_NO_VALUE, Bs as stateBucketExistenceConfirmed, Bt as updatePartialMessage, C as perType, Ci as malformedScrubResourceEntriesRefusalMessage, Cn as findDestructiveChanges, Co as WHOLE_DYNAMIC_REFERENCE_PATTERN, Cr as callerEnvCredentials, Cs as warnFinchArgvExposure, Dn as ledgerForStack, Do as S3StateBackend, Ds as getDockerImageBySourceHash, Dt as isJournaledOrphan, Ei as refuseDivergentRecordRegionForDestroy, Eo as isLockInfoExpired, Es as AssetManifestLoader, Et as demoteSupersededOrphans, Fa as withRetry, Fi as refuseMalformedResourceAttributesForOrphan, Fo as hasUnverifiableParameterRefusal, Fr as isImpossibleEmptyStoredAttribute, Fs as resolveCaptureObservedState, Ft as inheritProducerRegions, G as cyan, Ga as literalSplitDelimitersOf, Gi as refuseMalformedResourcePropertiesForOrphan, Go as WorkGraph, Gr as withSharedDrainBudget, Gs as MIGRATE_TMP_PREFIX, Gt as orphanRecordsPrintingBag, H as formatResourceLine, Ha as carryLogOnlyValues, Hi as refuseMalformedResourcePropertiesForDestroy, Hn as ccBrokenReason, Ho as AssetPublisher, Hr as isStalePlaceholderArnAttribute, Hs as ssmResolvedValueType, Ht as completedReplayEntries, Ii as refuseMalformedResourceEntries, Io as importableOutputKeys, Ir as carriesDynamicReference, Is as resolveSkipPrefix, J as red, Ja as recordLogOnlyParameterValue, Ji as refuseMalformedResourcesForExport, Jn as slowCcOperationTimeoutMs, Jo as loadPublishableAssetManifest, Jr as JSON_LISTING_HOLE_VALUE, Js as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Jt as ATOMIC_FINAL_SNAPSHOT_TYPES, K as gray, Ka as logOnlyValueCount, Ki as refuseMalformedResourcesForDeploy, Kn as withPrintingSecrets, Ko as buildAssetRedirectMap, Kr as parameterInputsFor, Ks as findLargeInlineResources, Kt as secretNamePrintingBag, Li as refuseMalformedResourceEntriesForDeploy, Lo as importableOutputs, Lr as carriesFetchableDynamicReference, Ls as resolveStateBucketWithDefault, Ma as prefetchCreateOnlyPropertyPaths, Mi as refuseMalformedOrphansForOrphan, Mo as exportNamesCarriedFrom, Mr as isUnboundTemplateParameter, Ms as loadCdkJson, Mt as resolveReplacementOldType, Na as templateResourceTypes, Ni as refuseMalformedOutputs, No as hasReadableExportSet, Nr as parameterTypeMayLoseSecretIdentity, Ns as resolveApp, Nt as findNestedStackTypeChanges, Oi as refuseMalformedOrphanRecords, Oo as rebuildClientForBucketRegion, Os as Synthesizer, Ot as isReplacementOrphan, Pa as describeTypeWithThrottleRetry, Pi as refuseMalformedOutputsForDestroy, Po as hasReasonlessBaselineRefusal, Pr as getAccountInfo, Ps as resolveAutoAssetStorage, Q as reachableDivergentParameters, Qa as errorCauseChain, Qi as repairMalformedOutputsForReadOnly, Qn as deleteIndeterminateGuards, Qo as assertAssetBucketRegion, Qr as UNREADABLE_RESOURCES_MAP_ROW, Qs as canonicalizeRegion, Qt as createPreDeleteFinalSnapshot, Ri as refuseMalformedResourceEntriesForDestroy, Ro as isReadableBag, Rr as isNamelessDynamicReferenceError, Rs as resolveStateBucketWithDefaultAndSource, S as isProtectionValueActive, Si as malformedResourcesWarning, Sn as constructPathOf, So as TEMPLATE_SOURCED_RULES, Sr as applyCallerIdentityCredentials, Ss as runDockerStreaming, St as destroyStackRecordsView, Ti as previewableOrphanRecords, Tn as RollbackInlinePolicyWriters, To as LockManager, Ts as stripControlChars, Tt as recordAfterRollbackUpdate, U as createReadOnlyAttributeHealerFactory, Ua as createUnionSecretMasker, Ui as refuseMalformedResourcePropertiesForDrift, Un as wouldReturnToSdkProvider, Uo as isSensitiveAttributeName, Ur as refStateLookupFromResource, Us as CFN_TEMPLATE_BODY_LIMIT, Ut as journaledOrphanPrintingBag, Va as liveMatchesUnresolvedTokenFrame, Vi as refuseMalformedResourceEntriesForOrphan, Vn as ProviderRegistry, Vo as shouldRetainResource, Vr as cfnRefValueFromPhysicalId, Vs as warnDeprecatedNoPrefixCliFlag, Vt as updatePartialReason, W as bold, Wa as hasMaskableValues, Wi as refuseMalformedResourcePropertiesForExport, Wn as isCustomResourceType$1, Wo as stringifyValue, Ws as CFN_TEMPLATE_URL_LIMIT, Wt as maskEventTextWithBoundBags, X as computeParameterTaint, Xa as shareLogOnlyValues, Xi as repairMalformedOrphanRecordsForReadOnly, Xo as AssetModeResolver, Xr as STATE_RESOURCES_MALFORMED, Xs as expectedOwnerParam, Xt as buildFinalSnapshotIdentifier, Y as yellow, Ya as recordLogOnlyValue, Yi as refuseMalformedState, Yn as ccProtectionRegistryTypes, Yo as rewriteTemplateAssetReferences, Yr as STATE_REGION_DIVERGED, Ys as decodeListingKey, Yt as PRE_DELETE_SNAPSHOT_TYPES, Z as namesAnyDeclaredParameter, Za as createSecretMasker, Zi as repairMalformedOrphansForReadOnly, Zn as UNSPECIFIED_SKIP_REASON, Zo as BOOTSTRAP_MARKER_PREFIX, Zr as UNREADABLE_ORPHANS_CONTAINER_ROW, Zs as PARTITION_TABLE, Zt as ccRoutedFinalSnapshotError, _ as makeCanonicalizePropertiesFn, _i as malformedOutputsRefusalMessage, _n as isExportAliasCollision, _o as recordProvenPublicExpression, _r as assertSendableRoleArn, _s as isMalformedEnvKey, a as findNestedTemplateTreeDefect, aa as findActionableSilentDrops, ac as hasPlainPrototype, ai as isReadableResourceEntry, an as extractDeploymentEventError, ao as dynamicReferenceTokens, as as validateContainerRepoName, at as makeSiblingClaimReader, b as recordedProtectionNote, bi as malformedResourceEntriesWarning, bn as DEFAULT_RESOURCE_WARN_AFTER_MS, bo as STATE_SOURCED_CROSS_GENERATION_RULES, br as sendableAssumeRoleCommand, bs as redactedDockerCause, bt as replayRollback, c as renderNestedTemplateTreeDefect, cc as absoluteAssemblyPathEscape, ci as malformedExportSourceWarning, cn as exportAliasCollisionScrubWarning, co as inheritNestedStackParameterAssociations, cs as resolveDockerContextDirectory, ct as displacedOpClause, d as conditionInputsFrom, da as findReplacedReadersOfRecreateTargets, dc as renderAssemblyPathEscape, di as malformedLocalResourcesWarning, dn as secretSafeKeyDisplay, do as identityKeyFor, dr as IntrinsicFunctionResolver, ds as describeDockerFailure, ea as repairMalformedResourcePropertiesForReadOnly, ec as AssemblyReader, ei as displayLogicalId, en as isFinalSnapshotError, eo as maskSecretsInText, es as getBootstrapMarkerKey, et as deleteJournaledOrphans, f as parentSuppliedValues, fa as shownType, fc as resolveAssemblyPath, fi as malformedOrphanRecordsRefusalMessage, fn as exportNameSecretExposure, fo as carriesSecretMask, fr as classifyReplaySecretRegion, fs as dockerSpawnEnvWithSensitive, ft as nestedChildStackName$1, g as mergeNoChangeOutputs, ga as renderStatefulReason, gi as malformedOrphansWarning, gn as collectPublishedOutputNames, go as recordNoEchoAttributeValues, gr as assertFlagRoleArn, gs as isDockerClientEnvKey, gt as withNestedRevertRun, h as keptWholeReasonText, ha as isStatefulRecreateTargetSync, hi as malformedOrphansRefusalMessage, hn as collectDeclaredOutputNames, ho as recordMaskOnlyValuesIn, hr as applyRoleArnIfSet, hs as getDockerCmd, ht as revertedNestedRowIds, i as childTemplateLoader, ia as unreadableResourceEntries, ic as hasOwnKey, ii as isReadableOrphanRecord, in as DeploymentEventsStore, io as DYNAMIC_REFERENCE_TOKEN_SCAN, is as validateAssetBucketName, it as sameJournaledOrphans, ji as refuseMalformedOrphansForDestroy, jo as describeRegionValueKind, jr as coerceParameterTypedValue, js as getLegacyStateBucketName, jt as replacementNeverSwapped, ki as refuseMalformedOrphanRecordsForDestroy, kn as withCreateTokenLedger, ko as splitImportedOps, ks as synthesisStatusMessage, kt as planFailedOps, l as templateIdentity, la as NO_CC_HANDLERS_REASON, lc as describeFileReadFailure, li as malformedLocalOutputsWarning, ln as secretBearing, lo as recordNestedStackParameterExpressions, lr as DiffCalculator, ls as describeDockerCapturedOutput, lt as displacedPhysicalIdShown, m as isSecretBearingReferenceString, ma as isStatefulRecreateTargetForReplace, mc as resolveBucketRegion, mi as malformedOrphanRowsKeptWarning, mn as noEchoParameterValueSeed, mo as recordMaskOnlyValue, mr as regionLessSecretName, ms as formatDockerLoginError, n as IMPLICIT_DELETE_DEPENDENCIES, na as unpreviewableOrphanRecords, nc as processStackMessages, ni as hasReadableOutputs, nn as unsupportedFinalSnapshotError, no as redactSecretsForState, ns as parseBootstrapMarker, nt as journaledOrphanLines, o as isAbsoluteAssetPath, oc as nullPrototypeRecord, oi as malformedDriftResourcePropertiesWarning, on as WITHHELD_NAME_DISPLAY, oo as isUncertifiedBaselineMaskPosition, os as buildDenyExternalAccessPolicy, ot as planOrphanAdoption, p as readRecordedConditionVerdicts, pa as MULTI_REGION_RECREATE_BLOCKED_TYPES, pi as malformedOrphanRecordsWarning, pn as isWholeDynamicReferenceValue, po as provenPublicValue, pr as producerRegionsFromState, ps as finchSecretArgvRefusal, pt as recordDisplacedSkips, q as green, qa as printingCorpusOf, qi as refuseMalformedResourcesForDestroy, qn as CloudControlProvider, qo as createAssetRedirectResolver, qs as uploadCfnTemplate, qt as stateSecretNameNeedles, r as computeImplicitDeleteEdges, ra as unreadableOrphanRecords, rc as defineOwnKey, ri as hasReadableResources, rn as DeploymentEventsReader, ro as scrubResourceRecord, rs as readBootstrapMarkerBody, rt as loadJournaledOrphans, s as listNestedTemplateRows, sa as unwrittenCreateOnlyReplacement, sc as ownValue, si as malformedExportNamesWarning, sn as displayTextOrWithheld, so as pathCrossesDottedKey, ss as buildDockerImage, st as NESTED_PENDING_PARENT_REASON, t as DeployEngine, ta as repairMalformedResourcesForReadOnly, tc as StageLoadError, ti as hasReadableOrphans, tn as refusesFinalSnapshot, to as markSameGenerationBag, tr as isWaitAbandonedError, ts as isCrossRegionRedirect, tt as isHandledOrphan, u as conditionFingerprint, ua as hasNoCloudControlHandlers, uc as displayAssemblyPath, ui as malformedLocalResourceEntriesWarning, un as secretBearingStateKeyWarning, ur as INTRINSIC_KEYS, us as describeDockerExecFailure, ut as dropSettledNestedJournals, v as withResourceDeadline, vi as malformedOutputsWarning, vn as bindingSkippedOutputs, vo as wholeStringLeavesOf, vr as explicitRoleArnOrThrow, vs as partitionSensitiveEnv, vt as withNestedStackContext, w as readProtection, wi as malformedStateRefusalMessage, wn as formatDestructiveChange, wo as isSingleDynamicReferenceToken, wr as envCredentialsAreAssumedRole, ws as escapeRegExp, wt as withStackRecords, x as PROTECTION_PROPERTY_BY_TYPE, xi as malformedResourcePropertiesWarning, xn as maskingRetryLogger, xo as STATE_SOURCED_READBACK_RULES, xr as AWS_CREDENTIAL_ENV_KEYS, xs as runDockerForeground, y as recordedProtectionEvidence, yi as malformedRenderedContainersWarning, yn as DEFAULT_RESOURCE_TIMEOUT_MS, yo as STATE_SOURCED_BASELINE_RULES, yr as isIamRoleArn, ys as redactDockerArgvValues, yt as replayFailedOperations, za as DagBuilder, zi as refuseMalformedResourceEntriesForImport, zo as orphansAfterRollback, zr as keepsSecretReferenceToken, zs as resolveUseCdkBootstrapAssets } from "./deploy-engine-iXgQFHYR.js";
|
|
6
|
+
import { t as getCdkdVersion } from "./version-Br6yDF8t.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";
|
|
@@ -2051,6 +2051,7 @@ var ExportIndexStore = class {
|
|
|
2051
2051
|
stateBackend;
|
|
2052
2052
|
loadState = { kind: "unloaded" };
|
|
2053
2053
|
opts;
|
|
2054
|
+
profile;
|
|
2054
2055
|
writeChain = Promise.resolve();
|
|
2055
2056
|
clientResolved = false;
|
|
2056
2057
|
resolveInFlight = null;
|
|
@@ -2060,9 +2061,11 @@ var ExportIndexStore = class {
|
|
|
2060
2061
|
this.prefix = prefix;
|
|
2061
2062
|
this.region = region;
|
|
2062
2063
|
this.stateBackend = stateBackend;
|
|
2064
|
+
const { profile, ...retry } = opts;
|
|
2065
|
+
this.profile = profile;
|
|
2063
2066
|
this.opts = {
|
|
2064
2067
|
...DEFAULT_OPTIONS,
|
|
2065
|
-
...
|
|
2068
|
+
...retry
|
|
2066
2069
|
};
|
|
2067
2070
|
}
|
|
2068
2071
|
indexKey() {
|
|
@@ -2245,7 +2248,11 @@ var ExportIndexStore = class {
|
|
|
2245
2248
|
if (state.outputs === void 0) continue;
|
|
2246
2249
|
const region = ref.region ?? this.region;
|
|
2247
2250
|
if (!hasReadableExportSet(state)) {
|
|
2248
|
-
this.logger.warn(malformedExportSourceWarning(ref.stackName, region
|
|
2251
|
+
this.logger.warn(malformedExportSourceWarning(ref.stackName, region, {
|
|
2252
|
+
profile: this.profile,
|
|
2253
|
+
stateBucket: this.bucket,
|
|
2254
|
+
statePrefix: this.prefix
|
|
2255
|
+
}));
|
|
2249
2256
|
continue;
|
|
2250
2257
|
}
|
|
2251
2258
|
const stateModified = state.lastModified ?? 0;
|
|
@@ -2414,7 +2421,7 @@ function collectCrossStackRefs(node, onRef) {
|
|
|
2414
2421
|
//#region src/provisioning/register-providers.ts
|
|
2415
2422
|
let providerClasses;
|
|
2416
2423
|
function loadProviderClasses() {
|
|
2417
|
-
providerClasses ??= import("./provider-classes-
|
|
2424
|
+
providerClasses ??= import("./provider-classes-CxXTKgEM.js");
|
|
2418
2425
|
return providerClasses;
|
|
2419
2426
|
}
|
|
2420
2427
|
function registerAllProviders(registry, classes) {
|
|
@@ -2709,7 +2716,7 @@ async function deployCommand(stacks, options) {
|
|
|
2709
2716
|
return {
|
|
2710
2717
|
stateBucket,
|
|
2711
2718
|
preflightStateBackend,
|
|
2712
|
-
exportIndexStore: new ExportIndexStore(awsClients.s3, stateBucket, options.statePrefix, region, preflightStateBackend)
|
|
2719
|
+
exportIndexStore: new ExportIndexStore(awsClients.s3, stateBucket, options.statePrefix, region, preflightStateBackend, { profile: options.profile })
|
|
2713
2720
|
};
|
|
2714
2721
|
})();
|
|
2715
2722
|
let deployInterrupted = false;
|
|
@@ -2740,6 +2747,11 @@ Force-quit: stack locks may not be released. If the next run reports a lock, run
|
|
|
2740
2747
|
const [result, statePrep] = await Promise.all([synthesizer.synthesize(synthOptions), statePrepPromise]);
|
|
2741
2748
|
const { stateBucket, preflightStateBackend, exportIndexStore } = statePrep;
|
|
2742
2749
|
synthOptions.stateBucket = stateBucket;
|
|
2750
|
+
const refusalRecovery = {
|
|
2751
|
+
profile: options.profile,
|
|
2752
|
+
stateBucket,
|
|
2753
|
+
statePrefix: options.statePrefix
|
|
2754
|
+
};
|
|
2743
2755
|
const { stacks: allStacks } = result;
|
|
2744
2756
|
logger.debug(`Found ${allStacks.length} stack(s) in assembly`);
|
|
2745
2757
|
const stackPatterns = stacks.length > 0 ? stacks : options.stack ? [options.stack] : [];
|
|
@@ -2925,8 +2937,8 @@ Force-quit: stack locks may not be released. If the next run reports a lock, run
|
|
|
2925
2937
|
if (options.recreateViaCcApi?.length || options.recreateViaSdkProvider?.length) {
|
|
2926
2938
|
const stateForRecreateCheck = await stackStateBackend.getState(stackInfo.stackName, stackRegion);
|
|
2927
2939
|
if (stateForRecreateCheck) {
|
|
2928
|
-
refuseMalformedResourcesForDeploy(stateForRecreateCheck.state, stackInfo.stackName, stackRegion);
|
|
2929
|
-
refuseMalformedResourceEntriesForDeploy(stateForRecreateCheck.state, stackInfo.stackName, stackRegion);
|
|
2940
|
+
refuseMalformedResourcesForDeploy(stateForRecreateCheck.state, stackInfo.stackName, stackRegion, refusalRecovery);
|
|
2941
|
+
refuseMalformedResourceEntriesForDeploy(stateForRecreateCheck.state, stackInfo.stackName, stackRegion, refusalRecovery);
|
|
2930
2942
|
}
|
|
2931
2943
|
const syncValidation = validateRecreateTargets({
|
|
2932
2944
|
template: stackInfo.template,
|
|
@@ -2997,6 +3009,7 @@ Force-quit: stack locks may not be released. If the next run reports a lock, run
|
|
|
2997
3009
|
dryRun: options.dryRun,
|
|
2998
3010
|
noRollback: !options.rollback,
|
|
2999
3011
|
...options.roleArn && { roleArn: options.roleArn },
|
|
3012
|
+
refusalRecovery,
|
|
3000
3013
|
...assetRedirect && { assetRedirect },
|
|
3001
3014
|
...eventRecorder && { eventRecorder },
|
|
3002
3015
|
...migrationGate && { onCurrentStateLoaded: migrationGate },
|
|
@@ -4175,38 +4188,38 @@ function indexNestedChildTemplates(template, templatePath) {
|
|
|
4175
4188
|
}
|
|
4176
4189
|
return result;
|
|
4177
4190
|
}
|
|
4178
|
-
async function loadStateOrEmpty(stackName, region, stateBackend) {
|
|
4191
|
+
async function loadStateOrEmpty(stackName, region, stateBackend, refusalRecovery) {
|
|
4179
4192
|
const result = await stateBackend.getState(stackName, region);
|
|
4180
4193
|
if (result) {
|
|
4181
4194
|
const unreadable = [];
|
|
4182
4195
|
const unreadableContainers = [];
|
|
4183
4196
|
const deployRefusals = [];
|
|
4184
4197
|
if (repairMalformedResourcesForReadOnly(result.state)) {
|
|
4185
|
-
logger.warn(malformedResourcesWarning(stackName, region));
|
|
4198
|
+
logger.warn(malformedResourcesWarning(stackName, region, refusalRecovery));
|
|
4186
4199
|
unreadableContainers.push("resources");
|
|
4187
4200
|
deployRefusals.push(DEPLOY_REFUSES_RESOURCES_BAG_REASON);
|
|
4188
4201
|
}
|
|
4189
4202
|
const dropped = repairMalformedResourceEntriesForReadOnly(result.state);
|
|
4190
4203
|
if (dropped.length > 0) {
|
|
4191
|
-
logger.warn(malformedResourceEntriesWarning(stackName, region, dropped));
|
|
4204
|
+
logger.warn(malformedResourceEntriesWarning(stackName, region, dropped, refusalRecovery));
|
|
4192
4205
|
for (const id of dropped) unreadable.push(id);
|
|
4193
4206
|
deployRefusals.push(deployRefusesResourceEntriesReason(dropped));
|
|
4194
4207
|
}
|
|
4195
4208
|
const unreadableProps = repairMalformedResourcePropertiesForReadOnly(result.state);
|
|
4196
4209
|
if (unreadableProps.length > 0) {
|
|
4197
|
-
logger.warn(malformedResourcePropertiesWarning(stackName, region, unreadableProps));
|
|
4210
|
+
logger.warn(malformedResourcePropertiesWarning(stackName, region, unreadableProps, refusalRecovery));
|
|
4198
4211
|
deployRefusals.push(deployRefusesPropertiesReason(unreadableProps));
|
|
4199
4212
|
}
|
|
4200
4213
|
if (repairMalformedOutputsForReadOnly(result.state)) {
|
|
4201
|
-
logger.warn(malformedOutputsWarning(stackName, region));
|
|
4214
|
+
logger.warn(malformedOutputsWarning(stackName, region, refusalRecovery));
|
|
4202
4215
|
deployRefusals.push(DEPLOY_REFUSES_OUTPUTS_REASON);
|
|
4203
4216
|
}
|
|
4204
4217
|
if (repairMalformedOrphansForReadOnly(result.state)) {
|
|
4205
|
-
logger.warn(malformedOrphansWarning(stackName, region));
|
|
4218
|
+
logger.warn(malformedOrphansWarning(stackName, region, refusalRecovery));
|
|
4206
4219
|
unreadableContainers.push("orphans");
|
|
4207
4220
|
deployRefusals.push(DEPLOY_REFUSES_ORPHANS_CONTAINER_REASON);
|
|
4208
4221
|
}
|
|
4209
|
-
if (isReadableBag(result.state.outputs) && !hasReadableExportSet(result.state)) logger.warn(malformedExportNamesWarning(stackName, region));
|
|
4222
|
+
if (isReadableBag(result.state.outputs) && !hasReadableExportSet(result.state)) logger.warn(malformedExportNamesWarning(stackName, region, refusalRecovery));
|
|
4210
4223
|
return {
|
|
4211
4224
|
state: result.state,
|
|
4212
4225
|
unreadable,
|
|
@@ -4522,7 +4535,7 @@ async function computeStackDiff(currentState, template, region, stackName, state
|
|
|
4522
4535
|
for (const id of unpreviewableOrphanRecords(currentState)) unreadableOrphans.push(id);
|
|
4523
4536
|
const readableOrphans = previewableOrphanRecords(currentState);
|
|
4524
4537
|
if (unreadableOrphans.length > 0) {
|
|
4525
|
-
logger.warn(malformedOrphanRecordsWarning(stackName, region, unreadableOrphans.map((id) => id ?? ""), false));
|
|
4538
|
+
logger.warn(malformedOrphanRecordsWarning(stackName, region, unreadableOrphans.map((id) => id ?? ""), false, options.refusalRecovery));
|
|
4526
4539
|
deployRefusals.push(deployRefusesDroppedOrphanRowsReason(unreadableOrphans));
|
|
4527
4540
|
}
|
|
4528
4541
|
let reportedByTheAdoptedPropertiesArm = [];
|
|
@@ -4545,14 +4558,14 @@ async function computeStackDiff(currentState, template, region, stackName, state
|
|
|
4545
4558
|
const tornAdopted = repairMalformedResourcePropertiesForReadOnly(stateForDiff);
|
|
4546
4559
|
reportedByTheAdoptedPropertiesArm = tornAdopted;
|
|
4547
4560
|
if (tornAdopted.length > 0) {
|
|
4548
|
-
logger.warn(malformedResourcePropertiesWarning(stackName, region, tornAdopted));
|
|
4561
|
+
logger.warn(malformedResourcePropertiesWarning(stackName, region, tornAdopted, options.refusalRecovery));
|
|
4549
4562
|
deployRefusals.push(deployRefusesPropertiesReason(tornAdopted));
|
|
4550
4563
|
}
|
|
4551
4564
|
}
|
|
4552
4565
|
const alreadyReported = new Set(reportedByTheAdoptedPropertiesArm);
|
|
4553
4566
|
const previewedRowsTheDeployRefuses = readableOrphans.filter((record) => !isReadableOrphanRecord(record)).map((record) => record.logicalId).filter((logicalId) => !alreadyReported.has(logicalId));
|
|
4554
4567
|
if (previewedRowsTheDeployRefuses.length > 0) {
|
|
4555
|
-
logger.warn(malformedOrphanRowsKeptWarning(stackName, region, previewedRowsTheDeployRefuses));
|
|
4568
|
+
logger.warn(malformedOrphanRowsKeptWarning(stackName, region, previewedRowsTheDeployRefuses, options.refusalRecovery));
|
|
4556
4569
|
deployRefusals.push(deployRefusesOrphanRowsReason(previewedRowsTheDeployRefuses));
|
|
4557
4570
|
}
|
|
4558
4571
|
}
|
|
@@ -4591,7 +4604,7 @@ async function computeStackDiff(currentState, template, region, stackName, state
|
|
|
4591
4604
|
}
|
|
4592
4605
|
} };
|
|
4593
4606
|
}
|
|
4594
|
-
const changes = await diffCalculator.calculateDiff(stateForDiff, effectiveTemplate, resolveFn, canonicalizeProperties, void 0, void 0, maskForLog, void 0, maskedInputs);
|
|
4607
|
+
const changes = await diffCalculator.calculateDiff(stateForDiff, effectiveTemplate, resolveFn, canonicalizeProperties, void 0, void 0, maskForLog, void 0, maskedInputs, options.refusalRecovery);
|
|
4595
4608
|
const nestedStackTypeChanges = findNestedStackTypeChanges({
|
|
4596
4609
|
changes,
|
|
4597
4610
|
stateResources: stateForDiff.resources
|
|
@@ -4858,9 +4871,9 @@ function recordedTemplateResources(template, state) {
|
|
|
4858
4871
|
return recorded;
|
|
4859
4872
|
}
|
|
4860
4873
|
async function buildDiffTree(args) {
|
|
4861
|
-
const { stackName, displayName, region, template, nestedTemplates, recursive, stateBackend, diffCalculator, parentHasSecretReference, parameters, parentUnresolvedParameters, canonicalizeProperties, assetRedirect, cfnFallback, previewOrphanAdoption, attributeHealerFor, ancestorTemplatePaths, isNestedChild, inheritedSecrets } = args;
|
|
4874
|
+
const { stackName, displayName, region, template, nestedTemplates, recursive, stateBackend, diffCalculator, parentHasSecretReference, parameters, parentUnresolvedParameters, canonicalizeProperties, assetRedirect, cfnFallback, previewOrphanAdoption, attributeHealerFor, ancestorTemplatePaths, isNestedChild, inheritedSecrets, refusalRecovery } = args;
|
|
4862
4875
|
const attributeHealer = attributeHealerFor?.(stackName, region);
|
|
4863
|
-
const { state, unreadable, unreadableContainers, deployRefusals } = await loadStateOrEmpty(stackName, region, stateBackend);
|
|
4876
|
+
const { state, unreadable, unreadableContainers, deployRefusals } = await loadStateOrEmpty(stackName, region, stateBackend, refusalRecovery);
|
|
4864
4877
|
const createOnlyPrefetch = prefetchCreateOnlyPropertyPaths(templateResourceTypes(recordedTemplateResources(template, state)));
|
|
4865
4878
|
const secretBearingAbove = parentHasSecretReference === true || templateHasSecretDynamicReference(template);
|
|
4866
4879
|
let stackDiff;
|
|
@@ -4873,6 +4886,7 @@ async function buildDiffTree(args) {
|
|
|
4873
4886
|
...previewOrphanAdoption && { previewOrphanAdoption },
|
|
4874
4887
|
...inheritedSecrets && { inheritedSecrets },
|
|
4875
4888
|
...attributeHealer && { attributeHealer },
|
|
4889
|
+
...refusalRecovery && { refusalRecovery },
|
|
4876
4890
|
inheritSecretBearingTemplate: false,
|
|
4877
4891
|
previewMaskedInputs: !isNestedChild,
|
|
4878
4892
|
nestedTemplates
|
|
@@ -4943,7 +4957,8 @@ async function buildDiffTree(args) {
|
|
|
4943
4957
|
ancestorTemplatePaths: childAncestorTemplatePaths,
|
|
4944
4958
|
isNestedChild: true,
|
|
4945
4959
|
parentHasSecretReference: secretBearingAbove,
|
|
4946
|
-
inheritedSecrets: printingSecrets
|
|
4960
|
+
inheritedSecrets: printingSecrets,
|
|
4961
|
+
...refusalRecovery && { refusalRecovery }
|
|
4947
4962
|
}));
|
|
4948
4963
|
}
|
|
4949
4964
|
if (!isNestedChild) {
|
|
@@ -4953,15 +4968,16 @@ async function buildDiffTree(args) {
|
|
|
4953
4968
|
for (const [logicalId, resource] of Object.entries(state.resources ?? {})) {
|
|
4954
4969
|
if (resource.resourceType !== "AWS::CloudFormation::Stack") continue;
|
|
4955
4970
|
if (templateChildIds.has(logicalId)) continue;
|
|
4956
|
-
node.children.push(await buildDeletedSubtree(`${stackName}~${logicalId}`, region, stateBackend, diffCalculator, secretBearingAbove, printingSecrets));
|
|
4971
|
+
node.children.push(await buildDeletedSubtree(`${stackName}~${logicalId}`, region, stateBackend, diffCalculator, secretBearingAbove, printingSecrets, refusalRecovery));
|
|
4957
4972
|
}
|
|
4958
4973
|
return node;
|
|
4959
4974
|
}
|
|
4960
|
-
async function buildDeletedSubtree(stackName, region, stateBackend, diffCalculator, parentHasSecretReference, inheritedSecrets) {
|
|
4961
|
-
const { state, unreadable, unreadableContainers } = await loadStateOrEmpty(stackName, region, stateBackend);
|
|
4975
|
+
async function buildDeletedSubtree(stackName, region, stateBackend, diffCalculator, parentHasSecretReference, inheritedSecrets, refusalRecovery) {
|
|
4976
|
+
const { state, unreadable, unreadableContainers } = await loadStateOrEmpty(stackName, region, stateBackend, refusalRecovery);
|
|
4962
4977
|
const { changes, outputChanges } = await computeStackDiff(state, EMPTY_TEMPLATE, region, stackName, stateBackend, diffCalculator, {
|
|
4963
4978
|
inheritSecretBearingTemplate: parentHasSecretReference,
|
|
4964
|
-
inheritedSecrets
|
|
4979
|
+
inheritedSecrets,
|
|
4980
|
+
...refusalRecovery && { refusalRecovery }
|
|
4965
4981
|
});
|
|
4966
4982
|
const node = {
|
|
4967
4983
|
stackName,
|
|
@@ -4980,7 +4996,7 @@ async function buildDeletedSubtree(stackName, region, stateBackend, diffCalculat
|
|
|
4980
4996
|
};
|
|
4981
4997
|
for (const [logicalId, resource] of Object.entries(state.resources ?? {})) {
|
|
4982
4998
|
if (resource.resourceType !== "AWS::CloudFormation::Stack") continue;
|
|
4983
|
-
node.children.push(await buildDeletedSubtree(`${stackName}~${logicalId}`, region, stateBackend, diffCalculator, parentHasSecretReference, inheritedSecrets));
|
|
4999
|
+
node.children.push(await buildDeletedSubtree(`${stackName}~${logicalId}`, region, stateBackend, diffCalculator, parentHasSecretReference, inheritedSecrets, refusalRecovery));
|
|
4984
5000
|
}
|
|
4985
5001
|
return node;
|
|
4986
5002
|
}
|
|
@@ -5355,6 +5371,11 @@ async function diffCommand(stacks, options) {
|
|
|
5355
5371
|
...options.profile && { profile: options.profile }
|
|
5356
5372
|
});
|
|
5357
5373
|
const diffCalculator = new DiffCalculator();
|
|
5374
|
+
const refusalRecovery = {
|
|
5375
|
+
profile: options.profile,
|
|
5376
|
+
stateBucket,
|
|
5377
|
+
statePrefix: options.statePrefix
|
|
5378
|
+
};
|
|
5358
5379
|
const diffProviderRegistry = new ProviderRegistry();
|
|
5359
5380
|
registerAllProviders(diffProviderRegistry, providerClasses);
|
|
5360
5381
|
const canonicalizeProperties = makeCanonicalizePropertiesFn(diffProviderRegistry);
|
|
@@ -5446,7 +5467,8 @@ async function diffCommand(stacks, options) {
|
|
|
5446
5467
|
...options.cfnFallback === false && { cfnFallback: false },
|
|
5447
5468
|
previewOrphanAdoption,
|
|
5448
5469
|
attributeHealerFor,
|
|
5449
|
-
isNestedChild: false
|
|
5470
|
+
isNestedChild: false,
|
|
5471
|
+
refusalRecovery
|
|
5450
5472
|
}));
|
|
5451
5473
|
}
|
|
5452
5474
|
if (options.json) process.stdout.write(`${stringifyJsonPayload(trees.map(diffTreeToJson))}\n`);
|
|
@@ -5879,6 +5901,11 @@ async function scrubCommand(stacks, options) {
|
|
|
5879
5901
|
bucket: stateBucket,
|
|
5880
5902
|
prefix: options.statePrefix
|
|
5881
5903
|
};
|
|
5904
|
+
const refusalRecovery = {
|
|
5905
|
+
profile: options.profile,
|
|
5906
|
+
stateBucket,
|
|
5907
|
+
statePrefix: options.statePrefix
|
|
5908
|
+
};
|
|
5882
5909
|
const stateS3 = new AwsClients({
|
|
5883
5910
|
region,
|
|
5884
5911
|
...options.profile && { profile: options.profile }
|
|
@@ -5921,7 +5948,7 @@ async function scrubCommand(stacks, options) {
|
|
|
5921
5948
|
const exportIndexFor = (indexRegion) => {
|
|
5922
5949
|
const existing = exportIndexStores.get(indexRegion);
|
|
5923
5950
|
if (existing) return existing;
|
|
5924
|
-
const store = new ExportIndexStore(stateS3.s3, stateBucket, options.statePrefix, indexRegion, stateBackend);
|
|
5951
|
+
const store = new ExportIndexStore(stateS3.s3, stateBucket, options.statePrefix, indexRegion, stateBackend, { profile: options.profile });
|
|
5925
5952
|
exportIndexStores.set(indexRegion, store);
|
|
5926
5953
|
return store;
|
|
5927
5954
|
};
|
|
@@ -5960,7 +5987,8 @@ async function scrubCommand(stacks, options) {
|
|
|
5960
5987
|
logger,
|
|
5961
5988
|
appStacks: allStacks,
|
|
5962
5989
|
...nestedChild && { nestedChild },
|
|
5963
|
-
readConsumerRecords: loadConsumerRecords
|
|
5990
|
+
readConsumerRecords: loadConsumerRecords,
|
|
5991
|
+
refusalRecovery
|
|
5964
5992
|
});
|
|
5965
5993
|
} catch (err) {
|
|
5966
5994
|
failures.push({ stackName });
|
|
@@ -7145,43 +7173,43 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
7145
7173
|
if (opts.dryRun) {
|
|
7146
7174
|
if (repairMalformedResourcesForReadOnly(state)) {
|
|
7147
7175
|
malformedResources = true;
|
|
7148
|
-
logger.warn(malformedResourcesWarning(stack.stackName, region));
|
|
7176
|
+
logger.warn(malformedResourcesWarning(stack.stackName, region, opts.refusalRecovery));
|
|
7149
7177
|
}
|
|
7150
|
-
} else if (!hasReadableResources(state)) throw new ScrubRefusalError(malformedStateRefusalMessage(stack.stackName, region), STATE_RESOURCES_MALFORMED);
|
|
7178
|
+
} else if (!hasReadableResources(state)) throw new ScrubRefusalError(malformedStateRefusalMessage(stack.stackName, region, opts.refusalRecovery), STATE_RESOURCES_MALFORMED);
|
|
7151
7179
|
let malformedResourceRows;
|
|
7152
7180
|
if (opts.dryRun) {
|
|
7153
7181
|
const droppedRows = repairMalformedResourceEntriesForReadOnly(state);
|
|
7154
7182
|
if (droppedRows.length > 0) {
|
|
7155
7183
|
malformedResourceRows = true;
|
|
7156
|
-
logger.warn(malformedResourceEntriesWarning(stack.stackName, region, droppedRows));
|
|
7184
|
+
logger.warn(malformedResourceEntriesWarning(stack.stackName, region, droppedRows, opts.refusalRecovery));
|
|
7157
7185
|
}
|
|
7158
7186
|
} else {
|
|
7159
7187
|
const unreadableRows = unreadableResourceEntries(state);
|
|
7160
|
-
if (unreadableRows.length > 0) throw new ScrubRefusalError(malformedScrubResourceEntriesRefusalMessage(stack.stackName, region, unreadableRows), STATE_RESOURCES_MALFORMED);
|
|
7188
|
+
if (unreadableRows.length > 0) throw new ScrubRefusalError(malformedScrubResourceEntriesRefusalMessage(stack.stackName, region, unreadableRows, opts.refusalRecovery), STATE_RESOURCES_MALFORMED);
|
|
7161
7189
|
}
|
|
7162
7190
|
let malformedOutputs;
|
|
7163
7191
|
if (opts.dryRun) {
|
|
7164
7192
|
if (repairMalformedOutputsForReadOnly(state)) {
|
|
7165
7193
|
malformedOutputs = true;
|
|
7166
|
-
logger.warn(malformedOutputsWarning(stack.stackName, region));
|
|
7194
|
+
logger.warn(malformedOutputsWarning(stack.stackName, region, opts.refusalRecovery));
|
|
7167
7195
|
}
|
|
7168
|
-
} else if (!hasReadableOutputs(state)) throw new ScrubRefusalError(malformedOutputsRefusalMessage(stack.stackName, region), STATE_RESOURCES_MALFORMED);
|
|
7196
|
+
} else if (!hasReadableOutputs(state)) throw new ScrubRefusalError(malformedOutputsRefusalMessage(stack.stackName, region, opts.refusalRecovery), STATE_RESOURCES_MALFORMED);
|
|
7169
7197
|
let malformedOrphans;
|
|
7170
7198
|
let malformedOrphanRows;
|
|
7171
7199
|
if (opts.dryRun) {
|
|
7172
7200
|
if (repairMalformedOrphansForReadOnly(state)) {
|
|
7173
7201
|
malformedOrphans = true;
|
|
7174
|
-
logger.warn(malformedOrphansWarning(stack.stackName, region));
|
|
7202
|
+
logger.warn(malformedOrphansWarning(stack.stackName, region, opts.refusalRecovery));
|
|
7175
7203
|
}
|
|
7176
7204
|
const droppedRows = repairMalformedOrphanRecordsForReadOnly(state);
|
|
7177
7205
|
if (droppedRows.length > 0) {
|
|
7178
7206
|
malformedOrphanRows = true;
|
|
7179
|
-
logger.warn(malformedOrphanRecordsWarning(stack.stackName, region, droppedRows, true));
|
|
7207
|
+
logger.warn(malformedOrphanRecordsWarning(stack.stackName, region, droppedRows, true, opts.refusalRecovery));
|
|
7180
7208
|
}
|
|
7181
|
-
} else if (!hasReadableOrphans(state)) throw new ScrubRefusalError(malformedOrphansRefusalMessage(stack.stackName, region), STATE_RESOURCES_MALFORMED);
|
|
7209
|
+
} else if (!hasReadableOrphans(state)) throw new ScrubRefusalError(malformedOrphansRefusalMessage(stack.stackName, region, opts.refusalRecovery), STATE_RESOURCES_MALFORMED);
|
|
7182
7210
|
else {
|
|
7183
7211
|
const unreadableRows = unreadableOrphanRecords(state);
|
|
7184
|
-
if (unreadableRows.length > 0) throw new ScrubRefusalError(malformedOrphanRecordsRefusalMessage(stack.stackName, region, unreadableRows), STATE_RESOURCES_MALFORMED);
|
|
7212
|
+
if (unreadableRows.length > 0) throw new ScrubRefusalError(malformedOrphanRecordsRefusalMessage(stack.stackName, region, unreadableRows, opts.refusalRecovery), STATE_RESOURCES_MALFORMED);
|
|
7185
7213
|
}
|
|
7186
7214
|
const perResourceTemplateProps = /* @__PURE__ */ new Map();
|
|
7187
7215
|
const outputsTemplateSource = {};
|
|
@@ -8303,9 +8331,15 @@ async function driftCommand(stacks, options) {
|
|
|
8303
8331
|
try {
|
|
8304
8332
|
const region = namedCliRegion(options.region) ?? "us-east-1";
|
|
8305
8333
|
const bucket = await resolveStateBucketWithDefault(options.stateBucket, region);
|
|
8334
|
+
const prefix = options.statePrefix;
|
|
8306
8335
|
const stateConfig = {
|
|
8307
8336
|
bucket,
|
|
8308
|
-
prefix
|
|
8337
|
+
prefix
|
|
8338
|
+
};
|
|
8339
|
+
const refusalRecovery = {
|
|
8340
|
+
profile: options.profile,
|
|
8341
|
+
stateBucket: bucket,
|
|
8342
|
+
statePrefix: prefix
|
|
8309
8343
|
};
|
|
8310
8344
|
const stateBackend = new S3StateBackend(awsClients.s3, stateConfig, {
|
|
8311
8345
|
region,
|
|
@@ -8363,7 +8397,7 @@ async function driftCommand(stacks, options) {
|
|
|
8363
8397
|
}
|
|
8364
8398
|
const stackRegion = ref.region;
|
|
8365
8399
|
const scope = stackRegionScope(stackRegion);
|
|
8366
|
-
const report = await runWithStackAwsClients(scope.clients, () => runDriftForStack(ref.stackName, stackRegion, stateBackend, scope.registry, scope.ccApiFallback, resolvePrincipalUniqueId, options.accept || options.revert ? "refuse" : "repair", nestedChildRecord));
|
|
8400
|
+
const report = await runWithStackAwsClients(scope.clients, () => runDriftForStack(ref.stackName, stackRegion, stateBackend, scope.registry, scope.ccApiFallback, resolvePrincipalUniqueId, options.accept || options.revert ? "refuse" : "repair", nestedChildRecord, refusalRecovery));
|
|
8367
8401
|
reports.push(report);
|
|
8368
8402
|
}
|
|
8369
8403
|
if (options.json) writeJsonReport(reports);
|
|
@@ -8817,7 +8851,7 @@ function redactDriftChanges(changes, secrets, secretPaths, maskPaths) {
|
|
|
8817
8851
|
maskedPaths
|
|
8818
8852
|
};
|
|
8819
8853
|
}
|
|
8820
|
-
async function runDriftForStack(stackName, region, stateBackend, providerRegistry, ccApiFallback, resolvePrincipalUniqueId, malformedRecordMode, nestedChildRecord) {
|
|
8854
|
+
async function runDriftForStack(stackName, region, stateBackend, providerRegistry, ccApiFallback, resolvePrincipalUniqueId, malformedRecordMode, nestedChildRecord, refusalRecovery) {
|
|
8821
8855
|
const result = await stateBackend.getState(stackName, region);
|
|
8822
8856
|
if (!result) throw new Error(`No state found for stack '${stackName}' (${region}). Run 'cdkd state list' to see available stacks.`);
|
|
8823
8857
|
return await withStackName(stackName, async () => {
|
|
@@ -8826,12 +8860,12 @@ async function runDriftForStack(stackName, region, stateBackend, providerRegistr
|
|
|
8826
8860
|
const logger = getLogger();
|
|
8827
8861
|
let unreadablePropertyBags = /* @__PURE__ */ new Set();
|
|
8828
8862
|
if (malformedRecordMode === "refuse") {
|
|
8829
|
-
refuseMalformedState(state, stackName, region);
|
|
8830
|
-
refuseMalformedResourceEntries(state, stackName, region);
|
|
8831
|
-
refuseMalformedResourcePropertiesForDrift(state, stackName, region);
|
|
8863
|
+
refuseMalformedState(state, stackName, region, refusalRecovery);
|
|
8864
|
+
refuseMalformedResourceEntries(state, stackName, region, refusalRecovery);
|
|
8865
|
+
refuseMalformedResourcePropertiesForDrift(state, stackName, region, refusalRecovery);
|
|
8832
8866
|
} else {
|
|
8833
8867
|
if (repairMalformedResourcesForReadOnly(state)) {
|
|
8834
|
-
logger.warn(malformedResourcesWarning(stackName, region));
|
|
8868
|
+
logger.warn(malformedResourcesWarning(stackName, region, refusalRecovery));
|
|
8835
8869
|
outcomes.push({
|
|
8836
8870
|
kind: "notCompared",
|
|
8837
8871
|
logicalId: UNREADABLE_RESOURCES_MAP_ROW,
|
|
@@ -8841,7 +8875,7 @@ async function runDriftForStack(stackName, region, stateBackend, providerRegistr
|
|
|
8841
8875
|
}
|
|
8842
8876
|
const dropped = repairMalformedResourceEntriesForReadOnly(state);
|
|
8843
8877
|
if (dropped.length > 0) {
|
|
8844
|
-
logger.warn(malformedResourceEntriesWarning(stackName, region, dropped));
|
|
8878
|
+
logger.warn(malformedResourceEntriesWarning(stackName, region, dropped, refusalRecovery));
|
|
8845
8879
|
for (const logicalId of dropped) outcomes.push({
|
|
8846
8880
|
kind: "notCompared",
|
|
8847
8881
|
logicalId,
|
|
@@ -8851,7 +8885,7 @@ async function runDriftForStack(stackName, region, stateBackend, providerRegistr
|
|
|
8851
8885
|
}
|
|
8852
8886
|
const repaired = repairMalformedResourcePropertiesForReadOnly(state);
|
|
8853
8887
|
if (repaired.length > 0) {
|
|
8854
|
-
logger.warn(malformedDriftResourcePropertiesWarning(stackName, region, repaired));
|
|
8888
|
+
logger.warn(malformedDriftResourcePropertiesWarning(stackName, region, repaired, refusalRecovery));
|
|
8855
8889
|
unreadablePropertyBags = new Set(repaired);
|
|
8856
8890
|
}
|
|
8857
8891
|
}
|
|
@@ -11078,7 +11112,7 @@ async function destroyCommand(stackArgs, options) {
|
|
|
11078
11112
|
});
|
|
11079
11113
|
await stateBackend.verifyBucketExists();
|
|
11080
11114
|
const lockManager = new LockManager(awsClients.s3, stateConfig);
|
|
11081
|
-
const exportIndexStore = new ExportIndexStore(awsClients.s3, stateBucket, options.statePrefix, region, stateBackend);
|
|
11115
|
+
const exportIndexStore = new ExportIndexStore(awsClients.s3, stateBucket, options.statePrefix, region, stateBackend, { profile: options.profile });
|
|
11082
11116
|
const providerRegistry = new ProviderRegistry();
|
|
11083
11117
|
registerAllProviders(providerRegistry, providerClasses);
|
|
11084
11118
|
providerRegistry.setCustomResourceResponseBucket(stateBucket);
|
|
@@ -13226,7 +13260,7 @@ async function exportCommand(stackArg, options) {
|
|
|
13226
13260
|
reportDriftBaselineGaps(state, logger, {
|
|
13227
13261
|
stackName: resolvedStackName,
|
|
13228
13262
|
region: migrationPending ? void 0 : targetRegion
|
|
13229
|
-
}, options.template ? void 0 : template);
|
|
13263
|
+
}, options.template ? void 0 : template, lockRecovery);
|
|
13230
13264
|
if (allSynthStacks.length > 0) {
|
|
13231
13265
|
const crossRefs = scanCrossStackReferences(allSynthStacks, resolvedStackName);
|
|
13232
13266
|
if (crossRefs.length > 0) {
|
|
@@ -13318,7 +13352,7 @@ async function exportCommand(stackArg, options) {
|
|
|
13318
13352
|
reportDriftBaselineGaps(state, logger, {
|
|
13319
13353
|
stackName: resolvedStackName,
|
|
13320
13354
|
region: migrationPending ? void 0 : targetRegion
|
|
13321
|
-
}, options.template ? void 0 : template);
|
|
13355
|
+
}, options.template ? void 0 : template, lockRecovery);
|
|
13322
13356
|
if (allSynthStacks.length > 0) {
|
|
13323
13357
|
const crossRefs = scanCrossStackReferences(allSynthStacks, resolvedStackName);
|
|
13324
13358
|
if (crossRefs.length > 0) {
|
|
@@ -14398,12 +14432,12 @@ function refreshWithheldReason(built) {
|
|
|
14398
14432
|
default: throw new Error(`refreshWithheldReason: unhandled WithholdReason ${String(reason)}`);
|
|
14399
14433
|
}
|
|
14400
14434
|
}
|
|
14401
|
-
function reportDriftBaselineGaps(state, logger, loaded, template) {
|
|
14435
|
+
function reportDriftBaselineGaps(state, logger, loaded, template, recovery) {
|
|
14402
14436
|
const stackName = loaded?.stackName ?? state.stackName;
|
|
14403
14437
|
const rawRegion = loaded ? loaded.region : state.region;
|
|
14404
14438
|
const region = typeof rawRegion === "string" && rawRegion !== "" ? rawRegion : void 0;
|
|
14405
14439
|
if (!hasReadableResources(state)) {
|
|
14406
|
-
logger.warn(malformedResourcesWarning(stackName, region));
|
|
14440
|
+
logger.warn(malformedResourcesWarning(stackName, region, recovery));
|
|
14407
14441
|
return;
|
|
14408
14442
|
}
|
|
14409
14443
|
const entries = Object.entries(state.resources);
|
|
@@ -15507,10 +15541,17 @@ async function setupStateBackend(options) {
|
|
|
15507
15541
|
region,
|
|
15508
15542
|
bucket,
|
|
15509
15543
|
prefix,
|
|
15510
|
-
exportIndexStore: new ExportIndexStore(awsClients.s3, bucket, prefix, region, stateBackend),
|
|
15544
|
+
exportIndexStore: new ExportIndexStore(awsClients.s3, bucket, prefix, region, stateBackend, { profile: options.profile }),
|
|
15511
15545
|
dispose: () => awsClients.destroy()
|
|
15512
15546
|
};
|
|
15513
15547
|
}
|
|
15548
|
+
function renderRecovery(options, setup) {
|
|
15549
|
+
return {
|
|
15550
|
+
profile: options.profile,
|
|
15551
|
+
stateBucket: setup.bucket,
|
|
15552
|
+
statePrefix: setup.prefix
|
|
15553
|
+
};
|
|
15554
|
+
}
|
|
15514
15555
|
function sortRefs(refs) {
|
|
15515
15556
|
return refs.slice().sort((a, b) => {
|
|
15516
15557
|
if (a.stackName < b.stackName) return -1;
|
|
@@ -15638,8 +15679,8 @@ async function stateResourcesCommand(stackName, options) {
|
|
|
15638
15679
|
if (!ref.region) throw legacyRecordRefusal(stackName);
|
|
15639
15680
|
const stateResult = await setup.stateBackend.getState(stackName, ref.region);
|
|
15640
15681
|
if (!stateResult) throw new Error(`No state found for stack ${formatStackRefSafe(ref)} in s3://${setup.bucket}/${setup.prefix}/. Run 'cdkd state list' to see available stacks.`);
|
|
15641
|
-
if (repairMalformedResourcesForReadOnly(stateResult.state)) logger.warn(malformedResourcesWarning(stackName, ref.region));
|
|
15642
|
-
if (options.long || options.json) repairRenderedContainers(stateResult.state, RESOURCES_RENDERED_CONTAINERS, stackName, ref.region, logger);
|
|
15682
|
+
if (repairMalformedResourcesForReadOnly(stateResult.state)) logger.warn(malformedResourcesWarning(stackName, ref.region, renderRecovery(options, setup)));
|
|
15683
|
+
if (options.long || options.json) repairRenderedContainers(stateResult.state, RESOURCES_RENDERED_CONTAINERS, stackName, ref.region, logger, renderRecovery(options, setup));
|
|
15643
15684
|
const resources = stateResult.state.resources;
|
|
15644
15685
|
const details = Object.entries(resources).map(([logicalId, entry]) => {
|
|
15645
15686
|
const resource = entry ?? {};
|
|
@@ -15738,11 +15779,11 @@ async function stateShowCommand(stackName, options) {
|
|
|
15738
15779
|
if (options.showNested) {
|
|
15739
15780
|
const treeWithLocks = await loadLocksForTree(await buildCdkdStateStackTree(stackName, ref.region, setup.stateBackend, stateResult.state), setup.lockManager, lockInfo);
|
|
15740
15781
|
if (options.json) {
|
|
15741
|
-
warnUnreadableTreeNodes(treeWithLocks, logger);
|
|
15782
|
+
warnUnreadableTreeNodes(treeWithLocks, logger, renderRecovery(options, setup));
|
|
15742
15783
|
process.stdout.write(`${stringifyJsonPayload(treeToShowJson(treeWithLocks))}\n`);
|
|
15743
15784
|
return;
|
|
15744
15785
|
}
|
|
15745
|
-
repairTreeForTextRender(treeWithLocks, logger);
|
|
15786
|
+
repairTreeForTextRender(treeWithLocks, logger, renderRecovery(options, setup));
|
|
15746
15787
|
const lines = renderTreeWithChildren(treeWithLocks);
|
|
15747
15788
|
process.stdout.write(`${lines.join("\n")}\n`);
|
|
15748
15789
|
return;
|
|
@@ -15754,7 +15795,7 @@ async function stateShowCommand(stackName, options) {
|
|
|
15754
15795
|
})}\n`);
|
|
15755
15796
|
return;
|
|
15756
15797
|
}
|
|
15757
|
-
repairRecordForTextRender(stateResult.state, stackName, ref.region, logger);
|
|
15798
|
+
repairRecordForTextRender(stateResult.state, stackName, ref.region, logger, renderRecovery(options, setup));
|
|
15758
15799
|
process.stdout.write(`${renderStateBlock(stateResult.state, lockInfo, true).join("\n")}\n`);
|
|
15759
15800
|
} finally {
|
|
15760
15801
|
setup.dispose();
|
|
@@ -15789,7 +15830,7 @@ const RENDERED_CONTAINER_ORDER = [
|
|
|
15789
15830
|
];
|
|
15790
15831
|
const SHOW_RENDERED_CONTAINERS = new Set(RENDERED_CONTAINER_ORDER);
|
|
15791
15832
|
const RESOURCES_RENDERED_CONTAINERS = /* @__PURE__ */ new Set(["attributes"]);
|
|
15792
|
-
function repairRenderedContainers(state, walked, stackName, region, logger) {
|
|
15833
|
+
function repairRenderedContainers(state, walked, stackName, region, logger, recovery) {
|
|
15793
15834
|
const repaired = /* @__PURE__ */ new Set();
|
|
15794
15835
|
const emptyIfUnwalkable = (owner, name) => {
|
|
15795
15836
|
if (!walked.has(name)) return;
|
|
@@ -15809,19 +15850,19 @@ function repairRenderedContainers(state, walked, stackName, region, logger) {
|
|
|
15809
15850
|
emptyIfUnwalkable(fields, "properties");
|
|
15810
15851
|
}
|
|
15811
15852
|
if (repaired.size === 0) return;
|
|
15812
|
-
logger.warn(malformedRenderedContainersWarning(stackName, region, RENDERED_CONTAINER_ORDER.filter((name) => repaired.has(name))));
|
|
15853
|
+
logger.warn(malformedRenderedContainersWarning(stackName, region, RENDERED_CONTAINER_ORDER.filter((name) => repaired.has(name)), recovery));
|
|
15813
15854
|
}
|
|
15814
|
-
function repairRecordForTextRender(state, stackName, region, logger) {
|
|
15815
|
-
if (repairMalformedResourcesForReadOnly(state)) logger.warn(malformedResourcesWarning(stackName, region));
|
|
15816
|
-
repairRenderedContainers(state, SHOW_RENDERED_CONTAINERS, stackName, region, logger);
|
|
15855
|
+
function repairRecordForTextRender(state, stackName, region, logger, recovery) {
|
|
15856
|
+
if (repairMalformedResourcesForReadOnly(state)) logger.warn(malformedResourcesWarning(stackName, region, recovery));
|
|
15857
|
+
repairRenderedContainers(state, SHOW_RENDERED_CONTAINERS, stackName, region, logger, recovery);
|
|
15817
15858
|
}
|
|
15818
|
-
function repairTreeForTextRender(node, logger) {
|
|
15819
|
-
repairRecordForTextRender(node.state, node.stackName, node.region, logger);
|
|
15820
|
-
for (const child of node.children) repairTreeForTextRender(child, logger);
|
|
15859
|
+
function repairTreeForTextRender(node, logger, recovery) {
|
|
15860
|
+
repairRecordForTextRender(node.state, node.stackName, node.region, logger, recovery);
|
|
15861
|
+
for (const child of node.children) repairTreeForTextRender(child, logger, recovery);
|
|
15821
15862
|
}
|
|
15822
|
-
function warnUnreadableTreeNodes(node, logger) {
|
|
15823
|
-
if (!hasReadableResources(node.state)) logger.warn(malformedResourcesWarning(node.stackName, node.region));
|
|
15824
|
-
for (const child of node.children) warnUnreadableTreeNodes(child, logger);
|
|
15863
|
+
function warnUnreadableTreeNodes(node, logger, recovery) {
|
|
15864
|
+
if (!hasReadableResources(node.state)) logger.warn(malformedResourcesWarning(node.stackName, node.region, recovery));
|
|
15865
|
+
for (const child of node.children) warnUnreadableTreeNodes(child, logger, recovery);
|
|
15825
15866
|
}
|
|
15826
15867
|
function renderStateBlock(state, lockInfo, withLegend) {
|
|
15827
15868
|
const lines = [];
|
|
@@ -19500,7 +19541,8 @@ async function loadStateForStack(stackName, synthRegion, opts) {
|
|
|
19500
19541
|
logger.debug(`${prefix}: loaded state for ${stackName} (${targetRegion})`);
|
|
19501
19542
|
return {
|
|
19502
19543
|
state: stateData.state,
|
|
19503
|
-
region: targetRegion
|
|
19544
|
+
region: targetRegion,
|
|
19545
|
+
stateBucket
|
|
19504
19546
|
};
|
|
19505
19547
|
} finally {
|
|
19506
19548
|
resetAwsClients();
|
|
@@ -19582,7 +19624,12 @@ async function buildCrossStackResolver(consumerRegion, opts) {
|
|
|
19582
19624
|
logger.warn(`${prefix}: cross-stack resolver could not access state bucket '${stateBucket}': ${err instanceof Error ? err.message : String(err)}. Fn::ImportValue / Fn::GetStackOutput env entries will warn-and-drop.`);
|
|
19583
19625
|
return;
|
|
19584
19626
|
}
|
|
19585
|
-
const exportIndex = new ExportIndexStore(awsClients.s3, stateBucket, opts.statePrefix, consumerRegion, stateBackend);
|
|
19627
|
+
const exportIndex = new ExportIndexStore(awsClients.s3, stateBucket, opts.statePrefix, consumerRegion, stateBackend, { profile: opts.profile });
|
|
19628
|
+
const refusalRecovery = {
|
|
19629
|
+
profile: opts.profile,
|
|
19630
|
+
stateBucket,
|
|
19631
|
+
statePrefix: opts.statePrefix
|
|
19632
|
+
};
|
|
19586
19633
|
return {
|
|
19587
19634
|
resolver: {
|
|
19588
19635
|
async resolveImport(exportName) {
|
|
@@ -19630,7 +19677,7 @@ async function buildCrossStackResolver(consumerRegion, opts) {
|
|
|
19630
19677
|
const recordKey = producerRecordKey(producerStack, recordRegion);
|
|
19631
19678
|
if (!warnedMalformedProducers.has(recordKey)) {
|
|
19632
19679
|
warnedMalformedProducers.add(recordKey);
|
|
19633
|
-
logger.warn(`${prefix}: ${malformedLocalOutputsWarning(producerStack, recordRegion)}`);
|
|
19680
|
+
logger.warn(`${prefix}: ${malformedLocalOutputsWarning(producerStack, recordRegion, refusalRecovery)}`);
|
|
19634
19681
|
}
|
|
19635
19682
|
return;
|
|
19636
19683
|
}
|
|
@@ -19692,10 +19739,15 @@ var S3LocalStateProvider = class {
|
|
|
19692
19739
|
};
|
|
19693
19740
|
const loaded = await loadStateForStack(stackName, synthRegion, loadOpts);
|
|
19694
19741
|
if (!loaded) return void 0;
|
|
19695
|
-
|
|
19696
|
-
|
|
19742
|
+
const refusalRecovery = {
|
|
19743
|
+
profile: this.opts.profile,
|
|
19744
|
+
stateBucket: loaded.stateBucket,
|
|
19745
|
+
statePrefix: this.opts.statePrefix
|
|
19746
|
+
};
|
|
19747
|
+
if (repairMalformedOutputsForReadOnly(loaded.state)) getLogger().warn(malformedLocalOutputsWarning(stackName, loaded.region, refusalRecovery));
|
|
19748
|
+
if (repairMalformedResourcesForReadOnly(loaded.state)) getLogger().warn(malformedLocalResourcesWarning(stackName, loaded.region, refusalRecovery));
|
|
19697
19749
|
const droppedRows = repairMalformedResourceEntriesForReadOnly(loaded.state);
|
|
19698
|
-
if (droppedRows.length > 0) getLogger().warn(malformedLocalResourceEntriesWarning(stackName, loaded.region, droppedRows));
|
|
19750
|
+
if (droppedRows.length > 0) getLogger().warn(malformedLocalResourceEntriesWarning(stackName, loaded.region, droppedRows, refusalRecovery));
|
|
19699
19751
|
const outputs = {};
|
|
19700
19752
|
for (const [k, v] of Object.entries(loaded.state.outputs ?? {})) if (typeof v === "string") outputs[k] = v;
|
|
19701
19753
|
else if (typeof v === "number" || typeof v === "boolean") outputs[k] = String(v);
|
|
@@ -26832,4 +26884,4 @@ function collectVerbFlags(program) {
|
|
|
26832
26884
|
|
|
26833
26885
|
//#endregion
|
|
26834
26886
|
export { canonicalizeIpProtocolValue as a, buildProgram, resolveSecretDerivedPrincipals as i, runDestroyForStack as n, resolvedResourceTimeoutMs as o, isResolvableSecretPrincipalList as r, canonicalizeIpv4Cidr as t };
|
|
26835
|
-
//# sourceMappingURL=program-
|
|
26887
|
+
//# sourceMappingURL=program-CPziYRDp.js.map
|