@cdkd/cli 0.351.0 → 0.351.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ambient-client-defaults-BdOY70NL.js → ambient-client-defaults-BNsgmFaO.js} +3 -3
- package/dist/{ambient-client-defaults-BdOY70NL.js.map → ambient-client-defaults-BNsgmFaO.js.map} +1 -1
- package/dist/{asg-provider-BhktjcGM.js → asg-provider-CBnZ6WhM.js} +26 -6
- package/dist/{asg-provider-BhktjcGM.js.map → asg-provider-CBnZ6WhM.js.map} +1 -1
- package/dist/cli.js +3 -3
- package/dist/{custom-resource-runtime-BkEa9HAa.js → custom-resource-runtime-BREgzXYF.js} +6 -6
- package/dist/{custom-resource-runtime-BkEa9HAa.js.map → custom-resource-runtime-BREgzXYF.js.map} +1 -1
- package/dist/{db-associated-roles-DZ1mRuUA.js → db-associated-roles-ClXc3ZtP.js} +2 -2
- package/dist/{db-associated-roles-DZ1mRuUA.js.map → db-associated-roles-ClXc3ZtP.js.map} +1 -1
- package/dist/{delete-started-ByP_GmQ7.js → delete-started-Du9ABI-8.js} +4 -4
- package/dist/{delete-started-ByP_GmQ7.js.map → delete-started-Du9ABI-8.js.map} +1 -1
- package/dist/{deploy-engine-BZNCiQ-B.js → deploy-engine-Crq1_YaU.js} +658 -133
- package/dist/deploy-engine-Crq1_YaU.js.map +1 -0
- package/dist/{diff-calculator-vaWjL6sQ.js → diff-calculator-BjfI_Wan.js} +12 -12
- package/dist/{diff-calculator-vaWjL6sQ.js.map → diff-calculator-BjfI_Wan.js.map} +1 -1
- package/dist/{ec2-termination-protection-DpNlPDar.js → ec2-termination-protection-ktQGLiiN.js} +6 -6
- package/dist/{ec2-termination-protection-DpNlPDar.js.map → ec2-termination-protection-ktQGLiiN.js.map} +1 -1
- package/dist/{ecr-uri-Cd_x_ldh.js → ecr-uri-BQT6UV3q.js} +2 -2
- package/dist/{ecr-uri-Cd_x_ldh.js.map → ecr-uri-BQT6UV3q.js.map} +1 -1
- package/dist/{expected-bucket-owner-Ba9LshiP.js → expected-bucket-owner-BB5y_p0b.js} +2 -2
- package/dist/{expected-bucket-owner-Ba9LshiP.js.map → expected-bucket-owner-BB5y_p0b.js.map} +1 -1
- package/dist/{iam-role-provider-CL-dMrn4.js → iam-role-provider-CiX8RNcU.js} +10 -8
- package/dist/iam-role-provider-CiX8RNcU.js.map +1 -0
- package/dist/{image-plan-C0B05bHS.js → image-plan-CwEUwSBO.js} +8 -8
- package/dist/{image-plan-C0B05bHS.js.map → image-plan-CwEUwSBO.js.map} +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/{logger-DpAGzSvV.js → logger-DmGdReDx.js} +2 -2
- package/dist/{logger-DpAGzSvV.js.map → logger-DmGdReDx.js.map} +1 -1
- package/dist/{neptune-provider-CJuYc8IB.js → neptune-provider-I7iiVIYL.js} +7 -7
- package/dist/{neptune-provider-CJuYc8IB.js.map → neptune-provider-I7iiVIYL.js.map} +1 -1
- package/dist/{program-CUCE3lAz.js → program-CjvlsJxS.js} +624 -170
- package/dist/program-CjvlsJxS.js.map +1 -0
- package/dist/{provider-classes-YUbciPtV.js → provider-classes-BUU9HgA_.js} +111 -79
- package/dist/provider-classes-BUU9HgA_.js.map +1 -0
- package/dist/{rds-provider-CbmVLapS.js → rds-provider-w7OvQPlJ.js} +10 -10
- package/dist/{rds-provider-CbmVLapS.js.map → rds-provider-w7OvQPlJ.js.map} +1 -1
- package/dist/{read-replica-BQ5dRRmm.js → read-replica-4gbBDrpV.js} +3 -3
- package/dist/{read-replica-BQ5dRRmm.js.map → read-replica-4gbBDrpV.js.map} +1 -1
- package/dist/{replacement-rules-DZphESoc.js → replacement-rules-CKf0IgJ7.js} +3 -3
- package/dist/{replacement-rules-DZphESoc.js.map → replacement-rules-CKf0IgJ7.js.map} +1 -1
- package/dist/{resource-deadline-_gEj2hxY.js → resource-deadline-CWs3cu_e.js} +4 -4
- package/dist/{resource-deadline-_gEj2hxY.js.map → resource-deadline-CWs3cu_e.js.map} +1 -1
- package/dist/{run-cli-bzXhjxpe.js → run-cli-8F0scSqk.js} +2 -2
- package/dist/{run-cli-bzXhjxpe.js.map → run-cli-8F0scSqk.js.map} +1 -1
- package/dist/{update-removal-DOUUID3B.js → update-removal-DwF56cpn.js} +4 -4
- package/dist/{update-removal-DOUUID3B.js.map → update-removal-DwF56cpn.js.map} +1 -1
- package/dist/{version-DTKcNNDa.js → version-G1UTHCOP.js} +2 -2
- package/dist/{version-DTKcNNDa.js.map → version-G1UTHCOP.js.map} +1 -1
- package/package.json +2 -2
- package/dist/deploy-engine-BZNCiQ-B.js.map +0 -1
- package/dist/iam-role-provider-CL-dMrn4.js.map +0 -1
- package/dist/program-CUCE3lAz.js.map +0 -1
- package/dist/provider-classes-YUbciPtV.js.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, E as cutMarker, F as stringifyJsonPayload, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, b as setPasteableVerbFlags, c as deployReplaceCommand, d as pasteableCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE, x as SAFE_MSG_ALTERED_CHAR, y as setPasteableRunFlags } from "./version-
|
|
2
|
-
import { $ as renderUnmatchedPatternsWarning, $t as deprecatedRegionOption, A as followContainerLogs, At as recordEmulatorDefaultRegion, B as resolveRuntimeCodeMountPath, Bt as regionShown, C as waitForRieReady, Cn as STATE_KEY_MAX_CODE_POINTS, Ct as setContainerRegion, Dn as parseStateKey, Dt as workloadGetsEmulatorKeysOnly, E as SENSITIVE_ENV_KEYS, En as listAllStateKeys, Et as warnAwsEmulatorStateSourceHint, F as removeContainer, Ft as namedCliRegion, G as partitionTopLevel, Gt as strandedProfileCredentialsNotice, H as resolveRuntimeImage, Ht as stackRegionResolver, It as rawCliRegion, J as renderAllNoTopLevelStacks, Jt as appOptions, K as refuseStackNameRegionCollisions, Kt as writeProfileCredentialsFile, L as runDetached, Lt as reconcileExportIndexRegion, M as killAndDrainContainerLogs, Mt as exportInferredRegionForSdk, N as pickFreePort, Nt as foldRegionOption, O as ensureDockerAvailable, Ot as emulatorDefaultRegion, P as pullImage, Pt as legacyStateBucketFallbackRegion, Q as renderStacksNoLongerSelected, Qt as deployOptions, Rt as reconcileMarkerRegionWithLegacyDefault, S as invokeRie, Sn as STATE_FILE_SUFFIX, St as resolveContainerRegion, T as DockerRunnerError, Tn as listAllLockKeys, Tt as taskRoleAssumedInRealAws, U as describeStack, Ut as stateWithRegion, V as resolveRuntimeFileExtension, Vt as resolveEffectiveRegion, W as matchStacks, Wt as withOtherIndexRemoval, X as renderNoStackMatch, Xt as commonOptions, Y as renderAmbiguousTargetStack, Yt as applyWaitFlagEnv, Z as renderNotInAppWarning, Zt as contextOptions, _ as copyLayerTreeLastWins, _n as resourceTimeoutOptions, _t as mixedModeActive, a as materializeLayerFromArn, an as parseContextOptions, at as buildCdkPathIndex, b as probeHostGatewaySupport, bn as parsePositiveIntegerOption, bt as profileCredentialsForWorkload, cn as stackOptions, ct as stackForConstructPath, d as resolveAssetCodeDirectory, dn as warnIfDeprecatedRegion, dt as assertAwsEmulatorValue, en as destroyOptions, et as selectTargetStack, f as derivePseudoParametersFromRegion$1, fn as effectiveAssumeRoleArn, ft as attachLocalLoopbackForwarder, g as buildContainerImage$1, gn as parseDuration, gt as localAwsEmulatorCredentials, h as architectureToPlatform, hn as allowUnsupportedTypesOption, ht as localAwsEmulatorActive, i as resolveInlineCodeFilePath, in as noLocalCustomResourcesOption, it as unmatchedPatterns, jt as adoptDeprecatedRegionFlag, k as flushStdio, kt as namedEnvAwsRegion, l as resolveLambdaLayers, ln as stateOptions, lt as stackForPathFormTarget, m as tryResolveImageFnJoin, mn as parseAssumeRoleToken, mt as keepEmulatorIssuedCredentials, n as resolveTmpfsForLambda, nn as guardStackRegionOptions, nt as stacksForDependency, o as resolveLambdaTarget, on as parseStackRegion, ot as readCdkPathOrUndefined, p as substituteImagePlaceholders, pn as normalizeStartApiAssumeRole, pt as getActiveWorkloadAwsWiring$1, q as renderAllLeftOutStageStacks, qt as annotationMessageOptions, r as resolveZipImagePlan, rn as noCfnFallbackOption, rt as stacksNoLongerSelected, s as extractEphemeralStorageMb, sn as skipFinalSnapshotOption, st as resolveCdkPathToLogicalIds, t as resolveLocalBuildPlan$1, tn as exclusivelyOption, tt as stackMatchesPattern, u as assetPathDirs, un as useCdkBootstrapAssetsOption, ut as activateLocalAwsAndRoleArn, v as layerAssetDirectory, vn as validateResourceTimeouts, vt as mixedModeEmulatorOverride, w as CONTAINER_LOG_DRAIN_TIMEOUT_MS, wn as describeStateKey, wt as stateRoleRecordIsEmulatorSide, x as resolveHostGatewayExtraHosts, xn as LOCK_FILE_SUFFIX, xt as realAwsException, y as HOST_GATEWAY_MIN_VERSION, yn as cliArgParser, yt as prepareLocalLoopbackForwarder, z as streamLogs, zt as regionNeedsReconciliation } from "./image-plan-
|
|
3
|
-
import { $t as buildForceUnlockCommand, Ct as isInterruptedWaitError, G as isMarkedNotGone, N as VALUE_NOT_SHOWN, Qt as UNREPRODUCIBLE_LOCK_CLAUSE, St as interruptWatchListenerCount, U as RESOURCE_NOT_FOUND, V as remedyLogicalId, W as assertRegionMatch, bt as beginCommandInterruptScope, cn as DEFAULT_STATE_PREFIX, dn as producerCoordinateKey, en as buildLockContentionMessage, fn as producerRecordKey, gt as isAwsCliLiteral, hn as withPasteableAwsProfile, in as formatLockOwner, jt as resourceTypeShown, kt as logicalIdShown, ln as injectiveKey, lt as runDeleteAttempt, m as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, mn as setPasteableAwsProfile, nn as formatLockExpiry, p as IAM_PRINCIPAL_NAME, pn as setPasteableAwsCaBundle, rn as formatLockOperation, sn as CUSTOM_RESOURCE_RESPONSE_PREFIX, tn as forceQuitRecoveryClause, xt as endCommandInterruptScope, y as readRecordedPrincipals } from "./update-removal-
|
|
1
|
+
import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, E as cutMarker, F as stringifyJsonPayload, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, b as setPasteableVerbFlags, c as deployReplaceCommand, d as pasteableCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE, x as SAFE_MSG_ALTERED_CHAR, y as setPasteableRunFlags } from "./version-G1UTHCOP.js";
|
|
2
|
+
import { $ as renderUnmatchedPatternsWarning, $t as deprecatedRegionOption, A as followContainerLogs, At as recordEmulatorDefaultRegion, B as resolveRuntimeCodeMountPath, Bt as regionShown, C as waitForRieReady, Cn as STATE_KEY_MAX_CODE_POINTS, Ct as setContainerRegion, Dn as parseStateKey, Dt as workloadGetsEmulatorKeysOnly, E as SENSITIVE_ENV_KEYS, En as listAllStateKeys, Et as warnAwsEmulatorStateSourceHint, F as removeContainer, Ft as namedCliRegion, G as partitionTopLevel, Gt as strandedProfileCredentialsNotice, H as resolveRuntimeImage, Ht as stackRegionResolver, It as rawCliRegion, J as renderAllNoTopLevelStacks, Jt as appOptions, K as refuseStackNameRegionCollisions, Kt as writeProfileCredentialsFile, L as runDetached, Lt as reconcileExportIndexRegion, M as killAndDrainContainerLogs, Mt as exportInferredRegionForSdk, N as pickFreePort, Nt as foldRegionOption, O as ensureDockerAvailable, Ot as emulatorDefaultRegion, P as pullImage, Pt as legacyStateBucketFallbackRegion, Q as renderStacksNoLongerSelected, Qt as deployOptions, Rt as reconcileMarkerRegionWithLegacyDefault, S as invokeRie, Sn as STATE_FILE_SUFFIX, St as resolveContainerRegion, T as DockerRunnerError, Tn as listAllLockKeys, Tt as taskRoleAssumedInRealAws, U as describeStack, Ut as stateWithRegion, V as resolveRuntimeFileExtension, Vt as resolveEffectiveRegion, W as matchStacks, Wt as withOtherIndexRemoval, X as renderNoStackMatch, Xt as commonOptions, Y as renderAmbiguousTargetStack, Yt as applyWaitFlagEnv, Z as renderNotInAppWarning, Zt as contextOptions, _ as copyLayerTreeLastWins, _n as resourceTimeoutOptions, _t as mixedModeActive, a as materializeLayerFromArn, an as parseContextOptions, at as buildCdkPathIndex, b as probeHostGatewaySupport, bn as parsePositiveIntegerOption, bt as profileCredentialsForWorkload, cn as stackOptions, ct as stackForConstructPath, d as resolveAssetCodeDirectory, dn as warnIfDeprecatedRegion, dt as assertAwsEmulatorValue, en as destroyOptions, et as selectTargetStack, f as derivePseudoParametersFromRegion$1, fn as effectiveAssumeRoleArn, ft as attachLocalLoopbackForwarder, g as buildContainerImage$1, gn as parseDuration, gt as localAwsEmulatorCredentials, h as architectureToPlatform, hn as allowUnsupportedTypesOption, ht as localAwsEmulatorActive, i as resolveInlineCodeFilePath, in as noLocalCustomResourcesOption, it as unmatchedPatterns, jt as adoptDeprecatedRegionFlag, k as flushStdio, kt as namedEnvAwsRegion, l as resolveLambdaLayers, ln as stateOptions, lt as stackForPathFormTarget, m as tryResolveImageFnJoin, mn as parseAssumeRoleToken, mt as keepEmulatorIssuedCredentials, n as resolveTmpfsForLambda, nn as guardStackRegionOptions, nt as stacksForDependency, o as resolveLambdaTarget, on as parseStackRegion, ot as readCdkPathOrUndefined, p as substituteImagePlaceholders, pn as normalizeStartApiAssumeRole, pt as getActiveWorkloadAwsWiring$1, q as renderAllLeftOutStageStacks, qt as annotationMessageOptions, r as resolveZipImagePlan, rn as noCfnFallbackOption, rt as stacksNoLongerSelected, s as extractEphemeralStorageMb, sn as skipFinalSnapshotOption, st as resolveCdkPathToLogicalIds, t as resolveLocalBuildPlan$1, tn as exclusivelyOption, tt as stackMatchesPattern, u as assetPathDirs, un as useCdkBootstrapAssetsOption, ut as activateLocalAwsAndRoleArn, v as layerAssetDirectory, vn as validateResourceTimeouts, vt as mixedModeEmulatorOverride, w as CONTAINER_LOG_DRAIN_TIMEOUT_MS, wn as describeStateKey, wt as stateRoleRecordIsEmulatorSide, x as resolveHostGatewayExtraHosts, xn as LOCK_FILE_SUFFIX, xt as realAwsException, y as HOST_GATEWAY_MIN_VERSION, yn as cliArgParser, yt as prepareLocalLoopbackForwarder, z as streamLogs, zt as regionNeedsReconciliation } from "./image-plan-CwEUwSBO.js";
|
|
3
|
+
import { $t as buildForceUnlockCommand, Ct as isInterruptedWaitError, G as isMarkedNotGone, N as VALUE_NOT_SHOWN, Qt as UNREPRODUCIBLE_LOCK_CLAUSE, St as interruptWatchListenerCount, U as RESOURCE_NOT_FOUND, V as remedyLogicalId, W as assertRegionMatch, bt as beginCommandInterruptScope, cn as DEFAULT_STATE_PREFIX, dn as producerCoordinateKey, en as buildLockContentionMessage, fn as producerRecordKey, gt as isAwsCliLiteral, hn as withPasteableAwsProfile, in as formatLockOwner, jt as resourceTypeShown, kt as logicalIdShown, ln as injectiveKey, lt as runDeleteAttempt, m as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, mn as setPasteableAwsProfile, nn as formatLockExpiry, p as IAM_PRINCIPAL_NAME, pn as setPasteableAwsCaBundle, rn as formatLockOperation, sn as CUSTOM_RESOURCE_RESPONSE_PREFIX, tn as forceQuitRecoveryClause, xt as endCommandInterruptScope, y as readRecordedPrincipals } from "./update-removal-DwF56cpn.js";
|
|
4
4
|
import { a as runWithStackAwsClients, i as resetAwsClients, l as s3ClientDefaults, o as setAwsClients, s as resolveS3ClientDefaults, t as AwsClients, u as setS3ClientDefaultsDebugLog } from "./aws-clients-DOkPjjAW.js";
|
|
5
|
-
import { $ as withStackScope, B as generateResourceName, E as coerceCfnBoolean, I as PATTERN_B_NAME_OPTIONS, L as PATTERN_B_NAME_PROPERTIES, Q as withSkipPrefix, R as PATTERN_B_RESOURCE_TYPES, S as explicitNamePropertyFor, X as isNameGeneration, a as reserveStdoutForPayload, i as releaseStdoutForPayload, m as verboseAwareText, n as getLogger, p as safeStringify, r as isStdoutReservedForPayload, s as runStackBuffered, u as describeAwsFailure, y as getLiveRenderer, z as derivesPatternBName } from "./logger-
|
|
6
|
-
import { A as stripControlChars, B as retryClassificationText, F as isAmbiguousOutcomeError, H as isMarkedNonRetryable, J as DynamicReferenceRegionAmbiguousError, Q as AccountIdUnavailableError, R as isRetryableTransientError, U as isThrottlingError, W as markNonRetryable, X as MalformedProducerRecordRefusalError, Y as IntrinsicResolutionRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, at as ProvisioningError, ct as SynthesisError, et as CdkdError, g as PartialFailureError, h as NestedStackChildDirectDestroyError, i as credentialFingerprint, j as stripForDisplay, k as escapeRegExp, l as withErrorHandling, n as ambientCredentialConfig, o as formatError, ot as ResourceTimeoutError, q as CrossAccountSecretRefusalError, r as clientDefaultsFor, rt as LocalInvokeBuildError$1, s as handleError, st as StateError, t as ambientClientDefaults, tt as DeployCancelledError, u as LocalStartServiceError, v as StackHasActiveImportsError, y as StackTerminationProtectionError, z as isTransientServerError } from "./ambient-client-defaults-
|
|
5
|
+
import { $ as withStackScope, B as generateResourceName, E as coerceCfnBoolean, I as PATTERN_B_NAME_OPTIONS, L as PATTERN_B_NAME_PROPERTIES, Q as withSkipPrefix, R as PATTERN_B_RESOURCE_TYPES, S as explicitNamePropertyFor, X as isNameGeneration, a as reserveStdoutForPayload, i as releaseStdoutForPayload, m as verboseAwareText, n as getLogger, p as safeStringify, r as isStdoutReservedForPayload, s as runStackBuffered, u as describeAwsFailure, y as getLiveRenderer, z as derivesPatternBName } from "./logger-DmGdReDx.js";
|
|
6
|
+
import { A as stripControlChars, B as retryClassificationText, F as isAmbiguousOutcomeError, H as isMarkedNonRetryable, J as DynamicReferenceRegionAmbiguousError, Q as AccountIdUnavailableError, R as isRetryableTransientError, U as isThrottlingError, W as markNonRetryable, X as MalformedProducerRecordRefusalError, Y as IntrinsicResolutionRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, at as ProvisioningError, ct as SynthesisError, et as CdkdError, g as PartialFailureError, h as NestedStackChildDirectDestroyError, i as credentialFingerprint, j as stripForDisplay, k as escapeRegExp, l as withErrorHandling, n as ambientCredentialConfig, o as formatError, ot as ResourceTimeoutError, q as CrossAccountSecretRefusalError, r as clientDefaultsFor, rt as LocalInvokeBuildError$1, s as handleError, st as StateError, t as ambientClientDefaults, tt as DeployCancelledError, u as LocalStartServiceError, v as StackHasActiveImportsError, y as StackTerminationProtectionError, z as isTransientServerError } from "./ambient-client-defaults-BNsgmFaO.js";
|
|
7
7
|
import { a as getAssumedRoleCredentials, c as setAssumedRoleCredentials, h as formatAuthority, l as setAwsEndpointOverrideSource, m as runInStackAwsScope, n as awsClientDefaults, r as awsEndpointOverrideActive, s as runWithRealAws } from "./aws-client-defaults-DAebi99J.js";
|
|
8
|
-
import { A as loadCdkJson, B as warnDeprecatedNoPrefixCliFlag, C as runDockerForeground, D as synthesisStatusMessage, E as Synthesizer, F as resolveStateBucketWithDefault, G as uploadCfnTemplate, H as CFN_TEMPLATE_URL_LIMIT, I as resolveStateBucketWithDefaultAndSource, J as StageLoadError, K as refuseFailedLookups, L as resolveStateBucketWithSource, M as resolveAutoAssetStorage, N as resolveCaptureObservedState, O as getDefaultStateBucketName, P as resolveSkipPrefix, R as resolveUseCdkBootstrapAssets, S as getDockerCmd, T as abortInFlightMultipartUploads, U as MIGRATE_TMP_PREFIX, V as CFN_TEMPLATE_BODY_LIMIT, W as findLargeInlineResources, X as setChildProcessAwsEnv, Y as processStackMessages, _ as partitionSensitiveEnv, a as AssetPublisher, b as isMalformedEnvKey, c as resolveDockerContextDirectory, d as describeDockerFailure, f as redactedCause, g as finchSecretArgvRefusal, h as dockerSpawnEnvWithSensitive, i as isLockInfoExpired, j as resolveApp, k as getLegacyStateBucketName, m as redactDockerArgvValues, n as DagBuilder, o as WorkGraph, p as redactedDockerCause, q as AssemblyReader, r as LockManager, s as buildDockerImage, t as DiffCalculator, u as describeDockerExecFailure, v as warnFinchArgvExposure, w as runDockerStreaming, x as formatDockerLoginError, y as isDockerClientEnvKey, z as stateBucketExistenceConfirmed } from "./diff-calculator-
|
|
9
|
-
import { $a as refuseUnreadableCdkCrossAccountRefs, $c as isAccessDenied, $i as ccRoutedFinalSnapshotError, $l as resolveAssemblyPath, $n as replayFailedOperations, $r as secretBearing, $s as UNREADABLE_ORPHANS_CONTAINER_ROW, A as refusePendingMovesOut, Aa as CloudControlProvider, Ac as displayLogicalId, Ai as green, An as noEchoMacBinding, As as unreadableOrphanRecords, B as readProtection, Ba as isWaitAbandonedError, Bc as NO_CC_HANDLERS_REASON, Bi as journaledOrphanPrintingBag, Bn as rollbackOrphanIds, Bo as isImpossibleEmptyStoredAttribute, Br as retiredAfterRollback, Bs as refuseMalformedResourceEntriesForImport, Bt as readRefactorMarkerOnce, C as isAbsoluteAssetPath, Ca as customResourcesFailedWithoutApp, Cc as refuseMalformedState, Ci as supersededHeldByOtherTypeWarning, Cl as validateAssetBucketName, Cn as makeForeignHolderScan, Co as AWS_NO_VALUE, Cr as recordUnderIdIsNotOwn, Cs as malformedOrphanRowsKeptWarning, D as hasPendingMovesOut, Da as setLocalCustomResourceRuntimeEnabled, Dc as withheldAccountClause, Di as bold, Dl as getDockerImageBySourceHash, Dn as DeploymentEventsStore, Do as lacksRecordedRefArn, Dr as resolveReplacementOldType, Ds as refuseMalformedOrphansForOrphan, E as templateIdentity, Ec as accountArgs, Ei as withoutSuperseded, El as AssetManifestLoader, En as DeploymentEventsReader, Eo as refStateLookupFromResource, Er as computeImplicitDeleteEdges, Es as refuseMalformedOrphanRecordsForDestroy, F as recordedProtectionEvidence, Fa as UNSPECIFIED_SKIP_REASON, Fi as noEchoExactEchoLeavesOf, Fn as findDestructiveChanges, Fr as removeProtectionTypeList, Fs as malformedScrubResourceEntriesRefusalMessage, Ga as stackIdTailOf, Gi as secretNamePrintingBags, Gl as nullPrototypeRecord, Gn as differingRemedy, Go as withSharedDrainBudget, Gr as inheritProducerRegions, Gs as malformedDriftResourcePropertiesWarning, Gt as updateRefactorMarker, Ha as isSelectOutOfBounds, Hc as TemplateParser, Hi as namingSecretsWithRecordedNoEcho, Hl as defineOwnKey, Hn as changedReferenceInDiff, Ho as isNamelessDynamicReferenceError, Hr as retiredNameGenerationsLeaving, Hs as refuseMalformedResourceEntriesForOrphan, Ht as refactorMarkerRefusalMessage, I as recordedProtectionNote, Ia as deleteIndeterminateGuards, Ic as unwrittenCreateOnlyReplacement, Ii as noEchoParameterNamesOf, Il as ssmResolvedValueType, In as formatDestructiveChange, Io as recordedReferenceRegions, Ir as orphanNeedsIdentity, Is as refuseMalformedResourceAttributesForOrphan, Jc as rebuildClientForBucketRegion, Ji as stateSecretNameNeedles, Jn as mappingPairs, Jr as reachableDivergentParameters, Js as refuseMalformedResourcePropertiesForDestroy, Kc as hasReasonlessBaselineRefusal, Kl as ownValue, Kn as isPairableType, Kr as computeParameterTaint, Ks as malformedResourcePropertiesWarning, Kt as macWriteOnlyKeys, L as PROTECTION_PROPERTY_BY_TYPE, La as deleteLeftInPlace, Li as withAttemptedItemsMasked, Ll as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Ln as findRefactorHints, Lr as nameGenerationCarriedFrom, Ls as refuseMalformedResourceEntries, Lt as keptForRetainedRecord, M as findServiceTokenRefusals, Mc as hasReadableResources, Mi as yellow, Mn as noEchoMacVerdict, Mo as keepHeldTokenProvenance, Ms as malformedLocalResourceEntriesWarning, N as serviceTokenBlockingReason, Na as setResolvedResourceTimeouts, Nc as findActionableSdkUnwired, Ni as noEchoAttributeNamesOf, Nn as noEchoValueMacsOf, Ns as malformedLocalResourcesWarning, O as pendingMovesOutOf, Oa as withCustomResourceStack, Oc as STATE_RESOURCES_MALFORMED, Oi as cyan, On as NOECHO_MAC_KEY_ALIAS, Oo as lacksRecordedTableArn, Or as withPreviousPolicies, Os as repairMalformedOrphanRecordsForReadOnly, P as diffSecurity, Pa as RollbackInlinePolicyWriters, Pc as findHandledUnwrittenCreateOnly, Pi as noEchoComparisonForTemplate, Pn as constructPathOf$1, Po as recordedOutputReferenceRegions, Pr as segmentCleanupOptions, Ps as malformedResourceEntriesWarning, Qa as producerLookupOver, Qc as crossPrefixDeniedWarning, Qi as PRE_DELETE_SNAPSHOT_TYPES, Ql as renderAssemblyPathEscape, Qn as referencedLogicalIds, Qo as findReplacedReadersOfRecreateTargets, Qr as exportAliasCollisionScrubWarning, Qs as repairMalformedResourcePropertiesForReadOnly, R as isProtectionValueActive, Ra as deleteSkipReason, Ri as createReadOnlyAttributeHealerFactory, Rn as hintSidesOf, Rr as nameGenerationHighWaterOf, Rs as refuseMalformedResourceEntriesForDeploy, Rt as recordRetainedForReadoption, S as findNestedTemplateTreeDefect, Sc as refuseMalformedResourcesForExport, Si as supersededAfterRollback, Sl as readBootstrapMarkerBody, Sn as sameJournaledOrphans, So as parameterTypeMayLoseSecretIdentity, Sr as recheckFailedPlan, Ss as malformedOrphanRecordsWarning, T as renderNestedTemplateTreeDefect, Ta as localCustomResourceCommand, Tc as JSON_LISTING_HOLE_VALUE, Ti as supersededResourcesOf, Tl as BOOTSTRAP_MARKER_PREFIX, Tn as planOrphanAdoption, To as isStalePlaceholderArnAttribute, Tr as IMPLICIT_DELETE_DEPENDENCIES, Ts as refuseMalformedOrphanRecords, Ua as isAlwaysLiveAttribute, Uc as S3StateBackend, Ui as orphanRecordsPrintingBag, Ul as hasOwnKey, Un as changedReferencePath, Uo as carriesDynamicReference, Ur as withNameGenerationReached, Us as repairMalformedResourceEntriesForReadOnly, Ut as refuseRefactorMarker, Va as IntrinsicFunctionResolver, Vc as hasNoCloudControlHandlers, Vi as maskEventTextWithBoundBags, Vn as withMovedTo, Vo as carriesFetchableDynamicReference, Vr as retiredNameGenerationsAfter, Vs as refuseMalformedResourceEntriesForImportSave, Vt as refactorMarkerMovesOf, Wa as poisonRenderedSpellingsCollidingIn, Wc as splitImportedOps, Wi as secretNamePrintingBag, Wl as hasPlainPrototype, Wn as changedReferenceReason, Wo as keepsSecretReferenceToken, Ws as unreadableResourceEntries, Wt as sameMove, Xa as withSecretPhysicalIdsMaskedInState, Xc as CrossPrefixScanCache, Xi as extractDeploymentEventError, Xl as displayAssemblyPath, Xn as propertiesChangedReason, Xr as WITHHELD_NAME_DISPLAY, Xs as refuseMalformedResourcePropertiesForExport, Xt as formatResourceLine, Ya as secretSegmentsOfState, Yc as CrossPrefixReadError, Yi as storedSecretNameNeedles, Yl as describeFileReadFailure, Yn as parseMappingFile, Yr as resourcesNamingDeclaredParameter, Ys as refuseMalformedResourcePropertiesForDrift, Za as resolveDynamicReferences, Zc as applyCrossPrefixScan, Zi as ATOMIC_FINAL_SNAPSHOT_TYPES, Zn as proposeRenames, Zr as displayTextOrWithheld, Zs as refuseMalformedResourcePropertiesForOrphan, _ as conditionFingerprint, _a as readsNoEchoDeleteValues, _c as malformedRenderedContainersWarning, _i as withStackRecords, _l as buildDenyExternalAccessPolicy, _n as dropFailedCommands, _r as seedsDeleteFirstGuard, _s as declaresNoEcho, a as scanActiveConsumers, aa as createPreDeleteFinalSnapshot, ac as repairMalformedOrphansForReadOnly, ai as isWholeDynamicReferenceValue, an as displacedPhysicalIdShown, ao as parseIamRoleArn, ar as calculateResourceDrift, b as readRecordedConditionVerdicts, ba as withPrintingSecrets, bc as refuseMalformedResourcesForDeploy, bi as holdsSupersededResources, bl as getBootstrapMarkerKey, bn as journaledOrphanLines, bo as coerceParameterTypedValue, br as isReplacementOrphan, bs as isReadableOrphanRecord, c as nestedSsmNameDeferredNote, ca as ProviderRegistry, cc as malformedLocalOutputsWarning, ci as collectPublishedOutputNames, cn as nestedChildStackName$1, co as applyCallerIdentityCredentials, cr as undeclaredEmptyObservedKeys, d as slashedSsmNameHealAdoptedNote, da as wouldReturnToSdkProvider, di as DEFAULT_RESOURCE_TIMEOUT_MS, dl as loadPublishableAssetManifest, dn as revertedNestedRowIds, do as classifyRecordedSecretRegion, ea as ccRoutedInstanceTakesNoSnapshot, ec as hasReadableOrphans, ei as secretBearingStateKeyWarning, el as isNotImplemented, eo as applyRoleArnIfSet, er as replayRollback, es as shownType, f as slashedSsmNameHealNote, fa as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, fc as refuseMalformedOutputs, fi as DEFAULT_RESOURCE_WARN_AFTER_MS, fn as withNestedRevertRun, fo as classifyReplaySecretRegion, fr as ledgerForStack, fs as maskedPropertyFingerprintsOf, g as makeCanonicalizePropertiesFn, ga as TemplateNoEchoReresolver, gc as refuseDivergentRecordRegionForDestroy, gl as ensureAssetStorage, gn as deleteJournaledOrphans, gr as planRollback, h as inheritedProvenanceForChildDiff, hc as STATE_REGION_DIVERGED, hi as destroyStackRecordsView, hl as AssetModeResolver, hn as withNestedStackContext, hs as maskedInputProof, i as mergeNoChangeOutputs, ia as unsupportedFinalSnapshotError, ic as refuseMalformedOrphansForDestroy, ii as exportNameSecretExposure, il as isSensitiveAttributeName, in as displacedOpClause, io as isIamRoleArn, ir as withUnprovenUnsettled, is as renderStatefulReason, j as deferredServiceTokenWarning, jc as hasReadableOutputs, ji as red, jn as noEchoMacParametersOf, js as isReadableResourceEntry, k as pendingMovesRefusalMessage, kc as UNREADABLE_RESOURCES_MAP_ROW, ki as gray, kn as createNoEchoValueMacs, kr as findNestedStackTypeChanges, ks as unpreviewableOrphanRecords, l as nestedSsmNameRowNote, la as ccBrokenReason, lc as malformedOutputsRefusalMessage, li as isExportAliasCollision, ln as recordDisplacedSkips, lo as callerEnvCredentials, lr as updatePartialMessage, m as crossStackOutputProvenanceSource, ma as customResourceResponseExpirationWarning, mc as repairMalformedOutputsForReadOnly, ml as rewriteTemplateAssetReferences, mn as getCurrentNestedStackContext, mo as regionLessSecretName, mr as withCreateTokenLedger, ms as parameterInputsFor, n as isSecretBearingReferenceString, na as isFinalSnapshotError, nc as malformedOrphansWarning, ni as carriedExportAliasExposure, nl as withStackInstanceIdWithheld, nn as resolvePendingCloudControlRequests, no as assertSendableRoleArn, nr as recordAfterRollbackUpdate, ns as isStatefulRecreateTargetForReplace, o as inRunStackKey, oa as buildFinalSnapshotIdentifier, oc as malformedExportNamesWarning, oi as noEchoParameterValueSeed, ol as buildAssetRedirectMap, on as dropSettledNestedJournals, oo as sendableAssumeRoleCommand, or as equalModuloMarkedMask, p as slashedSsmNameHealPendingNote, pa as applyCustomResourceResponseExpiration, pc as refuseMalformedOutputsForDestroy, pi as maskingRetryLogger, pn as collectNestedChildUnaddressed, po as producerRegionsFromState, qc as hasUnverifiableParameterRefusal, qi as secretNamedRecordNeedles, qn as looselyEqual, qo as INTRINSIC_KEYS, qr as namesAnyDeclaredParameter, qt as readsOnlyNoEchoParameters, r as keptWholeReasonText, ra as refusesFinalSnapshot, rc as refuseMalformedOrphans, ri as exportNameNoEchoParameters, rl as isSecretValuedAttribute, rn as NESTED_PENDING_PARENT_REASON, ro as explicitRoleArnOrThrow, rr as settleUnsettledPrevious, rs as isStatefulRecreateTargetSync, s as checkNestedSsmNames, sa as CC_BROKEN_REASON, sc as malformedExportSourceWarning, si as collectDeclaredOutputNames, sl as createAssetRedirectResolver, so as AWS_CREDENTIAL_ENV_KEYS, sr as equalModuloMask, t as DeployEngine, ta as effectiveDeletionPolicy, tc as malformedOrphansRefusalMessage, ti as secretSafeKeyDisplay, tl as stackInstanceIdOf, tn as pendingRequestCount, to as assertFlagRoleArn, tr as DELETED_RESOURCE_REMEDY, ts as MULTI_REGION_RECREATE_BLOCKED_TYPES, tu as resolveBucketRegion, u as healSlashedSsmParameterNames, ua as isCustomResource, uc as malformedOutputsWarning, ui as bindingSkippedOutputs, uo as envCredentialsAreAssumedRole, ur as updatePartialReason, v as conditionInputsFrom, va as isCustomResourceType$1, vc as malformedResourcesWarning, vl as assertAssetBucketRegion, vn as dropFailedHint, vr as demoteSupersededOrphans, vs as maskedPropertyFingerprint, w as listNestedTemplateRows, wa as customResourcesRunWithoutApp, wc as repairMalformedResourcesForReadOnly, wi as supersededHolderOf, wl as validateContainerRepoName, wn as makeSiblingClaimReader, wo as cfnRefValueFromPhysicalId, wr as replacementNeverSwapped, ws as previewableOrphanRecords, x as childTemplateLoader, xa as NO_LOCAL_CUSTOM_RESOURCES_FLAG, xc as refuseMalformedResourcesForDestroy, xi as isSupersededResourceRecord, xl as parseBootstrapMarker, xn as loadJournaledOrphans, xo as isUnboundTemplateParameter, xr as planFailedOps, xs as malformedOrphanRecordsRefusalMessage, y as parentSuppliedValues, yc as malformedStateRefusalMessage, yi as deleteSupersededEntry, yl as isCrossRegionRedirect, yn as isHandledOrphan, yr as isJournaledOrphan, ys as deployRefusesOrphanRowsReason, z as perType, zi as completedReplayEntries, zl as decodeListingKey, zn as movedToHint, zo as getAccountInfo, zr as nameScopeOf, zs as refuseMalformedResourceEntriesForDestroy, zt as readRefactorMarker } from "./deploy-engine-BZNCiQ-B.js";
|
|
8
|
+
import { A as loadCdkJson, B as warnDeprecatedNoPrefixCliFlag, C as runDockerForeground, D as synthesisStatusMessage, E as Synthesizer, F as resolveStateBucketWithDefault, G as uploadCfnTemplate, H as CFN_TEMPLATE_URL_LIMIT, I as resolveStateBucketWithDefaultAndSource, J as StageLoadError, K as refuseFailedLookups, L as resolveStateBucketWithSource, M as resolveAutoAssetStorage, N as resolveCaptureObservedState, O as getDefaultStateBucketName, P as resolveSkipPrefix, R as resolveUseCdkBootstrapAssets, S as getDockerCmd, T as abortInFlightMultipartUploads, U as MIGRATE_TMP_PREFIX, V as CFN_TEMPLATE_BODY_LIMIT, W as findLargeInlineResources, X as setChildProcessAwsEnv, Y as processStackMessages, _ as partitionSensitiveEnv, a as AssetPublisher, b as isMalformedEnvKey, c as resolveDockerContextDirectory, d as describeDockerFailure, f as redactedCause, g as finchSecretArgvRefusal, h as dockerSpawnEnvWithSensitive, i as isLockInfoExpired, j as resolveApp, k as getLegacyStateBucketName, m as redactDockerArgvValues, n as DagBuilder, o as WorkGraph, p as redactedDockerCause, q as AssemblyReader, r as LockManager, s as buildDockerImage, t as DiffCalculator, u as describeDockerExecFailure, v as warnFinchArgvExposure, w as runDockerStreaming, x as formatDockerLoginError, y as isDockerClientEnvKey, z as stateBucketExistenceConfirmed } from "./diff-calculator-BjfI_Wan.js";
|
|
9
|
+
import { $c as hasReasonlessBaselineRefusal, $i as ccRoutedFinalSnapshotError, $l as ownValue, $n as replayFailedOperations, $r as secretBearing, $s as malformedResourcePropertiesWarning, A as refusePendingMovesOut, Aa as customResourcesRunWithoutApp, Ac as refuseMalformedState, Ai as green, Al as validateAssetBucketName, An as noEchoMacBinding, Ao as AWS_NO_VALUE, As as malformedOrphanRowsKeptWarning, B as readProtection, Ba as RollbackInlinePolicyWriters, Bc as findActionableSdkUnwired, Bi as journaledOrphanPrintingBag, Bn as rollbackOrphanIds, Br as retiredAfterRollback, Bs as malformedLocalResourcesWarning, Bt as readRefactorMarkerOnce, C as isAbsoluteAssetPath, Ca as readsNoEchoDeleteValues, Cc as refuseDivergentRecordRegionForDestroy, Ci as supersededHeldByOtherTypeWarning, Cl as ensureAssetStorage, Cn as makeForeignHolderScan, Cr as recordUnderIdIsNotOwn, D as hasPendingMovesOut, Da as NO_LOCAL_CUSTOM_RESOURCES_FLAG, Dc as refuseMalformedResourcesForDeploy, Di as bold, Dl as getBootstrapMarkerKey, Dn as DeploymentEventsStore, Do as coerceParameterTypedValue, Dr as resolveReplacementOldType, Ds as isReadableOrphanRecord, E as templateIdentity, Ea as withPrintingSecrets, Ec as malformedStateRefusalMessage, Ei as withoutSuperseded, El as isCrossRegionRedirect, En as DeploymentEventsReader, Er as computeImplicitDeleteEdges, Es as deployRefusesOrphanRowsReason, F as recordedProtectionEvidence, Fc as STATE_RESOURCES_MALFORMED, Fi as noEchoExactEchoLeavesOf, Fn as findDestructiveChanges, Fo as lacksRecordedTableArn, Fr as removeProtectionTypeList, Fs as repairMalformedOrphanRecordsForReadOnly, Gi as secretNamePrintingBags, Gn as differingRemedy, Gr as inheritProducerRegions, Gs as refuseMalformedResourceEntriesForDeploy, Gt as updateRefactorMarker, Ha as deleteIndeterminateGuards, Hi as namingSecretsWithRecordedNoEcho, Hn as changedReferenceInDiff, Hr as retiredNameGenerationsLeaving, Hs as malformedScrubResourceEntriesRefusalMessage, Ht as refactorMarkerRefusalMessage, I as recordedProtectionNote, Ia as CloudControlProvider, Ic as UNREADABLE_RESOURCES_MAP_ROW, Ii as noEchoParameterNamesOf, In as formatDestructiveChange, Ir as orphanNeedsIdentity, Is as unpreviewableOrphanRecords, Ja as isSelectOutOfBounds, Jc as hasNoCloudControlHandlers, Ji as stateSecretNameNeedles, Jn as mappingPairs, Jo as carriesFetchableDynamicReference, Jr as reachableDivergentParameters, Js as refuseMalformedResourceEntriesForImportSave, Ka as isWaitAbandonedError, Kl as decodeListingKey, Kn as isPairableType, Ko as getAccountInfo, Kr as computeParameterTaint, Ks as refuseMalformedResourceEntriesForDestroy, Kt as macWriteOnlyKeys, L as PROTECTION_PROPERTY_BY_TYPE, Lc as displayLogicalId, Li as withAttemptedItemsMasked, Ln as findRefactorHints, Lr as nameGenerationCarriedFrom, Ls as unreadableOrphanRecords, Lt as keptForRetainedRecord, M as findServiceTokenRefusals, Mc as JSON_LISTING_HOLE_VALUE, Mi as yellow, Ml as BOOTSTRAP_MARKER_PREFIX, Mn as noEchoMacVerdict, Mo as isStalePlaceholderArnAttribute, Ms as refuseMalformedOrphanRecords, N as serviceTokenBlockingReason, Na as setLocalCustomResourceRuntimeEnabled, Nc as accountArgs, Ni as noEchoAttributeNamesOf, Nl as AssetManifestLoader, Nn as noEchoValueMacsOf, No as refStateLookupFromResource, Ns as refuseMalformedOrphanRecordsForDestroy, O as pendingMovesOutOf, Oc as refuseMalformedResourcesForDestroy, Oi as cyan, Ol as parseBootstrapMarker, On as NOECHO_MAC_KEY_ALIAS, Oo as isUnboundTemplateParameter, Or as withPreviousPolicies, Os as malformedOrphanRecordsRefusalMessage, P as diffSecurity, Pa as withCustomResourceStack, Pc as withheldAccountClause, Pi as noEchoComparisonForTemplate, Pl as getDockerImageBySourceHash, Pn as constructPathOf$1, Po as lacksRecordedRefArn, Pr as segmentCleanupOptions, Ps as refuseMalformedOrphansForOrphan, Qi as PRE_DELETE_SNAPSHOT_TYPES, Ql as nullPrototypeRecord, Qn as referencedLogicalIds, Qo as withSharedDrainBudget, Qr as exportAliasCollisionScrubWarning, Qs as malformedDriftResourcePropertiesWarning, R as isProtectionValueActive, Rc as hasReadableOutputs, Ri as createReadOnlyAttributeHealerFactory, Rn as hintSidesOf, Rr as nameGenerationHighWaterOf, Rs as isReadableResourceEntry, Rt as recordRetainedForReadoption, S as findNestedTemplateTreeDefect, Sa as TemplateNoEchoReresolver, Sc as STATE_REGION_DIVERGED, Si as supersededAfterRollback, Sl as AssetModeResolver, Sn as sameJournaledOrphans, Sr as recheckFailedPlan, Ss as maskedInputProof, T as renderNestedTemplateTreeDefect, Tc as malformedResourcesWarning, Ti as supersededResourcesOf, Tl as assertAssetBucketRegion, Tn as planOrphanAdoption, Tr as IMPLICIT_DELETE_DEPENDENCIES, Ts as maskedPropertyFingerprint, Ua as deleteLeftInPlace, Uc as unwrittenCreateOnlyReplacement, Ui as orphanRecordsPrintingBag, Ul as ssmResolvedValueType, Un as changedReferencePath, Uo as recordedReferenceRegions, Ur as withNameGenerationReached, Us as refuseMalformedResourceAttributesForOrphan, Ut as refuseRefactorMarker, Va as UNSPECIFIED_SKIP_REASON, Vc as findHandledUnwrittenCreateOnly, Vi as maskEventTextWithBoundBags, Vn as withMovedTo, Vo as recordedOutputReferenceRegions, Vr as retiredNameGenerationsAfter, Vs as malformedResourceEntriesWarning, Vt as refactorMarkerMovesOf, Wa as deleteSkipReason, Wi as secretNamePrintingBag, Wl as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Wn as changedReferenceReason, Ws as refuseMalformedResourceEntries, Wt as sameMove, Xa as poisonRenderedSpellingsCollidingIn, Xc as S3StateBackend, Xi as extractDeploymentEventError, Xl as hasOwnKey, Xn as propertiesChangedReason, Xo as carriesDynamicReference, Xr as WITHHELD_NAME_DISPLAY, Xs as repairMalformedResourceEntriesForReadOnly, Xt as formatResourceLine, Ya as isAlwaysLiveAttribute, Yc as TemplateParser, Yi as storedSecretNameNeedles, Yl as defineOwnKey, Yn as parseMappingFile, Yo as isNamelessDynamicReferenceError, Yr as resourcesNamingDeclaredParameter, Ys as refuseMalformedResourceEntriesForOrphan, Za as stackIdTailOf, Zc as splitImportedOps, Zi as ATOMIC_FINAL_SNAPSHOT_TYPES, Zl as hasPlainPrototype, Zn as proposeRenames, Zo as keepsSecretReferenceToken, Zr as displayTextOrWithheld, Zs as unreadableResourceEntries, _ as conditionFingerprint, _a as wouldReturnToSdkProvider, _c as malformedOutputsWarning, _i as withStackRecords, _n as dropFailedCommands, _o as envCredentialsAreAssumedRole, _r as seedsDeleteFirstGuard, a as scanActiveConsumers, aa as createPreDeleteFinalSnapshot, ac as repairMalformedResourcePropertiesForReadOnly, ai as isWholeDynamicReferenceValue, al as crossPrefixDeniedWarning, an as displacedPhysicalIdShown, ao as producerLookupOver, ar as calculateResourceDrift, as as findReplacedReadersOfRecreateTargets, au as renderAssemblyPathEscape, b as readRecordedConditionVerdicts, ba as customResourceResponseExpirationWarning, bc as refuseMalformedOutputsForDestroy, bi as holdsSupersededResources, bn as journaledOrphanLines, bo as producerRegionsFromState, br as isReplacementOrphan, c as nestedSsmNameDeferredNote, cc as malformedOrphansRefusalMessage, ci as collectPublishedOutputNames, cl as stackInstanceIdOf, cn as nestedChildStackName$1, co as assertFlagRoleArn, cr as undeclaredEmptyObservedKeys, cs as MULTI_REGION_RECREATE_BLOCKED_TYPES, cu as resolveBucketRegion, d as slashedSsmNameHealAdoptedNote, dc as refuseMalformedOrphansForDestroy, di as DEFAULT_RESOURCE_TIMEOUT_MS, dl as isSensitiveAttributeName, dn as revertedNestedRowIds, do as isIamRoleArn, ds as renderStatefulReason, ea as ccRoutedInstanceTakesNoSnapshot, ei as secretBearingStateKeyWarning, el as hasUnverifiableParameterRefusal, er as replayRollback, es as INTRINSIC_KEYS, f as slashedSsmNameHealNote, fc as repairMalformedOrphansForReadOnly, fi as DEFAULT_RESOURCE_WARN_AFTER_MS, fn as withNestedRevertRun, fo as parseIamRoleArn, fr as ledgerForStack, g as makeCanonicalizePropertiesFn, ga as isCustomResource, gc as malformedOutputsRefusalMessage, gn as deleteJournaledOrphans, go as callerEnvCredentials, gr as planRollback, h as inheritedProvenanceForChildDiff, ha as ccBrokenReason, hc as malformedLocalOutputsWarning, hi as destroyStackRecordsView, hn as withNestedStackContext, ho as applyCallerIdentityCredentials, i as mergeNoChangeOutputs, ia as unsupportedFinalSnapshotError, ic as refuseMalformedResourcePropertiesForOrphan, ii as exportNameSecretExposure, il as applyCrossPrefixScan, in as displacedOpClause, io as resolveDynamicReferences, ir as withUnprovenUnsettled, j as deferredServiceTokenWarning, ja as localCustomResourceCommand, jc as repairMalformedResourcesForReadOnly, ji as red, jl as validateContainerRepoName, jn as noEchoMacParametersOf, jo as cfnRefValueFromPhysicalId, js as previewableOrphanRecords, k as pendingMovesRefusalMessage, ka as customResourcesFailedWithoutApp, kc as refuseMalformedResourcesForExport, ki as gray, kl as readBootstrapMarkerBody, kn as createNoEchoValueMacs, ko as parameterTypeMayLoseSecretIdentity, kr as findNestedStackTypeChanges, ks as malformedOrphanRecordsWarning, l as nestedSsmNameRowNote, lc as malformedOrphansWarning, li as isExportAliasCollision, ll as withStackInstanceIdWithheld, ln as recordDisplacedSkips, lo as assertSendableRoleArn, lr as updatePartialMessage, ls as isStatefulRecreateTargetForReplace, m as crossStackOutputProvenanceSource, ma as ProviderRegistry, mc as malformedExportSourceWarning, ml as createAssetRedirectResolver, mn as getCurrentNestedStackContext, mo as AWS_CREDENTIAL_ENV_KEYS, mr as withCreateTokenLedger, n as isSecretBearingReferenceString, na as isFinalSnapshotError, nc as refuseMalformedResourcePropertiesForDrift, ni as carriedExportAliasExposure, nl as CrossPrefixReadError, nn as resolvePendingCloudControlRequests, no as secretSegmentsOfState, nr as recordAfterRollbackUpdate, nu as describeFileReadFailure, o as inRunStackKey, oa as buildFinalSnapshotIdentifier, oc as UNREADABLE_ORPHANS_CONTAINER_ROW, oi as noEchoParameterValueSeed, ol as isAccessDenied, on as dropSettledNestedJournals, oo as refuseUnreadableCdkCrossAccountRefs, or as equalModuloMarkedMask, ou as resolveAssemblyPath, p as slashedSsmNameHealPendingNote, pa as CC_BROKEN_REASON, pc as malformedExportNamesWarning, pi as maskingRetryLogger, pl as buildAssetRedirectMap, pn as collectNestedChildUnaddressed, po as sendableAssumeRoleCommand, qa as IntrinsicFunctionResolver, qc as NO_CC_HANDLERS_REASON, qi as secretNamedRecordNeedles, qn as looselyEqual, qo as isImpossibleEmptyStoredAttribute, qr as namesAnyDeclaredParameter, qs as refuseMalformedResourceEntriesForImport, qt as readsOnlyNoEchoParameters, r as keptWholeReasonText, ra as refusesFinalSnapshot, rc as refuseMalformedResourcePropertiesForExport, ri as exportNameNoEchoParameters, rl as CrossPrefixScanCache, rn as NESTED_PENDING_PARENT_REASON, ro as withSecretPhysicalIdsMaskedInState, rr as settleUnsettledPrevious, ru as displayAssemblyPath, s as checkNestedSsmNames, sc as hasReadableOrphans, si as collectDeclaredOutputNames, sl as isNotImplemented, so as applyRoleArnIfSet, sr as equalModuloMask, ss as shownType, t as DeployEngine, ta as effectiveDeletionPolicy, tc as refuseMalformedResourcePropertiesForDestroy, ti as secretSafeKeyDisplay, tl as rebuildClientForBucketRegion, tn as pendingRequestCount, to as secretPhysicalIdSegment, tr as DELETED_RESOURCE_REMEDY, u as healSlashedSsmParameterNames, ua as stripSiblingOwnedMembers, uc as refuseMalformedOrphans, ui as bindingSkippedOutputs, ul as isSecretValuedAttribute, uo as explicitRoleArnOrThrow, ur as updatePartialReason, us as isStatefulRecreateTargetSync, v as conditionInputsFrom, va as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, vl as loadPublishableAssetManifest, vn as dropFailedHint, vo as classifyRecordedSecretRegion, vr as demoteSupersededOrphans, w as listNestedTemplateRows, wa as isCustomResourceType$1, wc as malformedRenderedContainersWarning, wi as supersededHolderOf, wl as buildDenyExternalAccessPolicy, wn as makeSiblingClaimReader, wr as replacementNeverSwapped, ws as declaresNoEcho, x as childTemplateLoader, xc as repairMalformedOutputsForReadOnly, xi as isSupersededResourceRecord, xl as rewriteTemplateAssetReferences, xn as loadJournaledOrphans, xo as regionLessSecretName, xr as planFailedOps, xs as parameterInputsFor, y as parentSuppliedValues, ya as applyCustomResourceResponseExpiration, yc as refuseMalformedOutputs, yi as deleteSupersededEntry, yn as isHandledOrphan, yo as classifyReplaySecretRegion, yr as isJournaledOrphan, ys as maskedPropertyFingerprintsOf, z as perType, za as setResolvedResourceTimeouts, zc as hasReadableResources, zi as completedReplayEntries, zn as movedToHint, zo as keepHeldTokenProvenance, zr as nameScopeOf, zs as malformedLocalResourceEntriesWarning, zt as readRefactorMarker } from "./deploy-engine-Crq1_YaU.js";
|
|
10
10
|
import { n as canonicalizeRegion, r as derivePartitionAndUrlSuffix, t as PARTITION_TABLE } from "./aws-partition-DA0r2sr-.js";
|
|
11
|
-
import { A as describeJsonParseFailure, C as PhaseClock, D as renderPhaseTimings, M as parseFailureDebugDetail, O as timePhase, P as utf8ByteLength, d as getCreateOnlyPropertyPaths, g as describeTypeWithThrottleRetry, m as templateResourceTypes, p as prefetchCreateOnlyPropertyPaths, x as withRetry } from "./ec2-termination-protection-
|
|
12
|
-
import { t as expectedOwnerParam } from "./expected-bucket-owner-
|
|
13
|
-
import { Ct as isReadableBag, Et as shouldRetainResource, Ot as stackInstanceIdCarriedFrom, St as importableOutputs, Tt as orphansCarriedFrom, _t as acceptedCreateOnlyDropsOf, bt as hasReadableExportSet, gt as slowCcOperationTimeoutMs, vt as describeRegionValueKind, wt as orphansAfterRollback, xt as importableOutputKeys, yt as exportNamesCarriedFrom } from "./delete-started-
|
|
14
|
-
import { An as recordNoEchoAttributeValues, Bt as identityKeyFor, D as recordedNoEchoValuesOf, Fn as WHOLE_DYNAMIC_REFERENCE_PATTERN, Ft as keepTemplateLiteralLeaves, Ln as isSingleDynamicReferenceToken, Lt as spelledKeysOf, Mn as recordProvenPublicExpression, Mt as DYNAMIC_REFERENCE_TOKEN_SCAN, Nn as wholeStringLeavesOf, Nt as dynamicReferenceTokens, On as recordMaskOnlyValue, Ot as scrubResourceRecord, Pt as isUncertifiedBaselineMaskPosition, Rt as pathCrossesDottedKey, T as readsNoEchoSource, Tn as provenPublicValue, W as redactForState, Yt as inheritNestedStackParameterAssociations, _t as maskSecretsInText, at as literalSplitDelimitersOf, b as noEchoOutputsComparison, ct as recordLogOnlyParameterValue, dt as shareLogOnlyValues, et as carryLogOnlyValues, f as isMarkedCoordinate, ft as unionOfSecretBags, g as maskedLeafCoordinatesOf, gt as maskSecretsInError, h as maskWholeValue, it as hasMaskableValues, j as liveMatchesUnresolvedTokenFrame, jn as recordNoEchoParameterFreshValue, k as valueAtCoordinate, kn as recordMaskOnlyValuesIn, kt as withPhysicalNameCopies, ln as recordPhysicalNameCopy, m as maskReadbackAtCoordinates, mn as carriesSecretMask, mt as errorCauseChain, nt as createUnionSecretMasker, ot as logOnlyValueCount, p as maskAtCoordinates, pn as splitGetAttStringForm, pt as createSecretMasker, sn as physicalNameCopiesOf, st as printingCorpusOf, u as canonicalCoordinates, un as recordNestedStackParameterExpressions, ut as recordLogOnlyValue, v as noEchoCoordinatesOf, y as noEchoLeavesOf } from "./replacement-rules-
|
|
15
|
-
import { C as unsettledItemsField, E as unsettledPropertiesOf, O as withUnsettledProperties, i as withResourceDeadline, k as withoutUnsettledProperties, w as unsettledItemsOf } from "./resource-deadline-
|
|
16
|
-
import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-
|
|
11
|
+
import { A as describeJsonParseFailure, C as PhaseClock, D as renderPhaseTimings, M as parseFailureDebugDetail, O as timePhase, P as utf8ByteLength, d as getCreateOnlyPropertyPaths, g as describeTypeWithThrottleRetry, m as templateResourceTypes, p as prefetchCreateOnlyPropertyPaths, x as withRetry } from "./ec2-termination-protection-ktQGLiiN.js";
|
|
12
|
+
import { t as expectedOwnerParam } from "./expected-bucket-owner-BB5y_p0b.js";
|
|
13
|
+
import { Ct as isReadableBag, Et as shouldRetainResource, Ot as stackInstanceIdCarriedFrom, St as importableOutputs, Tt as orphansCarriedFrom, _t as acceptedCreateOnlyDropsOf, bt as hasReadableExportSet, gt as slowCcOperationTimeoutMs, vt as describeRegionValueKind, wt as orphansAfterRollback, xt as importableOutputKeys, yt as exportNamesCarriedFrom } from "./delete-started-Du9ABI-8.js";
|
|
14
|
+
import { An as recordNoEchoAttributeValues, Bt as identityKeyFor, D as recordedNoEchoValuesOf, Fn as WHOLE_DYNAMIC_REFERENCE_PATTERN, Ft as keepTemplateLiteralLeaves, Ln as isSingleDynamicReferenceToken, Lt as spelledKeysOf, Mn as recordProvenPublicExpression, Mt as DYNAMIC_REFERENCE_TOKEN_SCAN, Nn as wholeStringLeavesOf, Nt as dynamicReferenceTokens, On as recordMaskOnlyValue, Ot as scrubResourceRecord, Pt as isUncertifiedBaselineMaskPosition, Rt as pathCrossesDottedKey, T as readsNoEchoSource, Tn as provenPublicValue, W as redactForState, Yt as inheritNestedStackParameterAssociations, _t as maskSecretsInText, at as literalSplitDelimitersOf, b as noEchoOutputsComparison, ct as recordLogOnlyParameterValue, dt as shareLogOnlyValues, et as carryLogOnlyValues, f as isMarkedCoordinate, ft as unionOfSecretBags, g as maskedLeafCoordinatesOf, gt as maskSecretsInError, h as maskWholeValue, it as hasMaskableValues, j as liveMatchesUnresolvedTokenFrame, jn as recordNoEchoParameterFreshValue, k as valueAtCoordinate, kn as recordMaskOnlyValuesIn, kt as withPhysicalNameCopies, ln as recordPhysicalNameCopy, m as maskReadbackAtCoordinates, mn as carriesSecretMask, mt as errorCauseChain, nt as createUnionSecretMasker, ot as logOnlyValueCount, p as maskAtCoordinates, pn as splitGetAttStringForm, pt as createSecretMasker, sn as physicalNameCopiesOf, st as printingCorpusOf, u as canonicalCoordinates, un as recordNestedStackParameterExpressions, ut as recordLogOnlyValue, v as noEchoCoordinatesOf, y as noEchoLeavesOf } from "./replacement-rules-CKf0IgJ7.js";
|
|
15
|
+
import { C as unsettledItemsField, E as unsettledPropertiesOf, O as withUnsettledProperties, i as withResourceDeadline, k as withoutUnsettledProperties, w as unsettledItemsOf } from "./resource-deadline-CWs3cu_e.js";
|
|
16
|
+
import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-BQT6UV3q.js";
|
|
17
17
|
import { t as cdkdCacheHome } from "./cli.js";
|
|
18
18
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
19
19
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetObjectCommand, HeadBucketCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutBucketVersioningCommand, PutObjectCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -40,7 +40,7 @@ import * as readline$1 from "node:readline/promises";
|
|
|
40
40
|
import readline from "node:readline/promises";
|
|
41
41
|
import { Document, Pair, Scalar, YAMLError, YAMLMap, YAMLSeq, isScalar, parse, parseDocument, stringify, visit } from "yaml";
|
|
42
42
|
import { emitKeypressEvents } from "node:readline";
|
|
43
|
-
import { collectSsmParameterRefs, createLocalStartAgentCoreCommand, createLocalStartCloudFrontCommand, createLocalStartMicrovmCommand, createLocalStartWebFunctionCommand, createLocalStateProvider, getEmbedConfig, isCfnFlagPresent, listTargets, rejectExplicitCfnStackWithMultipleStacks, resolveCfnFallbackRegion, resolveSsmParameters, setEmbedConfig, substituteAgainstState, substituteAgainstStateAsync, substituteEnvVarsFromState, substituteEnvVarsFromStateAsync } from "cdk-local";
|
|
43
|
+
import { collectSsmParameterRefs, createLocalStartAgentCoreCommand, createLocalStartCloudFrontCommand, createLocalStartMicrovmCommand, createLocalStartWebFunctionCommand, createLocalStateProvider, getEmbedConfig, isCfnFlagPresent, listTargets, rejectExplicitCfnStackWithMultipleStacks, resolveCfnFallbackRegion, resolveCfnStackName, resolveSsmParameters, setEmbedConfig, substituteAgainstState, substituteAgainstStateAsync, substituteEnvVarsFromState, substituteEnvVarsFromStateAsync } from "cdk-local";
|
|
44
44
|
import { WebSocketServer } from "ws";
|
|
45
45
|
|
|
46
46
|
// src/cli/aws-emulator-activation.ts
|
|
@@ -1450,7 +1450,7 @@ function collectCrossStackRefs(node, onRef, unconditional) {
|
|
|
1450
1450
|
// src/provisioning/register-providers.ts
|
|
1451
1451
|
let providerClasses;
|
|
1452
1452
|
function loadProviderClasses() {
|
|
1453
|
-
providerClasses ??= import("./provider-classes-
|
|
1453
|
+
providerClasses ??= import("./provider-classes-BUU9HgA_.js");
|
|
1454
1454
|
return providerClasses;
|
|
1455
1455
|
}
|
|
1456
1456
|
function registerAllProviders(registry, classes) {
|
|
@@ -6757,7 +6757,7 @@ async function saveScrubbedState(stateBackend, stackName, region, state, loaded)
|
|
|
6757
6757
|
const SCRUB_CLEAN_SCOPE_NOTE = " (scrub checks only values the template names through a {{resolve:...}} reference)";
|
|
6758
6758
|
|
|
6759
6759
|
// src/cli/commands/scrub/nested.ts
|
|
6760
|
-
const NESTED_STACK_TYPE$
|
|
6760
|
+
const NESTED_STACK_TYPE$3 = "AWS::CloudFormation::Stack";
|
|
6761
6761
|
function readNestedChildTemplate$1(templatePath) {
|
|
6762
6762
|
let template;
|
|
6763
6763
|
try {
|
|
@@ -7960,7 +7960,7 @@ async function scrubStackResolvePass({ stack, region, logger, newBag, perResourc
|
|
|
7960
7960
|
const bagKeys = resolveInput !== null && typeof resolveInput === "object" && !Array.isArray(resolveInput) ? Object.keys(resolveInput) : void 0;
|
|
7961
7961
|
const intrinsicShapedBag = bagKeys?.some((k) => RESOLVER_DISPATCH_KEYS.has(k)) ?? false;
|
|
7962
7962
|
const resolveUnits = bagKeys && !intrinsicShapedBag ? Object.entries(resolveInput) : [["", resolveInput]];
|
|
7963
|
-
const isNestedRow = templateResource.Type === NESTED_STACK_TYPE$
|
|
7963
|
+
const isNestedRow = templateResource.Type === NESTED_STACK_TYPE$3;
|
|
7964
7964
|
const resolvedRowProps = nullPrototypeRecord();
|
|
7965
7965
|
if (isNestedRow) nestedRowParameters.set(logicalId, {
|
|
7966
7966
|
value: void 0,
|
|
@@ -7996,7 +7996,7 @@ async function scrubStackResolvePass({ stack, region, logger, newBag, perResourc
|
|
|
7996
7996
|
}
|
|
7997
7997
|
perResourceTemplateProps.set(logicalId, templateResource.Properties);
|
|
7998
7998
|
const nestedParameters = nestedRowParameters.get(logicalId);
|
|
7999
|
-
if (isNestedRow && nestedParameters?.complete === true) recordNestedStackParameterExpressions(recordedSecretValues, NESTED_STACK_TYPE$
|
|
7999
|
+
if (isNestedRow && nestedParameters?.complete === true) recordNestedStackParameterExpressions(recordedSecretValues, NESTED_STACK_TYPE$3, resolvedRowProps, templateResource.Properties);
|
|
8000
8000
|
}
|
|
8001
8001
|
for (const [orphanIndex, record] of (state.orphans ?? []).entries()) {
|
|
8002
8002
|
const recordedSecretValues = newBag();
|
|
@@ -10079,7 +10079,18 @@ function canonicalizeIpProtocols(baseline, aws, resourceType) {
|
|
|
10079
10079
|
}
|
|
10080
10080
|
|
|
10081
10081
|
// src/cli/commands/drift/baseline-keys.ts
|
|
10082
|
-
const UNDECLARED_UNCOMPARED_KEYS = {
|
|
10082
|
+
const UNDECLARED_UNCOMPARED_KEYS = {
|
|
10083
|
+
"AWS::S3::Bucket": ["NotificationConfiguration"],
|
|
10084
|
+
"AWS::Events::EventBus": ["Policy"],
|
|
10085
|
+
"AWS::IAM::User": ["Groups", "ManagedPolicyArns"],
|
|
10086
|
+
"AWS::IAM::Role": ["ManagedPolicyArns"],
|
|
10087
|
+
"AWS::IAM::Group": ["ManagedPolicyArns"],
|
|
10088
|
+
"AWS::IAM::ManagedPolicy": [
|
|
10089
|
+
"Groups",
|
|
10090
|
+
"Roles",
|
|
10091
|
+
"Users"
|
|
10092
|
+
]
|
|
10093
|
+
};
|
|
10083
10094
|
function undeclaredUncomparedDriftKeys(resourceType, properties) {
|
|
10084
10095
|
const keys = hasOwnKey(UNDECLARED_UNCOMPARED_KEYS, resourceType) ? UNDECLARED_UNCOMPARED_KEYS[resourceType] : [];
|
|
10085
10096
|
if (keys.length === 0) return [];
|
|
@@ -11091,7 +11102,7 @@ function sameRecordedJson(candidate, recorded) {
|
|
|
11091
11102
|
|
|
11092
11103
|
// src/cli/commands/drift/compare.ts
|
|
11093
11104
|
async function compareDriftReadback(args) {
|
|
11094
|
-
const { region, resolvePrincipalUniqueId, outcomes, logger, secretResolvers, producerRegions, stackSecretNames, resource, logicalId, provider, secrets, printing, aws } = args;
|
|
11105
|
+
const { region, resolvePrincipalUniqueId, outcomes, logger, secretResolvers, producerRegions, stackSecretNames, resource, logicalId, provider, secrets, printing, aws, readContext } = args;
|
|
11095
11106
|
const ignorePaths = provider.getDriftUnknownPaths ? provider.getDriftUnknownPaths(resource.resourceType, resource.properties ?? {}) : [];
|
|
11096
11107
|
const unorderedPaths = provider.getDriftUnorderedPaths ? provider.getDriftUnorderedPaths(resource.resourceType) : [];
|
|
11097
11108
|
const useObserved = resource.observedProperties !== void 0;
|
|
@@ -11138,10 +11149,11 @@ async function compareDriftReadback(args) {
|
|
|
11138
11149
|
const observedIgnorePaths = useObserved ? undeclaredEmptyObservedKeys(resource.observedProperties, resource.properties ?? {}) : [];
|
|
11139
11150
|
const normalized = await canonicalizePrincipalUniqueIds(comparisonBaseline, aws, resolvePrincipalUniqueId);
|
|
11140
11151
|
const protocolNormalized = canonicalizeIpProtocols(normalized.baseline, normalized.aws, resource.resourceType);
|
|
11152
|
+
const siblingStripped = stripSiblingOwnedMembers(resource.resourceType, resource.physicalId, protocolNormalized.baseline, protocolNormalized.aws, resource.properties, readContext);
|
|
11141
11153
|
const canonicalized = provider.canonicalizeDriftProperties ? {
|
|
11142
|
-
baseline: provider.canonicalizeDriftProperties(resource.resourceType,
|
|
11143
|
-
aws: provider.canonicalizeDriftProperties(resource.resourceType,
|
|
11144
|
-
} :
|
|
11154
|
+
baseline: provider.canonicalizeDriftProperties(resource.resourceType, siblingStripped.baseline),
|
|
11155
|
+
aws: provider.canonicalizeDriftProperties(resource.resourceType, siblingStripped.aws)
|
|
11156
|
+
} : siblingStripped;
|
|
11145
11157
|
const paired = provider.canonicalizeDriftPair ? await provider.canonicalizeDriftPair(resource.resourceType, canonicalized.baseline, canonicalized.aws, resource.properties ?? {}) : canonicalized;
|
|
11146
11158
|
const nameBaseline = canonicalizeDerivedPatternBName(resource.resourceType, paired.baseline, paired.aws);
|
|
11147
11159
|
const comparedBaseline = useObserved ? withAbsentDefaultKeys(nameBaseline, paired.aws, driftAbsentMeansDefaultKeys(provider, resource.resourceType, resource.properties)) : nameBaseline;
|
|
@@ -11375,8 +11387,9 @@ async function runDriftForStack(stackName, region, stateBackend, providerRegistr
|
|
|
11375
11387
|
await withPrintingSecrets(printing, async () => {
|
|
11376
11388
|
try {
|
|
11377
11389
|
let aws;
|
|
11390
|
+
const readContext = buildReadCurrentStateContext(state, logicalId);
|
|
11378
11391
|
if (provider.readCurrentState) {
|
|
11379
|
-
aws = await provider.readCurrentState(resource.physicalId, logicalId, resource.resourceType, resource.properties ?? {},
|
|
11392
|
+
aws = await provider.readCurrentState(resource.physicalId, logicalId, resource.resourceType, resource.properties ?? {}, readContext);
|
|
11380
11393
|
readReturned = true;
|
|
11381
11394
|
noteReadReturned();
|
|
11382
11395
|
} else {
|
|
@@ -11430,7 +11443,8 @@ async function runDriftForStack(stackName, region, stateBackend, providerRegistr
|
|
|
11430
11443
|
provider,
|
|
11431
11444
|
secrets,
|
|
11432
11445
|
printing,
|
|
11433
|
-
aws
|
|
11446
|
+
aws,
|
|
11447
|
+
readContext
|
|
11434
11448
|
});
|
|
11435
11449
|
} catch (err) {
|
|
11436
11450
|
if (isNoReadHandlerError(err)) {
|
|
@@ -11627,6 +11641,7 @@ async function revertDriftedOutcome(args) {
|
|
|
11627
11641
|
if (unresolvedTokens.size > 0) logger.warn(` ! [revert] ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): cdkd cannot resolve ${maskSecretsInText([...unresolvedTokens].join(", "), secrets)} — a property whose WHOLE value is one of these tokens is left UNCHANGED by this revert when cdkd can pair its position against AWS's report (a list element by an identity field, or by its list's own unchanged literal values); a token EMBEDDED in a longer string is left unchanged the same way when the rest of that string is exactly what AWS holds. Where it cannot pair or match, the token is written literally, exactly as 'cdkd deploy' does, so a resolved value AWS holds there is overwritten.`);
|
|
11628
11642
|
let newProperties;
|
|
11629
11643
|
try {
|
|
11644
|
+
desiredProperties = stripSiblingOwnedMembers(outcome.resourceType, stateResource.physicalId, desiredProperties, outcome.awsProperties, stateResource.properties, buildReadCurrentStateContext(report.state, outcome.logicalId)).baseline;
|
|
11630
11645
|
if (provider.canonicalizeDriftPair) desiredProperties = (await provider.canonicalizeDriftPair(outcome.resourceType, desiredProperties, outcome.awsProperties, stateResource.properties ?? {})).baseline;
|
|
11631
11646
|
const overlaid = buildRevertNewProperties(outcome.changes, desiredProperties, outcome.awsProperties, stateResource.observedProperties === void 0 ? { preserveUntemplated: true } : { absentMeansDefault: driftAbsentMeansDefaultKeys(provider, outcome.resourceType, stateResource.properties) });
|
|
11632
11647
|
const certifiedOverlay = overlayLiveAtUncertifiedPaths(overlaid, [...outcome.uncertifiedPaths, ...outcome.noEchoParameterPaths ?? []], outcome.awsProperties, desiredProperties, secrets, new Set(outcome.changes.map((change) => change.path.split(".", 1)[0] ?? "")), spelledKeysOf(stateResource.properties ?? {}));
|
|
@@ -12123,7 +12138,7 @@ const NOECHO_PRINTING_BIND_CAP_MS = 1e4;
|
|
|
12123
12138
|
async function purgeStateHistoryIfOptedIn(ctx, stackName, region) {
|
|
12124
12139
|
if (ctx.purgeStateHistory === true) await ctx.stateBackend.purgeDeletedStateHistory(stackName, region);
|
|
12125
12140
|
}
|
|
12126
|
-
const NESTED_STACK_TYPE$
|
|
12141
|
+
const NESTED_STACK_TYPE$2 = "AWS::CloudFormation::Stack";
|
|
12127
12142
|
function maskedSnapshotLogger(logger, mask) {
|
|
12128
12143
|
return {
|
|
12129
12144
|
info: (message) => logger.info(mask(message)),
|
|
@@ -12800,6 +12815,7 @@ async function deleteStackResource({ lock, state, ctx, stackName, logger, result
|
|
|
12800
12815
|
recordedAttributes: resource.attributes,
|
|
12801
12816
|
recordedCreateOnlyDrops: resource.acceptedCreateOnlyDrops,
|
|
12802
12817
|
recordedNoEchoLeaves: resource.noEchoLeaves,
|
|
12818
|
+
recordedTypedPayloadLeaves: resource.typedPayloadLeaves,
|
|
12803
12819
|
...noEchoDeleteValues !== void 0 && { noEchoDeleteValues },
|
|
12804
12820
|
...ctx.noEchoReresolver !== void 0 && { noEchoReresolver: ctx.noEchoReresolver },
|
|
12805
12821
|
...ctx.stackDestroy === true && { stackDestroy: true },
|
|
@@ -13729,8 +13745,8 @@ async function orderDestroyTargets(targets, appStacks, synthScanStacks, regionFo
|
|
|
13729
13745
|
|
|
13730
13746
|
// src/cli/commands/destroy-runner/emulator-custom-resources.ts
|
|
13731
13747
|
const NAMED_MAX = 5;
|
|
13732
|
-
const MAX_NESTED_DEPTH = 32;
|
|
13733
|
-
const NESTED_STACK_TYPE = "AWS::CloudFormation::Stack";
|
|
13748
|
+
const MAX_NESTED_DEPTH$1 = 32;
|
|
13749
|
+
const NESTED_STACK_TYPE$1 = "AWS::CloudFormation::Stack";
|
|
13734
13750
|
const LAMBDA_FUNCTION_ARN = /^arn:aws[a-z-]*:lambda:[^:]+:(\d{12}):function:[^:]+(?::[^:]+)?$/;
|
|
13735
13751
|
async function refuseCustomResourcesWithoutApp(targets, deps) {
|
|
13736
13752
|
const command = localCustomResourceCommand();
|
|
@@ -13780,7 +13796,7 @@ async function collect(stackName, region, state, nestedStack, depth, account, de
|
|
|
13780
13796
|
for (const [logicalId, row] of Object.entries(rows)) {
|
|
13781
13797
|
if (row === null || typeof row !== "object") continue;
|
|
13782
13798
|
if (isCustomResourceType$1(row.resourceType) && runsInLocalRuntime(row.properties?.["ServiceToken"], account)) out.push(label(logicalId));
|
|
13783
|
-
else if (row.resourceType === NESTED_STACK_TYPE && depth < MAX_NESTED_DEPTH) {
|
|
13799
|
+
else if (row.resourceType === NESTED_STACK_TYPE$1 && depth < MAX_NESTED_DEPTH$1) {
|
|
13784
13800
|
const childName = `${stackName}~${logicalId}`;
|
|
13785
13801
|
const child = await deps.getState(childName, region);
|
|
13786
13802
|
if (child !== null) await collect(childName, region, child.state, childName, depth + 1, account, deps, out);
|
|
@@ -25160,6 +25176,277 @@ function hasSdkMetadata(error) {
|
|
|
25160
25176
|
return error.$metadata !== void 0;
|
|
25161
25177
|
}
|
|
25162
25178
|
|
|
25179
|
+
// src/local/cross-stack-secrets.ts
|
|
25180
|
+
function withSourceDetail(judged) {
|
|
25181
|
+
return judged.source === void 0 ? judged : {
|
|
25182
|
+
...judged,
|
|
25183
|
+
detail: sourceRemedy(judged.source, true)
|
|
25184
|
+
};
|
|
25185
|
+
}
|
|
25186
|
+
function producerSecretCheckOf(resolver) {
|
|
25187
|
+
const r = resolver;
|
|
25188
|
+
const judgedImport = r?.resolveImportJudged;
|
|
25189
|
+
const judgedOutput = r?.resolveGetStackOutputJudged;
|
|
25190
|
+
if (typeof judgedImport !== "function" || typeof judgedOutput !== "function") return void 0;
|
|
25191
|
+
return {
|
|
25192
|
+
resolveImportJudged: (exportName) => judgedImport.call(resolver, exportName),
|
|
25193
|
+
resolveGetStackOutputJudged: (stack, region, output) => judgedOutput.call(resolver, stack, region, output)
|
|
25194
|
+
};
|
|
25195
|
+
}
|
|
25196
|
+
function strongerJudgement(a, b) {
|
|
25197
|
+
if (a === void 0) return b;
|
|
25198
|
+
if (b === void 0) return a;
|
|
25199
|
+
return strongerVerdict(a.verdict, b.verdict) === a.verdict ? a : b;
|
|
25200
|
+
}
|
|
25201
|
+
function strongerVerdict(a, b) {
|
|
25202
|
+
if (a === "secret" || b === "secret") return "secret";
|
|
25203
|
+
return a ?? b;
|
|
25204
|
+
}
|
|
25205
|
+
const SEGMENT_SUBSTRING_FLOOR = 4;
|
|
25206
|
+
const NAMED_LEAF_EXACT_FLOOR = 8;
|
|
25207
|
+
const NAMED_LEAF_FLOOR = 16;
|
|
25208
|
+
function namedLeaves(name, value, out = []) {
|
|
25209
|
+
if (typeof value === "string") out.push({
|
|
25210
|
+
path: name,
|
|
25211
|
+
leaf: value
|
|
25212
|
+
});
|
|
25213
|
+
else if (Array.isArray(value)) value.forEach((v, i) => namedLeaves(`${name}.${i}`, v, out));
|
|
25214
|
+
else if (value !== null && typeof value === "object") for (const [k, v] of Object.entries(value)) namedLeaves(`${name}.${k}`, v, out);
|
|
25215
|
+
return out;
|
|
25216
|
+
}
|
|
25217
|
+
const isPlaintext = (n) => n !== "" && n !== "***" && !n.includes("{{resolve:");
|
|
25218
|
+
function producerSecretNeedles(state) {
|
|
25219
|
+
const segments = secretSegmentsOfState(state).filter(isPlaintext);
|
|
25220
|
+
const typed = [];
|
|
25221
|
+
const named = [];
|
|
25222
|
+
const resources = state !== null && typeof state === "object" ? state.resources : void 0;
|
|
25223
|
+
if (resources !== null && typeof resources === "object" && !Array.isArray(resources)) for (const record of Object.values(resources)) {
|
|
25224
|
+
if (record === null || typeof record !== "object") continue;
|
|
25225
|
+
const r = record;
|
|
25226
|
+
const attributes = r.attributes;
|
|
25227
|
+
if (attributes === null || typeof attributes !== "object" || Array.isArray(attributes)) continue;
|
|
25228
|
+
const type = typeof r.resourceType === "string" ? r.resourceType : void 0;
|
|
25229
|
+
for (const [name, stored] of Object.entries(attributes)) {
|
|
25230
|
+
const isTyped = isSecretValuedAttribute(type, name);
|
|
25231
|
+
for (const { path, leaf } of namedLeaves(name, stored)) {
|
|
25232
|
+
if (!isPlaintext(leaf)) continue;
|
|
25233
|
+
if (isTyped) typed.push(leaf);
|
|
25234
|
+
else if (isSensitiveAttributeName(path) && leaf.length >= NAMED_LEAF_EXACT_FLOOR) named.push(leaf);
|
|
25235
|
+
}
|
|
25236
|
+
}
|
|
25237
|
+
}
|
|
25238
|
+
return {
|
|
25239
|
+
segments,
|
|
25240
|
+
typed,
|
|
25241
|
+
named
|
|
25242
|
+
};
|
|
25243
|
+
}
|
|
25244
|
+
function holds(value, needle, floor) {
|
|
25245
|
+
return value === needle || needle.length >= floor && value.includes(needle);
|
|
25246
|
+
}
|
|
25247
|
+
const emptySummary = () => ({
|
|
25248
|
+
segments: /* @__PURE__ */ new Set(),
|
|
25249
|
+
typed: /* @__PURE__ */ new Set(),
|
|
25250
|
+
named: /* @__PURE__ */ new Set(),
|
|
25251
|
+
unverified: /* @__PURE__ */ new Set(),
|
|
25252
|
+
opaqueSource: void 0
|
|
25253
|
+
});
|
|
25254
|
+
function verdictOf(summary, served) {
|
|
25255
|
+
const secret = { verdict: "secret" };
|
|
25256
|
+
for (const s of summary.segments) if (holds(served, s, SEGMENT_SUBSTRING_FLOOR)) return secret;
|
|
25257
|
+
for (const t of summary.typed) if (holds(served, t, SEGMENT_SUBSTRING_FLOOR)) return secret;
|
|
25258
|
+
for (const n of summary.named) if (holds(served, n, NAMED_LEAF_FLOOR)) return secret;
|
|
25259
|
+
if (summary.opaqueSource !== void 0) return {
|
|
25260
|
+
verdict: "unreadable",
|
|
25261
|
+
source: summary.opaqueSource
|
|
25262
|
+
};
|
|
25263
|
+
for (const u of summary.unverified) if (holds(served, u, NAMED_LEAF_FLOOR)) return { verdict: "unreadable" };
|
|
25264
|
+
}
|
|
25265
|
+
function servedOutputValue(value) {
|
|
25266
|
+
if (typeof value === "string") return value;
|
|
25267
|
+
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
25268
|
+
return JSON.stringify(value);
|
|
25269
|
+
}
|
|
25270
|
+
const NESTED_STACK_TYPE = "AWS::CloudFormation::Stack";
|
|
25271
|
+
const MAX_NESTED_DEPTH = 32;
|
|
25272
|
+
function sourcesOf(state) {
|
|
25273
|
+
if (state === null || typeof state !== "object") return [];
|
|
25274
|
+
const out = [];
|
|
25275
|
+
for (const list of [state.imports, state.outputReads]) {
|
|
25276
|
+
if (!Array.isArray(list)) continue;
|
|
25277
|
+
for (const entry of list) {
|
|
25278
|
+
if (entry === null || typeof entry !== "object") continue;
|
|
25279
|
+
const { sourceStack, sourceRegion } = entry;
|
|
25280
|
+
if (typeof sourceStack !== "string" || typeof sourceRegion !== "string") continue;
|
|
25281
|
+
if (sourceStack === "***" || sourceStack.includes("{{resolve:")) out.push("redacted");
|
|
25282
|
+
else if (sourceStack !== "") out.push({
|
|
25283
|
+
stackName: sourceStack,
|
|
25284
|
+
region: sourceRegion
|
|
25285
|
+
});
|
|
25286
|
+
}
|
|
25287
|
+
}
|
|
25288
|
+
return out;
|
|
25289
|
+
}
|
|
25290
|
+
var ProducerSecretReader = class {
|
|
25291
|
+
reads = /* @__PURE__ */ new Map();
|
|
25292
|
+
getState;
|
|
25293
|
+
debug;
|
|
25294
|
+
listStacks;
|
|
25295
|
+
listed;
|
|
25296
|
+
constructor(getState, debug, listStacks) {
|
|
25297
|
+
this.getState = getState;
|
|
25298
|
+
this.debug = debug;
|
|
25299
|
+
this.listStacks = listStacks;
|
|
25300
|
+
}
|
|
25301
|
+
async readSource(stackName, region) {
|
|
25302
|
+
const exact = await this.read(stackName, region);
|
|
25303
|
+
if (typeof exact === "object") return {
|
|
25304
|
+
state: exact.state,
|
|
25305
|
+
region
|
|
25306
|
+
};
|
|
25307
|
+
if (exact === "error" || this.listStacks === void 0) return exact;
|
|
25308
|
+
const list = this.listStacks;
|
|
25309
|
+
this.listed ??= Promise.resolve().then(() => list()).catch((err) => {
|
|
25310
|
+
this.debug(`state listing failed while checking a cross-stack value for secrets: ${displaySafe(describeAwsFailure(err).detail)}`);
|
|
25311
|
+
return "error";
|
|
25312
|
+
});
|
|
25313
|
+
const refs = await this.listed;
|
|
25314
|
+
if (refs === "error") return "error";
|
|
25315
|
+
const folded = canonicalizeRegion(region);
|
|
25316
|
+
const variants = refs.filter((ref) => ref.stackName === stackName && ref.region !== void 0 && ref.region !== region && canonicalizeRegion(ref.region) === folded);
|
|
25317
|
+
let failed = false;
|
|
25318
|
+
for (const ref of variants) {
|
|
25319
|
+
const got = await this.read(stackName, ref.region);
|
|
25320
|
+
if (typeof got === "object") return {
|
|
25321
|
+
state: got.state,
|
|
25322
|
+
region: ref.region
|
|
25323
|
+
};
|
|
25324
|
+
if (got === "error") failed = true;
|
|
25325
|
+
}
|
|
25326
|
+
return failed ? "error" : "absent";
|
|
25327
|
+
}
|
|
25328
|
+
read(stackName, region) {
|
|
25329
|
+
const key = producerRecordKey(stackName, region);
|
|
25330
|
+
let read = this.reads.get(key);
|
|
25331
|
+
if (read === void 0) {
|
|
25332
|
+
read = Promise.resolve().then(() => this.getState(stackName, region)).then((got) => got === null || got === void 0 || got.state === void 0 ? "absent" : { state: got.state }, (err) => {
|
|
25333
|
+
this.debug(`state read failed for ${displayIdent(stackName)} (${displayIdent(region)}) while checking a cross-stack value for secrets: ${displaySafe(describeAwsFailure(err).detail)}`);
|
|
25334
|
+
return "error";
|
|
25335
|
+
});
|
|
25336
|
+
this.reads.set(key, read);
|
|
25337
|
+
}
|
|
25338
|
+
return read;
|
|
25339
|
+
}
|
|
25340
|
+
async summarize(stackName, region, state) {
|
|
25341
|
+
const summary = emptySummary();
|
|
25342
|
+
const visited = /* @__PURE__ */ new Set([producerRecordKey(stackName, region)]);
|
|
25343
|
+
let frontier = [{
|
|
25344
|
+
stackName,
|
|
25345
|
+
region,
|
|
25346
|
+
state,
|
|
25347
|
+
depth: 0
|
|
25348
|
+
}];
|
|
25349
|
+
while (frontier.length > 0) {
|
|
25350
|
+
const next = [];
|
|
25351
|
+
const claim = (name, at) => {
|
|
25352
|
+
const key = producerRecordKey(name, at);
|
|
25353
|
+
if (visited.has(key)) return false;
|
|
25354
|
+
visited.add(key);
|
|
25355
|
+
return true;
|
|
25356
|
+
};
|
|
25357
|
+
await Promise.all(frontier.map(async (node) => {
|
|
25358
|
+
const own = producerSecretNeedles(node.state);
|
|
25359
|
+
for (const v of own.segments) summary.segments.add(v);
|
|
25360
|
+
for (const v of own.typed) summary.typed.add(v);
|
|
25361
|
+
for (const v of own.named) summary.named.add(v);
|
|
25362
|
+
const deeper = node.depth + 1;
|
|
25363
|
+
const resources = node.state !== null && typeof node.state === "object" ? node.state.resources : void 0;
|
|
25364
|
+
const nested = (resources !== null && typeof resources === "object" && !Array.isArray(resources) ? Object.entries(resources) : []).map(async ([logicalId, record]) => {
|
|
25365
|
+
if (record === null || typeof record !== "object") return;
|
|
25366
|
+
const r = record;
|
|
25367
|
+
if (r.resourceType !== NESTED_STACK_TYPE) return;
|
|
25368
|
+
const childName = `${node.stackName}~${logicalId}`;
|
|
25369
|
+
if (!claim(childName, node.region)) return;
|
|
25370
|
+
const child = deeper <= MAX_NESTED_DEPTH ? await this.read(childName, node.region) : "error";
|
|
25371
|
+
if (typeof child === "object") {
|
|
25372
|
+
next.push({
|
|
25373
|
+
stackName: childName,
|
|
25374
|
+
region: node.region,
|
|
25375
|
+
state: child.state,
|
|
25376
|
+
depth: deeper
|
|
25377
|
+
});
|
|
25378
|
+
return;
|
|
25379
|
+
}
|
|
25380
|
+
for (const { leaf } of namedLeaves("", r.attributes)) if (isPlaintext(leaf)) summary.unverified.add(leaf);
|
|
25381
|
+
});
|
|
25382
|
+
const sources = sourcesOf(node.state).map(async (source) => {
|
|
25383
|
+
if (source === "redacted") {
|
|
25384
|
+
summary.opaqueSource ??= { reason: "redacted" };
|
|
25385
|
+
return;
|
|
25386
|
+
}
|
|
25387
|
+
const shown = `${displayIdent(source.stackName)} (${displayIdent(source.region)})`;
|
|
25388
|
+
if (deeper > MAX_NESTED_DEPTH) {
|
|
25389
|
+
summary.opaqueSource ??= {
|
|
25390
|
+
reason: "too-deep",
|
|
25391
|
+
shown
|
|
25392
|
+
};
|
|
25393
|
+
return;
|
|
25394
|
+
}
|
|
25395
|
+
if (!claim(source.stackName, source.region)) return;
|
|
25396
|
+
const got = await this.readSource(source.stackName, source.region);
|
|
25397
|
+
if (got === "error") summary.opaqueSource ??= {
|
|
25398
|
+
reason: "unreadable",
|
|
25399
|
+
shown
|
|
25400
|
+
};
|
|
25401
|
+
else if (got !== "absent") next.push({
|
|
25402
|
+
stackName: source.stackName,
|
|
25403
|
+
region: got.region,
|
|
25404
|
+
state: got.state,
|
|
25405
|
+
depth: deeper
|
|
25406
|
+
});
|
|
25407
|
+
});
|
|
25408
|
+
await Promise.all([...nested, ...sources]);
|
|
25409
|
+
}));
|
|
25410
|
+
frontier = next;
|
|
25411
|
+
}
|
|
25412
|
+
return summary;
|
|
25413
|
+
}
|
|
25414
|
+
async judge(stackName, region, state, served) {
|
|
25415
|
+
return verdictOf(await this.summarize(stackName, region, state), served);
|
|
25416
|
+
}
|
|
25417
|
+
async judgeIndexed(producerStack, producerRegion, exportName, served) {
|
|
25418
|
+
const got = await this.read(producerStack, producerRegion);
|
|
25419
|
+
if (got === "absent") return { verdict: "stale" };
|
|
25420
|
+
if (got === "error") return { verdict: "unreadable" };
|
|
25421
|
+
const state = got.state;
|
|
25422
|
+
const verdict = await this.judge(producerStack, producerRegion, state, served);
|
|
25423
|
+
if (verdict?.verdict === "secret") return verdict;
|
|
25424
|
+
const outputs = state.outputs;
|
|
25425
|
+
return (outputs !== null && typeof outputs === "object" && importableOutputKeys(state).includes(exportName) ? servedOutputValue(outputs[exportName]) : void 0) !== served ? { verdict: "stale" } : verdict;
|
|
25426
|
+
}
|
|
25427
|
+
};
|
|
25428
|
+
function sourceRemedy(source, bare = false) {
|
|
25429
|
+
if (source.reason === "redacted") return "the producer re-exports from a stack whose name is recorded masked, so cdkd cannot find its state";
|
|
25430
|
+
if (source.reason === "too-deep") return `the producer re-exports from ${source.shown}, beyond the ${MAX_NESTED_DEPTH}-level re-export bound`;
|
|
25431
|
+
const remedy = bare ? "; retry, or upgrade cdkd for a newer-schema record" : " (retry; or a newer-schema record needs a cdkd upgrade)";
|
|
25432
|
+
return `the producer re-exports from ${source.shown}, whose state cdkd could not read${remedy}`;
|
|
25433
|
+
}
|
|
25434
|
+
function producerSecretArgvReason(judgement) {
|
|
25435
|
+
const tail = "which cdkd will not put on the docker run command line; pass the value through Environment or Secrets instead";
|
|
25436
|
+
if (judgement.verdict === "secret") return `resolved a cross-stack value holding a secret of the producer stack, ${tail}`;
|
|
25437
|
+
if (judgement.verdict === "stale") return `resolved a cross-stack value the producer stack no longer exports (a stale exports index entry), so cdkd could not check it for secrets, ${tail}`;
|
|
25438
|
+
if (judgement.source !== void 0) return `resolved a cross-stack value cdkd could not check for secrets: ${sourceRemedy(judgement.source)}, ${tail}`;
|
|
25439
|
+
if (judgement.detail !== void 0) return `resolved a cross-stack value cdkd could not check for secrets: ${displaySafe(judgement.detail)}, ${tail}`;
|
|
25440
|
+
return `resolved a cross-stack value whose producer stack's state cdkd could not read to check it for secrets, ${tail}`;
|
|
25441
|
+
}
|
|
25442
|
+
function producerSecretValueFromReason(judgement) {
|
|
25443
|
+
if (judgement.verdict === "secret") return "ValueFrom resolved a cross-stack value holding a secret of the producer stack, rather than naming a Secrets Manager secret or an SSM parameter";
|
|
25444
|
+
if (judgement.verdict === "stale") return "ValueFrom resolved a cross-stack value the producer stack no longer exports (a stale exports index entry), which cdkd could not check for secrets";
|
|
25445
|
+
if (judgement.source !== void 0) return `ValueFrom resolved a cross-stack value cdkd could not check for secrets: ${sourceRemedy(judgement.source)}`;
|
|
25446
|
+
if (judgement.detail !== void 0) return `ValueFrom resolved a cross-stack value cdkd could not check for secrets: ${displaySafe(judgement.detail)}`;
|
|
25447
|
+
return "ValueFrom resolved a cross-stack value whose producer stack's state cdkd could not read to check it for secrets";
|
|
25448
|
+
}
|
|
25449
|
+
|
|
25163
25450
|
// src/cli/commands/local-state-loader.ts
|
|
25164
25451
|
async function loadStateForStack(stackName, synthRegion, opts) {
|
|
25165
25452
|
const logger = getLogger();
|
|
@@ -25324,87 +25611,99 @@ async function buildCrossStackResolver(consumerRegion, opts) {
|
|
|
25324
25611
|
stateBucket,
|
|
25325
25612
|
statePrefix: opts.statePrefix
|
|
25326
25613
|
};
|
|
25327
|
-
|
|
25328
|
-
|
|
25329
|
-
|
|
25330
|
-
|
|
25331
|
-
|
|
25332
|
-
|
|
25333
|
-
|
|
25334
|
-
|
|
25335
|
-
|
|
25336
|
-
|
|
25337
|
-
|
|
25338
|
-
|
|
25339
|
-
logger.debug(`${prefix}: exports index lookup failed for '${exportName}': ${describeAwsFailure(err).detail}; falling back to per-stack state scan`);
|
|
25614
|
+
const secrets = new ProducerSecretReader((stackName, region) => stateBackend.getState(stackName, region), (message) => logger.debug(`${prefix}: ${message}`), () => stateBackend.listStacks());
|
|
25615
|
+
const judged = {
|
|
25616
|
+
async resolveImportJudged(exportName) {
|
|
25617
|
+
try {
|
|
25618
|
+
const entry = await exportIndex.lookup(exportName);
|
|
25619
|
+
if (entry) {
|
|
25620
|
+
const value = entry.value;
|
|
25621
|
+
const served = servedOutputValue(value);
|
|
25622
|
+
return {
|
|
25623
|
+
value: served,
|
|
25624
|
+
...await secrets.judgeIndexed(entry.producerStack, entry.producerRegion, exportName, served)
|
|
25625
|
+
};
|
|
25340
25626
|
}
|
|
25341
|
-
|
|
25627
|
+
} catch (err) {
|
|
25628
|
+
logger.debug(`${prefix}: exports index lookup failed for '${exportName}': ${describeAwsFailure(err).detail}; falling back to per-stack state scan`);
|
|
25629
|
+
}
|
|
25630
|
+
let refs;
|
|
25631
|
+
try {
|
|
25632
|
+
refs = await stateBackend.listStacks();
|
|
25633
|
+
} catch (err) {
|
|
25634
|
+
logger.debug(`${prefix}: failed to list stacks during Fn::ImportValue fallback for '${exportName}': ${describeAwsFailure(err).detail}`);
|
|
25635
|
+
return { value: void 0 };
|
|
25636
|
+
}
|
|
25637
|
+
const canonicalConsumerRegion = canonicalizeRegion(consumerRegion);
|
|
25638
|
+
for (const ref of refs) {
|
|
25639
|
+
const region = ref.region ?? consumerRegion;
|
|
25640
|
+
if (canonicalizeRegion(region) !== canonicalConsumerRegion) continue;
|
|
25342
25641
|
try {
|
|
25343
|
-
|
|
25642
|
+
const got = await stateBackend.getState(ref.stackName, region);
|
|
25643
|
+
if (!got || !got.state.outputs) continue;
|
|
25644
|
+
if (importableOutputKeys(got.state).includes(exportName)) {
|
|
25645
|
+
const served = servedOutputValue(got.state.outputs[exportName]);
|
|
25646
|
+
return {
|
|
25647
|
+
value: served,
|
|
25648
|
+
...await secrets.judge(ref.stackName, region, got.state, served)
|
|
25649
|
+
};
|
|
25650
|
+
}
|
|
25344
25651
|
} catch (err) {
|
|
25345
|
-
logger.debug(`${prefix}: failed
|
|
25346
|
-
|
|
25652
|
+
logger.debug(`${prefix}: state read failed for ${ref.stackName} (${region}) during Fn::ImportValue fallback: ${describeAwsFailure(err).detail}`);
|
|
25653
|
+
continue;
|
|
25347
25654
|
}
|
|
25348
|
-
|
|
25349
|
-
|
|
25350
|
-
|
|
25351
|
-
|
|
25352
|
-
|
|
25353
|
-
|
|
25354
|
-
|
|
25355
|
-
|
|
25356
|
-
|
|
25357
|
-
|
|
25358
|
-
|
|
25359
|
-
return JSON.stringify(value);
|
|
25360
|
-
}
|
|
25361
|
-
} catch (err) {
|
|
25362
|
-
logger.debug(`${prefix}: state read failed for ${ref.stackName} (${region}) during Fn::ImportValue fallback: ${describeAwsFailure(err).detail}`);
|
|
25363
|
-
continue;
|
|
25655
|
+
}
|
|
25656
|
+
return { value: void 0 };
|
|
25657
|
+
},
|
|
25658
|
+
async resolveGetStackOutputJudged(producerStack, producerRegion, outputName) {
|
|
25659
|
+
const readOutput = async (got, recordRegion) => {
|
|
25660
|
+
if (!got) return { value: void 0 };
|
|
25661
|
+
if (!hasReadableOutputs(got.state)) {
|
|
25662
|
+
const recordKey = producerRecordKey(producerStack, recordRegion);
|
|
25663
|
+
if (!warnedMalformedProducers.has(recordKey)) {
|
|
25664
|
+
warnedMalformedProducers.add(recordKey);
|
|
25665
|
+
logger.warn(`${prefix}: ${malformedLocalOutputsWarning(producerStack, recordRegion, refusalRecovery)}`);
|
|
25364
25666
|
}
|
|
25667
|
+
return { value: void 0 };
|
|
25365
25668
|
}
|
|
25366
|
-
|
|
25367
|
-
|
|
25368
|
-
|
|
25369
|
-
|
|
25370
|
-
|
|
25371
|
-
|
|
25372
|
-
|
|
25373
|
-
warnedMalformedProducers.add(recordKey);
|
|
25374
|
-
logger.warn(`${prefix}: ${malformedLocalOutputsWarning(producerStack, recordRegion, refusalRecovery)}`);
|
|
25375
|
-
}
|
|
25376
|
-
return;
|
|
25377
|
-
}
|
|
25378
|
-
const outputs = got.state.outputs;
|
|
25379
|
-
if (!outputs) return void 0;
|
|
25380
|
-
if (!Object.hasOwn(outputs, outputName)) return void 0;
|
|
25381
|
-
const value = outputs[outputName];
|
|
25382
|
-
if (typeof value === "string") return value;
|
|
25383
|
-
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
25384
|
-
return JSON.stringify(value);
|
|
25669
|
+
const outputs = got.state.outputs;
|
|
25670
|
+
if (!outputs) return { value: void 0 };
|
|
25671
|
+
if (!Object.hasOwn(outputs, outputName)) return { value: void 0 };
|
|
25672
|
+
const served = servedOutputValue(outputs[outputName]);
|
|
25673
|
+
return {
|
|
25674
|
+
value: served,
|
|
25675
|
+
...await secrets.judge(producerStack, recordRegion, got.state, served)
|
|
25385
25676
|
};
|
|
25386
|
-
|
|
25387
|
-
|
|
25388
|
-
|
|
25389
|
-
|
|
25390
|
-
|
|
25391
|
-
|
|
25392
|
-
|
|
25393
|
-
|
|
25394
|
-
|
|
25395
|
-
|
|
25396
|
-
|
|
25397
|
-
|
|
25398
|
-
|
|
25399
|
-
|
|
25400
|
-
|
|
25677
|
+
};
|
|
25678
|
+
try {
|
|
25679
|
+
const got = await stateBackend.getState(producerStack, producerRegion);
|
|
25680
|
+
if (got) return await readOutput(got, producerRegion);
|
|
25681
|
+
const canonicalProducerRegion = canonicalizeRegion(producerRegion);
|
|
25682
|
+
const refs = await stateBackend.listStacks();
|
|
25683
|
+
for (const ref of refs) {
|
|
25684
|
+
if (ref.stackName !== producerStack) continue;
|
|
25685
|
+
const region = ref.region ?? producerRegion;
|
|
25686
|
+
if (region === producerRegion) continue;
|
|
25687
|
+
if (canonicalizeRegion(region) !== canonicalProducerRegion) continue;
|
|
25688
|
+
const recovered = await readOutput(await stateBackend.getState(producerStack, region), region);
|
|
25689
|
+
if (recovered.value !== void 0) {
|
|
25690
|
+
logger.debug(`${prefix}: Fn::GetStackOutput '${producerStack}.${outputName}' resolved from the case-variant state record '${region}' (no record spells '${producerRegion}' exactly).`);
|
|
25691
|
+
return recovered;
|
|
25401
25692
|
}
|
|
25402
|
-
return;
|
|
25403
|
-
} catch (err) {
|
|
25404
|
-
logger.debug(`${prefix}: state read failed for Fn::GetStackOutput '${producerStack}.${outputName}' (${producerRegion}): ${describeAwsFailure(err).detail}`);
|
|
25405
|
-
return;
|
|
25406
25693
|
}
|
|
25694
|
+
return { value: void 0 };
|
|
25695
|
+
} catch (err) {
|
|
25696
|
+
logger.debug(`${prefix}: state read failed for Fn::GetStackOutput '${producerStack}.${outputName}' (${producerRegion}): ${describeAwsFailure(err).detail}`);
|
|
25697
|
+
return { value: void 0 };
|
|
25407
25698
|
}
|
|
25699
|
+
}
|
|
25700
|
+
};
|
|
25701
|
+
return {
|
|
25702
|
+
resolver: {
|
|
25703
|
+
resolveImportJudged: async (exportName) => withSourceDetail(await judged.resolveImportJudged(exportName)),
|
|
25704
|
+
resolveGetStackOutputJudged: async (stack, region, output) => withSourceDetail(await judged.resolveGetStackOutputJudged(stack, region, output)),
|
|
25705
|
+
resolveImport: async (exportName) => (await judged.resolveImportJudged(exportName)).value,
|
|
25706
|
+
resolveGetStackOutput: async (stack, region, output) => (await judged.resolveGetStackOutputJudged(stack, region, output)).value
|
|
25408
25707
|
},
|
|
25409
25708
|
dispose: () => {
|
|
25410
25709
|
awsClients.destroy();
|
|
@@ -25639,6 +25938,12 @@ const cdkdExtraStateProviders = { fromState: fromStateFactory };
|
|
|
25639
25938
|
function createLocalStateProvider$1(options, cdkdStackName, synthRegion, behavior = {}) {
|
|
25640
25939
|
return createLocalStateProvider(options, cdkdStackName, synthRegion, cdkdExtraStateProviders, behavior);
|
|
25641
25940
|
}
|
|
25941
|
+
function withDeployedStackName(pseudo, options, stackName) {
|
|
25942
|
+
return {
|
|
25943
|
+
...pseudo,
|
|
25944
|
+
stackName: resolveCfnStackName(options.fromCfnStack ?? false, stackName)
|
|
25945
|
+
};
|
|
25946
|
+
}
|
|
25642
25947
|
|
|
25643
25948
|
// src/local/container-pool.ts
|
|
25644
25949
|
const DEFAULT_IDLE_MS = 6e4;
|
|
@@ -27583,7 +27888,7 @@ async function emulate(args) {
|
|
|
27583
27888
|
failedRoles.add(args.roleArn);
|
|
27584
27889
|
logger.warn(safeMsg`${args.flag}: AssumeRole(${shownRole}) was refused, and cdkd cannot emulate the role's permissions instead: ${reason}.`);
|
|
27585
27890
|
};
|
|
27586
|
-
if (args.emulateRoleVia === void 0 && !args.realAws && mixedModeEmulatorOverride() !== void 0) return cannot("
|
|
27891
|
+
if (args.emulateRoleVia === void 0 && !args.realAws && mixedModeEmulatorOverride() !== void 0) return cannot("AWS Emulator checks IAM policies only on IAM and STS calls, so session policies there would not show a missing permission. To run as the role, let the role's trust policy allow the emulator's identity, for example the account root (arn:aws:iam::000000000000:root), and redeploy; run under the role on real AWS to find a missing permission");
|
|
27587
27892
|
const { STSClient, GetCallerIdentityCommand, GetFederationTokenCommand } = await import("@aws-sdk/client-sts");
|
|
27588
27893
|
const sts = new STSClient({
|
|
27589
27894
|
...awsClientDefaults({
|
|
@@ -27647,7 +27952,8 @@ async function emulate(args) {
|
|
|
27647
27952
|
const count = policies.inline.length + policies.managedArns.length;
|
|
27648
27953
|
const who = args.emulateRoleVia !== void 0 ? "that role" : "you";
|
|
27649
27954
|
const federationNote = args.emulateRoleVia === void 0 ? " A GetFederationToken session cannot call IAM, nor STS except GetCallerIdentity." : "";
|
|
27650
|
-
|
|
27955
|
+
const emulatorNote = !args.realAws && mixedModeEmulatorOverride() !== void 0 ? " AWS Emulator checks IAM policies only on IAM and STS calls, so it does not enforce these session policies on other services: run under the role on real AWS to find a missing permission." : "";
|
|
27956
|
+
logger.warn(safeMsg`${args.flag}: AssumeRole(${shownRole}) was refused (the role's trust policy does not allow you), so cdkd EMULATES its permissions: credentials from ${via} with the role's ${policies.inline.length} inline and ${policies.managedArns.length} managed ${count === 1 ? "policy" : "policies"} as session policies, which allow only what both ${who} and the role allow. This is an APPROXIMATION: resource-based policies, KMS key policies and aws:PrincipalArn conditions that name the role see a different principal, and the role's session tags are not reproduced. Policy variables such as aws:username and aws:userid take this session's values, not the role's (a role session has no aws:username).${federationNote}${emulatorNote}`);
|
|
27651
27957
|
}
|
|
27652
27958
|
return {
|
|
27653
27959
|
accessKeyId: creds.AccessKeyId,
|
|
@@ -28225,7 +28531,7 @@ function parseContainerDefinition(raw, idx, taskLogicalId, resources, stack, con
|
|
|
28225
28531
|
});
|
|
28226
28532
|
if (sub.kind === "literal") {
|
|
28227
28533
|
defineOwnKey(environment, key, String(sub.value));
|
|
28228
|
-
if (sensitive) plaintextEnvKeys.push(key);
|
|
28534
|
+
if (sensitive || secretAttributeRead(value, subContext.resources) !== void 0) plaintextEnvKeys.push(key);
|
|
28229
28535
|
continue;
|
|
28230
28536
|
}
|
|
28231
28537
|
droppedEnvKeys.push({
|
|
@@ -28253,6 +28559,14 @@ function parseContainerDefinition(raw, idx, taskLogicalId, resources, stack, con
|
|
|
28253
28559
|
continue;
|
|
28254
28560
|
}
|
|
28255
28561
|
if (subContext) {
|
|
28562
|
+
const reason = secretValueFromReason(valueFromRaw, subContext.resources);
|
|
28563
|
+
if (reason !== void 0) {
|
|
28564
|
+
droppedSecretKeys.push({
|
|
28565
|
+
key: sName,
|
|
28566
|
+
reason
|
|
28567
|
+
});
|
|
28568
|
+
continue;
|
|
28569
|
+
}
|
|
28256
28570
|
const sub = substituteAgainstState(valueFromRaw, subContext);
|
|
28257
28571
|
if (sub.kind === "literal" && typeof sub.value === "string" && sub.value.length > 0) {
|
|
28258
28572
|
secrets.push({
|
|
@@ -28429,11 +28743,41 @@ function resolveArgvArray(raw, field, subContext, unresolved) {
|
|
|
28429
28743
|
});
|
|
28430
28744
|
}
|
|
28431
28745
|
function secretAttributeRead(element, stateResources) {
|
|
28746
|
+
const hit = secretRead(element, stateResources, { byName: true });
|
|
28747
|
+
if (hit === void 0) return void 0;
|
|
28748
|
+
if (hit.attribute === void 0) return `references ${hit.logicalId}, whose physical id holds a secret, which cdkd will not put on the docker run command line; pass the value through Environment or Secrets instead`;
|
|
28749
|
+
return `reads the secret attribute ${hit.logicalId}.${hit.attribute}, which cdkd will not put on the docker run command line; pass the value through Environment or Secrets instead`;
|
|
28750
|
+
}
|
|
28751
|
+
function secretValueFromReason(valueFrom, stateResources) {
|
|
28752
|
+
const read = secretValueRead(valueFrom, stateResources);
|
|
28753
|
+
if (read === void 0) return void 0;
|
|
28754
|
+
return `ValueFrom reads ${read}, which holds a secret rather than naming a Secrets Manager secret or an SSM parameter`;
|
|
28755
|
+
}
|
|
28756
|
+
function secretValueRead(value, stateResources) {
|
|
28757
|
+
const hit = secretRead(value, stateResources, { byName: false });
|
|
28758
|
+
if (hit === void 0) return void 0;
|
|
28759
|
+
return hit.attribute === void 0 ? hit.logicalId : `${hit.logicalId}.${hit.attribute}`;
|
|
28760
|
+
}
|
|
28761
|
+
function mayHoldSegment(stored, segment) {
|
|
28762
|
+
if (typeof stored === "string") return stored.includes(segment);
|
|
28763
|
+
return stored === void 0 || stored === null || typeof stored === "object";
|
|
28764
|
+
}
|
|
28765
|
+
function secretRead(element, stateResources, options) {
|
|
28766
|
+
const recordOf = (logicalId) => Object.hasOwn(stateResources, logicalId) ? stateResources[logicalId] : void 0;
|
|
28432
28767
|
for (const [logicalId, attribute] of getAttReads(element)) {
|
|
28433
|
-
const record =
|
|
28768
|
+
const record = recordOf(logicalId);
|
|
28434
28769
|
const recorded = record?.attributes;
|
|
28435
28770
|
const stored = recorded && Object.hasOwn(recorded, attribute) ? recorded[attribute] : void 0;
|
|
28436
|
-
|
|
28771
|
+
const segment = secretPhysicalIdSegment(record?.resourceType, record?.physicalId);
|
|
28772
|
+
const secretNamed = record?.secretNamedAttributes;
|
|
28773
|
+
if ((options.byName || record?.resourceType !== "AWS::CloudFormation::Stack") && isSensitiveAttributeName(attribute) || isSecretValuedAttribute(record?.resourceType, attribute) || stored === "***" || record?.resourceType === "AWS::CloudFormation::Stack" && Array.isArray(secretNamed) && secretNamed.includes(attribute) || segment !== void 0 && mayHoldSegment(stored, segment)) return {
|
|
28774
|
+
logicalId,
|
|
28775
|
+
attribute
|
|
28776
|
+
};
|
|
28777
|
+
}
|
|
28778
|
+
for (const logicalId of refReads(element)) {
|
|
28779
|
+
const record = recordOf(logicalId);
|
|
28780
|
+
if (record && secretPhysicalIdSegment(record.resourceType, record.physicalId) !== void 0) return { logicalId };
|
|
28437
28781
|
}
|
|
28438
28782
|
}
|
|
28439
28783
|
function computedAttributeRead(node) {
|
|
@@ -28480,6 +28824,28 @@ function getAttReads(node, out = []) {
|
|
|
28480
28824
|
}
|
|
28481
28825
|
return out;
|
|
28482
28826
|
}
|
|
28827
|
+
function refReads(node, out = []) {
|
|
28828
|
+
if (node === null || typeof node !== "object") return out;
|
|
28829
|
+
if (Array.isArray(node)) {
|
|
28830
|
+
for (const item of node) refReads(item, out);
|
|
28831
|
+
return out;
|
|
28832
|
+
}
|
|
28833
|
+
for (const [key, value] of Object.entries(node)) {
|
|
28834
|
+
if (key === "Ref") {
|
|
28835
|
+
if (typeof value === "string" && !value.startsWith("AWS::")) out.push(value);
|
|
28836
|
+
} else if (key === "Fn::Sub") {
|
|
28837
|
+
const template = Array.isArray(value) ? value[0] : value;
|
|
28838
|
+
const variables = Array.isArray(value) ? value[1] : void 0;
|
|
28839
|
+
const isVariable = (name) => variables !== null && typeof variables === "object" && Object.hasOwn(variables, name);
|
|
28840
|
+
if (typeof template === "string") for (const m of template.matchAll(/\$\{([^}!]+)\}/g)) {
|
|
28841
|
+
const ref = m[1];
|
|
28842
|
+
if (!ref.includes(".") && !ref.startsWith("AWS::") && !isVariable(ref)) out.push(ref);
|
|
28843
|
+
}
|
|
28844
|
+
}
|
|
28845
|
+
refReads(value, out);
|
|
28846
|
+
}
|
|
28847
|
+
return out;
|
|
28848
|
+
}
|
|
28483
28849
|
const NO_STATE_ARGV_REASON = "intrinsic-valued and no deployed state was loaded: deploy the stack and pass --from-state (cdkd-deployed) or --from-cfn-stack (cdk-deployed) to substitute it against that state (Ref, Fn::GetAtt, Fn::Sub, Fn::Join, Fn::Select, Fn::Split and pseudo parameters resolve; Fn::If and Fn::FindInMap do not)";
|
|
28484
28850
|
const CROSS_STACK_ARGV_REASON = "a cross-stack reference (Fn::ImportValue / Fn::GetStackOutput): it resolves only from a state source (--from-state / --from-cfn-stack) with the producer stack deployed";
|
|
28485
28851
|
function argvValue(value) {
|
|
@@ -28555,6 +28921,8 @@ function resolveVolumeSourcePath(raw, volumeName, idx, taskLogicalId, subContext
|
|
|
28555
28921
|
if (typeof raw === "string") return raw.length > 0 ? raw : void 0;
|
|
28556
28922
|
if (typeof raw !== "object") throw new EcsTaskResolutionError(`Task '${taskLogicalId}' Volumes[${idx}] '${volumeName}' Host.SourcePath must be a string or a CFn intrinsic, got ${typeof raw}.`);
|
|
28557
28923
|
if (!subContext) throw new EcsTaskResolutionError(`Task '${taskLogicalId}' Volumes[${idx}] '${volumeName}' Host.SourcePath is a CFn intrinsic (Ref/Fn::Sub/Fn::Join/Fn::GetAtt). Pass --from-state to substitute it against the deployed state + AWS pseudo parameters.`);
|
|
28924
|
+
const secret = secretValueRead(raw, subContext.resources);
|
|
28925
|
+
if (secret !== void 0) throw new EcsTaskResolutionError(`Task '${taskLogicalId}' Volumes[${idx}] '${volumeName}' Host.SourcePath reads ${secret}, which holds a secret; cdkd will not put it on the docker run command line as a -v path.`);
|
|
28558
28926
|
const sub = substituteAgainstState(raw, subContext);
|
|
28559
28927
|
if (sub.kind === "literal" && typeof sub.value === "string" && sub.value.length > 0) return sub.value;
|
|
28560
28928
|
throw new EcsTaskResolutionError(`Task '${taskLogicalId}' Volumes[${idx}] '${volumeName}' Host.SourcePath could not be resolved: ` + (sub.kind === "literal" ? "resolved to non-string / empty value" : sub.reason));
|
|
@@ -28704,7 +29072,70 @@ function notFoundError(target, stack, resources) {
|
|
|
28704
29072
|
return new EcsTaskResolutionError(msg.trimEnd());
|
|
28705
29073
|
}
|
|
28706
29074
|
|
|
29075
|
+
// src/local/cross-stack-watch.ts
|
|
29076
|
+
function watchResolved(context, producerSecrets) {
|
|
29077
|
+
const seen = {
|
|
29078
|
+
masked: false,
|
|
29079
|
+
producerSecret: void 0
|
|
29080
|
+
};
|
|
29081
|
+
const inner = context.crossStackResolver;
|
|
29082
|
+
if (!inner) return {
|
|
29083
|
+
context,
|
|
29084
|
+
seen
|
|
29085
|
+
};
|
|
29086
|
+
const watch = ({ value, verdict, source, detail }) => {
|
|
29087
|
+
if (value === void 0) return value;
|
|
29088
|
+
if (value === "***") seen.masked = true;
|
|
29089
|
+
seen.producerSecret = strongerJudgement(seen.producerSecret, verdict === void 0 ? void 0 : {
|
|
29090
|
+
verdict,
|
|
29091
|
+
source,
|
|
29092
|
+
detail
|
|
29093
|
+
});
|
|
29094
|
+
return value;
|
|
29095
|
+
};
|
|
29096
|
+
const resolver = producerSecrets ? {
|
|
29097
|
+
resolveImport: async (exportName) => watch(await producerSecrets.resolveImportJudged(exportName)),
|
|
29098
|
+
resolveGetStackOutput: async (stack, region, output) => watch(await producerSecrets.resolveGetStackOutputJudged(stack, region, output))
|
|
29099
|
+
} : {
|
|
29100
|
+
resolveImport: async (exportName) => watch({ value: await inner.resolveImport(exportName) }),
|
|
29101
|
+
resolveGetStackOutput: async (stack, region, output) => watch({ value: await inner.resolveGetStackOutput(stack, region, output) })
|
|
29102
|
+
};
|
|
29103
|
+
return {
|
|
29104
|
+
context: {
|
|
29105
|
+
...context,
|
|
29106
|
+
crossStackResolver: resolver
|
|
29107
|
+
},
|
|
29108
|
+
seen
|
|
29109
|
+
};
|
|
29110
|
+
}
|
|
29111
|
+
async function substituteEnvVarsJudgedAsync(templateEnv, context) {
|
|
29112
|
+
const producerSecrets = producerSecretCheckOf(context.crossStackResolver);
|
|
29113
|
+
if (!producerSecrets || !templateEnv) return substituteEnvVarsFromStateAsync(templateEnv, context);
|
|
29114
|
+
const env = {};
|
|
29115
|
+
const audit = {
|
|
29116
|
+
resolvedKeys: [],
|
|
29117
|
+
unresolved: [],
|
|
29118
|
+
sensitiveKeys: []
|
|
29119
|
+
};
|
|
29120
|
+
for (const [key, value] of Object.entries(templateEnv)) {
|
|
29121
|
+
const watched = watchResolved(context, producerSecrets);
|
|
29122
|
+
const one = {};
|
|
29123
|
+
defineOwnKey(one, key, value);
|
|
29124
|
+
const sub = await substituteEnvVarsFromStateAsync(one, watched.context);
|
|
29125
|
+
for (const [k, v] of Object.entries(sub.env)) defineOwnKey(env, k, v);
|
|
29126
|
+
audit.resolvedKeys.push(...sub.audit.resolvedKeys);
|
|
29127
|
+
audit.unresolved.push(...sub.audit.unresolved);
|
|
29128
|
+
audit.sensitiveKeys.push(...sub.audit.sensitiveKeys);
|
|
29129
|
+
if (watched.seen.producerSecret !== void 0 && sub.audit.resolvedKeys.includes(key) && !audit.sensitiveKeys.includes(key)) audit.sensitiveKeys.push(key);
|
|
29130
|
+
}
|
|
29131
|
+
return {
|
|
29132
|
+
env,
|
|
29133
|
+
audit
|
|
29134
|
+
};
|
|
29135
|
+
}
|
|
29136
|
+
|
|
28707
29137
|
// src/local/ecs-task-resolver/cross-stack.ts
|
|
29138
|
+
const SECRET_POINTER_ARN = /^arn:aws(?:-[a-z]+)*:(?:secretsmanager:[a-z0-9-]+:\d{12}:secret:[A-Za-z0-9/_+=.@!-]+(?::[A-Za-z0-9/_+=.@-]*:[A-Za-z0-9/_+=.@-]*:[A-Za-z0-9/_+=.@-]*)?|ssm:[a-z0-9-]+:\d{12}:parameter\/[A-Za-z0-9/_.-]+)$/;
|
|
28708
29139
|
function argvTarget(container, field) {
|
|
28709
29140
|
if (field === "Command") return container.command;
|
|
28710
29141
|
if (field === "EntryPoint") return container.entryPoint;
|
|
@@ -28723,6 +29154,7 @@ function rawArgv(c, field) {
|
|
|
28723
29154
|
async function applyCrossStackResolverToTask(task, context) {
|
|
28724
29155
|
if (!context.crossStackResolver) return;
|
|
28725
29156
|
const { resolveDynamicReferences: _envOnly, ...secretContext } = context;
|
|
29157
|
+
const producerSecrets = producerSecretCheckOf(context.crossStackResolver);
|
|
28726
29158
|
const rawContainers = (task.resource.Properties ?? {})["ContainerDefinitions"];
|
|
28727
29159
|
if (!Array.isArray(rawContainers)) return;
|
|
28728
29160
|
for (let idx = 0; idx < task.containers.length; idx += 1) {
|
|
@@ -28752,11 +29184,12 @@ async function applyCrossStackResolverToTask(task, context) {
|
|
|
28752
29184
|
return plain;
|
|
28753
29185
|
}
|
|
28754
29186
|
} : context;
|
|
28755
|
-
const
|
|
29187
|
+
const watched = watchResolved(keyContext, producerSecrets);
|
|
29188
|
+
const sub = await substituteAgainstStateAsync(value, watched.context);
|
|
28756
29189
|
if (sub.kind === "literal") {
|
|
28757
29190
|
defineOwnKey(container.environment, key, String(sub.value));
|
|
28758
29191
|
resolvedEnvKeys.add(key);
|
|
28759
|
-
if (resolvedToken) container.resolvedDynamicReferenceKeys = [...container.resolvedDynamicReferenceKeys ?? [], key];
|
|
29192
|
+
if (resolvedToken || watched.seen.producerSecret !== void 0 || secretAttributeRead(value, context.resources) !== void 0) container.resolvedDynamicReferenceKeys = [...container.resolvedDynamicReferenceKeys ?? [], key];
|
|
28760
29193
|
}
|
|
28761
29194
|
}
|
|
28762
29195
|
if (Array.isArray(c["Secrets"])) for (const entry of c["Secrets"]) {
|
|
@@ -28768,7 +29201,13 @@ async function applyCrossStackResolverToTask(task, context) {
|
|
|
28768
29201
|
if (typeof valueFromRaw === "string" && valueFromRaw.length > 0) continue;
|
|
28769
29202
|
if (container.secrets.some((s) => s.name === sName)) continue;
|
|
28770
29203
|
if (!isCrossStackIntrinsic(valueFromRaw)) continue;
|
|
28771
|
-
|
|
29204
|
+
if (secretValueFromReason(valueFromRaw, secretContext.resources) !== void 0) continue;
|
|
29205
|
+
const watched = watchResolved(secretContext, producerSecrets);
|
|
29206
|
+
const sub = await substituteAgainstStateAsync(valueFromRaw, watched.context);
|
|
29207
|
+
if (watched.seen.producerSecret !== void 0 && !(watched.seen.producerSecret.verdict !== "secret" && sub.kind === "literal" && typeof sub.value === "string" && SECRET_POINTER_ARN.test(sub.value))) {
|
|
29208
|
+
redropSecret(task, container, containerName, sName, producerSecretValueFromReason(watched.seen.producerSecret));
|
|
29209
|
+
continue;
|
|
29210
|
+
}
|
|
28772
29211
|
if (sub.kind === "literal" && typeof sub.value === "string" && sub.value.length > 0) {
|
|
28773
29212
|
container.secrets.push({
|
|
28774
29213
|
name: sName,
|
|
@@ -28795,9 +29234,9 @@ async function applyCrossStackResolverToTask(task, context) {
|
|
|
28795
29234
|
});
|
|
28796
29235
|
continue;
|
|
28797
29236
|
}
|
|
28798
|
-
const
|
|
28799
|
-
const sub = await substituteAgainstStateAsync(rawElement,
|
|
28800
|
-
const arg = masked
|
|
29237
|
+
const watched = watchResolved(secretContext, producerSecrets);
|
|
29238
|
+
const sub = await substituteAgainstStateAsync(rawElement, watched.context);
|
|
29239
|
+
const arg = watched.seen.masked ? { reason: `resolved a cross-stack value recorded as the secret mask (${"***"}), not the deployed value` } : watched.seen.producerSecret !== void 0 ? { reason: producerSecretArgvReason(watched.seen.producerSecret) } : sub.kind === "literal" ? argvValue(sub.value) : { reason: sub.reason };
|
|
28801
29240
|
if ("value" in arg) {
|
|
28802
29241
|
target[u.index] = arg.value;
|
|
28803
29242
|
continue;
|
|
@@ -28824,21 +29263,13 @@ async function applyCrossStackResolverToTask(task, context) {
|
|
|
28824
29263
|
}
|
|
28825
29264
|
}
|
|
28826
29265
|
}
|
|
28827
|
-
function
|
|
28828
|
-
const
|
|
28829
|
-
|
|
28830
|
-
|
|
28831
|
-
|
|
28832
|
-
|
|
28833
|
-
|
|
28834
|
-
const resolver = {
|
|
28835
|
-
resolveImport: async (exportName) => watch(await inner.resolveImport(exportName)),
|
|
28836
|
-
resolveGetStackOutput: async (stack, region, output) => watch(await inner.resolveGetStackOutput(stack, region, output))
|
|
28837
|
-
};
|
|
28838
|
-
return {
|
|
28839
|
-
...context,
|
|
28840
|
-
crossStackResolver: resolver
|
|
28841
|
-
};
|
|
29266
|
+
function redropSecret(task, container, containerName, name, reason) {
|
|
29267
|
+
const line = `Secret '${name}' dropped: ${reason}`;
|
|
29268
|
+
const own = `Secret '${name}' dropped:`;
|
|
29269
|
+
container.warnings = [...container.warnings.filter((w) => !w.startsWith(own)), line];
|
|
29270
|
+
const taskOwn = `Container '${containerName}': ${own}`;
|
|
29271
|
+
task.warnings = [...task.warnings.filter((w) => !w.startsWith(taskOwn)), `Container '${containerName}': ${line}`];
|
|
29272
|
+
if (!container.droppedSecretNames?.includes(name)) container.droppedSecretNames = [...container.droppedSecretNames ?? [], name];
|
|
28842
29273
|
}
|
|
28843
29274
|
|
|
28844
29275
|
// src/cli/commands/local-start-api/state.ts
|
|
@@ -28913,7 +29344,7 @@ async function loadStateForRoutedStacks(stacks, routes, routesWithAuth, options)
|
|
|
28913
29344
|
};
|
|
28914
29345
|
if (stackHasIntrinsicEnv(stackName)) {
|
|
28915
29346
|
const pseudo = await resolvePseudoParametersForStartApi(loaded.region, options);
|
|
28916
|
-
|
|
29347
|
+
bundle.pseudoParameters = withDeployedStackName(pseudo, options, stack.stackName);
|
|
28917
29348
|
Object.assign(bundle, await templateSsmParameters(provider, stack.template));
|
|
28918
29349
|
}
|
|
28919
29350
|
out.set(key, bundle);
|
|
@@ -30889,9 +31320,21 @@ async function buildEcsImageResolutionContext$1(candidate, stateProvider, option
|
|
|
30889
31320
|
const ctx = {};
|
|
30890
31321
|
if (!roleRecordUsable) ctx.ignoreStateForRoles = true;
|
|
30891
31322
|
let stateRecordRegion;
|
|
31323
|
+
const regionAboveRecord = canonicalizeRegion(options.region ?? namedEnvAwsRegion() ?? process.env["AWS_DEFAULT_REGION"] ?? candidate.region);
|
|
31324
|
+
const wantsState = needs.needsStateResources || needs.needsEnvOrSecretSubstitution || needs.needsPseudoParameters && !regionAboveRecord || wantsStateForTaskRole;
|
|
31325
|
+
if (stateProvider && wantsState) {
|
|
31326
|
+
const loaded = await stateProvider.load(candidate.stackName, candidate.region);
|
|
31327
|
+
if (loaded) {
|
|
31328
|
+
ctx.stateResources = loaded.resources;
|
|
31329
|
+
stateRecordRegion = loaded.region;
|
|
31330
|
+
if (needs.needsEnvOrSecretSubstitution) Object.assign(ctx, await stateSsmParametersForImageContext(stateProvider, candidate));
|
|
31331
|
+
}
|
|
31332
|
+
} else if (!stateProvider && needs.needsStateResources) {
|
|
31333
|
+
if (!options.imageOverride?.length) logger.warn("Container Image references a same-stack AWS::ECR::Repository. Pass --from-state (cdkd-deployed) or --from-cfn-stack (cdk-deployed) to substitute the deployed repository URI, or --image-override to build it from a local Dockerfile. Otherwise the run stops before any container starts.");
|
|
31334
|
+
} else if (!stateProvider && needs.needsEnvOrSecretSubstitution) logger.warn("Container Environment / Secrets / Command entries contain CloudFormation intrinsics (Ref / Fn::GetAtt / Fn::Sub / Fn::Join). Pass --from-state (cdkd-deployed) or --from-cfn-stack (cdk-deployed) to substitute them against deployed state. Without a state source Environment / Secrets entries are dropped (per-key warnings will follow) and an intrinsic Command / EntryPoint / HealthCheck.Command element refuses the run.");
|
|
30892
31335
|
const wantsPseudoForEnvOrSecret = !!stateProvider && needs.needsEnvOrSecretSubstitution;
|
|
30893
31336
|
if (needs.needsPseudoParameters || wantsPseudoForEnvOrSecret) {
|
|
30894
|
-
const region = canonicalizeRegion(
|
|
31337
|
+
const region = canonicalizeRegion(regionAboveRecord ?? stateRecordRegion ?? emulatorDefaultRegion());
|
|
30895
31338
|
if (!region) logger.warn("Resolver references ${AWS::Region} but cdkd could not determine the target region. Pass --region, set AWS_REGION, or declare env.region on the CDK stack.");
|
|
30896
31339
|
let accountId;
|
|
30897
31340
|
try {
|
|
@@ -30905,26 +31348,15 @@ async function buildEcsImageResolutionContext$1(candidate, stateProvider, option
|
|
|
30905
31348
|
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.`);
|
|
30906
31349
|
}
|
|
30907
31350
|
const partitionAndSuffix = region ? derivePartitionAndUrlSuffix(region) : void 0;
|
|
30908
|
-
ctx.pseudoParameters = {
|
|
31351
|
+
ctx.pseudoParameters = withDeployedStackName({
|
|
30909
31352
|
...accountId !== void 0 && { accountId },
|
|
30910
31353
|
...region !== void 0 && { region },
|
|
30911
31354
|
...partitionAndSuffix && {
|
|
30912
31355
|
partition: partitionAndSuffix.partition,
|
|
30913
31356
|
urlSuffix: partitionAndSuffix.urlSuffix
|
|
30914
31357
|
}
|
|
30915
|
-
};
|
|
31358
|
+
}, options, candidate.stackName);
|
|
30916
31359
|
}
|
|
30917
|
-
const wantsState = needs.needsStateResources || needs.needsEnvOrSecretSubstitution || wantsStateForTaskRole;
|
|
30918
|
-
if (stateProvider && wantsState) {
|
|
30919
|
-
const loaded = await stateProvider.load(candidate.stackName, candidate.region);
|
|
30920
|
-
if (loaded) {
|
|
30921
|
-
ctx.stateResources = loaded.resources;
|
|
30922
|
-
stateRecordRegion = loaded.region;
|
|
30923
|
-
if (needs.needsEnvOrSecretSubstitution) Object.assign(ctx, await stateSsmParametersForImageContext(stateProvider, candidate));
|
|
30924
|
-
}
|
|
30925
|
-
} else if (!stateProvider && needs.needsStateResources) {
|
|
30926
|
-
if (!options.imageOverride?.length) logger.warn("Container Image references a same-stack AWS::ECR::Repository. Pass --from-state (cdkd-deployed) or --from-cfn-stack (cdk-deployed) to substitute the deployed repository URI, or --image-override to build it from a local Dockerfile. Otherwise the run stops before any container starts.");
|
|
30927
|
-
} else if (!stateProvider && needs.needsEnvOrSecretSubstitution) logger.warn("Container Environment / Secrets / Command entries contain CloudFormation intrinsics (Ref / Fn::GetAtt / Fn::Sub / Fn::Join). Pass --from-state (cdkd-deployed) or --from-cfn-stack (cdk-deployed) to substitute them against deployed state. Without a state source Environment / Secrets entries are dropped (per-key warnings will follow) and an intrinsic Command / EntryPoint / HealthCheck.Command element refuses the run.");
|
|
30928
31360
|
if (needs.needsAssetRepoMarker && options.fromState) {
|
|
30929
31361
|
const containerRepo = await loadBootstrapContainerRepo(candidate.region, {
|
|
30930
31362
|
statePrefix: options.statePrefix,
|
|
@@ -31743,13 +32175,12 @@ async function buildContainerEnvWith(resolved, options, profileCredentials, prof
|
|
|
31743
32175
|
workload
|
|
31744
32176
|
})
|
|
31745
32177
|
};
|
|
31746
|
-
|
|
31747
|
-
if (pseudo) subContext.pseudoParameters = pseudo;
|
|
32178
|
+
subContext.pseudoParameters = imageContext?.pseudoParameters ?? withDeployedStackName(derivePseudoParametersFromRegion$1(loaded.region), options, resolved.stack.stackName);
|
|
31748
32179
|
if (imageContext?.stateParameters) subContext.parameters = imageContext.stateParameters;
|
|
31749
32180
|
if (imageContext?.stateSensitiveParameters?.length) subContext.sensitiveParameters = new Set(imageContext.stateSensitiveParameters);
|
|
31750
32181
|
const resolver = await stateProvider.buildCrossStackResolver(loaded.region);
|
|
31751
32182
|
if (resolver) subContext.crossStackResolver = resolver;
|
|
31752
|
-
const { env, audit } = await
|
|
32183
|
+
const { env, audit } = await substituteEnvVarsJudgedAsync(templateEnv, subContext);
|
|
31753
32184
|
templateEnv = env;
|
|
31754
32185
|
for (const key of audit.resolvedKeys) logger.debug(`${stateProvider.label}: substituted env var ${key}`);
|
|
31755
32186
|
for (const key of audit.sensitiveKeys) sensitiveEnvKeys.add(key);
|
|
@@ -31881,7 +32312,7 @@ function resolveAssumeRoleArnUncached(options, resolved, loaded) {
|
|
|
31881
32312
|
return fromState;
|
|
31882
32313
|
}
|
|
31883
32314
|
}
|
|
31884
|
-
getLogger().warn("--assume-role passed without an ARN, but the runtime's RoleArn is not a literal ARN in the template " + (loaded ? "and could not be resolved from the deployed stack state. " : "and no --from-cfn-stack state is available to resolve it. ") + "Pass the ARN explicitly: --assume-role '<arn>'. Falling back to the developer's shell credentials.");
|
|
32315
|
+
getLogger().warn("--assume-role passed without an ARN, but the runtime's RoleArn is not a literal ARN in the template " + (loaded ? "and could not be resolved from the deployed stack state. " : "and no --from-state or --from-cfn-stack state is available to resolve it. ") + "Pass the ARN explicitly: --assume-role '<arn>'. Falling back to the developer's shell credentials.");
|
|
31885
32316
|
}
|
|
31886
32317
|
}
|
|
31887
32318
|
function forwardAwsEnv$1(env) {
|
|
@@ -32094,15 +32525,23 @@ async function resolveAgentCoreCodeImageFromS3(resolved, code, s3Source, options
|
|
|
32094
32525
|
fallbackWithoutProfile: "the default credentials"
|
|
32095
32526
|
}));
|
|
32096
32527
|
}
|
|
32097
|
-
const
|
|
32098
|
-
|
|
32099
|
-
|
|
32100
|
-
|
|
32101
|
-
|
|
32102
|
-
|
|
32103
|
-
|
|
32104
|
-
|
|
32105
|
-
|
|
32528
|
+
const bucketJudged = s3Source.bucketJudged === true;
|
|
32529
|
+
let bundle;
|
|
32530
|
+
try {
|
|
32531
|
+
bundle = await downloadAndExtractS3Bundle(location, {
|
|
32532
|
+
workload: {
|
|
32533
|
+
logicalId: resolved.logicalId,
|
|
32534
|
+
cdkPath: readCdkPathOrUndefined(resolved.resource)
|
|
32535
|
+
},
|
|
32536
|
+
...region !== void 0 && { region },
|
|
32537
|
+
...options.profile !== void 0 && { profile: options.profile },
|
|
32538
|
+
...credentials !== void 0 && { credentials },
|
|
32539
|
+
...bucketJudged && { redactBucket: true }
|
|
32540
|
+
});
|
|
32541
|
+
} catch (err) {
|
|
32542
|
+
if (bucketJudged) withholdBucketInError(err, location.bucket);
|
|
32543
|
+
throw err;
|
|
32544
|
+
}
|
|
32106
32545
|
try {
|
|
32107
32546
|
return await buildAgentCoreCodeImage({
|
|
32108
32547
|
sourceDir: bundle.dir,
|
|
@@ -32119,24 +32558,40 @@ function findFileAssetByObjectKey(fileAssets, hash) {
|
|
|
32119
32558
|
const zip = `${hash}.zip`;
|
|
32120
32559
|
for (const asset of fileAssets.values()) if (Object.values(asset.destinations).some((d) => d.objectKey === zip || d.objectKey.endsWith(`/${zip}`))) return asset;
|
|
32121
32560
|
}
|
|
32122
|
-
|
|
32561
|
+
const WITHHELD_BUCKET = "<cross-stack value withheld>";
|
|
32562
|
+
function withholdBucketInError(err, bucket) {
|
|
32563
|
+
if (!(err instanceof Error) || bucket.length === 0) return;
|
|
32564
|
+
const withhold = (text) => {
|
|
32565
|
+
let out = text.split(bucket).join(WITHHELD_BUCKET);
|
|
32566
|
+
for (let k = bucket.length - 1; k > 0; k -= 1) {
|
|
32567
|
+
const cut = `${bucket.slice(0, k)}${TRUNCATION_MARK}`;
|
|
32568
|
+
if (out.includes(cut)) out = out.split(cut).join(`${WITHHELD_BUCKET}${TRUNCATION_MARK}`);
|
|
32569
|
+
}
|
|
32570
|
+
return out;
|
|
32571
|
+
};
|
|
32572
|
+
err.message = withhold(err.message);
|
|
32573
|
+
if (typeof err.stack === "string") err.stack = withhold(err.stack);
|
|
32574
|
+
}
|
|
32575
|
+
const TRUNCATION_MARK = "[... truncated";
|
|
32576
|
+
async function resolveFromS3BucketIntrinsic(resolved, stateProvider, loaded, imageContext, options = {}) {
|
|
32123
32577
|
const s3Source = resolved.codeArtifact?.s3Source;
|
|
32124
32578
|
if (!s3Source || s3Source.bucketIntrinsic === void 0) return;
|
|
32125
32579
|
if (s3Source.bucket !== void 0) return;
|
|
32126
|
-
if (!stateProvider || !loaded) throw new CdkdError(`AgentCore Runtime '${resolved.logicalId}' fromS3 bundle's Code.S3.Bucket is an unresolved intrinsic (${describeIntrinsic(s3Source.bucketIntrinsic)}). Pass --from-cfn-stack so its physical bucket name can be resolved against the deployed stack state.`, "LOCAL_INVOKE_AGENTCORE_FROMS3_BUCKET_INTRINSIC_NO_STATE");
|
|
32580
|
+
if (!stateProvider || !loaded) throw new CdkdError(`AgentCore Runtime '${resolved.logicalId}' fromS3 bundle's Code.S3.Bucket is an unresolved intrinsic (${describeIntrinsic(s3Source.bucketIntrinsic)}). Pass --from-state or --from-cfn-stack so its physical bucket name can be resolved against the deployed stack state.`, "LOCAL_INVOKE_AGENTCORE_FROMS3_BUCKET_INTRINSIC_NO_STATE");
|
|
32127
32581
|
const subContext = {
|
|
32128
32582
|
resources: imageContext?.stateResources ?? loaded.resources,
|
|
32129
32583
|
consumerRegion: loaded.region
|
|
32130
32584
|
};
|
|
32131
|
-
|
|
32132
|
-
if (pseudo) subContext.pseudoParameters = pseudo;
|
|
32585
|
+
subContext.pseudoParameters = imageContext?.pseudoParameters ?? withDeployedStackName(derivePseudoParametersFromRegion$1(loaded.region), options, resolved.stack.stackName);
|
|
32133
32586
|
const crossStackResolver = await stateProvider.buildCrossStackResolver(loaded.region);
|
|
32134
32587
|
if (crossStackResolver) subContext.crossStackResolver = crossStackResolver;
|
|
32135
|
-
const
|
|
32136
|
-
|
|
32588
|
+
const watched = watchResolved(subContext, producerSecretCheckOf(crossStackResolver));
|
|
32589
|
+
const result = await substituteAgainstStateAsync(s3Source.bucketIntrinsic, watched.context);
|
|
32590
|
+
if (result.kind !== "literal") throw new CdkdError(`Could not resolve AgentCore Runtime '${resolved.logicalId}' fromS3 Code.S3.Bucket intrinsic (${describeIntrinsic(s3Source.bucketIntrinsic)}) against the deployed stack state: ${result.reason}. Confirm the referenced resource / export exists in the deployed stack.`, "LOCAL_INVOKE_AGENTCORE_FROMS3_BUCKET_INTRINSIC_UNRESOLVED");
|
|
32137
32591
|
if (typeof result.value !== "string" || result.value.length === 0) throw new CdkdError(`AgentCore Runtime '${resolved.logicalId}' fromS3 Code.S3.Bucket intrinsic resolved to a ${typeof result.value} value, not a bucket name string. (${describeIntrinsic(s3Source.bucketIntrinsic)})`, "LOCAL_INVOKE_AGENTCORE_FROMS3_BUCKET_INTRINSIC_NOT_STRING");
|
|
32138
32592
|
s3Source.bucket = result.value;
|
|
32139
|
-
|
|
32593
|
+
if (watched.seen.producerSecret !== void 0) s3Source.bucketJudged = true;
|
|
32594
|
+
getLogger().info(watched.seen.producerSecret === void 0 ? `Resolved fromS3 Code.S3.Bucket from state: ${describeIntrinsic(s3Source.bucketIntrinsic)} resolved to ${result.value}` : `Resolved fromS3 Code.S3.Bucket from state: ${describeIntrinsic(s3Source.bucketIntrinsic)} (a cross-stack value cdkd does not print: it holds a secret of the producer stack, or one cdkd could not check)`);
|
|
32140
32595
|
}
|
|
32141
32596
|
function describeIntrinsic(value) {
|
|
32142
32597
|
if (!value || typeof value !== "object") return String(value);
|
|
@@ -32148,7 +32603,8 @@ function describeIntrinsic(value) {
|
|
|
32148
32603
|
}
|
|
32149
32604
|
async function buildAgentCoreImageContext(candidate, stateProvider, options) {
|
|
32150
32605
|
const logger = getLogger();
|
|
32151
|
-
const
|
|
32606
|
+
const loaded = await stateProvider.load(candidate.stackName, candidate.region);
|
|
32607
|
+
const region = canonicalizeRegion(options.region ?? namedEnvAwsRegion() ?? process.env["AWS_DEFAULT_REGION"] ?? candidate.region ?? loaded?.region ?? emulatorDefaultRegion());
|
|
32152
32608
|
let accountId;
|
|
32153
32609
|
try {
|
|
32154
32610
|
accountId = await resolveStackAccountId(region, options.profile, options.fromState, options.fromCfnStack);
|
|
@@ -32156,9 +32612,7 @@ async function buildAgentCoreImageContext(candidate, stateProvider, options) {
|
|
|
32156
32612
|
logger.warn(safeMsg`${stateProvider.label}: STS GetCallerIdentity failed: ${describeLocalAwsFailureForWarn(err, "STS GetCallerIdentity")}. ` + "A same-stack ECR image URI referencing ${AWS::AccountId} may not resolve.");
|
|
32157
32613
|
}
|
|
32158
32614
|
const context = {};
|
|
32159
|
-
|
|
32160
|
-
if (pseudo) context.pseudoParameters = pseudo;
|
|
32161
|
-
const loaded = await stateProvider.load(candidate.stackName, candidate.region);
|
|
32615
|
+
context.pseudoParameters = withDeployedStackName(derivePseudoParametersFromRegion$1(region, accountId), options, candidate.stackName);
|
|
32162
32616
|
if (loaded) {
|
|
32163
32617
|
context.stateResources = loaded.resources;
|
|
32164
32618
|
if (stateProvider.resolveTemplateSsmParameters) {
|
|
@@ -32195,7 +32649,7 @@ function watchInterruptedError(what) {
|
|
|
32195
32649
|
async function bootAgentCoreContainer(args) {
|
|
32196
32650
|
const logger = getLogger();
|
|
32197
32651
|
const { resolved, options, assemblyDir, profileCredentials, profileCredsFile, stateProvider, loadedState, imageContext, isMcp, isA2a, startGuard } = args;
|
|
32198
|
-
await resolveFromS3BucketIntrinsic(resolved, stateProvider, loadedState, imageContext);
|
|
32652
|
+
await resolveFromS3BucketIntrinsic(resolved, stateProvider, loadedState, imageContext, options);
|
|
32199
32653
|
const image = await resolveAgentCoreImage(resolved, options, assemblyDir, loadedState);
|
|
32200
32654
|
const { env: dockerEnv, sensitiveEnvKeys } = await buildContainerEnv(resolved, options, profileCredentials, profileCredsFile, stateProvider, loadedState, imageContext);
|
|
32201
32655
|
const hostPort = await pickFreePort();
|
|
@@ -33198,15 +33652,15 @@ async function resolveInvokeTemplateEnvWith(lambda, options, dynamicRefs) {
|
|
|
33198
33652
|
})
|
|
33199
33653
|
};
|
|
33200
33654
|
if (envHasIntrinsicValue(templateEnv)) {
|
|
33201
|
-
const pseudo = await resolvePseudoParametersForInvoke(lambda.stack.region, options);
|
|
33202
|
-
|
|
33655
|
+
const pseudo = await resolvePseudoParametersForInvoke(lambda.stack.region ?? loaded.region, options);
|
|
33656
|
+
subContext.pseudoParameters = withDeployedStackName(pseudo, options, lambda.stack.stackName);
|
|
33203
33657
|
Object.assign(subContext, await templateSsmParameters(stateProvider, lambda.stack.template));
|
|
33204
33658
|
}
|
|
33205
33659
|
if (envHasCrossStackIntrinsic(templateEnv)) {
|
|
33206
33660
|
const resolver = await stateProvider.buildCrossStackResolver(loaded.region);
|
|
33207
33661
|
if (resolver) subContext.crossStackResolver = resolver;
|
|
33208
33662
|
}
|
|
33209
|
-
const { env, audit } = await
|
|
33663
|
+
const { env, audit } = await substituteEnvVarsJudgedAsync(templateEnv, subContext);
|
|
33210
33664
|
templateEnv = env;
|
|
33211
33665
|
stateAudit = audit;
|
|
33212
33666
|
const label = stateProvider.label;
|
|
@@ -33426,4 +33880,4 @@ function collectVerbFlags(program) {
|
|
|
33426
33880
|
}
|
|
33427
33881
|
|
|
33428
33882
|
export { resolveSecretDerivedPrincipals as a, buildProgram, isResolvableSecretPrincipalList as i, runDestroyForStack as n, canonicalizeIpProtocolValue as o, holdsUnprovenSecretPrincipalToken as r, canonicalizeIpv4Cidr as t };
|
|
33429
|
-
//# sourceMappingURL=program-
|
|
33883
|
+
//# sourceMappingURL=program-CjvlsJxS.js.map
|