@go-to-k/cdkd 0.301.3 → 0.301.5
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-Di3xOH3L.js → asg-provider-DHB498Xq.js} +2 -2
- package/dist/{asg-provider-Di3xOH3L.js.map → asg-provider-DHB498Xq.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-CZaafy9R.js → deploy-engine-HAvm8vSI.js} +24343 -24262
- package/dist/deploy-engine-HAvm8vSI.js.map +1 -0
- package/dist/iam-policy-targets-BkeM7IXi.js.map +1 -1
- package/dist/{iam-role-provider-De0ZPOAF.js → iam-role-provider-CTpDWSUG.js} +5 -4
- package/dist/iam-role-provider-CTpDWSUG.js.map +1 -0
- package/dist/index.d.ts +3 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{neptune-provider-DTUriVz3.js → neptune-provider-CXhoiT-P.js} +5 -7
- package/dist/neptune-provider-CXhoiT-P.js.map +1 -0
- package/dist/{program-CYtSW-WU.js → program-DmPDfDhE.js} +152 -102
- package/dist/program-DmPDfDhE.js.map +1 -0
- package/dist/{provider-classes-59TTNMFB.js → provider-classes-DPwEHVDJ.js} +213 -230
- package/dist/provider-classes-DPwEHVDJ.js.map +1 -0
- package/dist/{rds-provider-Dadp11aB.js → rds-provider-CxB94DZy.js} +4 -4
- package/dist/rds-provider-CxB94DZy.js.map +1 -0
- package/dist/{version-Cx2pAgJv.js → version-2jeKJQlt.js} +2 -2
- package/dist/{version-Cx2pAgJv.js.map → version-2jeKJQlt.js.map} +1 -1
- package/package.json +2 -2
- package/dist/deploy-engine-CZaafy9R.js.map +0 -1
- package/dist/iam-role-provider-De0ZPOAF.js.map +0 -1
- package/dist/neptune-provider-DTUriVz3.js.map +0 -1
- package/dist/program-CYtSW-WU.js.map +0 -1
- package/dist/provider-classes-59TTNMFB.js.map +0 -1
- package/dist/rds-provider-Dadp11aB.js.map +0 -1
|
@@ -2,8 +2,8 @@ import { a as runWithStackAwsClients, i as resetAwsClients, o as setAwsClients,
|
|
|
2
2
|
import { A as UNRENDERABLE, B as safeMsg, D as SAFE_MSG_ALTERED_CHAR, F as displaySafe, H as terminalSafe, I as displayStackName, L as isPasteableIdent, M as cutMarker, N as displayAwsMessage, O as SECRET_REF_MAX_CODE_POINTS, P as displayIdent, T as withStackName, U as truncateCodePoints, V as stringifyJsonPayload, _ as derivesPatternBName, a as getLogger, f as getLiveRenderer, h as PATTERN_B_RESOURCE_TYPES, k as STACK_REF_MAX_CODE_POINTS, l as runStackBuffered, m as PATTERN_B_NAME_PROPERTIES, o as isStdoutReservedForPayload, p as PATTERN_B_NAME_OPTIONS, r as safeStringify, s as reserveStdoutForPayload, t as describeAwsFailure, v as explicitNamePropertyFor, w as withSkipPrefix, y as generateResourceName, z as plainIdentOr } from "./aws-failure-text-BEQfs6za.js";
|
|
3
3
|
import { $t as ambientCredentialConfig, Bn as shellBoundedDisplay, Bt as formatLockOperation, Cn as StateError, D as VALUE_NOT_SHOWN, Dn as normalizeAwsError, E as assertRegionMatch, Fn as isInertUnquoted, Ft as UNREPRODUCIBLE_LOCK_CLAUSE, G as runDeleteAttempt, Gt as DEFAULT_STATE_PREFIX, Hn as withheldTargetClause, In as pasteableCommand, It as buildForceUnlockCommand, Jt as producerCoordinateKey, Kt as injectiveKey, Lt as buildLockContentionMessage, Nn as commandHole, On as withErrorHandling, P as remedyLogicalId, Qt as ambientClientDefaults, Rn as plainOrDescribed, Rt as forceQuitRecoveryClause, Sn as StackTerminationProtectionError, T as RESOURCE_NOT_FOUND, Un as setPasteableRunFlags, Vn as shellQuote, Vt as formatLockOwner, Wn as setPasteableVerbFlags, Wt as CUSTOM_RESOURCE_RESPONSE_PREFIX, Xt as setPasteableAwsProfile, Yt as producerRecordKey, Z as isAwsCliLiteral, Zt as withPasteableAwsProfile, _n as PartialFailureError, ar as isRetryableTransientError, bn as ResourceUpdateNotSupportedError, cn as DeployCancelledError, dn as LocalInvokeBuildError$1, dr as markNonRetryable, en as clientDefaultsFor, fn as LocalStartServiceError, ft as logicalIdShown, gn as NestedStackChildDirectDestroyError, hn as MalformedProducerRecordRefusalError, in as CdkdError, it as isInterruptedWaitError, jn as SHELL_ACTIVE_WHY, kn as TIMEOUT_FLAG_RESOURCE_TYPE, ln as DynamicReferenceRegionAmbiguousError, lr as isMarkedNonRetryable, mt as resourceTypeShown, n as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, nn as AccountIdUnavailableError, nr as isAmbiguousOutcomeError, nt as endCommandInterruptScope, on as CrossAccountSecretRefusalError, or as isTransientServerError, rt as interruptWatchListenerCount, s as readRecordedPrincipals, sr as retryClassificationText, t as IAM_PRINCIPAL_NAME, tn as credentialFingerprint, tt as beginCommandInterruptScope, un as IntrinsicResolutionRefusalError, ur as isThrottlingError, vn as ProvisioningError, wn as SynthesisError, xn as StackHasActiveImportsError, yn as ResourceTimeoutError, zn as quotedOrDescribed, zt as formatLockExpiry } from "./iam-policy-targets-BkeM7IXi.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 { $a as repairMalformedResourcesForReadOnly, $c as escapeRegExp, $i as hasReadableOrphans, $n as unsupportedFinalSnapshotError, $o as liveMatchesUnresolvedTokenFrame, $r as IntrinsicFunctionResolver, $s as applyCrossPrefixScan, $t as isJournaledOrphan, A as diffSecurity, Aa as refuseMalformedOrphansForOrphan, Ac as parseBootstrapMarker, Ai as getAccountInfo, Al as AssemblyReader, An as collectPublishedOutputNames, Ar as withPrintingSecrets, At as NESTED_PENDING_PARENT_REASON, B as readProtection, Ba as refuseMalformedResourcePropertiesForDestroy, Bc as dockerSpawnEnvWithSensitive, Bl as displayAssemblyPath, Bn as secretNamePrintingBags, Bo as canonicalCoordinates, Br as deleteLeftInPlace, Bs as wholeStringLeavesOf, Bt as collectNestedChildUnaddressed, Ca as previewableOrphanRecords, Cc as rewriteTemplateAssetReferences, Ci as classifyRecordedSecretRegion, Cl as uploadCfnTemplate, Cn as secretSafeKeyDisplay, Cr as isCustomResource, Cs as isUncertifiedBaselineMaskPosition, Ct as dropFailedCommands, D as findServiceTokenRefusals, Da as refuseMalformedOrphanRecordsForDestroy, Dc as ensureAssetStorage, Di as coerceParameterTypedValue, Dl as PARTITION_TABLE, Dn as isWholeDynamicReferenceValue, Dr as readsNoEchoDeleteValues, Ds as recordNestedStackParameterExpressions, Dt as loadJournaledOrphans, E as deferredServiceTokenWarning, Ea as refuseMalformedOrphanRecords, Ec as assertAssetBucketRegion, Ei as regionLessSecretName, El as expectedOwnerParam, En as exportNameSecretExposure, Er as TemplateNoEchoReresolver, Es as inheritNestedStackParameterAssociations, Et as journaledOrphanLines, F as recordedProtectionEvidence, Fa as refuseMalformedResourceEntriesForDeploy, Fc as buildDockerImage, Fi as keepsSecretReferenceToken, Fl as hasPlainPrototype, Fn as completedReplayEntries, Fr as slowCcOperationTimeoutMs, Fs as recordMaskOnlyValue, Ft as nestedChildStackName$1, Ga as refuseMalformedResourcesForDestroy, Gc as isMalformedEnvKey, Gi as JSON_LISTING_HOLE_VALUE, Gn as ATOMIC_FINAL_SNAPSHOT_TYPES, Go as maskedLeafCoordinatesOf, Gs as WHOLE_DYNAMIC_REFERENCE_PATTERN, Ha as refuseMalformedResourcePropertiesForExport, Hc as formatDockerLoginError, Hi as parameterInputsFor, Hl as resolveAssemblyPath, Hn as stateSecretNameNeedles, Ho as maskAtCoordinates, Hs as STATE_SOURCED_CROSS_GENERATION_RULES, Ht as withNestedStackContext, I as recordedProtectionNote, Ia as refuseMalformedResourceEntriesForDestroy, Ic as resolveDockerContextDirectory, Ii as AWS_NO_VALUE, Il as nullPrototypeRecord, In as journaledOrphanPrintingBag, Is as recordMaskOnlyValuesIn, It as recordDisplacedSkips, Ja as repairMalformedOrphanRecordsForReadOnly, Jc as redactedCause, Ji as UNREADABLE_ORPHANS_CONTAINER_ROW, Jn as ccRoutedFinalSnapshotError, Jo as noEchoOutputsComparison, Js as isLockInfoExpired, Jt as withStackRecords, Ka as refuseMalformedResourcesForExport, Kc as partitionSensitiveEnv, Ki as STATE_REGION_DIVERGED, Kl as resolveBucketRegion, Kn as PRE_DELETE_SNAPSHOT_TYPES, Ko as noEchoCoordinatesOf, Ks as isSingleDynamicReferenceToken, Kt as destroyStackRecordsView, L as PROTECTION_PROPERTY_BY_TYPE, La as refuseMalformedResourceEntriesForImport, Lc as describeDockerCapturedOutput, Li as cfnRefValueFromPhysicalId, Ll as ownValue, Ln as maskEventTextWithBoundBags, Lr as RollbackInlinePolicyWriters, Ls as recordNoEchoAttributeValues, M as noEchoComparisonForTemplate, Ma as refuseMalformedOutputsForDestroy, Mc as validateAssetBucketName, Mi as carriesDynamicReference, Ml as processStackMessages, Mn as bindingSkippedOutputs, Mo as templateResourceTypes, Mr as applyCustomResourceResponseExpiration, Ms as splitGetAttStringForm, Mt as displacedPhysicalIdShown, N as noEchoExactEchoLeavesOf, Na as refuseMalformedResourceAttributesForOrphan, Nc as validateContainerRepoName, Ni as carriesFetchableDynamicReference, Nl as defineOwnKey, Nn as DEFAULT_RESOURCE_TIMEOUT_MS, No as describeTypeWithThrottleRetry, Nr as customResourceResponseExpirationWarning, Ns as carriesSecretMask, Nt as dropSettledNestedJournals, O as serviceTokenBlockingReason, Oa as refuseMalformedOrphans, Oc as getBootstrapMarkerKey, Oi as isUnboundTemplateParameter, Ol as canonicalizeRegion, On as noEchoParameterValueSeed, Or as isCustomResourceType$1, Ot as makeForeignHolderScan, P as noEchoParameterNamesOf, Pa as refuseMalformedResourceEntries, Pc as buildDenyExternalAccessPolicy, Pi as isNamelessDynamicReferenceError, Pl as hasOwnKey, Pn as DEFAULT_RESOURCE_WARN_AFTER_MS, Po as withRetry, Pr as CloudControlProvider, Ps as provenPublicValue, Qa as repairMalformedResourcePropertiesForReadOnly, Qc as warnFinchArgvExposure, Qi as displayLogicalId, Qn as refusesFinalSnapshot, Qo as valueAtCoordinate, Qr as INTRINSIC_KEYS, Qs as CrossPrefixScanCache, Qt as demoteSupersededOrphans, R as isProtectionValueActive, Ra as refuseMalformedResourceEntriesForImportSave, Rc as describeDockerExecFailure, Ri as isStalePlaceholderArnAttribute, Rl as absoluteAssemblyPathEscape, Rn as orphanRecordsPrintingBag, Ro as DagBuilder, Rr as UNSPECIFIED_SKIP_REASON, Rs as recordNoEchoParameterFreshValue, Rt as revertedNestedRowIds, Sa as malformedStateRefusalMessage, Sc as loadPublishableAssetManifest, Sl as findLargeInlineResources, Sn as secretBearingStateKeyWarning, Sr as ccBrokenReason, Ss as dynamicReferenceTokens, St as deleteJournaledOrphans, T as recordRetainedForReadoption, Tc as BOOTSTRAP_MARKER_PREFIX, Ti as producerRegionsFromState, Tl as decodeListingKey, Tn as exportNameNoEchoParameters, Ts as identityKeyFor, Tt as isHandledOrphan, Ua as refuseMalformedResourcePropertiesForOrphan, Uc as getDockerCmd, Ul as injectAwsRegion, Un as storedSecretNameNeedles, Uo as maskReadbackAtCoordinates, Ur as isWaitAbandonedError, Us as STATE_SOURCED_READBACK_RULES, Ut as replayFailedOperations, Va as refuseMalformedResourcePropertiesForDrift, Vc as finchSecretArgvRefusal, Vi as withSharedDrainBudget, Vl as renderAssemblyPathEscape, Vn as secretNamedRecordNeedles, Vo as isMarkedCoordinate, Vr as deleteSkipReason, Vs as STATE_SOURCED_BASELINE_RULES, Vt as getCurrentNestedStackContext, Wa as refuseMalformedResourcesForDeploy, Wc as isDockerClientEnvKey, Wi as declaresNoEcho, Wl as injectedAwsRegionValue, Wn as extractDeploymentEventError, Wo as maskWholeValue, Ws as TEMPLATE_SOURCED_RULES, Wt as replayRollback, Xa as repairMalformedOutputsForReadOnly, Xc as runDockerForeground, Xi as accountArgs, Xn as effectiveDeletionPolicy, Xo as readbackPathFor, Xs as rebuildClientForBucketRegion, Ya as repairMalformedOrphansForReadOnly, Yc as redactedDockerCause, Yi as UNREADABLE_RESOURCES_MAP_ROW, Yn as createPreDeleteFinalSnapshot, Ys as S3StateBackend, Yt as removeProtectionTypeList, Za as repairMalformedResourceEntriesForReadOnly, Zc as runDockerStreaming, Zi as deployRefusesOrphanRowsReason, Zn as isFinalSnapshotError, Zo as readsNoEchoSource, Zr as DiffCalculator, Zs as CrossPrefixReadError, Zt as recordAfterRollbackUpdate, _ as keptWholeReasonText, _a as malformedRenderedContainersWarning, _c as isSensitiveAttributeName, _i as recordedReferenceRegions, _l as warnDeprecatedNoPrefixCliFlag, _n as orphanNeedsIdentity, _s as redactSecretsForState, _t as planOrphanAdoption, a as inheritedProvenanceForChildDiff, aa as malformedExportNamesWarning, ac as describeRegionValueKind, ai as assertSendableRoleArn, al as synthesisStatusMessage, an as replacementNeverSwapped, ar as ledgerForStack, as as printingCorpusOf, at as createReadOnlyAttributeHealerFactory, ba as malformedResourcesWarning, bc as buildAssetRedirectMap, bl as CFN_TEMPLATE_URL_LIMIT, bn as exportAliasCollisionScrubWarning, br as CC_BROKEN_REASON, bt as pendingRequestCount, c as isAbsoluteAssetPath, ca as malformedLocalResourceEntriesWarning, cc as hasReasonlessBaselineRefusal, ci as sendableAssumeRoleCommand, cl as loadCdkJson, cn as findNestedStackTypeChanges, co as NO_CC_HANDLERS_REASON, cs as shareLogOnlyValues, ct as gray, d as templateIdentity, da as malformedOrphanRecordsWarning, dc as importableOutputs, di as callerEnvCredentials, dl as resolveCaptureObservedState, do as shownType, ds as errorCauseChain, dt as yellow, ea as hasReadableOutputs, ec as crossPrefixDeniedWarning, ei as poisonRenderedSpellingsCollidingIn, el as stripControlChars, en as isReplacementOrphan, eo as unpreviewableOrphanRecords, er as maskingRetryLogger, es as carryLogOnlyValues, f as conditionFingerprint, fa as malformedOrphanRowsKeptWarning, fc as isReadableBag, fi as envCredentialsAreAssumedRole, fl as resolveSkipPrefix, fo as MULTI_REGION_RECREATE_BLOCKED_TYPES, fs as maskSecretsInError, ft as computeParameterTaint, g as isSecretBearingReferenceString, ga as malformedOutputsWarning, gc as AssetPublisher, gi as recordedOutputReferenceRegions, gl as stateBucketExistenceConfirmed, gn as updatePartialReason, gt as makeSiblingClaimReader, h as readRecordedConditionVerdicts, ha as malformedOutputsRefusalMessage, hc as shouldRetainResource, hl as resolveUseCdkBootstrapAssets, hn as updatePartialMessage, ho as renderStatefulReason, ht as resourcesNamingDeclaredParameter, i as crossStackOutputProvenanceSource, ia as malformedDriftResourcePropertiesWarning, ic as acceptedCreateOnlyDropsOf, ii as assertFlagRoleArn, il as Synthesizer, in as recordUnderIdIsNotOwn, io as findActionableSilentDrops, is as logOnlyValueCount, it as formatResourceLine, j as noEchoAttributeNamesOf, ja as refuseMalformedOutputs, jc as readBootstrapMarkerBody, ji as isImpossibleEmptyStoredAttribute, jl as StageLoadError, jn as isExportAliasCollision, jo as prefetchCreateOnlyPropertyPaths, jr as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, js as recordPhysicalNameCopy, jt as displacedOpClause, k as withResourceDeadline, ka as refuseMalformedOrphansForDestroy, kc as isCrossRegionRedirect, ki as parameterTypeMayLoseSecretIdentity, kl as derivePartitionAndUrlSuffix, kn as collectDeclaredOutputNames, ks as physicalNameCopiesOf, kt as sameJournaledOrphans, l as listNestedTemplateRows, la as malformedLocalResourcesWarning, lc as hasUnverifiableParameterRefusal, li as AWS_CREDENTIAL_ENV_KEYS, ll as resolveApp, lo as hasNoCloudControlHandlers, ls as unionOfSecretBags, lt as green, m as parentSuppliedValues, ma as malformedOrphansWarning, mc as orphansCarriedFrom, mi as keepHeldTokenProvenance, ml as resolveStateBucketWithDefaultAndSource, mo as isStatefulRecreateTargetSync, ms as markSameGenerationBag, mt as reachableDivergentParameters, n as IMPLICIT_DELETE_DEPENDENCIES, na as isReadableOrphanRecord, nc as isNotImplemented, ni as refuseUnreadableCdkCrossAccountRefs, nl as AssetManifestLoader, nn as planRollback, no as unreadableResourceEntries, nr as findDestructiveChanges, ns as hasMaskableValues, o as childTemplateLoader, oa as malformedExportSourceWarning, oc as exportNamesCarriedFrom, oi as explicitRoleArnOrThrow, ol as getDefaultStateBucketName, on as resolveReplacementOldType, oo as unwrittenCreateOnlyReplacement, os as recordLogOnlyParameterValue, ot as bold, p as conditionInputsFrom, pa as malformedOrphansRefusalMessage, pc as orphansAfterRollback, pl as resolveStateBucketWithDefault, po as isStatefulRecreateTargetForReplace, ps as maskSecretsInText, pt as namesAnyDeclaredParameter, qa as refuseMalformedState, qc as redactDockerArgvValues, qi as STATE_RESOURCES_MALFORMED, qn as buildFinalSnapshotIdentifier, qo as noEchoLeavesOf, qs as LockManager, r as computeImplicitDeleteEdges, ra as isReadableResourceEntry, rc as splitImportedOps, ri as applyRoleArnIfSet, rl as getDockerImageBySourceHash, rn as recheckFailedPlan, ro as withheldAccountClause, rr as formatDestructiveChange, rs as literalSplitDelimitersOf, s as findNestedTemplateTreeDefect, sa as malformedLocalOutputsWarning, sc as hasReadableExportSet, si as isIamRoleArn, sl as getLegacyStateBucketName, sn as seedsDeleteFirstGuard, sr as withCreateTokenLedger, ss as recordLogOnlyValue, st as cyan, t as DeployEngine, ta as hasReadableResources, tc as isAccessDenied, ti as producerLookupOver, tl as stripForDisplay, tn as planFailedOps, to as unreadableOrphanRecords, tr as constructPathOf, ts as createUnionSecretMasker, u as renderNestedTemplateTreeDefect, ua as malformedOrphanRecordsRefusalMessage, uc as importableOutputKeys, ui as applyCallerIdentityCredentials, ul as resolveAutoAssetStorage, un as inheritProducerRegions, uo as findReplacedReadersOfRecreateTargets, us as createSecretMasker, ut as red, v as mergeNoChangeOutputs, va as malformedResourceEntriesWarning, vc as stringifyValue, vl as ssmResolvedValueType, vn as WITHHELD_NAME_DISPLAY, vs as scrubResourceRecord, vt as DeploymentEventsReader, w as keptForReadoption, wa as refuseDivergentRecordRegionForDestroy, wc as AssetModeResolver, wi as classifyReplaySecretRegion, wl as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, wn as carriedExportAliasExposure, wr as wouldReturnToSdkProvider, ws as pathCrossesDottedKey, wt as dropFailedHint, xa as malformedScrubResourceEntriesRefusalMessage, xc as createAssetRedirectResolver, xl as MIGRATE_TMP_PREFIX, xn as secretBearing, xr as ProviderRegistry, xs as DYNAMIC_REFERENCE_TOKEN_SCAN, xt as resolvePendingCloudControlRequests, y as makeCanonicalizePropertiesFn, ya as malformedResourcePropertiesWarning, yc as WorkGraph, yl as CFN_TEMPLATE_BODY_LIMIT, yn as displayTextOrWithheld, ys as withPhysicalNameCopies, yt as DeploymentEventsStore, z as perType, za as refuseMalformedResourceEntriesForOrphan, zc as describeDockerFailure, zi as refStateLookupFromResource, zl as describeFileReadFailure, zn as secretNamePrintingBag, zo as TemplateParser, zr as deleteIndeterminateGuards, zs as recordProvenPublicExpression, zt as withNestedRevertRun } from "./deploy-engine-CZaafy9R.js";
|
|
6
|
-
import { t as getCdkdVersion } from "./version-
|
|
5
|
+
import { $ as resolvePendingCloudControlRequests, $a as repairMalformedOutputsForReadOnly, $c as redactedDockerCause, $i as accountArgs, $n as buildFinalSnapshotIdentifier, $o as readbackPathFor, $r as DiffCalculator, $s as S3StateBackend, $t as namesAnyDeclaredParameter, A as findServiceTokenRefusals, Aa as refuseMalformedOrphanRecordsForDestroy, Ac as assertAssetBucketRegion, Ai as coerceParameterTypedValue, Al as expectedOwnerParam, An as gray, Ar as isCustomResourceType$1, As as inheritNestedStackParameterAssociations, At as removeProtectionTypeList, B as parentSuppliedValues, Ba as refuseMalformedResourceEntriesForImport, Bc as resolveDockerContextDirectory, Bi as cfnRefValueFromPhysicalId, Bl as nullPrototypeRecord, Bn as journaledOrphanPrintingBag, Br as UNSPECIFIED_SKIP_REASON, Bs as recordMaskOnlyValuesIn, Bt as resolveReplacementOldType, Ca as malformedResourcesWarning, Cc as WorkGraph, Ci as applyCallerIdentityCredentials, Cl as CFN_TEMPLATE_BODY_LIMIT, Cr as ProviderRegistry, Cs as withPhysicalNameCopies, Ct as formatResourceLine, D as crossStackOutputProvenanceSource, Da as refuseDivergentRecordRegionForDestroy, Dc as rewriteTemplateAssetReferences, Di as classifyReplaySecretRegion, Dl as uploadCfnTemplate, Ds as isUncertifiedBaselineMaskPosition, E as computeImplicitDeleteEdges, Ea as previewableOrphanRecords, Ec as loadPublishableAssetManifest, Ei as classifyRecordedSecretRegion, El as findLargeInlineResources, En as withStackRecords, Er as wouldReturnToSdkProvider, Es as dynamicReferenceTokens, F as listNestedTemplateRows, Fa as refuseMalformedOutputsForDestroy, Fc as readBootstrapMarkerBody, Fi as carriesDynamicReference, Fl as StageLoadError, Fn as noEchoComparisonForTemplate, Fo as templateResourceTypes, Fr as customResourceResponseExpirationWarning, Fs as recordPhysicalNameCopy, Ft as planFailedOps, G as keptWholeReasonText, Ga as refuseMalformedResourcePropertiesForExport, Gc as finchSecretArgvRefusal, Gi as parameterInputsFor, Gl as renderAssemblyPathEscape, Gn as secretNamePrintingBags, Go as maskAtCoordinates, Gr as isWaitAbandonedError, Gs as STATE_SOURCED_BASELINE_RULES, Gt as inheritProducerRegions, H as withResourceDeadline, Ha as refuseMalformedResourceEntriesForOrphan, Hc as describeDockerExecFailure, Hi as refStateLookupFromResource, Hl as absoluteAssemblyPathEscape, Hn as namingSecretsWithRecordedNoEcho, Ho as TemplateParser, Hr as deleteLeftInPlace, Hs as recordNoEchoParameterFreshValue, Ht as orphanNeedsIdentity, I as renderNestedTemplateTreeDefect, Ia as refuseMalformedResourceAttributesForOrphan, Ic as validateAssetBucketName, Ii as carriesFetchableDynamicReference, Il as processStackMessages, In as noEchoExactEchoLeavesOf, Io as describeTypeWithThrottleRetry, Ir as CloudControlProvider, Is as splitGetAttStringForm, It as planRollback, J as makeSiblingClaimReader, Ja as refuseMalformedResourcesForDestroy, Jc as isDockerClientEnvKey, Ji as JSON_LISTING_HOLE_VALUE, Jl as injectedAwsRegionValue, Jn as stateSecretNameNeedles, Jo as maskedLeafCoordinatesOf, Js as TEMPLATE_SOURCED_RULES, K as mergeNoChangeOutputs, Ka as refuseMalformedResourcePropertiesForOrphan, Kc as formatDockerLoginError, Kl as resolveAssemblyPath, Ko as maskReadbackAtCoordinates, Ks as STATE_SOURCED_CROSS_GENERATION_RULES, L as templateIdentity, La as refuseMalformedResourceEntries, Lc as validateContainerRepoName, Li as isNamelessDynamicReferenceError, Ll as defineOwnKey, Ln as noEchoParameterNamesOf, Lo as withRetry, Lr as slowCcOperationTimeoutMs, Ls as carriesSecretMask, Lt as recheckFailedPlan, M as childTemplateLoader, Ma as refuseMalformedOrphansForDestroy, Mc as getBootstrapMarkerKey, Mi as parameterTypeMayLoseSecretIdentity, Ml as canonicalizeRegion, Mn as red, Mr as withPrintingSecrets, Mt as demoteSupersededOrphans, N as findNestedTemplateTreeDefect, Na as refuseMalformedOrphansForOrphan, Nc as isCrossRegionRedirect, Ni as getAccountInfo, Nl as derivePartitionAndUrlSuffix, Nn as yellow, Nr as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, Ns as physicalNameCopiesOf, Nt as isJournaledOrphan, O as inheritedProvenanceForChildDiff, Oc as AssetModeResolver, Oi as producerRegionsFromState, Ol as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, On as bold, Or as TemplateNoEchoReresolver, Os as pathCrossesDottedKey, Ot as replayFailedOperations, P as isAbsoluteAssetPath, Pa as refuseMalformedOutputs, Pc as parseBootstrapMarker, Pi as isImpossibleEmptyStoredAttribute, Pl as AssemblyReader, Pn as noEchoAttributeNamesOf, Po as prefetchCreateOnlyPropertyPaths, Pr as applyCustomResourceResponseExpiration, Pt as isReplacementOrphan, Q as pendingRequestCount, Qa as repairMalformedOrphansForReadOnly, Qc as redactedCause, Qi as UNREADABLE_RESOURCES_MAP_ROW, Qn as PRE_DELETE_SNAPSHOT_TYPES, Qs as isLockInfoExpired, Qt as computeParameterTaint, R as conditionFingerprint, Ra as refuseMalformedResourceEntriesForDeploy, Rc as buildDenyExternalAccessPolicy, Ri as keepsSecretReferenceToken, Rl as hasOwnKey, Rn as createReadOnlyAttributeHealerFactory, Rs as provenPublicValue, Rt as recordUnderIdIsNotOwn, Sa as malformedResourcePropertiesWarning, Sc as stringifyValue, Si as AWS_CREDENTIAL_ENV_KEYS, Sl as ssmResolvedValueType, Sn as formatDestructiveChange, Sr as CC_BROKEN_REASON, Ss as scrubResourceRecord, St as sameJournaledOrphans, T as IMPLICIT_DELETE_DEPENDENCIES, Ta as malformedStateRefusalMessage, Tc as createAssetRedirectResolver, Ti as envCredentialsAreAssumedRole, Tl as MIGRATE_TMP_PREFIX, Tr as isCustomResource, Ts as DYNAMIC_REFERENCE_TOKEN_SCAN, U as diffSecurity, Ua as refuseMalformedResourcePropertiesForDestroy, Uc as describeDockerFailure, Ul as describeFileReadFailure, Un as orphanRecordsPrintingBag, Uo as canonicalCoordinates, Ur as deleteSkipReason, Us as recordProvenPublicExpression, Ut as findNestedStackTypeChanges, V as readRecordedConditionVerdicts, Va as refuseMalformedResourceEntriesForImportSave, Vc as describeDockerCapturedOutput, Vi as isStalePlaceholderArnAttribute, Vl as ownValue, Vn as maskEventTextWithBoundBags, Vo as DagBuilder, Vr as deleteIndeterminateGuards, Vs as recordNoEchoAttributeValues, Vt as seedsDeleteFirstGuard, W as isSecretBearingReferenceString, Wa as refuseMalformedResourcePropertiesForDrift, Wc as dockerSpawnEnvWithSensitive, Wi as withSharedDrainBudget, Wl as displayAssemblyPath, Wn as secretNamePrintingBag, Wo as isMarkedCoordinate, Ws as wholeStringLeavesOf, X as DeploymentEventsReader, Xa as refuseMalformedState, Xc as partitionSensitiveEnv, Xi as STATE_RESOURCES_MALFORMED, Xl as resolveBucketRegion, Xn as extractDeploymentEventError, Xo as noEchoLeavesOf, Xs as isSingleDynamicReferenceToken, Xt as updatePartialMessage, Y as planOrphanAdoption, Ya as refuseMalformedResourcesForExport, Yc as isMalformedEnvKey, Yi as STATE_REGION_DIVERGED, Yn as storedSecretNameNeedles, Yo as noEchoCoordinatesOf, Ys as WHOLE_DYNAMIC_REFERENCE_PATTERN, Z as DeploymentEventsStore, Za as repairMalformedOrphanRecordsForReadOnly, Zc as redactDockerArgvValues, Zi as UNREADABLE_ORPHANS_CONTAINER_ROW, Zn as ATOMIC_FINAL_SNAPSHOT_TYPES, Zo as noEchoOutputsComparison, Zs as LockManager, Zt as updatePartialReason, _a as malformedOrphansWarning, _c as orphansAfterRollback, _i as assertFlagRoleArn, _l as resolveStateBucketWithDefault, _n as DEFAULT_RESOURCE_TIMEOUT_MS, _o as isStatefulRecreateTargetSync, _s as maskSecretsInText, _t as dropFailedHint, a as isProtectionValueActive, aa as isReadableOrphanRecord, ac as isAccessDenied, al as stripForDisplay, an as secretBearing, ao as unreadableResourceEntries, ar as unsupportedFinalSnapshotError, as as createUnionSecretMasker, at as dropSettledNestedJournals, ba as malformedRenderedContainersWarning, bc as AssetPublisher, bi as isIamRoleArn, bl as stateBucketExistenceConfirmed, bn as constructPathOf, bt as loadJournaledOrphans, ca as malformedExportNamesWarning, cc as acceptedCreateOnlyDropsOf, cl as Synthesizer, cn as carriedExportAliasExposure, cs as logOnlyValueCount, ct as recordDisplacedSkips, da as malformedLocalResourceEntriesWarning, dc as hasReadableExportSet, di as refuseUnreadableCdkCrossAccountRefs, dl as getLegacyStateBucketName, dn as isWholeDynamicReferenceValue, do as NO_CC_HANDLERS_REASON, ds as recordLogOnlyValue, dt as withNestedRevertRun, ea as deployRefusesOrphanRowsReason, ec as rebuildClientForBucketRegion, ei as INTRINSIC_KEYS, el as runDockerForeground, en as reachableDivergentParameters, eo as repairMalformedResourceEntriesForReadOnly, er as ccRoutedFinalSnapshotError, es as readsNoEchoSource, et as keptForReadoption, fa as malformedLocalResourcesWarning, fc as hasReasonlessBaselineRefusal, fi as keepHeldTokenProvenance, fl as loadCdkJson, fn as noEchoParameterValueSeed, fo as hasNoCloudControlHandlers, fs as shareLogOnlyValues, ft as collectNestedChildUnaddressed, ga as malformedOrphansRefusalMessage, gc as isReadableBag, gi as applyRoleArnIfSet, gl as resolveSkipPrefix, gn as bindingSkippedOutputs, go as isStatefulRecreateTargetForReplace, gs as maskSecretsInError, gt as dropFailedCommands, ha as malformedOrphanRowsKeptWarning, hc as importableOutputs, hi as recordedReferenceRegions, hl as resolveCaptureObservedState, hn as isExportAliasCollision, ho as MULTI_REGION_RECREATE_BLOCKED_TYPES, hs as errorCauseChain, ht as deleteJournaledOrphans, i as PROTECTION_PROPERTY_BY_TYPE, ia as hasReadableResources, ic as crossPrefixDeniedWarning, il as stripControlChars, in as exportAliasCollisionScrubWarning, io as unreadableOrphanRecords, ir as refusesFinalSnapshot, is as carryLogOnlyValues, it as displacedPhysicalIdShown, j as serviceTokenBlockingReason, ja as refuseMalformedOrphans, jc as ensureAssetStorage, ji as isUnboundTemplateParameter, jl as PARTITION_TABLE, jn as green, js as recordNestedStackParameterExpressions, jt as recordAfterRollbackUpdate, k as deferredServiceTokenWarning, ka as refuseMalformedOrphanRecords, kc as BOOTSTRAP_MARKER_PREFIX, ki as regionLessSecretName, kl as decodeListingKey, kn as cyan, kr as readsNoEchoDeleteValues, ks as identityKeyFor, kt as replayRollback, la as malformedExportSourceWarning, lc as describeRegionValueKind, li as resolveDynamicReferences, ll as synthesisStatusMessage, ln as exportNameNoEchoParameters, lo as unwrittenCreateOnlyReplacement, lr as withCreateTokenLedger, ls as printingCorpusOf, ma as malformedOrphanRecordsWarning, mc as importableOutputKeys, mi as recordedOutputReferenceRegions, ml as resolveAutoAssetStorage, mn as collectPublishedOutputNames, mo as shownType, ms as createSecretMasker, mt as withNestedStackContext, n as recordedProtectionEvidence, na as hasReadableOrphans, nc as CrossPrefixScanCache, ni as poisonRenderedSpellingsCollidingIn, nl as warnFinchArgvExposure, nn as WITHHELD_NAME_DISPLAY, no as repairMalformedResourcesForReadOnly, nr as effectiveDeletionPolicy, ns as valueAtCoordinate, nt as NESTED_PENDING_PARENT_REASON, o as perType, oa as isReadableResourceEntry, oc as isNotImplemented, ol as AssetManifestLoader, on as secretBearingStateKeyWarning, oo as withheldAccountClause, os as hasMaskableValues, pa as malformedOrphanRecordsRefusalMessage, pc as hasUnverifiableParameterRefusal, pl as resolveApp, pn as collectDeclaredOutputNames, po as findReplacedReadersOfRecreateTargets, ps as unionOfSecretBags, pt as getCurrentNestedStackContext, q as makeCanonicalizePropertiesFn, qa as refuseMalformedResourcesForDeploy, qc as getDockerCmd, qi as declaresNoEcho, ql as injectAwsRegion, qn as secretNamedRecordNeedles, qo as maskWholeValue, qs as STATE_SOURCED_READBACK_RULES, r as recordedProtectionNote, ra as hasReadableOutputs, rc as applyCrossPrefixScan, rl as escapeRegExp, rn as displayTextOrWithheld, ro as unpreviewableOrphanRecords, rr as isFinalSnapshotError, rs as liveMatchesUnresolvedTokenFrame, rt as displacedOpClause, s as readProtection, sa as malformedDriftResourcePropertiesWarning, sc as splitImportedOps, sl as getDockerImageBySourceHash, sn as secretSafeKeyDisplay, so as findActionableSilentDrops, sr as ledgerForStack, ss as literalSplitDelimitersOf, st as nestedChildStackName$1, t as DeployEngine, ta as displayLogicalId, tc as CrossPrefixReadError, ti as IntrinsicFunctionResolver, tl as runDockerStreaming, tn as resourcesNamingDeclaredParameter, to as repairMalformedResourcePropertiesForReadOnly, tr as createPreDeleteFinalSnapshot, ts as recordedNoEchoValuesOf, tt as recordRetainedForReadoption, ua as malformedLocalOutputsWarning, uc as exportNamesCarriedFrom, ui as producerLookupOver, ul as getDefaultStateBucketName, un as exportNameSecretExposure, us as recordLogOnlyParameterValue, ut as revertedNestedRowIds, va as malformedOutputsRefusalMessage, vc as orphansCarriedFrom, vi as assertSendableRoleArn, vl as resolveStateBucketWithDefaultAndSource, vn as DEFAULT_RESOURCE_WARN_AFTER_MS, vo as renderStatefulReason, vs as markSameGenerationBag, vt as isHandledOrphan, wa as malformedScrubResourceEntriesRefusalMessage, wc as buildAssetRedirectMap, wi as callerEnvCredentials, wl as CFN_TEMPLATE_URL_LIMIT, wn as destroyStackRecordsView, wr as ccBrokenReason, xa as malformedResourceEntriesWarning, xc as isSensitiveAttributeName, xi as sendableAssumeRoleCommand, xl as warnDeprecatedNoPrefixCliFlag, xn as findDestructiveChanges, xs as redactSecretsForState, xt as makeForeignHolderScan, ya as malformedOutputsWarning, yc as shouldRetainResource, yi as explicitRoleArnOrThrow, yl as resolveUseCdkBootstrapAssets, yn as maskingRetryLogger, yt as journaledOrphanLines, z as conditionInputsFrom, za as refuseMalformedResourceEntriesForDestroy, zc as buildDockerImage, zi as AWS_NO_VALUE, zl as hasPlainPrototype, zn as completedReplayEntries, zr as RollbackInlinePolicyWriters, zs as recordMaskOnlyValue, zt as replacementNeverSwapped } from "./deploy-engine-HAvm8vSI.js";
|
|
6
|
+
import { t as getCdkdVersion } from "./version-2jeKJQlt.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-DPwEHVDJ.js");
|
|
2563
2563
|
return providerClasses;
|
|
2564
2564
|
}
|
|
2565
2565
|
function registerAllProviders(registry, classes) {
|
|
@@ -4949,7 +4949,8 @@ function maskOutputChangeForDisplay(change, mask, nameCorpus) {
|
|
|
4949
4949
|
async function computeStackDiff(currentState, template, region, stackName, stateBackend, diffCalculator, options = {}) {
|
|
4950
4950
|
const { parameters, canonicalizeProperties, cfnFallback, producerLookup, consumerAccount, inheritSecretBearingTemplate, inheritedSecrets, inheritedSecretTokens, inheritedDerivedNames, attributeHealer: unboundAttributeHealer, parentUnresolvedParameters, inheritedNoEchoParameters, inheritedNoEchoParametersAnyVerdict } = options;
|
|
4951
4951
|
let healResources = currentState.resources ?? {};
|
|
4952
|
-
|
|
4952
|
+
let healNamingSecrets;
|
|
4953
|
+
const attributeHealer = unboundAttributeHealer && healerUnderRecordPrintingBag(unboundAttributeHealer, () => healResources, (map) => healNamingSecrets?.(map));
|
|
4953
4954
|
const noEchoParametersOf = (t) => /* @__PURE__ */ new Set([...noEchoParameterNamesOf(t), ...inheritedNoEchoParameters ?? []]);
|
|
4954
4955
|
const inheritedForResolver = inheritedSecrets !== void 0 && hasMaskableValues(inheritedSecrets) ? inheritedSecrets : void 0;
|
|
4955
4956
|
const secretStandInTokens = standInTokensOf(inheritedSecretTokens);
|
|
@@ -5079,9 +5080,36 @@ async function computeStackDiff(currentState, template, region, stackName, state
|
|
|
5079
5080
|
recordLogOnlyParameterValue(diffSecrets, mergedParameters[name]);
|
|
5080
5081
|
recordLogOnlyParameterValue(splitPieces, mergedParameters[name], splitDelimiters);
|
|
5081
5082
|
}
|
|
5082
|
-
const
|
|
5083
|
-
carryLogOnlyValues(diffSecrets,
|
|
5084
|
-
const
|
|
5083
|
+
const noEchoJudgeValues = new Map(diffSecrets);
|
|
5084
|
+
carryLogOnlyValues(diffSecrets, noEchoJudgeValues);
|
|
5085
|
+
const namingNoEchoParameters = noEchoParametersOf(effectiveTemplate);
|
|
5086
|
+
const namingConditions = conditions === void 0 ? void 0 : Object.fromEntries(Object.entries(conditions).filter(([name]) => !stillUnknown.includes(name)));
|
|
5087
|
+
const namingTemplateResources = effectiveTemplate.Resources ?? {};
|
|
5088
|
+
const recordedNamingValues = (resources, logicalId) => {
|
|
5089
|
+
const record = Object.hasOwn(resources, logicalId) ? resources[logicalId] : void 0;
|
|
5090
|
+
const templateResource = Object.hasOwn(namingTemplateResources, logicalId) ? namingTemplateResources[logicalId] : void 0;
|
|
5091
|
+
const bag = recordedNoEchoValuesOf(templateResource?.Type === record?.resourceType ? templateResource?.Properties : void 0, record, namingNoEchoParameters, namingConditions);
|
|
5092
|
+
return hasMaskableValues(bag) ? bag : void 0;
|
|
5093
|
+
};
|
|
5094
|
+
const noEchoJudge = (resources) => namingSecretsWithRecordedNoEcho(noEchoJudgeValues, (logicalId) => recordedNamingValues(resources, logicalId));
|
|
5095
|
+
const liveNamingJudge = (resources) => {
|
|
5096
|
+
const memo = /* @__PURE__ */ new Map();
|
|
5097
|
+
return (logicalId) => {
|
|
5098
|
+
const record = Object.hasOwn(resources, logicalId) ? resources[logicalId] : void 0;
|
|
5099
|
+
let hit = memo.get(logicalId);
|
|
5100
|
+
if (hit === void 0 || hit.record !== record) {
|
|
5101
|
+
hit = {
|
|
5102
|
+
record,
|
|
5103
|
+
bag: recordedNamingValues(resources, logicalId)
|
|
5104
|
+
};
|
|
5105
|
+
memo.set(logicalId, hit);
|
|
5106
|
+
}
|
|
5107
|
+
const stored = hit.bag;
|
|
5108
|
+
return stored === void 0 ? diffSecrets : unionOfSecretBags([diffSecrets, stored]);
|
|
5109
|
+
};
|
|
5110
|
+
};
|
|
5111
|
+
healNamingSecrets = noEchoJudge;
|
|
5112
|
+
const stateNames = storedSecretNameNeedles(currentState.resources ?? {}, noEchoJudge(currentState.resources ?? {}), /* @__PURE__ */ new Map(), currentState.outputs);
|
|
5085
5113
|
const outputsPassSecrets = /* @__PURE__ */ new Map();
|
|
5086
5114
|
const printing = createDiffPrintingMasker([
|
|
5087
5115
|
diffSecrets,
|
|
@@ -5098,7 +5126,7 @@ async function computeStackDiff(currentState, template, region, stackName, state
|
|
|
5098
5126
|
recordedSecretValues: bag,
|
|
5099
5127
|
...printingSecrets && { printingSecrets },
|
|
5100
5128
|
...crossStackReads && { crossStackReads },
|
|
5101
|
-
secretNameNeedles: stateSecretNameNeedles(currentState.resources,
|
|
5129
|
+
secretNameNeedles: stateSecretNameNeedles(currentState.resources, liveNamingJudge(currentState.resources)),
|
|
5102
5130
|
secretNameSink: derivedNames,
|
|
5103
5131
|
...inheritedForResolver && { inheritedSecrets: inheritedForResolver },
|
|
5104
5132
|
...secretStandInTokens && { secretStandInTokens },
|
|
@@ -5151,7 +5179,7 @@ async function computeStackDiff(currentState, template, region, stackName, state
|
|
|
5151
5179
|
logger.warn(malformedResourcePropertiesWarning(stackName, region, tornAdopted, options.refusalRecovery));
|
|
5152
5180
|
deployRefusals.push(deployRefusesPropertiesReason(tornAdopted));
|
|
5153
5181
|
}
|
|
5154
|
-
storedSecretNameNeedles(stateForDiff.resources, noEchoJudge, stateNames, currentState.outputs);
|
|
5182
|
+
storedSecretNameNeedles(stateForDiff.resources, noEchoJudge(stateForDiff.resources), stateNames, currentState.outputs);
|
|
5155
5183
|
}
|
|
5156
5184
|
const alreadyReported = new Set(reportedByTheAdoptedPropertiesArm);
|
|
5157
5185
|
const previewedRowsTheDeployRefuses = readableOrphans.filter((record) => !isReadableOrphanRecord(record)).map((record) => record.logicalId).filter((logicalId) => !alreadyReported.has(logicalId));
|
|
@@ -5178,7 +5206,7 @@ async function computeStackDiff(currentState, template, region, stackName, state
|
|
|
5178
5206
|
return {
|
|
5179
5207
|
value: await intrinsicResolver.resolve(structuredClone(node), {
|
|
5180
5208
|
recordedSecretValues: secrets,
|
|
5181
|
-
secretNameNeedles: stateSecretNameNeedles(resourcesForInputs,
|
|
5209
|
+
secretNameNeedles: stateSecretNameNeedles(resourcesForInputs, liveNamingJudge(resourcesForInputs)),
|
|
5182
5210
|
secretNameSink: derivedNames,
|
|
5183
5211
|
template: effectiveTemplate,
|
|
5184
5212
|
resources: resourcesForInputs,
|
|
@@ -5312,7 +5340,8 @@ async function computeStackDiff(currentState, template, region, stackName, state
|
|
|
5312
5340
|
effectiveTemplate,
|
|
5313
5341
|
printingSecrets,
|
|
5314
5342
|
derivedNames: diffPrintingSecrets([derivedNames, inheritedDerivedNames]),
|
|
5315
|
-
secretNamedRecords: secretNamedRecordNeedles(stateForDiff.resources, noEchoJudge),
|
|
5343
|
+
secretNamedRecords: secretNamedRecordNeedles(stateForDiff.resources, noEchoJudge(stateForDiff.resources)),
|
|
5344
|
+
namingSecretsFor: noEchoJudge,
|
|
5316
5345
|
resolvedParameters: mergedParameters,
|
|
5317
5346
|
conditions,
|
|
5318
5347
|
knownConditions: conditions === void 0 ? void 0 : Object.fromEntries(Object.entries(conditions).filter(([name]) => !stillUnknown.includes(name))),
|
|
@@ -5540,17 +5569,20 @@ function recordedTemplateResources(template, state) {
|
|
|
5540
5569
|
for (const [logicalId, resource] of Object.entries(resources)) if (Object.prototype.hasOwnProperty.call(stateResources, logicalId)) recorded[logicalId] = resource;
|
|
5541
5570
|
return recorded;
|
|
5542
5571
|
}
|
|
5543
|
-
function healerUnderRecordPrintingBag(healer, resources) {
|
|
5572
|
+
function healerUnderRecordPrintingBag(healer, resources, namingSecrets) {
|
|
5544
5573
|
let judged;
|
|
5545
5574
|
const bagFor = (logicalId, resource) => {
|
|
5546
5575
|
const map = resources();
|
|
5547
|
-
if (!Object.hasOwn(map, logicalId) || map[logicalId] !== resource)
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5576
|
+
if (!Object.hasOwn(map, logicalId) || map[logicalId] !== resource) {
|
|
5577
|
+
const withSelf = {
|
|
5578
|
+
...map,
|
|
5579
|
+
[logicalId]: resource
|
|
5580
|
+
};
|
|
5581
|
+
return secretNamePrintingBags(withSelf, namingSecrets?.(withSelf))(logicalId);
|
|
5582
|
+
}
|
|
5551
5583
|
if (judged?.map !== map) judged = {
|
|
5552
5584
|
map,
|
|
5553
|
-
bagOf: secretNamePrintingBags(map,
|
|
5585
|
+
bagOf: secretNamePrintingBags(map, namingSecrets?.(map))
|
|
5554
5586
|
};
|
|
5555
5587
|
return judged.bagOf(logicalId);
|
|
5556
5588
|
};
|
|
@@ -5588,7 +5620,7 @@ async function buildDiffTree(args) {
|
|
|
5588
5620
|
} finally {
|
|
5589
5621
|
createOnlyPrefetch.cancel();
|
|
5590
5622
|
}
|
|
5591
|
-
const { changes, securityDiff, outputChanges, adoptedOrphans, adoptedRecords, blocking, unreadableOrphans, deployRefusals: adoptedDeployRefusals, effectiveTemplate, printingSecrets, derivedNames: nodeDerivedNames, secretNamedRecords: nodeStateNames, resolvedParameters, conditions, knownConditions, trust } = stackDiff;
|
|
5623
|
+
const { changes, securityDiff, outputChanges, adoptedOrphans, adoptedRecords, blocking, unreadableOrphans, deployRefusals: adoptedDeployRefusals, effectiveTemplate, printingSecrets, derivedNames: nodeDerivedNames, secretNamedRecords: nodeStateNames, namingSecretsFor, resolvedParameters, conditions, knownConditions, trust } = stackDiff;
|
|
5592
5624
|
const stateAfterAdoption = Object.keys(adoptedRecords).length > 0 ? {
|
|
5593
5625
|
...state,
|
|
5594
5626
|
resources: {
|
|
@@ -5640,7 +5672,7 @@ async function buildDiffTree(args) {
|
|
|
5640
5672
|
]), void 0, stateAfterAdoption.resources);
|
|
5641
5673
|
const rowDerivedNames = /* @__PURE__ */ new Map();
|
|
5642
5674
|
const childSecretTokens = /* @__PURE__ */ new Map();
|
|
5643
|
-
const childParameters = await resolveChildStackParameters(resource, effectiveTemplate, stateAfterAdoption, region, stackName, stateBackend, resolvedParameters, conditions, cfnFallback, printingSecrets, attributeHealer && healerUnderRecordPrintingBag(attributeHealer, () => stateAfterAdoption.resources ?? {}), childUnresolvedParameters, trust, rowDerivedNames, producerLookup, consumerAccount, {
|
|
5675
|
+
const childParameters = await resolveChildStackParameters(resource, effectiveTemplate, stateAfterAdoption, region, stackName, stateBackend, resolvedParameters, conditions, cfnFallback, printingSecrets, attributeHealer && healerUnderRecordPrintingBag(attributeHealer, () => stateAfterAdoption.resources ?? {}, namingSecretsFor), childUnresolvedParameters, trust, rowDerivedNames, producerLookup, consumerAccount, {
|
|
5644
5676
|
inherited: inheritedSecretTokens,
|
|
5645
5677
|
child: childSecretTokens
|
|
5646
5678
|
});
|
|
@@ -7198,7 +7230,7 @@ async function resolveForeignRegionTokens(leaf, stackName, ctx) {
|
|
|
7198
7230
|
if (verdict.kind === "named-region") {
|
|
7199
7231
|
const resolver = "recorded" in verdict ? ctx.resolvers.forRecordedRegion(verdict.region) : ctx.resolvers.forRegion(verdict.region);
|
|
7200
7232
|
try {
|
|
7201
|
-
out += await
|
|
7233
|
+
out += await resolveDynamicReferences(resolver, token, {
|
|
7202
7234
|
template: { Resources: {} },
|
|
7203
7235
|
resources: {},
|
|
7204
7236
|
recordedSecretValues: ctx.recordedSecretValues
|
|
@@ -9831,7 +9863,7 @@ async function driftProducerRegionEvidence(state, stackName, region, stateBacken
|
|
|
9831
9863
|
async function resolveDriftLeafByRegion(leaf, propertyPath, logicalId, consumerRegion, producerRegions, resolvers, ctx, recordedRegions) {
|
|
9832
9864
|
const verdicts = dynamicReferenceTokens(leaf).map((token) => [token, classifyRecordedSecretRegion(token, consumerRegion, producerRegions, recordedRegions)]);
|
|
9833
9865
|
for (const [, verdict] of verdicts) if (verdict.kind === "ambiguous") throw regionAmbiguousDriftSecretError(logicalId, propertyPath, verdict.secretName, verdict.foreignProducerRegions, consumerRegion);
|
|
9834
|
-
if (!verdicts.some(([, verdict]) => verdict.kind === "named-region" || verdict.kind === "recorded-region")) return await resolvers.primary
|
|
9866
|
+
if (!verdicts.some(([, verdict]) => verdict.kind === "named-region" || verdict.kind === "recorded-region")) return await resolveDynamicReferences(resolvers.primary, leaf, ctx);
|
|
9835
9867
|
let out = "";
|
|
9836
9868
|
let cursor = 0;
|
|
9837
9869
|
for (const [token, verdict] of verdicts) {
|
|
@@ -9839,7 +9871,7 @@ async function resolveDriftLeafByRegion(leaf, propertyPath, logicalId, consumerR
|
|
|
9839
9871
|
if (at < 0) throw new DriftSecretRefusalError(`${logicalId}${propertyPath === "" ? "" : ` property '${propertyPath}'`}: could not locate a scanned dynamic reference in the value it was scanned from. Refusing rather than resolving it in '${consumerRegion}', which would be the wrong region for a reference that names another one. This is an internal invariant failure — please report it with the resource type and property path.`, "DRIFT_SECRET_TOKEN_SCAN_MISMATCH");
|
|
9840
9872
|
out += leaf.slice(cursor, at);
|
|
9841
9873
|
const resolver = verdict.kind === "named-region" ? resolvers.forRegion(verdict.region) : verdict.kind === "recorded-region" ? resolvers.forRecordedRegion(verdict.region) : resolvers.primary;
|
|
9842
|
-
out += await
|
|
9874
|
+
out += await resolveDynamicReferences(resolver, token, ctx);
|
|
9843
9875
|
cursor = at + token.length;
|
|
9844
9876
|
}
|
|
9845
9877
|
return out + leaf.slice(cursor);
|
|
@@ -11673,7 +11705,7 @@ async function resolveSecretDerivedPrincipals(values, region, producerRegions, r
|
|
|
11673
11705
|
}
|
|
11674
11706
|
async function resolveEntry(entry, primary, verdictOf, context) {
|
|
11675
11707
|
const tokens = dynamicReferenceTokens(entry).map((t) => [t, verdictOf(t)]);
|
|
11676
|
-
if (!tokens.some(([, v]) => v.kind === "recorded-region")) return await
|
|
11708
|
+
if (!tokens.some(([, v]) => v.kind === "recorded-region")) return await resolveDynamicReferences(primary, entry, context);
|
|
11677
11709
|
let out = "";
|
|
11678
11710
|
let cursor = 0;
|
|
11679
11711
|
for (const [token, verdict] of tokens) {
|
|
@@ -11681,7 +11713,7 @@ async function resolveEntry(entry, primary, verdictOf, context) {
|
|
|
11681
11713
|
if (at < 0) throw new Error("A scanned dynamic reference is not in the entry it was scanned from");
|
|
11682
11714
|
out += entry.slice(cursor, at);
|
|
11683
11715
|
const resolver = verdict.kind === "recorded-region" ? primary.resolverForRecordedRegion(verdict.region) : primary;
|
|
11684
|
-
out += await
|
|
11716
|
+
out += await resolveDynamicReferences(resolver, token, context);
|
|
11685
11717
|
cursor = at + token.length;
|
|
11686
11718
|
}
|
|
11687
11719
|
return out + entry.slice(cursor);
|
|
@@ -12178,7 +12210,16 @@ async function destroyStackInRegion(stackName, state, ctx, stackScope) {
|
|
|
12178
12210
|
const graph = dagBuilder.buildGraph(template);
|
|
12179
12211
|
const executionLevels = dagBuilder.getExecutionLevels(graph);
|
|
12180
12212
|
logger.debug(`Dependency graph: ${executionLevels.length} level(s)`);
|
|
12181
|
-
const
|
|
12213
|
+
const reresolver = ctx.noEchoReresolver;
|
|
12214
|
+
const judgedBagOf = secretNamePrintingBags(state.resources, reresolver === void 0 ? noEchoValues : namingSecretsWithRecordedNoEcho(noEchoValues, (logicalId) => {
|
|
12215
|
+
try {
|
|
12216
|
+
return reresolver.recordedNoEchoValuesFor(logicalId, Object.hasOwn(state.resources, logicalId) ? state.resources[logicalId] : void 0);
|
|
12217
|
+
} catch (error) {
|
|
12218
|
+
logger.debug(safeMsg`Could not read ${logicalId}'s stored NoEcho values for its printing bag (${error instanceof Error ? error.name : typeof error}).`);
|
|
12219
|
+
return;
|
|
12220
|
+
}
|
|
12221
|
+
}));
|
|
12222
|
+
const printingBagOf = (logicalId) => withStackName(stackName, () => judgedBagOf(logicalId));
|
|
12182
12223
|
for (let levelIndex = executionLevels.length - 1; levelIndex >= 0; levelIndex--) {
|
|
12183
12224
|
if (lock.interrupted) {
|
|
12184
12225
|
logger.debug("Interrupted (draining) — not scheduling further deletion levels");
|
|
@@ -13189,7 +13230,7 @@ var PublicSsmProver = class {
|
|
|
13189
13230
|
skipDynamicReferences: true
|
|
13190
13231
|
};
|
|
13191
13232
|
try {
|
|
13192
|
-
await this.resolver
|
|
13233
|
+
await resolveDynamicReferences(this.resolver, token, context);
|
|
13193
13234
|
} catch (err) {
|
|
13194
13235
|
const name = err instanceof Error ? err.name : typeof err;
|
|
13195
13236
|
this.logger.debug(safeMsg`Could not prove an ssm dynamic reference public (${name}); a leaf embedding it ` + `keeps its {{resolve:...}} expression in observedProperties.`);
|
|
@@ -13368,7 +13409,7 @@ var AttributeFetcher = class {
|
|
|
13368
13409
|
} catch (err) {
|
|
13369
13410
|
return {
|
|
13370
13411
|
ok: false,
|
|
13371
|
-
reason: `no provider available for ${orphan.resourceType}: ${
|
|
13412
|
+
reason: `no provider available for ${orphan.resourceType}: ${describeAwsFailure(err).detail}`
|
|
13372
13413
|
};
|
|
13373
13414
|
}
|
|
13374
13415
|
if (!provider.getAttribute) return this.cacheFallback(orphanLogicalId, attribute, `provider for ${orphan.resourceType} does not implement getAttribute`);
|
|
@@ -14736,7 +14777,7 @@ const securityGroupRuleLookupRetryDelays = {};
|
|
|
14736
14777
|
const MAX_SG_RULE_THROTTLE_RETRIES = 4;
|
|
14737
14778
|
function isAuthorizationShapedError(err) {
|
|
14738
14779
|
const errName = err instanceof Error ? err.name : "";
|
|
14739
|
-
const message =
|
|
14780
|
+
const message = describeAwsFailure(err).detail;
|
|
14740
14781
|
return /AccessDenied|UnauthorizedOperation|AuthFailure|not authorized to perform/i.test(`${errName} ${message}`);
|
|
14741
14782
|
}
|
|
14742
14783
|
async function describeAllSecurityGroupRules(groupId, ec2Client) {
|
|
@@ -14764,7 +14805,7 @@ async function describeAllSecurityGroupRules(groupId, ec2Client) {
|
|
|
14764
14805
|
...securityGroupRuleLookupRetryDelays.sleep ? { sleep: securityGroupRuleLookupRetryDelays.sleep } : {}
|
|
14765
14806
|
});
|
|
14766
14807
|
} catch (err) {
|
|
14767
|
-
const detail =
|
|
14808
|
+
const detail = describeAwsFailure(err).detail;
|
|
14768
14809
|
return {
|
|
14769
14810
|
ok: false,
|
|
14770
14811
|
kind: isAuthorizationShapedError(err) ? "auth" : isThrottlingError(err) ? "throttled" : "failed",
|
|
@@ -15157,7 +15198,7 @@ async function exportCommand(stackArg, options) {
|
|
|
15157
15198
|
await handler(entry);
|
|
15158
15199
|
logger.info(` ${preDeletedLine(entry.physicalId)}`);
|
|
15159
15200
|
} catch (err) {
|
|
15160
|
-
const msg =
|
|
15201
|
+
const msg = describeAwsFailure(err).detail;
|
|
15161
15202
|
const orphan = orphanCommandFor(resolvedStackName, targetRegion, lockRecovery);
|
|
15162
15203
|
throw new Error(`Phase 1 (IMPORT) succeeded; pre-delete of ${plainOrNotShown(entry.logicalId)} (${plainOrNotShown(entry.resourceType)}, physicalId: ${recordValueOrNotShown(entry.physicalId)}) failed: ${displayAwsMessage(msg)}\n\nThe CloudFormation stack ${quotedOrNotShown(cfnStackName)} contains the phase-1 imports but the IMPORT-unsupported resources (${recreateBeforePhase2.length} total) still exist in AWS unmanaged. cdkd state is UNCHANGED. Re-running \`cdkd export\` does NOT work — the existing-stack check rejects it. To recover manually:\n 1. Fix the failure cause (typically IAM permissions for the underlying AWS API — iam:Delete{Role,User,Group}Policy for an inline policy).\n 2. Delete the remaining AWS-side IMPORT-unsupported resources by hand:\n` + preDeleteManualCommands(recreateBeforePhase2).map((line) => ` ${line}\n`).join("") + ` (one per entry in the pre-delete list logged above).
|
|
15163
15204
|
3. Run the phase-2 UPDATE manually with the full synth template:
|
|
@@ -15176,7 +15217,7 @@ async function exportCommand(stackArg, options) {
|
|
|
15176
15217
|
if (recreateBeforePhase2.length > 0) parts.push(`${recreateBeforePhase2.length} IMPORT-unsupported resource(s) re-CREATEd`);
|
|
15177
15218
|
logger.info(`✓ Phase 2: ${parts.join("; ")}.`);
|
|
15178
15219
|
} catch (err) {
|
|
15179
|
-
const msg =
|
|
15220
|
+
const msg = describeAwsFailure(err).detail;
|
|
15180
15221
|
const recreateNote = recreateBeforePhase2.length > 0 ? ` - cdkd deleted ${recreateBeforePhase2.length} AWS resource(s) before phase 2 (Stage etc.). They are gone in AWS but absent from the CFn stack. Running phase 2 UPDATE manually will CFn-CREATE them fresh.\n` : "";
|
|
15181
15222
|
const orphan = orphanCommandFor(resolvedStackName, targetRegion, lockRecovery);
|
|
15182
15223
|
throw new Error(`Phase 1 (IMPORT) succeeded; phase 2 (UPDATE) failed: ${displayAwsMessage(msg)}\n\nThe CloudFormation stack ${quotedOrNotShown(cfnStackName)} now contains the imported resources but is missing ${phase2Count} resource(s) (${phase2Creates.length} Custom Resource(s) + ${recreateBeforePhase2.length} IMPORT-unsupported). cdkd state is UNCHANGED so you can inspect what's in it, but DO NOT run \`cdkd deploy\` against this stack (the imported resources are now CFn-managed). To recover:\n` + recreateNote + ` 1. Fix the failure cause (typically an onCreate Lambda error).
|
|
@@ -15192,7 +15233,7 @@ async function exportCommand(stackArg, options) {
|
|
|
15192
15233
|
});
|
|
15193
15234
|
} finally {
|
|
15194
15235
|
if (!options.dryRun) await lockManager.releaseLock(resolvedStackName, targetRegion).catch((err) => {
|
|
15195
|
-
logger.warn(`Failed to release lock: ${
|
|
15236
|
+
logger.warn(`Failed to release lock: ${describeAwsFailure(err).detail}`);
|
|
15196
15237
|
});
|
|
15197
15238
|
}
|
|
15198
15239
|
} finally {
|
|
@@ -15263,7 +15304,7 @@ async function assertCfnStackAbsent(cfnClient, stackName) {
|
|
|
15263
15304
|
if (!stack) return;
|
|
15264
15305
|
throw new Error(`CloudFormation stack ${quotedOrNotShown(stackName)} already exists (status: ${stack.StackStatus ?? "unknown"}). cdkd export only creates new stacks via IMPORT — delete or rename the existing stack first, or pass --cfn-stack-name to choose a different name.`);
|
|
15265
15306
|
} catch (err) {
|
|
15266
|
-
const msg =
|
|
15307
|
+
const msg = describeAwsFailure(err).detail;
|
|
15267
15308
|
if (/does not exist/i.test(msg)) return;
|
|
15268
15309
|
throw err;
|
|
15269
15310
|
}
|
|
@@ -15815,7 +15856,7 @@ async function buildImportPlan(state, template, cfnClient, parentStackName, opti
|
|
|
15815
15856
|
blocked.push({
|
|
15816
15857
|
logicalId,
|
|
15817
15858
|
resourceType,
|
|
15818
|
-
reason: "could not resolve resource identifier: " + (err
|
|
15859
|
+
reason: "could not resolve resource identifier: " + describeAwsFailure(err).detail,
|
|
15819
15860
|
...err instanceof RepairableRefusal ? { repair: err.repair } : {}
|
|
15820
15861
|
});
|
|
15821
15862
|
continue;
|
|
@@ -16004,7 +16045,7 @@ async function resolveResourceIdentifier(resourceType, logicalId, physicalId, pr
|
|
|
16004
16045
|
try {
|
|
16005
16046
|
result = splitter(physicalId, properties);
|
|
16006
16047
|
} catch (err) {
|
|
16007
|
-
throw new Error(`composite-id splitter for ${resourceType} failed: ` + (err
|
|
16048
|
+
throw new Error(`composite-id splitter for ${resourceType} failed: ` + describeAwsFailure(err).detail);
|
|
16008
16049
|
}
|
|
16009
16050
|
for (const f of entry.fields) if (!(f in result.resourceIdentifier)) throw new Error(`composite-id splitter for ${resourceType} did not produce field '${f}' (produced: ${Object.keys(result.resourceIdentifier).join(", ")})`);
|
|
16010
16051
|
return result;
|
|
@@ -16043,7 +16084,7 @@ async function fetchPrimaryIdentifier(resourceType, cfnClient) {
|
|
|
16043
16084
|
}
|
|
16044
16085
|
}
|
|
16045
16086
|
} catch (err) {
|
|
16046
|
-
const msg =
|
|
16087
|
+
const msg = describeAwsFailure(err).detail;
|
|
16047
16088
|
getLogger().debug(`DescribeType failed for ${quotedOrNotShown(resourceType)}: ${safeDetail(msg)} — using fallback`);
|
|
16048
16089
|
}
|
|
16049
16090
|
const fallback = PRIMARY_IDENTIFIER_FALLBACK[resourceType];
|
|
@@ -16455,7 +16496,7 @@ async function runTemplateUploadCleanup(cleanup, bucket) {
|
|
|
16455
16496
|
try {
|
|
16456
16497
|
await cleanup();
|
|
16457
16498
|
} catch (cleanupErr) {
|
|
16458
|
-
const msg =
|
|
16499
|
+
const msg = describeAwsFailure(cleanupErr).detail;
|
|
16459
16500
|
logger.warn(`Failed to delete temporary template upload from ${quotedOrNotShown(bucket)}. Clean up manually under prefix 'cdkd-migrate-tmp/'. Cause: ${safeDetail(msg)}`);
|
|
16460
16501
|
}
|
|
16461
16502
|
}
|
|
@@ -16488,7 +16529,7 @@ async function submitImportChangeSet(cfnClient, stackName, template, resourcesTo
|
|
|
16488
16529
|
]
|
|
16489
16530
|
}));
|
|
16490
16531
|
} catch (err) {
|
|
16491
|
-
const msg =
|
|
16532
|
+
const msg = describeAwsFailure(err).detail;
|
|
16492
16533
|
throw new Error(`Failed to create IMPORT changeset: ${displayAwsMessage(msg)}`);
|
|
16493
16534
|
}
|
|
16494
16535
|
try {
|
|
@@ -16829,7 +16870,7 @@ async function runPerStackImportLoop(args) {
|
|
|
16829
16870
|
try {
|
|
16830
16871
|
resolved = await resolveAll();
|
|
16831
16872
|
} catch (err) {
|
|
16832
|
-
const message =
|
|
16873
|
+
const message = describeAwsFailure(err).detail;
|
|
16833
16874
|
const plannable = message.startsWith("buildResolvedParametersPerStack:") || err instanceof SsmChildParameterRefusalError;
|
|
16834
16875
|
if (!options.dryRun || !plannable) throw err;
|
|
16835
16876
|
logger.warn(safeMsg`${message} --dry-run plans without the nested stacks' Parameter values; a real run ` + `refuses here.`);
|
|
@@ -16964,7 +17005,7 @@ async function runPerStackImportLoop(args) {
|
|
|
16964
17005
|
try {
|
|
16965
17006
|
return await step();
|
|
16966
17007
|
} catch (err) {
|
|
16967
|
-
throw new Error(`${what} failed for cdkd stack ${quotedOrNotShown(plan.cdkdName)} (CFn name ${quotedOrNotShown(plan.cfnName)}), after its Phase 1A IMPORT succeeded. Cause: ${displayAwsMessage(
|
|
17008
|
+
throw new Error(`${what} failed for cdkd stack ${quotedOrNotShown(plan.cdkdName)} (CFn name ${quotedOrNotShown(plan.cfnName)}), after its Phase 1A IMPORT succeeded. Cause: ${displayAwsMessage(describeAwsFailure(err).detail)}\n` + nestedResumeTail(i, stage), { cause: err instanceof Error ? err : void 0 });
|
|
16968
17009
|
}
|
|
16969
17010
|
};
|
|
16970
17011
|
const phase1ATemplate = filterTemplateForImport(plan.template, plan.phase1Imports);
|
|
@@ -16978,7 +17019,7 @@ async function runPerStackImportLoop(args) {
|
|
|
16978
17019
|
try {
|
|
16979
17020
|
await submitImportChangeSet(deps.cfnClient, plan.cfnName, phase1ATemplate, phase1AResources, stackParameters, plan.templateFormat, deps.uploadOpts);
|
|
16980
17021
|
} catch (err) {
|
|
16981
|
-
throw new Error(`Phase 1A IMPORT changeset failed for cdkd stack ${quotedOrNotShown(plan.cdkdName)} (CFn name ${quotedOrNotShown(plan.cfnName)}). Cause: ${displayAwsMessage(
|
|
17022
|
+
throw new Error(`Phase 1A IMPORT changeset failed for cdkd stack ${quotedOrNotShown(plan.cdkdName)} (CFn name ${quotedOrNotShown(plan.cfnName)}). Cause: ${displayAwsMessage(describeAwsFailure(err).detail)}\n` + nestedResumeTail(i, "phase1"), { cause: err instanceof Error ? err : void 0 });
|
|
16982
17023
|
}
|
|
16983
17024
|
const cfnArn = await afterImport("Reading its CloudFormation stack", "imported", async () => {
|
|
16984
17025
|
const arn = (await deps.cfnClient.send(new DescribeStacksCommand({ StackName: plan.cfnName }))).Stacks?.[0]?.StackId;
|
|
@@ -17031,7 +17072,7 @@ async function runPerStackImportLoop(args) {
|
|
|
17031
17072
|
await submitImportChangeSet(deps.cfnClient, plan.cfnName, phase1BTemplate, phase1BResources, stackParameters, plan.templateFormat, deps.uploadOpts);
|
|
17032
17073
|
} catch (err) {
|
|
17033
17074
|
const importedSummary = importedStacks.length > 0 ? importedStacks.map((s) => `${quotedOrNotShown(s.cdkdStackName)} → ${quotedOrNotShown(s.cfnStackName)}`).join(", ") : "(none)";
|
|
17034
|
-
throw new Error(`Phase 1B (nested-child adoption) IMPORT changeset failed for parent ${quotedOrNotShown(plan.cdkdName)} (CFn name ${quotedOrNotShown(plan.cfnName)}). The parent CFn stack exists with its ${plan.phase1Imports.length} leaf resource(s); ${plan.nestedStackRows.length} nested-child adoption(s) did NOT complete. Stacks IMPORTed so far (each a CFn stack): ${importedSummary}. cdkd state for every stack in the tree is preserved. To recover, fix the underlying cause (typically a template-match validation error per AWS-docs "Nested stack import validation"), then re-attempt the parent-side nested adoption by hand via the AWS console or CLI, per the AWS docs "Nest an existing stack" procedure. Do NOT run cdkd destroy on the tree: that would tear down the live AWS resources. Cause: ${displayAwsMessage(
|
|
17075
|
+
throw new Error(`Phase 1B (nested-child adoption) IMPORT changeset failed for parent ${quotedOrNotShown(plan.cdkdName)} (CFn name ${quotedOrNotShown(plan.cfnName)}). The parent CFn stack exists with its ${plan.phase1Imports.length} leaf resource(s); ${plan.nestedStackRows.length} nested-child adoption(s) did NOT complete. Stacks IMPORTed so far (each a CFn stack): ${importedSummary}. cdkd state for every stack in the tree is preserved. To recover, fix the underlying cause (typically a template-match validation error per AWS-docs "Nested stack import validation"), then re-attempt the parent-side nested adoption by hand via the AWS console or CLI, per the AWS docs "Nest an existing stack" procedure. Do NOT run cdkd destroy on the tree: that would tear down the live AWS resources. Cause: ${displayAwsMessage(describeAwsFailure(err).detail)}\n` + nestedResumeTail(i, "imported"), { cause: err instanceof Error ? err : void 0 });
|
|
17035
17076
|
}
|
|
17036
17077
|
logger.info(` ✓ Phase 1B: parent ${quotedOrNotShown(plan.cfnName)} adopted ${plan.nestedStackRows.length} nested child(ren) via UPDATE-IMPORT.`);
|
|
17037
17078
|
if (plan.cdkdName !== rootStackName) {
|
|
@@ -17046,7 +17087,7 @@ async function runPerStackImportLoop(args) {
|
|
|
17046
17087
|
try {
|
|
17047
17088
|
await handler(entry);
|
|
17048
17089
|
} catch (err) {
|
|
17049
|
-
const msg =
|
|
17090
|
+
const msg = describeAwsFailure(err).detail;
|
|
17050
17091
|
const importedSummary = importedStacks.map((s) => `${quotedOrNotShown(s.cdkdStackName)} → ${quotedOrNotShown(s.cfnStackName)}`).join(", ");
|
|
17051
17092
|
throw new Error(`Phase 1 (IMPORT) succeeded for cdkd stack ${quotedOrNotShown(plan.cdkdName)} (CFn name ${quotedOrNotShown(plan.cfnName)}); pre-delete of ${plainOrNotShown(entry.logicalId)} (${plainOrNotShown(entry.resourceType)}, physicalId: ${recordValueOrNotShown(entry.physicalId)}) failed: ${displayAwsMessage(msg)}\n\nStacks IMPORTed so far (each CFn-managed): ${importedSummary}. cdkd state for every stack in the tree is preserved. This stack's IMPORT-unsupported resources may still exist in AWS unmanaged. To recover: fix the failure cause, delete the remaining pre-delete resources of this stack by hand:\n` + preDeleteManualCommands(plan.recreateBeforePhase2).map((line) => ` ${line}\n`).join("") + `then run the phase-2 UPDATE for ${quotedOrNotShown(plan.cfnName)} by hand with its full synth template. ` + nestedResumeTail(i, "phase2"), { cause: err instanceof Error ? err : void 0 });
|
|
17052
17093
|
}
|
|
@@ -17062,7 +17103,7 @@ async function runPerStackImportLoop(args) {
|
|
|
17062
17103
|
try {
|
|
17063
17104
|
await executeUpdateChangeSet(deps.cfnClient, plan.cfnName, phase2Template, stackParameters, plan.templateFormat, deps.uploadOpts);
|
|
17064
17105
|
} catch (err) {
|
|
17065
|
-
throw new Error(`Phase 2 (UPDATE) failed for cdkd stack ${quotedOrNotShown(plan.cdkdName)} (CFn name ${quotedOrNotShown(plan.cfnName)}): ${displayAwsMessage(
|
|
17106
|
+
throw new Error(`Phase 2 (UPDATE) failed for cdkd stack ${quotedOrNotShown(plan.cdkdName)} (CFn name ${quotedOrNotShown(plan.cfnName)}): ${displayAwsMessage(describeAwsFailure(err).detail)}. Its phase-1 IMPORT succeeded and cdkd state is preserved; fix the cause and run the phase-2 UPDATE by hand with its full synth template. ` + nestedResumeTail(i, "phase2"), { cause: err instanceof Error ? err : void 0 });
|
|
17066
17107
|
}
|
|
17067
17108
|
logger.info(` ✓ Phase 2: stack ${quotedOrNotShown(plan.cfnName)} updated (${plan.phase2Creates.length} non-importable CREATE, ${plan.recreateBeforePhase2.length} re-CREATE).`);
|
|
17068
17109
|
}
|
|
@@ -17075,7 +17116,7 @@ async function runPerStackImportLoop(args) {
|
|
|
17075
17116
|
stateDeletionFailures.push({
|
|
17076
17117
|
stackName: node.stackName,
|
|
17077
17118
|
region: node.region,
|
|
17078
|
-
reason:
|
|
17119
|
+
reason: describeAwsFailure(err).detail
|
|
17079
17120
|
});
|
|
17080
17121
|
const orphan = orphanCommandFor(node.stackName, node.region, args.lockRecovery);
|
|
17081
17122
|
logger.warn(`Failed to delete cdkd state for ${quotedOrNotShown(node.stackName)} (${quotedRegion(node.region)}): ${safeDetail(err)}. The stack IS CFn-managed; clean up its state record.${orphan.note}\nClean up with: ${orphan.command}`);
|
|
@@ -17155,7 +17196,7 @@ async function executeUpdateChangeSet(cfnClient, stackName, template, parameters
|
|
|
17155
17196
|
]
|
|
17156
17197
|
}));
|
|
17157
17198
|
} catch (err) {
|
|
17158
|
-
const msg =
|
|
17199
|
+
const msg = describeAwsFailure(err).detail;
|
|
17159
17200
|
throw new Error(`Failed to create UPDATE changeset: ${displayAwsMessage(msg)}`);
|
|
17160
17201
|
}
|
|
17161
17202
|
try {
|
|
@@ -21442,7 +21483,7 @@ function parseResourceOverrides(flags, mappingFile, mappingInline) {
|
|
|
21442
21483
|
try {
|
|
21443
21484
|
raw = readFileSync(mappingFile, "utf-8");
|
|
21444
21485
|
} catch (err) {
|
|
21445
|
-
throw new Error(`Failed to read --resource-mapping file '${mappingFile}': ` + (err
|
|
21486
|
+
throw new Error(`Failed to read --resource-mapping file '${mappingFile}': ` + describeAwsFailure(err).detail);
|
|
21446
21487
|
}
|
|
21447
21488
|
const parsed = parseMappingJson(raw, `--resource-mapping file '${mappingFile}'`);
|
|
21448
21489
|
for (const [key, value] of Object.entries(parsed)) map.set(key, value);
|
|
@@ -21463,7 +21504,7 @@ function parseMappingJson(raw, source) {
|
|
|
21463
21504
|
try {
|
|
21464
21505
|
parsed = JSON.parse(raw);
|
|
21465
21506
|
} catch (err) {
|
|
21466
|
-
throw new Error(`Failed to parse ${source} as JSON: ` + (err
|
|
21507
|
+
throw new Error(`Failed to parse ${source} as JSON: ` + describeAwsFailure(err).detail);
|
|
21467
21508
|
}
|
|
21468
21509
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error(`${source} must be a JSON object {logicalId: physicalId}`);
|
|
21469
21510
|
const out = {};
|
|
@@ -21482,7 +21523,7 @@ function writeRecordedMapping(filePath, rows) {
|
|
|
21482
21523
|
writeFileSync(filePath, body, "utf-8");
|
|
21483
21524
|
logger.info(`Wrote resolved mapping to ${filePath} (${Object.keys(map).length} entry(ies))`);
|
|
21484
21525
|
} catch (err) {
|
|
21485
|
-
const msg =
|
|
21526
|
+
const msg = describeAwsFailure(err).detail;
|
|
21486
21527
|
logger.error(`Failed to write --record-resource-mapping file '${filePath}': ${msg}. Continuing — the import already resolved every physical id in memory.`);
|
|
21487
21528
|
}
|
|
21488
21529
|
}
|
|
@@ -22113,12 +22154,12 @@ function readNestedChildTemplate(templatePath, childLogicalId) {
|
|
|
22113
22154
|
try {
|
|
22114
22155
|
raw = readFileSync(templatePath, "utf-8");
|
|
22115
22156
|
} catch (err) {
|
|
22116
|
-
throw new Error(`Failed to read nested-stack template for '${childLogicalId}' at ${templatePath}: ${
|
|
22157
|
+
throw new Error(`Failed to read nested-stack template for '${childLogicalId}' at ${templatePath}: ${describeAwsFailure(err).detail}`);
|
|
22117
22158
|
}
|
|
22118
22159
|
try {
|
|
22119
22160
|
return JSON.parse(raw);
|
|
22120
22161
|
} catch (err) {
|
|
22121
|
-
throw new Error(`Failed to parse nested-stack template for '${childLogicalId}' at ${templatePath}: ${
|
|
22162
|
+
throw new Error(`Failed to parse nested-stack template for '${childLogicalId}' at ${templatePath}: ${describeAwsFailure(err).detail}`);
|
|
22122
22163
|
}
|
|
22123
22164
|
}
|
|
22124
22165
|
function indexGrandchildTemplatePaths(childTemplate, childTemplatePath) {
|
|
@@ -22163,8 +22204,13 @@ function hasSdkMetadata(error) {
|
|
|
22163
22204
|
//#region src/local/local-role-arn.ts
|
|
22164
22205
|
async function applyRoleArnForLocal(opts) {
|
|
22165
22206
|
await applyRoleArnIfSet(opts);
|
|
22166
|
-
|
|
22167
|
-
|
|
22207
|
+
const role = getAssumedRoleCredentials();
|
|
22208
|
+
if (role === void 0) return;
|
|
22209
|
+
recordAssumedRole(getPreAssumeEnvCredentials(), {
|
|
22210
|
+
accessKeyId: role.accessKeyId,
|
|
22211
|
+
secretAccessKey: role.secretAccessKey,
|
|
22212
|
+
sessionToken: role.sessionToken
|
|
22213
|
+
});
|
|
22168
22214
|
}
|
|
22169
22215
|
|
|
22170
22216
|
//#endregion
|
|
@@ -25105,7 +25151,7 @@ async function localStartApiCommand(target, options) {
|
|
|
25105
25151
|
logger.info(`Pre-warming ${groupSpecs.size} container(s) for ${group.displayName}...`);
|
|
25106
25152
|
const handles = await Promise.allSettled([...groupSpecs.keys()].map((id) => groupPool.acquire(id)));
|
|
25107
25153
|
for (const result of handles) if (result.status === "fulfilled") groupPool.release(result.value);
|
|
25108
|
-
else logger.warn(`Pre-warm failed for one Lambda in ${group.displayName} (cold start cost will apply on first request): ${
|
|
25154
|
+
else logger.warn(`Pre-warm failed for one Lambda in ${group.displayName} (cold start cost will apply on first request): ${describeAwsFailure(result.reason).detail}`);
|
|
25109
25155
|
}
|
|
25110
25156
|
const defaultRegion = canonicalizeRegion(options.region ?? process.env["AWS_REGION"] ?? process.env["AWS_DEFAULT_REGION"] ?? void 0);
|
|
25111
25157
|
const started = await startApiServer({
|
|
@@ -25255,34 +25301,34 @@ async function localStartApiCommand(target, options) {
|
|
|
25255
25301
|
if (watcher) try {
|
|
25256
25302
|
await watcher.close();
|
|
25257
25303
|
} catch (err) {
|
|
25258
|
-
logger.warn(`watcher.close() failed: ${
|
|
25304
|
+
logger.warn(`watcher.close() failed: ${describeAwsFailure(err).detail}`);
|
|
25259
25305
|
}
|
|
25260
25306
|
await Promise.allSettled(wsServers.map(async (ws) => {
|
|
25261
25307
|
try {
|
|
25262
25308
|
await ws.attached.close();
|
|
25263
25309
|
} catch (err) {
|
|
25264
|
-
logger.warn(`WebSocket close() failed for ${ws.api.apiLogicalId}: ${
|
|
25310
|
+
logger.warn(`WebSocket close() failed for ${ws.api.apiLogicalId}: ${describeAwsFailure(err).detail}`);
|
|
25265
25311
|
}
|
|
25266
25312
|
}));
|
|
25267
25313
|
await Promise.allSettled(servers.map(async ({ server, group }) => {
|
|
25268
25314
|
try {
|
|
25269
25315
|
await server.close();
|
|
25270
25316
|
} catch (err) {
|
|
25271
|
-
logger.warn(`server.close() failed for ${group.displayName}: ${
|
|
25317
|
+
logger.warn(`server.close() failed for ${group.displayName}: ${describeAwsFailure(err).detail}`);
|
|
25272
25318
|
}
|
|
25273
25319
|
}));
|
|
25274
25320
|
await Promise.allSettled(wsServers.map(async (ws) => {
|
|
25275
25321
|
try {
|
|
25276
25322
|
await ws.server.close();
|
|
25277
25323
|
} catch (err) {
|
|
25278
|
-
logger.warn(`WebSocket server.close() failed for ${ws.api.apiLogicalId}: ${
|
|
25324
|
+
logger.warn(`WebSocket server.close() failed for ${ws.api.apiLogicalId}: ${describeAwsFailure(err).detail}`);
|
|
25279
25325
|
}
|
|
25280
25326
|
}));
|
|
25281
25327
|
await Promise.allSettled(servers.map(async ({ server, group }) => {
|
|
25282
25328
|
try {
|
|
25283
25329
|
await server.getServerState().pool.dispose();
|
|
25284
25330
|
} catch (err) {
|
|
25285
|
-
logger.warn(`pool.dispose() failed for ${group.displayName}: ${
|
|
25331
|
+
logger.warn(`pool.dispose() failed for ${group.displayName}: ${describeAwsFailure(err).detail}`);
|
|
25286
25332
|
}
|
|
25287
25333
|
}));
|
|
25288
25334
|
if (retiredPoolDisposals.size > 0) {
|
|
@@ -25293,7 +25339,7 @@ async function localStartApiCommand(target, options) {
|
|
|
25293
25339
|
try {
|
|
25294
25340
|
await ws.server.getServerState().pool.dispose();
|
|
25295
25341
|
} catch (err) {
|
|
25296
|
-
logger.warn(`WebSocket pool.dispose() failed for ${ws.api.apiLogicalId}: ${
|
|
25342
|
+
logger.warn(`WebSocket pool.dispose() failed for ${ws.api.apiLogicalId}: ${describeAwsFailure(err).detail}`);
|
|
25297
25343
|
}
|
|
25298
25344
|
}));
|
|
25299
25345
|
for (const dir of inlineTmpDirs) try {
|
|
@@ -25302,7 +25348,7 @@ async function localStartApiCommand(target, options) {
|
|
|
25302
25348
|
force: true
|
|
25303
25349
|
});
|
|
25304
25350
|
} catch (err) {
|
|
25305
|
-
logger.warn(`Failed to remove inline-code tmpdir ${dir}: ${
|
|
25351
|
+
logger.warn(`Failed to remove inline-code tmpdir ${dir}: ${describeAwsFailure(err).detail}`);
|
|
25306
25352
|
}
|
|
25307
25353
|
for (const dir of layerTmpDirs) try {
|
|
25308
25354
|
rmSync(dir, {
|
|
@@ -25310,12 +25356,12 @@ async function localStartApiCommand(target, options) {
|
|
|
25310
25356
|
force: true
|
|
25311
25357
|
});
|
|
25312
25358
|
} catch (err) {
|
|
25313
|
-
logger.warn(`Failed to remove merged-layers tmpdir ${dir}: ${
|
|
25359
|
+
logger.warn(`Failed to remove merged-layers tmpdir ${dir}: ${describeAwsFailure(err).detail}`);
|
|
25314
25360
|
}
|
|
25315
25361
|
if (profileCredsFile) try {
|
|
25316
25362
|
await profileCredsFile.dispose();
|
|
25317
25363
|
} catch (err) {
|
|
25318
|
-
logger.warn(`Failed to remove profile credentials tmpdir ${profileCredsFile.hostPath}: ${
|
|
25364
|
+
logger.warn(`Failed to remove profile credentials tmpdir ${profileCredsFile.hostPath}: ${describeAwsFailure(err).detail}`);
|
|
25319
25365
|
}
|
|
25320
25366
|
});
|
|
25321
25367
|
const shutdown = async (signal, exitCode) => {
|
|
@@ -25819,13 +25865,13 @@ function readEnvOverridesFile$3(filePath) {
|
|
|
25819
25865
|
try {
|
|
25820
25866
|
raw = readFileSync(filePath, "utf-8");
|
|
25821
25867
|
} catch (err) {
|
|
25822
|
-
throw new Error(`Failed to read --env-vars file '${filePath}': ${
|
|
25868
|
+
throw new Error(`Failed to read --env-vars file '${filePath}': ${describeAwsFailure(err).detail}`);
|
|
25823
25869
|
}
|
|
25824
25870
|
let parsed;
|
|
25825
25871
|
try {
|
|
25826
25872
|
parsed = JSON.parse(raw);
|
|
25827
25873
|
} catch (err) {
|
|
25828
|
-
throw new Error(`Failed to parse --env-vars file '${filePath}' as JSON: ${
|
|
25874
|
+
throw new Error(`Failed to parse --env-vars file '${filePath}' as JSON: ${describeAwsFailure(err).detail}`);
|
|
25829
25875
|
}
|
|
25830
25876
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error(`--env-vars file '${filePath}' must contain a JSON object at the top level.`);
|
|
25831
25877
|
return parsed;
|
|
@@ -25987,7 +26033,7 @@ async function reloadAllServers(args) {
|
|
|
25987
26033
|
const previousState = booted.server.setServerState(newState);
|
|
25988
26034
|
booted.group = group;
|
|
25989
26035
|
const disposal = previousState.pool.dispose().catch((err) => {
|
|
25990
|
-
logger.debug(`Previous pool dispose() failed for ${group.displayName}: ${
|
|
26036
|
+
logger.debug(`Previous pool dispose() failed for ${group.displayName}: ${describeAwsFailure(err).detail}`);
|
|
25991
26037
|
});
|
|
25992
26038
|
retiredPoolDisposals?.add(disposal);
|
|
25993
26039
|
disposal.then(() => retiredPoolDisposals?.delete(disposal));
|
|
@@ -26066,12 +26112,7 @@ async function resolvePseudoParametersForStartApi(stateRegion, options) {
|
|
|
26066
26112
|
try {
|
|
26067
26113
|
const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
|
|
26068
26114
|
let sts;
|
|
26069
|
-
if (options.fromState) sts = new STSClient({
|
|
26070
|
-
...awsClientDefaults({ profile: options.profile }),
|
|
26071
|
-
...region && { region },
|
|
26072
|
-
...options.profile && { profile: options.profile }
|
|
26073
|
-
});
|
|
26074
|
-
else sts = new STSClient({
|
|
26115
|
+
if (!options.fromState) sts = new STSClient({
|
|
26075
26116
|
...awsClientDefaults({
|
|
26076
26117
|
profile: options.profile,
|
|
26077
26118
|
ignoreAssumedRole: true
|
|
@@ -26079,6 +26120,11 @@ async function resolvePseudoParametersForStartApi(stateRegion, options) {
|
|
|
26079
26120
|
...region && { region },
|
|
26080
26121
|
...options.profile && { profile: options.profile }
|
|
26081
26122
|
});
|
|
26123
|
+
else sts = new STSClient({
|
|
26124
|
+
...awsClientDefaults({ profile: options.profile }),
|
|
26125
|
+
...region && { region },
|
|
26126
|
+
...options.profile && { profile: options.profile }
|
|
26127
|
+
});
|
|
26082
26128
|
try {
|
|
26083
26129
|
accountId = (await sts.send(new GetCallerIdentityCommand({}))).Account;
|
|
26084
26130
|
} finally {
|
|
@@ -27205,17 +27251,15 @@ async function localRunTaskCommand(target, options) {
|
|
|
27205
27251
|
if (sigintHandler) process.off("SIGINT", sigintHandler);
|
|
27206
27252
|
}
|
|
27207
27253
|
}
|
|
27254
|
+
function readFromCfnStack(source) {
|
|
27255
|
+
return source.fromState !== true && source.fromCfnStack !== void 0 && source.fromCfnStack !== false;
|
|
27256
|
+
}
|
|
27208
27257
|
async function resolvePlaceholderAccount(arn, source) {
|
|
27209
|
-
const { region, profile
|
|
27258
|
+
const { region, profile } = source;
|
|
27210
27259
|
if (!arn.includes("${AWS::AccountId}")) return arn;
|
|
27211
27260
|
const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
|
|
27212
27261
|
let sts;
|
|
27213
|
-
if (
|
|
27214
|
-
...awsClientDefaults({ profile }),
|
|
27215
|
-
...region && { region },
|
|
27216
|
-
...profile && { profile }
|
|
27217
|
-
});
|
|
27218
|
-
else sts = new STSClient({
|
|
27262
|
+
if (readFromCfnStack(source)) sts = new STSClient({
|
|
27219
27263
|
...awsClientDefaults({
|
|
27220
27264
|
profile,
|
|
27221
27265
|
ignoreAssumedRole: true
|
|
@@ -27223,6 +27267,11 @@ async function resolvePlaceholderAccount(arn, source) {
|
|
|
27223
27267
|
...region && { region },
|
|
27224
27268
|
...profile && { profile }
|
|
27225
27269
|
});
|
|
27270
|
+
else sts = new STSClient({
|
|
27271
|
+
...awsClientDefaults({ profile }),
|
|
27272
|
+
...region && { region },
|
|
27273
|
+
...profile && { profile }
|
|
27274
|
+
});
|
|
27226
27275
|
try {
|
|
27227
27276
|
const account = (await sts.send(new GetCallerIdentityCommand({}))).Account;
|
|
27228
27277
|
if (!account) throw new CdkdError(`--assume-task-role: GetCallerIdentity returned no Account; cannot resolve placeholder ARN ${plainIdentOr(arn, VALUE_NOT_SHOWN, { maxCodePoints: 613 })}. Pass the ARN explicitly: --assume-task-role '<arn>'`, "LOCAL_RUN_TASK_PLACEHOLDER_NO_ACCOUNT");
|
|
@@ -27282,7 +27331,8 @@ async function buildEcsImageResolutionContext$1(candidate, stateProvider, option
|
|
|
27282
27331
|
accountId = await resolveStackAccountId$1({
|
|
27283
27332
|
region,
|
|
27284
27333
|
profile: options.profile,
|
|
27285
|
-
fromState: options.fromState
|
|
27334
|
+
fromState: options.fromState,
|
|
27335
|
+
fromCfnStack: options.fromCfnStack
|
|
27286
27336
|
});
|
|
27287
27337
|
} catch (err) {
|
|
27288
27338
|
logger.warn(`Resolver needs \${AWS::AccountId} but STS GetCallerIdentity failed: ${describeLocalAwsFailureForWarn(err, "STS GetCallerIdentity")}. Substitution will be skipped; affected env / secret entries will be dropped with per-key warnings.`);
|
|
@@ -27336,15 +27386,10 @@ function pickCandidateStack(parsed, target, stacks) {
|
|
|
27336
27386
|
if (matched.length === 1) return matched[0];
|
|
27337
27387
|
}
|
|
27338
27388
|
async function resolveStackAccountId$1(source) {
|
|
27339
|
-
const { region, profile
|
|
27389
|
+
const { region, profile } = source;
|
|
27340
27390
|
const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
|
|
27341
27391
|
let sts;
|
|
27342
|
-
if (
|
|
27343
|
-
...awsClientDefaults({ profile }),
|
|
27344
|
-
...region && { region },
|
|
27345
|
-
...profile && { profile }
|
|
27346
|
-
});
|
|
27347
|
-
else sts = new STSClient({
|
|
27392
|
+
if (readFromCfnStack(source)) sts = new STSClient({
|
|
27348
27393
|
...awsClientDefaults({
|
|
27349
27394
|
profile,
|
|
27350
27395
|
ignoreAssumedRole: true
|
|
@@ -27352,6 +27397,11 @@ async function resolveStackAccountId$1(source) {
|
|
|
27352
27397
|
...region && { region },
|
|
27353
27398
|
...profile && { profile }
|
|
27354
27399
|
});
|
|
27400
|
+
else sts = new STSClient({
|
|
27401
|
+
...awsClientDefaults({ profile }),
|
|
27402
|
+
...region && { region },
|
|
27403
|
+
...profile && { profile }
|
|
27404
|
+
});
|
|
27355
27405
|
try {
|
|
27356
27406
|
return (await sts.send(new GetCallerIdentityCommand({}))).Account;
|
|
27357
27407
|
} finally {
|
|
@@ -28382,7 +28432,7 @@ async function buildAgentCoreImageContext(candidate, stateProvider, options) {
|
|
|
28382
28432
|
const region = canonicalizeRegion(options.region ?? process.env["AWS_REGION"] ?? process.env["AWS_DEFAULT_REGION"] ?? candidate.region);
|
|
28383
28433
|
let accountId;
|
|
28384
28434
|
try {
|
|
28385
|
-
accountId = await resolveStackAccountId(region, options.profile, options.fromState);
|
|
28435
|
+
accountId = await resolveStackAccountId(region, options.profile, options.fromState, options.fromCfnStack);
|
|
28386
28436
|
} catch (err) {
|
|
28387
28437
|
logger.warn(safeMsg`${stateProvider.label}: STS GetCallerIdentity failed: ${describeLocalAwsFailureForWarn(err, "STS GetCallerIdentity")}. ` + "A same-stack ECR image URI referencing ${AWS::AccountId} may not resolve.");
|
|
28388
28438
|
}
|
|
@@ -28403,15 +28453,10 @@ async function buildAgentCoreImageContext(candidate, stateProvider, options) {
|
|
|
28403
28453
|
loaded: loaded ?? void 0
|
|
28404
28454
|
};
|
|
28405
28455
|
}
|
|
28406
|
-
async function resolveStackAccountId(region, profile, fromState) {
|
|
28456
|
+
async function resolveStackAccountId(region, profile, fromState, fromCfnStack) {
|
|
28407
28457
|
const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
|
|
28408
28458
|
let sts;
|
|
28409
|
-
if (fromState) sts = new STSClient({
|
|
28410
|
-
...awsClientDefaults({ profile }),
|
|
28411
|
-
...region && { region },
|
|
28412
|
-
...profile && { profile }
|
|
28413
|
-
});
|
|
28414
|
-
else sts = new STSClient({
|
|
28459
|
+
if (!fromState && fromCfnStack !== void 0 && fromCfnStack !== false) sts = new STSClient({
|
|
28415
28460
|
...awsClientDefaults({
|
|
28416
28461
|
profile,
|
|
28417
28462
|
ignoreAssumedRole: true
|
|
@@ -28419,6 +28464,11 @@ async function resolveStackAccountId(region, profile, fromState) {
|
|
|
28419
28464
|
...region && { region },
|
|
28420
28465
|
...profile && { profile }
|
|
28421
28466
|
});
|
|
28467
|
+
else sts = new STSClient({
|
|
28468
|
+
...awsClientDefaults({ profile }),
|
|
28469
|
+
...region && { region },
|
|
28470
|
+
...profile && { profile }
|
|
28471
|
+
});
|
|
28422
28472
|
try {
|
|
28423
28473
|
return (await sts.send(new GetCallerIdentityCommand({}))).Account;
|
|
28424
28474
|
} finally {
|
|
@@ -29141,12 +29191,7 @@ async function resolvePseudoParametersForInvoke(stackRegion, options) {
|
|
|
29141
29191
|
try {
|
|
29142
29192
|
const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
|
|
29143
29193
|
let sts;
|
|
29144
|
-
if (options.fromState) sts = new STSClient({
|
|
29145
|
-
...awsClientDefaults({ profile: options.profile }),
|
|
29146
|
-
...region && { region },
|
|
29147
|
-
...options.profile && { profile: options.profile }
|
|
29148
|
-
});
|
|
29149
|
-
else sts = new STSClient({
|
|
29194
|
+
if (!options.fromState) sts = new STSClient({
|
|
29150
29195
|
...awsClientDefaults({
|
|
29151
29196
|
profile: options.profile,
|
|
29152
29197
|
ignoreAssumedRole: true
|
|
@@ -29154,6 +29199,11 @@ async function resolvePseudoParametersForInvoke(stackRegion, options) {
|
|
|
29154
29199
|
...region && { region },
|
|
29155
29200
|
...options.profile && { profile: options.profile }
|
|
29156
29201
|
});
|
|
29202
|
+
else sts = new STSClient({
|
|
29203
|
+
...awsClientDefaults({ profile: options.profile }),
|
|
29204
|
+
...region && { region },
|
|
29205
|
+
...options.profile && { profile: options.profile }
|
|
29206
|
+
});
|
|
29157
29207
|
try {
|
|
29158
29208
|
accountId = (await sts.send(new GetCallerIdentityCommand({}))).Account;
|
|
29159
29209
|
} finally {
|
|
@@ -29451,4 +29501,4 @@ function collectVerbFlags(program) {
|
|
|
29451
29501
|
|
|
29452
29502
|
//#endregion
|
|
29453
29503
|
export { resolveSecretDerivedPrincipals as a, buildProgram, isResolvableSecretPrincipalList as i, runDestroyForStack as n, canonicalizeIpProtocolValue as o, holdsUnprovenSecretPrincipalToken as r, resolvedResourceTimeoutMs as s, canonicalizeIpv4Cidr as t };
|
|
29454
|
-
//# sourceMappingURL=program-
|
|
29504
|
+
//# sourceMappingURL=program-DmPDfDhE.js.map
|