@cdkd/cli 0.373.6 → 0.374.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ambient-client-defaults-BqOg0I6e.js → ambient-client-defaults-Bz-RIOwy.js} +3 -3
- package/dist/{ambient-client-defaults-BqOg0I6e.js.map → ambient-client-defaults-Bz-RIOwy.js.map} +1 -1
- package/dist/{asg-provider-DkhAcikX.js → asg-provider-CAUjmdq9.js} +8 -8
- package/dist/{asg-provider-DkhAcikX.js.map → asg-provider-CAUjmdq9.js.map} +1 -1
- package/dist/cli.js +3 -3
- package/dist/{custom-resource-runtime-CLjuWVBC.js → custom-resource-runtime-CWVAEO2K.js} +6 -6
- package/dist/{custom-resource-runtime-CLjuWVBC.js.map → custom-resource-runtime-CWVAEO2K.js.map} +1 -1
- package/dist/{db-associated-roles-CCgL0Loo.js → db-associated-roles-lNcEBB6O.js} +2 -2
- package/dist/{db-associated-roles-CCgL0Loo.js.map → db-associated-roles-lNcEBB6O.js.map} +1 -1
- package/dist/{delete-started-C9z4Yf_c.js → delete-started-CJq_moaK.js} +4 -4
- package/dist/{delete-started-C9z4Yf_c.js.map → delete-started-CJq_moaK.js.map} +1 -1
- package/dist/{deploy-engine-DNEAZMj7.js → deploy-engine-DQU_GZet.js} +10535 -891
- package/dist/deploy-engine-DQU_GZet.js.map +1 -0
- package/dist/{ec2-termination-protection-zaan5pi0.js → ec2-termination-protection-CGDF52lA.js} +3 -3
- package/dist/{ec2-termination-protection-zaan5pi0.js.map → ec2-termination-protection-CGDF52lA.js.map} +1 -1
- package/dist/{ecr-uri-CrQgKKRC.js → ecr-uri-CJJjp-MO.js} +2 -2
- package/dist/{ecr-uri-CrQgKKRC.js.map → ecr-uri-CJJjp-MO.js.map} +1 -1
- package/dist/{emr-cluster-provider-Dkg4vDao.js → emr-cluster-provider-2hRUEW1E.js} +13 -11
- package/dist/emr-cluster-provider-2hRUEW1E.js.map +1 -0
- package/dist/{expected-bucket-owner-DIMD36_h.js → expected-bucket-owner-DyFD7Dw5.js} +2 -2
- package/dist/{expected-bucket-owner-DIMD36_h.js.map → expected-bucket-owner-DyFD7Dw5.js.map} +1 -1
- package/dist/guard-read-retry-CaBmRzwo.js +56 -0
- package/dist/guard-read-retry-CaBmRzwo.js.map +1 -0
- package/dist/{iam-role-provider-CkIQ7vmu.js → iam-role-provider-c32ZQo8P.js} +12 -12
- package/dist/{iam-role-provider-CkIQ7vmu.js.map → iam-role-provider-c32ZQo8P.js.map} +1 -1
- package/dist/{identity-read-denied-DU0YqxNk.js → identity-read-denied-DRjvF3oA.js} +4 -4
- package/dist/{identity-read-denied-DU0YqxNk.js.map → identity-read-denied-DRjvF3oA.js.map} +1 -1
- package/dist/{image-plan-B1CAuiek.js → image-plan-Cmjgc6iE.js} +8 -8
- package/dist/{image-plan-B1CAuiek.js.map → image-plan-Cmjgc6iE.js.map} +1 -1
- package/dist/index.d.ts +14 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/{logger-IjQ12QWZ.js → logger-BlKwgEgV.js} +3 -3
- package/dist/{logger-IjQ12QWZ.js.map → logger-BlKwgEgV.js.map} +1 -1
- package/dist/{neptune-provider-2O6bzLTH.js → neptune-provider-BiLAHYo4.js} +12 -10
- package/dist/neptune-provider-BiLAHYo4.js.map +1 -0
- package/dist/{program-DnMYJ4--.js → program-CQZs9Ljn.js} +656 -334
- package/dist/program-CQZs9Ljn.js.map +1 -0
- package/dist/{provider-classes-BuCH49t_.js → provider-classes-CNMjjxoS.js} +584 -86
- package/dist/provider-classes-CNMjjxoS.js.map +1 -0
- package/dist/{rds-provider-BSeLwUR8.js → rds-provider-By5mf53G.js} +13 -13
- package/dist/{rds-provider-BSeLwUR8.js.map → rds-provider-By5mf53G.js.map} +1 -1
- package/dist/{read-replica-FMRYAHg6.js → read-replica-BIjj_bfE.js} +3 -3
- package/dist/{read-replica-FMRYAHg6.js.map → read-replica-BIjj_bfE.js.map} +1 -1
- package/dist/{redacted-delete-address-DGHv9GNm.js → redacted-delete-address-DGufa4wz.js} +4 -4
- package/dist/{redacted-delete-address-DGHv9GNm.js.map → redacted-delete-address-DGufa4wz.js.map} +1 -1
- package/dist/{replacement-rules-BAJWgr5f.js → replacement-rules-BQ-sbuiR.js} +3 -3
- package/dist/{replacement-rules-BAJWgr5f.js.map → replacement-rules-BQ-sbuiR.js.map} +1 -1
- package/dist/{resource-deadline-DB1HaWnD.js → resource-deadline-0dfvU7D5.js} +2102 -2055
- package/dist/resource-deadline-0dfvU7D5.js.map +1 -0
- package/dist/{restore-source-guard-BL2O_O6r.js → restore-source-guard-CWbzgUdy.js} +4 -4
- package/dist/{restore-source-guard-BL2O_O6r.js.map → restore-source-guard-CWbzgUdy.js.map} +1 -1
- package/dist/retry-ClxjEovs.js +211 -0
- package/dist/retry-ClxjEovs.js.map +1 -0
- package/dist/{run-cli-CtrPRsbm.js → run-cli-DBXWGhyD.js} +2 -2
- package/dist/{run-cli-CtrPRsbm.js.map → run-cli-DBXWGhyD.js.map} +1 -1
- package/dist/{secret-reference-immutable-XFEdCfNg.js → secret-reference-immutable-CSgI6Td9.js} +10 -211
- package/dist/secret-reference-immutable-CSgI6Td9.js.map +1 -0
- package/dist/{settle-own-write-members-DzUentwR.js → settle-own-write-members-DqlMjdQV.js} +10 -10
- package/dist/{settle-own-write-members-DzUentwR.js.map → settle-own-write-members-DqlMjdQV.js.map} +1 -1
- package/dist/{tag-list-Bye2zxAF.js → tag-list-B4IlIPvY.js} +4 -4
- package/dist/{tag-list-Bye2zxAF.js.map → tag-list-B4IlIPvY.js.map} +1 -1
- package/dist/{update-removal-BpxPxmQR.js → update-removal-VyphayB2.js} +2 -2
- package/dist/{update-removal-BpxPxmQR.js.map → update-removal-VyphayB2.js.map} +1 -1
- package/dist/{version-nXXjUmZl.js → version-fHMzKIi5.js} +2 -2
- package/dist/{version-nXXjUmZl.js.map → version-fHMzKIi5.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-DNEAZMj7.js.map +0 -1
- package/dist/emr-cluster-provider-Dkg4vDao.js.map +0 -1
- package/dist/neptune-provider-2O6bzLTH.js.map +0 -1
- package/dist/program-DnMYJ4--.js.map +0 -1
- package/dist/provider-classes-BuCH49t_.js.map +0 -1
- package/dist/resource-deadline-DB1HaWnD.js.map +0 -1
- package/dist/secret-reference-immutable-XFEdCfNg.js.map +0 -1
|
@@ -1,23 +1,25 @@
|
|
|
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 renderStacksNoLongerSelected, $t as contextOptions, A as followContainerLogs, An as parseStateKey, At as namedEnvAwsRegion, B as resolveRuntimeCodeMountPath, Bt as regionNeedsReconciliation, C as waitForRieReady, Cn as parsePositiveIntegerOption, Ct as resolveContainerRegion, Dn as describeStateKey, Dt as warnAwsEmulatorStateSourceHint, E as SENSITIVE_ENV_KEYS, En as STATE_KEY_MAX_CODE_POINTS, Et as taskRoleAssumedInRealAws, F as removeContainer, Ft as legacyStateBucketFallbackRegion, G as nestedOwnerOfLogicalId, Gt as withOtherIndexRemoval, H as resolveRuntimeImage, Ht as resolveEffectiveRegion, It as namedCliRegion, J as renderAllLeftOutStageStacks, Jt as annotationMessageOptions, K as partitionTopLevel, Kt as strandedProfileCredentialsNotice, L as runDetached, Lt as rawCliRegion, M as killAndDrainContainerLogs, Mt as adoptRegionFlag, N as pickFreePort, Nt as exportInferredRegionForSdk, O as ensureDockerAvailable, On as listAllLockKeys, Ot as workloadGetsEmulatorKeysOnly, P as pullImage, Pt as foldRegionOption, Q as renderNotInAppWarning, Qt as commonOptions, Rt as reconcileExportIndexRegion, S as invokeRie, Sn as cliArgParser, St as realAwsException, T as DockerRunnerError, Tn as STATE_FILE_SUFFIX, Tt as stateRoleRecordIsEmulatorSide, U as describeStack, Ut as stackRegionResolver, V as resolveRuntimeFileExtension, Vt as regionShown, W as matchStacks, Wt as stateWithRegion, X as renderAmbiguousTargetStack, Xt as applyWaitFlagEnv, Y as renderAllNoTopLevelStacks, Yt as appOptions, Z as renderNoStackMatch, Zt as collectRepeated, _ as probeHostGatewaySupport, _n as allowUnsupportedTypesOption, _t as localAwsEmulatorCredentials, a as materializeLayerFromArn, an as noCfnFallbackOption, at as unmatchedPatterns, b as substituteImagePlaceholders, bn as resourceTimeoutOptions, bt as prepareLocalLoopbackForwarder, cn as parseStackRegion, ct as resolveCdkPathToLogicalIds, d as resolveAssetCodeDirectory, dn as stackOptions, dt as activateLocalAwsAndRoleArn, en as deployOptions, et as renderUnmatchedPatternsWarning, f as architectureToPlatform, fn as stateOptions, ft as assertAwsEmulatorValue, g as HOST_GATEWAY_MIN_VERSION, gn as parseAssumeRoleToken, gt as localAwsEmulatorActive, h as layerAssetDirectory, hn as normalizeStartApiAssumeRole, ht as keepEmulatorIssuedCredentials, i as resolveInlineCodeFilePath, in as guardStackRegionOptions, it as stacksNoLongerSelected, jt as recordEmulatorDefaultRegion, k as flushStdio, kn as listAllStateKeys, kt as emulatorDefaultRegion, l as resolveLambdaLayers, ln as regionOption, lt as stackForConstructPath, m as copyLayerTreeLastWins, mn as effectiveAssumeRoleArn, mt as getActiveWorkloadAwsWiring$1, n as resolveTmpfsForLambda, nn as diffUpdatePolicyOptions, nt as stackMatchesPattern, o as resolveLambdaTarget, on as noLocalCustomResourcesOption, ot as buildCdkPathIndex, p as buildContainerImage$1, pn as useCdkBootstrapAssetsOption, pt as attachLocalLoopbackForwarder, q as refuseStackNameRegionCollisions, qt as writeProfileCredentialsFile, r as resolveZipImagePlan, rn as exclusivelyOption, rt as stacksForDependency, s as extractEphemeralStorageMb, sn as parseContextOptions, st as readCdkPathOrUndefined, t as resolveLocalBuildPlan$1, tn as destroyOptions, tt as selectTargetStack, u as assetPathDirs, un as skipFinalSnapshotOption, ut as stackForPathFormTarget, v as resolveHostGatewayExtraHosts, vn as diffReplaceResourceOption, vt as mixedModeActive, w as CONTAINER_LOG_DRAIN_TIMEOUT_MS, wn as LOCK_FILE_SUFFIX, wt as setContainerRegion, x as tryResolveImageFnJoin, xn as validateResourceTimeouts, xt as profileCredentialsForWorkload, y as derivePseudoParametersFromRegion$1, yn as parseDuration, yt as mixedModeEmulatorOverride, z as streamLogs, zt as reconcileMarkerRegionWithLegacyDefault } from "./image-plan-
|
|
3
|
-
import { $
|
|
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-fHMzKIi5.js";
|
|
2
|
+
import { $ as renderStacksNoLongerSelected, $t as contextOptions, A as followContainerLogs, An as parseStateKey, At as namedEnvAwsRegion, B as resolveRuntimeCodeMountPath, Bt as regionNeedsReconciliation, C as waitForRieReady, Cn as parsePositiveIntegerOption, Ct as resolveContainerRegion, Dn as describeStateKey, Dt as warnAwsEmulatorStateSourceHint, E as SENSITIVE_ENV_KEYS, En as STATE_KEY_MAX_CODE_POINTS, Et as taskRoleAssumedInRealAws, F as removeContainer, Ft as legacyStateBucketFallbackRegion, G as nestedOwnerOfLogicalId, Gt as withOtherIndexRemoval, H as resolveRuntimeImage, Ht as resolveEffectiveRegion, It as namedCliRegion, J as renderAllLeftOutStageStacks, Jt as annotationMessageOptions, K as partitionTopLevel, Kt as strandedProfileCredentialsNotice, L as runDetached, Lt as rawCliRegion, M as killAndDrainContainerLogs, Mt as adoptRegionFlag, N as pickFreePort, Nt as exportInferredRegionForSdk, O as ensureDockerAvailable, On as listAllLockKeys, Ot as workloadGetsEmulatorKeysOnly, P as pullImage, Pt as foldRegionOption, Q as renderNotInAppWarning, Qt as commonOptions, Rt as reconcileExportIndexRegion, S as invokeRie, Sn as cliArgParser, St as realAwsException, T as DockerRunnerError, Tn as STATE_FILE_SUFFIX, Tt as stateRoleRecordIsEmulatorSide, U as describeStack, Ut as stackRegionResolver, V as resolveRuntimeFileExtension, Vt as regionShown, W as matchStacks, Wt as stateWithRegion, X as renderAmbiguousTargetStack, Xt as applyWaitFlagEnv, Y as renderAllNoTopLevelStacks, Yt as appOptions, Z as renderNoStackMatch, Zt as collectRepeated, _ as probeHostGatewaySupport, _n as allowUnsupportedTypesOption, _t as localAwsEmulatorCredentials, a as materializeLayerFromArn, an as noCfnFallbackOption, at as unmatchedPatterns, b as substituteImagePlaceholders, bn as resourceTimeoutOptions, bt as prepareLocalLoopbackForwarder, cn as parseStackRegion, ct as resolveCdkPathToLogicalIds, d as resolveAssetCodeDirectory, dn as stackOptions, dt as activateLocalAwsAndRoleArn, en as deployOptions, et as renderUnmatchedPatternsWarning, f as architectureToPlatform, fn as stateOptions, ft as assertAwsEmulatorValue, g as HOST_GATEWAY_MIN_VERSION, gn as parseAssumeRoleToken, gt as localAwsEmulatorActive, h as layerAssetDirectory, hn as normalizeStartApiAssumeRole, ht as keepEmulatorIssuedCredentials, i as resolveInlineCodeFilePath, in as guardStackRegionOptions, it as stacksNoLongerSelected, jt as recordEmulatorDefaultRegion, k as flushStdio, kn as listAllStateKeys, kt as emulatorDefaultRegion, l as resolveLambdaLayers, ln as regionOption, lt as stackForConstructPath, m as copyLayerTreeLastWins, mn as effectiveAssumeRoleArn, mt as getActiveWorkloadAwsWiring$1, n as resolveTmpfsForLambda, nn as diffUpdatePolicyOptions, nt as stackMatchesPattern, o as resolveLambdaTarget, on as noLocalCustomResourcesOption, ot as buildCdkPathIndex, p as buildContainerImage$1, pn as useCdkBootstrapAssetsOption, pt as attachLocalLoopbackForwarder, q as refuseStackNameRegionCollisions, qt as writeProfileCredentialsFile, r as resolveZipImagePlan, rn as exclusivelyOption, rt as stacksForDependency, s as extractEphemeralStorageMb, sn as parseContextOptions, st as readCdkPathOrUndefined, t as resolveLocalBuildPlan$1, tn as destroyOptions, tt as selectTargetStack, u as assetPathDirs, un as skipFinalSnapshotOption, ut as stackForPathFormTarget, v as resolveHostGatewayExtraHosts, vn as diffReplaceResourceOption, vt as mixedModeActive, w as CONTAINER_LOG_DRAIN_TIMEOUT_MS, wn as LOCK_FILE_SUFFIX, wt as setContainerRegion, x as tryResolveImageFnJoin, xn as validateResourceTimeouts, xt as profileCredentialsForWorkload, y as derivePseudoParametersFromRegion$1, yn as parseDuration, yt as mixedModeEmulatorOverride, z as streamLogs, zt as reconcileMarkerRegionWithLegacyDefault } from "./image-plan-Cmjgc6iE.js";
|
|
3
|
+
import { $i as setPasteableAwsCaBundle, $r as recordPhysicalNameCopy, Ai as recordMaskOnlyValuesIn, An as redactForState, B as isMarkedNotGone, Dt as interruptWatchListenerCount, E as assertRegionMatch, Ei as provenPublicValue, En as resolvedPlaintextOf, Er as logOnlyValueCount, Et as endCommandInterruptScope, Fr as errorCauseChain, Gi as formatLockExpiry, Hi as buildForceUnlockCommand, Ht as maskDeep, Ii as WHOLE_DYNAMIC_REFERENCE_PATTERN, It as resourceTypeShown, Ki as formatLockOperation, Lr as maskSecretsInError, Mi as recordNoEchoParameterFreshValue, Mr as shareLogOnlyValues, Ni as recordProvenPublicExpression, Nr as unionOfSecretBags, Or as printingCorpusOf, Ot as isInterruptedWaitError, Pi as wholeStringLeavesOf, Pr as createSecretMasker, Pt as logicalIdShown, Qi as WAIT_CONDITION_SIGNAL_PREFIX, R as remedyLogicalId, Ri as isPlainObject$1, Rr as maskSecretsInText, Sr as createUnionSecretMasker, St as readRecordedPrincipals, T as RESOURCE_NOT_FOUND, Tr as literalSplitDelimitersOf, Tt as beginCommandInterruptScope, Ui as buildLockContentionMessage, Vi as UNREPRODUCIBLE_LOCK_CLAUSE, Wi as forceQuitRecoveryClause, Wr as recordNestedStackParameterExpressions, Xi as CUSTOM_RESOURCE_RESPONSE_PREFIX, Xn as scrubResourceRecord, Yr as keepTemplateLiteralLeaves, Zi as DEFAULT_STATE_PREFIX, Zn as withPhysicalNameCopies, Zr as physicalNameCopiesOf, aa as producerRecordKey, ai as dynamicReferenceSpans, ar as identityKeyFor, br as carryLogOnlyValues, dn as mentionsMask, dt as isAwsCliLiteral, ea as setPasteableAwsProfile, fr as carriesInheritedRedaction, gn as valueMentionsDynamicReference, gt as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, ht as IAM_PRINCIPAL_NAME, ia as producerCoordinateKey, ii as DYNAMIC_REFERENCE_TOKEN_SCAN, it as runDeleteAttempt, ji as recordNoEchoAttributeValues, jr as recordLogOnlyValue, k as VALUE_NOT_SHOWN, ki as recordMaskOnlyValue, kr as recordLogOnlyParameterValue, ln as mentionsDynamicReference, mi as carriesSecretMask, mn as recordedSecrecyOf, mt as renderDisableCommand, na as injectiveKey, nr as spelledKeysOf, o as withResourceDeadline, oi as dynamicReferenceTokens, on as holdsMaskLeaf, pi as splitGetAttStringForm, pn as opensDynamicReferenceTo, pr as inheritNestedStackParameterAssociations, qi as formatLockOwner, r as formatWarnElapsed, rn as countDynamicReferenceOpenings, rr as pathCrossesDottedKey, sn as isMaskLeaf, ta as withPasteableAwsProfile, ti as carriesSubFloorEvidence, tr as isUncertifiedBaselineMaskPosition, un as mentionsDynamicReferenceTo, w as DriftReadRefusedError, wr as hasMaskableValues, zi as isSingleDynamicReferenceToken } from "./resource-deadline-0dfvU7D5.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
|
|
6
|
-
import { $ as AccountIdUnavailableError, A as stripControlChars, B as isTransientServerError, F as isAmbiguousOutcomeError, G as markNonRetryable, H as THROTTLING_ERROR_NAMES, J as CrossAccountSecretRefusalError, U as isMarkedNonRetryable, V as retryClassificationText, W as isThrottlingError, X as IntrinsicResolutionRefusalError, Y as DynamicReferenceRegionAmbiguousError, Z as MalformedProducerRecordRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, ct as StateError, g as PartialFailureError, h as NestedStackChildDirectDestroyError, i as credentialFingerprint, it as LocalInvokeBuildError$1, j as stripForDisplay, k as escapeRegExp, l as withErrorHandling, lt as SynthesisError, n as ambientCredentialConfig, nt as DeployCancelledError, o as formatError, ot as ProvisioningError, r as clientDefaultsFor, s as handleError, st as ResourceTimeoutError, t as ambientClientDefaults, tt as CdkdError, u as LocalStartServiceError, v as StackHasActiveImportsError, y as StackTerminationProtectionError, z as isRetryableTransientError } from "./ambient-client-defaults-
|
|
5
|
+
import { $ as withSkipPrefix, A as configStringRefusal, B as generateResourceName, E as coerceCfnBoolean, F as requireConfigString, I as PATTERN_B_NAME_OPTIONS, L as PATTERN_B_NAME_PROPERTIES, N as requireConfigArray, O as configBooleanRefusal, P as requireConfigObject, R as PATTERN_B_RESOURCE_TYPES, S as explicitNamePropertyFor, X as isNameGeneration, a as reserveStdoutForPayload, et as withStackScope, f as isAwsAuthoredFailure, 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-BlKwgEgV.js";
|
|
6
|
+
import { $ as AccountIdUnavailableError, A as stripControlChars, B as isTransientServerError, F as isAmbiguousOutcomeError, G as markNonRetryable, H as THROTTLING_ERROR_NAMES, J as CrossAccountSecretRefusalError, U as isMarkedNonRetryable, V as retryClassificationText, W as isThrottlingError, X as IntrinsicResolutionRefusalError, Y as DynamicReferenceRegionAmbiguousError, Z as MalformedProducerRecordRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, ct as StateError, g as PartialFailureError, h as NestedStackChildDirectDestroyError, i as credentialFingerprint, it as LocalInvokeBuildError$1, j as stripForDisplay, k as escapeRegExp, l as withErrorHandling, lt as SynthesisError, n as ambientCredentialConfig, nt as DeployCancelledError, o as formatError, ot as ProvisioningError, r as clientDefaultsFor, s as handleError, st as ResourceTimeoutError, t as ambientClientDefaults, tt as CdkdError, u as LocalStartServiceError, v as StackHasActiveImportsError, y as StackTerminationProtectionError, z as isRetryableTransientError } from "./ambient-client-defaults-Bz-RIOwy.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 { $ as createLegacyAssetParameterBinder, A as runDockerForeground, B as resolveCaptureObservedState, C as finchSecretArgvRefusal, D as isMalformedEnvKey, E as isDockerClientEnvKey, F as getDefaultStateBucketName, G as resolveUpdatePolicy, H as resolveStateBucketWithDefault, I as getLegacyStateBucketName, J as warnDeprecatedNoPrefixCliFlag, K as resolveUseCdkBootstrapAssets, L as loadCdkJson, M as abortInFlightMultipartUploads, N as Synthesizer, O as formatDockerLoginError, P as synthesisStatusMessage, Q as bindLegacyStackAssetParameters, R as resolveApp, S as dockerSpawnEnvWithSensitive, T as warnFinchArgvExposure, U as resolveStateBucketWithDefaultAndSource, V as resolveSkipPrefix, W as resolveStateBucketWithSource, X as AssemblyReader, Y as refuseFailedLookups, Z as StageLoadError, _ as describeDockerExecFailure, at as setChildProcessAwsEnv, b as redactedDockerCause, d as isLockInfoExpired, et as legacyPlanAssetCount, f as AssetPublisher, h as resolveDockerContextDirectory, i as mergeDeclaredEntries, it as processStackMessages, j as runDockerStreaming, k as getDockerCmd, l as DagBuilder, m as buildDockerImage, n as declaredStringList, nt as prepareLegacyStackAssets, p as WorkGraph, q as stateBucketExistenceConfirmed, r as inlinePoliciesAreDeclared, rt as CdkToolkitBucketMissingError, s as stringListIsDeclared, t as declaredInlinePolicies, tt as predictedAutoCreatedAssetMode, u as LockManager, v as describeDockerFailure, w as partitionSensitiveEnv, x as redactDockerArgvValues, y as redactedCause, z as resolveAutoAssetStorage } from "./settle-own-write-members-
|
|
9
|
-
import { $a as maskEventTextWithBoundBags, $c as yellow, $d as createLazyAssetModeContext, $i as namesAnyDeclaredParameter, $l as repairMalformedOrphanRecordsForReadOnly, $n as NESTED_PENDING_PARENT_REASON, $o as WaitConditionSignalStore, $r as recordedRuleIdOf, $s as classifyReplaySecretRegion, $u as UNREADABLE_RESOURCES_MAP_ROW, A as renderUnreplacedTarget, Aa as supersededResourcesOf, Ac as recordedValuesOf, Ad as isSecretValuedAttribute, Af as nullPrototypeRecord, Ai as demoteSupersededOrphans, An as refactorMarkerMovesOf, Ar as movedToHint, As as DiffCalculator, Au as malformedExportNamesWarning, B as readProtection, Ba as sgCidrKey, Bc as parseCfnTemplateWithFormat, Bf as resolveBucketRegion, Bi as removeProtectionTypeList, Bl as maskedInputProof, Bn as settleStackTagChildRuns, Bo as memberReadFailure, Br as parseMappingFile, Bs as refuseUnreadableCdkCrossAccountRefs, Bu as refuseDivergentRecordRegionForDestroy, C as healSlashedSsmParameterNames, Ca as deleteSupersededEntry, Cc as maskPassedSecretChanges, Cd as CrossPrefixScanCache, Cf as validateContainerRepoName, Cl as isStatefulRecreateTargetSync, Cr as constructPathOf$1, Cs as deleteIndeterminateGuards, Cu as UNREADABLE_ORPHANS_CONTAINER_ROW, D as scanActiveConsumers, Da as supersededDependentsFirst, Dc as mixedSecretTagKeys, Dd as isNotImplemented, Df as defineOwnKey, Dn as recordRetainedForReadoption, Do as destroyStackRecordsView, Dr as orphanedLogicalIds, Ds as getReadOnlyPropertyPaths, Du as refuseMalformedOrphans, E as slashedSsmNameHealPendingNote, Ea as supersededAfterRollback, Ec as mixedSecretRowKeys, Ed as isAccessDenied, Ei as withCreateTokenLedger, En as keptForRetainedRecord, Er as formatDestructiveChange, Eu as malformedOrphansWarning, F as recordedProtectionEvidence, Fa as withPreviousPolicies, Fc as prepareCloudFormationStackRetirement, Fd as isAbsoluteAssetPath, Ff as displayAssemblyPath, Fi as recordUnderIdIsNotOwn, Fl as getTopLevelKeysHoldingUnreadableCreateOnly, Fn as deleteSignalReceiver, Fr as changedReferenceReason, Fs as stackIdTailOf, Ga as noEchoAttributeNamesOf, Gc as promptYesNo, Gd as uploadCfnTemplate, Gi as nameScopeOf, Gl as isReadableOrphanRecord, Gn as readsOnlyNoEchoParameters, Go as verbatimEchoDriftKeys, Gr as createNoEchoValueMacs, Gs as isIamRoleArn, Gu as refuseMalformedResourcesForDestroy, Hc as SUPERSEDED_COPY_HINT, Hd as CFN_TEMPLATE_BODY_LIMIT, Hi as orphanNeedsIdentity, Hl as declaresNoEcho, Hn as childStackTags, Ho as reReadUntilSettled, Hr as proposeRenames, Hs as assertFlagRoleArn, Hu as malformedResourcesWarning, I as recordedProtectionNote, Ia as findNestedStackTypeChanges, Ic as findReplacedCfnResources, Id as listNestedTemplateRows, Ii as replacementNeverSwapped, Il as tryGetTopLevelWriteOnlyProperties, In as isReceiver, Io as declaredMemberDocument, Ir as differingRemedy, Iu as refuseMalformedOutputs, Ja as withAttemptedItemsMasked, Jc as bold, Jd as decodeListingKey, Ji as retiredNameGenerationsLeaving, Jl as malformedOrphanRowsKeptWarning, Jn as startForceQuitFlushes, Jo as CC_BROKEN_REASON, Jr as noEchoMacVerdict, Js as AWS_CREDENTIAL_ENV_KEYS, Ju as repairMalformedResourcesForReadOnly, Ka as noEchoComparisonForTemplate, Kc as serializePrompt, Kd as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Ki as retiredAfterRollback, Kl as malformedOrphanRecordsRefusalMessage, Kr as noEchoMacBinding, Ks as parseIamRoleArn, Ku as refuseMalformedResourcesForExport, L as PROTECTION_PROPERTY_BY_TYPE, Lc as getCloudFormationResourceTree, Ld as renderNestedTemplateTreeDefect, Lf as renderAssemblyPathEscape, Li as attemptUsesCompletedCreate, Ll as publicReferencesOf, Ln as removeSignalReceiverNamed, Lo as declaredPolicyDocument, Lr as isPairableType, Lt as tagsMatchDeclared, Lu as refuseMalformedOutputsForDestroy, M as findServiceTokenRefusals, Mc as taintedNamesOf, Mi as isReplacementOrphan, Ml as secretSegmentsOfState, Mn as refuseRefactorMarker, Mr as withMovedTo, Ms as isSelectOutOfBounds, Mu as malformedLocalOutputsWarning, N as serviceTokenBlockingReason, Na as snapshotSegmentSurvivors, Nc as templateMixesDynamicReference, Ni as planFailedOps, Nl as withSecretPhysicalIdsMaskedInState, Nn as sameMove, No as LAMBDA_PERMISSION_STATEMENT_KEYS, Nr as changedReferenceInDiff, Ns as isAlwaysLiveAttribute, Nt as declaredTagsReadback, Nu as malformedOutputsRefusalMessage, O as planReplaceResourceTargets, Oa as supersededHeldByOtherTypeWarning, Oc as mixesDynamicReference, Od as stackInstanceIdOf, Of as hasOwnKey, Oi as planRollback, On as readRefactorMarker, Or as findRefactorHints, Os as isWaitAbandonedError, Ou as refuseMalformedOrphansForDestroy, P as diffSecurity, Pa as resolveReplacementOldType, Pc as deleteRetiredCloudFormationStack, Pd as findNestedTemplateTreeDefect, Pf as describeFileReadFailure, Pi as recheckFailedPlan, Pl as getSettledWriteOnlyPropertyPaths, Pn as updateRefactorMarker, Pr as changedReferencePath, Ps as poisonRenderedSpellingsCollidingIn, Pu as malformedOutputsWarning, Q as streamPolicyMatchesDeclared, Qa as journaledOrphanPrintingBag, Qc as red, Qd as createAssetRedirectResolver, Qi as computeParameterTaint, Ql as refuseMalformedOrphansForOrphan, Qn as planOrphanAdoption, Qo as wouldReturnToSdkProvider, Qr as undeclaredGrantSiblingMembers, Qs as classifyRecordedSecretRegion, Qu as STATE_RESOURCES_MALFORMED, R as isProtectionValueActive, Ra as cfnIngressPortValue, Rc as tryGetCloudFormationResourceMap, Rd as templateIdentity, Rf as resolveAssemblyPath, Ri as readsRegeneratingSecret, Rl as maskedPropertyFingerprintsOf, Rn as childTemplateLoader, Ro as efsPolicyMatchesDeclared, Rr as looselyEqual, Rs as resolveDynamicReferences, Ru as repairMalformedOutputsForReadOnly, S as warnLegacySpelling, Sa as typesDeletedBefore, Sc as crossStackTaintSeeds, Sd as CrossPrefixReadError, Sf as validateAssetBucketName, Si as replacementCreateRoutesToCloudControl, Sl as isStatefulRecreateTargetForReplace, Sr as crossStackReadsForPartialSave, Ss as UNSPECIFIED_SKIP_REASON, Su as repairMalformedResourcePropertiesForReadOnly, T as slashedSsmNameHealNote, Ta as isSupersededResourceRecord, Tc as maskPassedSecretReasons, Td as crossPrefixDeniedWarning, Tn as NestedCleanupQueue, Tr as formatChangeCounts, Ts as deleteSkipReason, Tu as malformedOrphansRefusalMessage, Ua as canonicalizeIpv4Cidr, Uc as cfnFailureText, Ud as CFN_TEMPLATE_URL_LIMIT, Ui as nameGenerationCarriedFrom, Ul as maskedPropertyFingerprint, Un as literalRowTags, Ur as referencedLogicalIds, Us as assertSendableRoleArn, Uu as malformedStateRefusalMessage, Va as sgProtocolKey, Vc as stringifyCfnTemplate, Vd as ssmResolvedValueType, Vi as removeProtectionTypes, Vo as policyDocumentMatchesDeclared, Vr as propertiesChangedReason, Vs as applyRoleArnIfSet, Vu as malformedRenderedContainersWarning, Wa as canonicalizeIpProtocolValue, Wc as confirmOrRefuse, Wd as findLargeInlineResources, Wi as nameGenerationHighWaterOf, Wl as deployRefusesOrphanRowsReason, Wn as macWriteOnlyKeys, Wr as NOECHO_MAC_KEY_ALIAS, Ws as explicitRoleArnOrThrow, Wu as refuseMalformedResourcesForDeploy, Xa as createReadOnlyAttributeHealerFactory, Xc as gray, Xl as refuseMalformedOrphanRecords, Xn as resolvePendingCloudControlRequests, Xo as ccBrokenReason, Xr as siblingOwnedRevertDesired, Xs as callerEnvCredentials, Xu as accountArgs, Ya as noEchoExactEchoLeavesOf, Yc as cyan, Yi as withNameGenerationReached, Yl as previewableOrphanRecords, Yn as pendingRequestCount, Yo as ProviderRegistry, Yr as noEchoValueMacsOf, Ys as applyCallerIdentityCredentials, Yu as JSON_LISTING_HOLE_VALUE, Za as completedReplayEntries, Zc as green, Zd as buildAssetRedirectMap, Zi as inheritProducerRegions, Zl as refuseMalformedOrphanRecordsForDestroy, Zn as makeSiblingClaimReader, Zo as isCustomResource, Zr as stripSiblingOwnedParentMembers, Zs as envCredentialsAreAssumedRole, Zu as withheldAccountClause, _ as readRecordedConditionVerdicts, _a as DEFAULT_RESOURCE_TIMEOUT_MS, _c as lacksRecordedRefArn, _d as splitImportedOps, _f as assertAssetBucketRegion, _i as equalModuloMask, _o as unsupportedFinalSnapshotError, _r as loadJournaledOrphans, _s as withCustomResourceStack, _u as malformedResourcePropertiesWarning, a as mergeNoChangeOutputs, aa as secretBearing, ai as replayFailedOperations, al as recordedReferenceRegions, ao as secretNamedRecordNeedles, ar as recordDisplacedSkips, as as customResourceResponseExpirationWarning, au as malformedResourceEntriesWarning, b as pendingMovesRefusalMessage, ba as IMPLICIT_DELETE_DEPENDENCIES, bc as SECURITY_TABLE_WITHHELD, bd as hasUnverifiableParameterRefusal, bf as parseBootstrapMarker, bi as updatePartialReason, bl as shownType, br as DeploymentEventsReader, bu as refuseMalformedResourcePropertiesForExport, c as nestedSsmNameRowNote, ca as carriedExportAliasExposure, cd as NO_CC_HANDLERS_REASON, cf as getDockerImageBySourceHash, ci as PLANNED_EARLY_DELETE_CONSEQUENCE, cl as isImpossibleEmptyStoredAttribute, co as storedSecretNameNeedles, cr as withNestedRevertRun, cs as readsNoEchoDeleteValues, cu as refuseMalformedResourceEntries, d as makeCanonicalizePropertiesFn, da as isWholeDynamicReferenceValue, dc as isUnboundTemplateParameter, dd as providerReplacementOldDeleted, di as buildReadCurrentStateContext, dl as carriesDynamicReference, do as PRE_DELETE_SNAPSHOT_TYPES, dr as withNestedStackContext, du as refuseMalformedResourceEntriesForImport, ea as reachableDivergentParameters, ec as producerRegionsFromState, ed as displayLogicalId, ei as sgRuleOwnershipIdentity, eo as namingSecretsWithRecordedNoEcho, er as displacedOpClause, es as classifyHandleUrl, eu as unpreviewableOrphanRecords, f as readDbInstanceAvailabilityZone, fa as noEchoParameterValueSeed, fc as parameterTypeMayLoseSecretIdentity, fi as recordAfterRollbackUpdate, fl as keepsSecretReferenceToken, fo as ccRoutedFinalSnapshotError, fr as deleteJournaledOrphans, fs as customResourcesFailedWithoutApp, fu as refuseMalformedResourceEntriesForImportSave, g as parentSuppliedValues, ga as bindingSkippedOutputs, gc as refStateLookupFromResource, gd as S3StateBackend, gf as buildDenyExternalAccessPolicy, gi as equalModuloMarkedMask, go as refusesFinalSnapshot, gr as journaledOrphanLines, gs as setLocalCustomResourceRuntimeEnabled, gu as malformedDriftResourcePropertiesWarning, h as conditionInputsFrom, ha as isExportAliasCollision, hc as isStalePlaceholderArnAttribute, hd as TemplateParser, hf as ensureAssetStorage, hi as calculateResourceDrift, hl as LEGACY_HANDLE_HEAL_REASON, ho as isFinalSnapshotError, hr as isHandledOrphan, hu as unreadableResourceEntries, i as keptWholeReasonText, ia as exportAliasCollisionScrubWarning, id as findHandledUnwrittenCreateOnly, il as recordedOutputReferenceRegions, ir as nestedChildStackName$1, is as applyCustomResourceResponseExpiration, iu as malformedLocalResourcesWarning, j as deferredServiceTokenWarning, ja as withoutSuperseded, jc as securityDiffWithPassedSecretWithheld, jd as isSensitiveAttributeName, jf as ownValue, ji as isJournaledOrphan, jl as secretPhysicalIdSegment, jn as refactorMarkerRefusalMessage, jo as withStackRecords, jr as rollbackOrphanIds, js as IntrinsicFunctionResolver, ju as malformedExportSourceWarning, k as refuseStatefulReplaceResourceTargets, ka as supersededHolderOf, kc as readsTainted, kd as withStackInstanceIdWithheld, kf as hasPlainPrototype, ki as seedsDeleteFirstGuard, kl as displayPhysicalId, kn as readRefactorMarkerOnce, ko as revertStackRecordsView, kr as hintSidesOf, ku as repairMalformedOrphansForReadOnly, l as crossStackOutputProvenanceSource, la as exportNameNoEchoParameters, ld as hasNoCloudControlHandlers, li as earlyDeleteWhen, ll as carriesFetchableDynamicReference, lo as extractDeploymentEventError, lr as collectNestedChildUnaddressed, ls as isCustomResourceType$1, lu as refuseMalformedResourceEntriesForDeploy, m as conditionFingerprint, ma as collectPublishedOutputNames, mc as cfnRefValueFromPhysicalId, mf as AssetModeResolver, mi as withUnprovenUnsettled, ml as INTRINSIC_KEYS, mo as effectiveDeletionPolicy, mr as dropFailedHint, ms as localCustomResourceCommand, mu as repairMalformedResourceEntriesForReadOnly, n as applyStackTagsToTemplate, na as WITHHELD_NAME_DISPLAY, nc as withoutLapsedStaleShapeStamp, nd as hasReadableResources, nl as keepHeldTokenProvenance, no as secretNamePrintingBag, nr as dropSettledNestedJournals, ns as isSignalKey, nu as isReadableResourceEntry, o as checkNestedSsmNames, oa as secretBearingStateKeyWarning, od as unwrittenCreateOnlyReplacement, of as rewriteTemplateAssetReferences, oi as replayRollback, ol as withoutVersionAttestation, oo as stackSecretNamesMasker, ou as malformedScrubResourceEntriesRefusalMessage, p as healZonelessDbInstanceRecords, pa as collectDeclaredOutputNames, pc as AWS_NO_VALUE, pi as settleUnsettledPrevious, pl as withSharedDrainBudget, po as ccRoutedInstanceTakesNoSnapshot, pr as dropFailedCommands, ps as customResourcesRunWithoutApp, pu as refuseMalformedResourceEntriesForOrphan, q as readStreamPolicy, qa as noEchoParameterNamesOf, qc as NESTED_STACK_RESOURCE_TYPE$1, qi as retiredNameGenerationsAfter, ql as malformedOrphanRecordsWarning, qn as formatResourceLine, qr as noEchoMacParametersOf, qs as sendableAssumeRoleCommand, qu as refuseMalformedState, r as isSecretBearingReferenceString, ra as displayTextOrWithheld, rc as isUnexposedRecordedIdentity, rd as findActionableSdkUnwired, rf as loadPublishableAssetManifest, ri as siblingRecordedSgRuleIds, ro as secretNamePrintingBags, rs as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, ru as malformedLocalResourceEntriesWarning, s as nestedSsmNameDeferredNote, sa as secretSafeKeyDisplay, sf as AssetManifestLoader, si as DELETED_RESOURCE_REMEDY, sl as getAccountInfo, so as stateSecretNameNeedles, sr as revertedNestedRowIds, ss as TemplateNoEchoReresolver, su as refuseMalformedResourceAttributesForOrphan, t as DeployEngine, ta as resourcesNamingDeclaredParameter, tc as regionLessSecretName, td as hasReadableOutputs, ti as sgSiblingDecidedById, tl as withPrintingSecrets, to as orphanRecordsPrintingBag, tr as displacedPhysicalIdShown, tu as unreadableOrphanRecords, u as inheritedProvenanceForChildDiff, ua as exportNameSecretExposure, uc as coerceParameterTypedValue, ud as PROPERTY_COVERAGE_BY_TYPE, ui as earlyDeletedOld, ul as isNamelessDynamicReferenceError, uo as ATOMIC_FINAL_SNAPSHOT_TYPES, ur as getCurrentNestedStackContext, us as NO_LOCAL_CUSTOM_RESOURCES_FLAG, uu as refuseMalformedResourceEntriesForDestroy, v as hasPendingMovesOut, va as DEFAULT_RESOURCE_WARN_AFTER_MS, vc as lacksRecordedTableArn, vd as readOnlyStateVersionOf, vf as isCrossRegionRedirect, vi as undeclaredEmptyObservedKeys, vl as findReplacedReadersOfRecreateTargets, vo as createPreDeleteFinalSnapshot, vr as sameJournaledOrphans, vu as refuseMalformedResourcePropertiesForDestroy, w as slashedSsmNameHealAdoptedNote, wa as holdsSupersededResources, wc as maskPassedSecretOutputs, wd as applyCrossPrefixScan, wf as BOOTSTRAP_MARKER_PREFIX, wi as ledgerForStack, wl as renderStatefulReason, wr as findDestructiveChanges, ws as deleteLeftInPlace, wu as hasReadableOrphans, x as refusePendingMovesOut, xa as computeImplicitDeleteEdges, xc as calculatorMaskingPassedSecretLines, xd as rebuildClientForBucketRegion, xf as readBootstrapMarkerBody, xi as findUpdatePolicyReplacementRefusals, xl as MULTI_REGION_RECREATE_BLOCKED_TYPES, xr as DeploymentEventsStore, xs as RollbackInlinePolicyWriters, xu as refuseMalformedResourcePropertiesForOrphan, y as pendingMovesOutOf, ya as maskingRetryLogger, yd as hasReasonlessBaselineRefusal, yf as getBootstrapMarkerKey, yi as updatePartialMessage, yl as refuseStatefulReplacedReaders, yo as buildFinalSnapshotIdentifier, yr as makeForeignHolderScan, ys as CloudControlProvider, yu as refuseMalformedResourcePropertiesForDrift, z as perType, za as recordedSgRuleId, zc as parseCfnTemplate, zi as segmentCleanupOptions, zl as parameterInputsFor, zn as inRunStackKey, zo as lambdaPermissionMatchesDeclared, zr as mappingPairs, zs as producerLookupOver, zu as STATE_REGION_DIVERGED } from "./deploy-engine-DNEAZMj7.js";
|
|
8
|
+
import { $ as createLegacyAssetParameterBinder, A as runDockerForeground, B as resolveCaptureObservedState, C as finchSecretArgvRefusal, D as isMalformedEnvKey, E as isDockerClientEnvKey, F as getDefaultStateBucketName, G as resolveUpdatePolicy, H as resolveStateBucketWithDefault, I as getLegacyStateBucketName, J as warnDeprecatedNoPrefixCliFlag, K as resolveUseCdkBootstrapAssets, L as loadCdkJson, M as abortInFlightMultipartUploads, N as Synthesizer, O as formatDockerLoginError, P as synthesisStatusMessage, Q as bindLegacyStackAssetParameters, R as resolveApp, S as dockerSpawnEnvWithSensitive, T as warnFinchArgvExposure, U as resolveStateBucketWithDefaultAndSource, V as resolveSkipPrefix, W as resolveStateBucketWithSource, X as AssemblyReader, Y as refuseFailedLookups, Z as StageLoadError, _ as describeDockerExecFailure, at as setChildProcessAwsEnv, b as redactedDockerCause, d as isLockInfoExpired, et as legacyPlanAssetCount, f as AssetPublisher, h as resolveDockerContextDirectory, i as mergeDeclaredEntries, it as processStackMessages, j as runDockerStreaming, k as getDockerCmd, l as DagBuilder, m as buildDockerImage, n as declaredStringList, nt as prepareLegacyStackAssets, p as WorkGraph, q as stateBucketExistenceConfirmed, r as inlinePoliciesAreDeclared, rt as CdkToolkitBucketMissingError, s as stringListIsDeclared, t as declaredInlinePolicies, tt as predictedAutoCreatedAssetMode, u as LockManager, v as describeDockerFailure, w as partitionSensitiveEnv, x as redactDockerArgvValues, y as redactedCause, z as resolveAutoAssetStorage } from "./settle-own-write-members-DqlMjdQV.js";
|
|
9
|
+
import { $c as getCloudFormationResourceTree, $d as findNestedTemplateTreeDefect, $f as describeFileReadFailure, $i as nameGenerationCarriedFrom, $l as getWriteOnlyKeysKeptWhenOmittedOnRevert, $n as formatResourceLine, $o as reReadUntilSettled, $r as noEchoMacParametersOf, $u as malformedOutputsWarning, A as renderUnreplacedTarget, Aa as IMPLICIT_DELETE_DEPENDENCIES, Ac as cfnRefValueFromPhysicalId, Ai as updatePartialReason, Al as INTRINSIC_KEYS, Ao as buildFinalSnapshotIdentifier, Ar as findDestructiveChanges, As as localCustomResourceCommand, Au as refuseMalformedResourceEntriesForImport, B as readProtection, Ba as supersededHolderOf, Bc as maskPassedSecretOutputs, Bd as rebuildClientForBucketRegion, Bf as readBootstrapMarkerBody, Bi as demoteSupersededOrphans, Bl as renderStatefulReason, Bn as updateRefactorMarker, Bo as revertStackRecordsView, Br as changedReferenceInDiff, Bs as deleteLeftInPlace, Bu as refuseMalformedResourcePropertiesForOrphan, C as healSlashedSsmParameterNames, Ca as collectDeclaredOutputNames, Cd as findHandledUnwrittenCreateOnly, Ci as settleUnsettledPrevious, Cl as getAccountInfo, Co as ccRoutedFinalSnapshotError, Cr as loadJournaledOrphans, Cs as TemplateNoEchoReresolver, Cu as malformedLocalResourcesWarning, D as scanActiveConsumers, Da as DEFAULT_RESOURCE_TIMEOUT_MS, Dc as isUnboundTemplateParameter, Dd as hasNoCloudControlHandlers, Df as getDockerImageBySourceHash, Di as equalModuloMask, Dl as carriesDynamicReference, Do as refusesFinalSnapshot, Dr as DeploymentEventsStore, Du as refuseMalformedResourceEntries, E as slashedSsmNameHealPendingNote, Ea as bindingSkippedOutputs, Ec as coerceParameterTypedValue, Ed as NO_CC_HANDLERS_REASON, Ef as AssetManifestLoader, Ei as equalModuloMarkedMask, El as isNamelessDynamicReferenceError, Eo as isFinalSnapshotError, Er as DeploymentEventsReader, Es as NO_LOCAL_CUSTOM_RESOURCES_FLAG, Eu as refuseMalformedResourceAttributesForOrphan, F as recordedProtectionEvidence, Fa as holdsSupersededResources, Fd as splitImportedOps, Ff as buildDenyExternalAccessPolicy, Fl as refuseStatefulReplacedReaders, Fn as readRefactorMarkerOnce, Fr as findRefactorHints, Fs as CloudControlProvider, Fu as malformedDriftResourcePropertiesWarning, Ga as resolveReplacementOldType, Gc as readsTainted, Gd as isAccessDenied, Gi as recordUnderIdIsNotOwn, Gl as displayPhysicalId, Gn as inRunStackKey, Gr as looselyEqual, Gu as malformedOrphansWarning, Ha as withoutSuperseded, Hc as mixedSecretRowKeys, Hd as CrossPrefixScanCache, Hf as validateContainerRepoName, Hi as isReplacementOrphan, Hn as isReceiver, Ho as withStackRecords, Hr as changedReferenceReason, Hu as UNREADABLE_ORPHANS_CONTAINER_ROW, I as recordedProtectionNote, Ia as isSupersededResourceRecord, Ic as SECURITY_TABLE_WITHHELD, Id as readOnlyStateVersionOf, If as assertAssetBucketRegion, Ii as withCreateTokenLedger, Il as shownType, In as refactorMarkerMovesOf, Ir as hintSidesOf, Iu as malformedResourcePropertiesWarning, Jc as taintedNamesOf, Jd as withStackInstanceIdWithheld, Jf as hasPlainPrototype, Ji as readsRegeneratingSecret, Jl as secretSegmentsOfState, Jn as childStackTags, Jo as declaredPolicyDocument, Jr as propertiesChangedReason, Js as isSelectOutOfBounds, Ju as repairMalformedOrphansForReadOnly, Ka as withPreviousPolicies, Kc as recordedValuesOf, Kd as isNotImplemented, Kf as defineOwnKey, Ki as replacementNeverSwapped, Kn as settleStackTagChildRuns, Kr as mappingPairs, Ks as DiffCalculator, Ku as refuseMalformedOrphans, L as PROTECTION_PROPERTY_BY_TYPE, La as supersededAfterRollback, Lc as calculatorMaskingPassedSecretLines, Ld as storedRecordsOf, Lf as isCrossRegionRedirect, Ll as MULTI_REGION_RECREATE_BLOCKED_TYPES, Ln as refactorMarkerRefusalMessage, Lr as movedToHint, Ls as RollbackInlinePolicyWriters, Lt as tagsMatchDeclared, Lu as refuseMalformedResourcePropertiesForDestroy, M as findServiceTokenRefusals, Ma as typesDeletedBefore, Mc as refStateLookupFromResource, Mi as replacementCreateRoutesToCloudControl, Mn as keptForRetainedRecord, Mr as formatDestructiveChange, Ms as setLocalCustomResourceRuntimeEnabled, Mu as refuseMalformedResourceEntriesForOrphan, N as serviceTokenBlockingReason, Na as DagExecutor, Nc as lacksRecordedRefArn, Nd as TemplateParser, Nf as AssetModeResolver, Nn as recordRetainedForReadoption, Nr as orphanedLogicalIds, Ns as withCustomResourceStack, Nt as declaredTagsReadback, Nu as repairMalformedResourceEntriesForReadOnly, O as planReplaceResourceTargets, Oa as DEFAULT_RESOURCE_WARN_AFTER_MS, Oc as parameterTypeMayLoseSecretIdentity, Od as PROPERTY_COVERAGE_BY_TYPE, Oi as undeclaredEmptyObservedKeys, Ol as keepsSecretReferenceToken, Oo as unsupportedFinalSnapshotError, Or as crossStackReadsForPartialSave, Os as customResourcesFailedWithoutApp, Ou as refuseMalformedResourceEntriesForDeploy, P as diffSecurity, Pa as deleteSupersededEntry, Pc as lacksRecordedTableArn, Pd as S3StateBackend, Pf as ensureAssetStorage, Pi as ledgerForStack, Pl as findReplacedReadersOfRecreateTargets, Pn as readRefactorMarker, Pr as pendingOldCopyDeletes, Pu as unreadableResourceEntries, Q as streamPolicyMatchesDeclared, Qa as sgProtocolKey, Qc as findReplacedCfnResources, Qi as orphanNeedsIdentity, Ql as getTopLevelKeysHoldingUnreadableCreateOnly, Qo as policyDocumentMatchesDeclared, Qr as noEchoMacBinding, Qu as malformedOutputsRefusalMessage, R as isProtectionValueActive, Ra as supersededDependentsFirst, Rc as crossStackTaintSeeds, Rd as hasReasonlessBaselineRefusal, Rf as getBootstrapMarkerKey, Ri as planRollback, Rl as isStatefulRecreateTargetForReplace, Rn as refuseRefactorMarker, Ro as destroyStackRecordsView, Rr as rollbackOrphanIds, Rs as UNSPECIFIED_SKIP_REASON, Ru as refuseMalformedResourcePropertiesForDrift, S as warnLegacySpelling, Sa as noEchoParameterValueSeed, Sd as findActionableSdkUnwired, Sf as loadPublishableAssetManifest, Si as recordAfterRollbackUpdate, Sl as withoutVersionAttestation, So as PRE_DELETE_SNAPSHOT_TYPES, Sr as journaledOrphanLines, Su as malformedLocalResourceEntriesWarning, T as slashedSsmNameHealNote, Ta as isExportAliasCollision, Td as unwrittenCreateOnlyReplacement, Tf as rewriteTemplateAssetReferences, Ti as calculateResourceDrift, Tl as carriesFetchableDynamicReference, To as effectiveDeletionPolicy, Tr as makeForeignHolderScan, Ts as isCustomResourceType$1, Tu as malformedScrubResourceEntriesRefusalMessage, Uc as mixedSecretTagKeys, Ud as applyCrossPrefixScan, Uf as BOOTSTRAP_MARKER_PREFIX, Ui as planFailedOps, Un as removeSignalReceiverNamed, Ur as differingRemedy, Us as getReadOnlyPropertyPaths, Uu as hasReadableOrphans, Va as supersededResourcesOf, Vc as maskPassedSecretReasons, Vd as CrossPrefixReadError, Vf as validateAssetBucketName, Vi as isJournaledOrphan, Vn as deleteSignalReceiver, Vr as changedReferencePath, Vs as deleteSkipReason, Vu as repairMalformedResourcePropertiesForReadOnly, Wa as snapshotSegmentSurvivors, Wc as mixesDynamicReference, Wd as crossPrefixDeniedWarning, Wi as recheckFailedPlan, Wn as childTemplateLoader, Wo as LAMBDA_PERMISSION_STATEMENT_KEYS, Wr as isPairableType, Ws as isWaitAbandonedError, Wu as malformedOrphansRefusalMessage, Xa as recordedSgRuleId, Xc as deleteRetiredCloudFormationStack, Xd as isSensitiveAttributeName, Xf as ownValue, Xi as removeProtectionTypeList, Xl as getSettledWriteOnlyPropertyPaths, Xn as macWriteOnlyKeys, Xo as lambdaPermissionMatchesDeclared, Xr as referencedLogicalIds, Xs as poisonRenderedSpellingsCollidingIn, Xu as malformedExportSourceWarning, Ya as cfnIngressPortValue, Yc as templateMixesDynamicReference, Yd as isSecretValuedAttribute, Yf as nullPrototypeRecord, Yi as segmentCleanupOptions, Yl as withSecretPhysicalIdsMaskedInState, Yn as literalRowTags, Yo as efsPolicyMatchesDeclared, Yr as proposeRenames, Ys as isAlwaysLiveAttribute, Yu as malformedExportNamesWarning, Za as sgCidrKey, Zc as prepareCloudFormationStackRetirement, Zi as removeProtectionTypes, Zl as getSnapshotTopLevelWriteOnlyProperties, Zn as readsOnlyNoEchoParameters, Zo as memberReadFailure, Zr as createNoEchoValueMacs, Zs as stackIdTailOf, Zu as malformedLocalOutputsWarning, _ as readRecordedConditionVerdicts, _a as secretSafeKeyDisplay, _c as regionLessSecretName, _d as STATE_RESOURCES_MALFORMED, _f as createAssetRedirectResolver, _i as DELETED_RESOURCE_REMEDY, _l as withPrintingSecrets, _o as stackSecretNamesMasker, _r as withNestedStackContext, _u as refuseMalformedOrphansForOrphan, a as mergeNoChangeOutputs, aa as withNameGenerationReached, ac as assertSendableRoleArn, ad as refuseDivergentRecordRegionForDestroy, ai as wasNoEchoMacKeyUsed, al as cfnFailureText, ao as withAttemptedItemsMasked, ap as resolveBucketRegion, ar as NESTED_PENDING_PARENT_REASON, as as CC_BROKEN_REASON, au as maskedInputProof, b as pendingMovesRefusalMessage, ba as exportNameSecretExposure, bd as hasReadableOutputs, bi as earlyDeletedOld, bl as recordedOutputReferenceRegions, bo as extractDeploymentEventError, br as dropFailedHint, bs as applyCustomResourceResponseExpiration, bu as unreadableOrphanRecords, c as nestedSsmNameRowNote, ca as computeParameterTaint, cc as parseIamRoleArn, cd as malformedStateRefusalMessage, cf as CFN_TEMPLATE_URL_LIMIT, ci as undeclaredGrantSiblingMembers, cl as serializePrompt, co as completedReplayEntries, cr as dropSettledNestedJournals, cs as isCustomResource, cu as maskedPropertyFingerprint, d as makeCanonicalizePropertiesFn, da as resourcesNamingDeclaredParameter, dc as applyCallerIdentityCredentials, dd as refuseMalformedResourcesForExport, df as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, di as sgSiblingDecidedById, dl as cyan, do as namingSecretsWithRecordedNoEcho, dr as recordDisplacedSkips, ds as classifyHandleUrl, du as malformedOrphanRecordsRefusalMessage, ea as nameGenerationHighWaterOf, ec as resolveDynamicReferences, ef as isAbsoluteAssetPath, ei as noEchoMacVerdict, el as tryGetCloudFormationResourceMap, eo as canonicalizeIpv4Cidr, ep as displayAssemblyPath, er as startForceQuitFlushes, eu as isWriteOnlyEmulatorRegistryMissType, f as readDbInstanceAvailabilityZone, fa as WITHHELD_NAME_DISPLAY, fc as callerEnvCredentials, fd as refuseMalformedState, fl as gray, fo as orphanRecordsPrintingBag, fu as malformedOrphanRecordsWarning, g as parentSuppliedValues, ga as secretBearingStateKeyWarning, gc as producerRegionsFromState, gd as withheldAccountClause, gf as buildAssetRedirectMap, gi as replayRollback, go as secretNamedRecordNeedles, gr as getCurrentNestedStackContext, gu as refuseMalformedOrphanRecordsForDestroy, h as conditionInputsFrom, ha as secretBearing, hc as classifyReplaySecretRegion, hd as accountArgs, hi as replayFailedOperations, hl as yellow, hr as collectNestedChildUnaddressed, hu as refuseMalformedOrphanRecords, i as keptWholeReasonText, ia as retiredNameGenerationsLeaving, ic as assertFlagRoleArn, id as STATE_REGION_DIVERGED, ii as isUsableNoEchoMacKey, il as SUPERSEDED_COPY_HINT, io as noEchoParameterNamesOf, ir as planOrphanAdoption, iu as parameterInputsFor, j as deferredServiceTokenWarning, ja as computeImplicitDeleteEdges, jc as isStalePlaceholderArnAttribute, ji as findUpdatePolicyReplacementRefusals, jl as LEGACY_HANDLE_HEAL_REASON, jn as NestedCleanupQueue, jr as formatChangeCounts, ju as refuseMalformedResourceEntriesForImportSave, k as refuseStatefulReplaceResourceTargets, ka as maskingRetryLogger, kc as AWS_NO_VALUE, kd as providerReplacementOldDeleted, ki as updatePartialMessage, kl as withSharedDrainBudget, ko as createPreDeleteFinalSnapshot, kr as constructPathOf$1, ks as customResourcesRunWithoutApp, ku as refuseMalformedResourceEntriesForDestroy, l as crossStackOutputProvenanceSource, la as namesAnyDeclaredParameter, lc as sendableAssumeRoleCommand, ld as refuseMalformedResourcesForDeploy, lf as findLargeInlineResources, li as recordedRuleIdOf, ll as NESTED_STACK_RESOURCE_TYPE$1, lo as journaledOrphanPrintingBag, ls as wouldReturnToSdkProvider, lu as deployRefusesOrphanRowsReason, m as conditionFingerprint, ma as exportAliasCollisionScrubWarning, mc as classifyRecordedSecretRegion, md as JSON_LISTING_HOLE_VALUE, ml as red, mo as secretNamePrintingBags, mr as withNestedRevertRun, mu as previewableOrphanRecords, n as applyStackTagsToTemplate, na as retiredAfterRollback, nc as refuseUnreadableCdkCrossAccountRefs, nd as refuseMalformedOutputsForDestroy, nf as renderNestedTemplateTreeDefect, ni as parseNoEchoMac, nl as parseCfnTemplateWithFormat, no as noEchoAttributeNamesOf, np as renderAssemblyPathEscape, nr as resolvePendingCloudControlRequests, ns as verbatimEchoDriftKeys, nu as publicReferencesOf, o as checkNestedSsmNames, oc as explicitRoleArnOrThrow, od as malformedRenderedContainersWarning, of as ssmResolvedValueType, oi as siblingOwnedRevertDesired, ol as confirmOrRefuse, oo as noEchoExactEchoLeavesOf, or as displacedOpClause, os as ProviderRegistry, p as healZonelessDbInstanceRecords, pa as displayTextOrWithheld, pc as envCredentialsAreAssumedRole, pd as repairMalformedResourcesForReadOnly, pf as decodeListingKey, pi as siblingRecordedSgRuleIds, pl as green, po as secretNamePrintingBag, pr as revertedNestedRowIds, ps as isSignalKey, pu as malformedOrphanRowsKeptWarning, q as readStreamPolicy, qa as findNestedStackTypeChanges, qc as securityDiffWithPassedSecretWithheld, qd as stackInstanceIdOf, qf as hasOwnKey, qi as attemptUsesCompletedCreate, ql as secretPhysicalIdSegment, qo as declaredMemberDocument, qr as parseMappingFile, qs as IntrinsicFunctionResolver, qu as refuseMalformedOrphansForDestroy, r as isSecretBearingReferenceString, ra as retiredNameGenerationsAfter, rc as applyRoleArnIfSet, rd as repairMalformedOutputsForReadOnly, rf as templateIdentity, ri as NOECHO_MAC_KEY_ALIAS, rl as stringifyCfnTemplate, ro as noEchoComparisonForTemplate, rp as resolveAssemblyPath, rr as makeSiblingClaimReader, ru as maskedPropertyFingerprintsOf, s as nestedSsmNameDeferredNote, sa as inheritProducerRegions, sc as isIamRoleArn, sd as malformedResourcesWarning, sf as CFN_TEMPLATE_BODY_LIMIT, si as stripSiblingOwnedParentMembers, sl as promptYesNo, so as createReadOnlyAttributeHealerFactory, sr as displacedPhysicalIdShown, ss as ccBrokenReason, su as declaresNoEcho, t as DeployEngine, ta as nameScopeOf, tc as producerLookupOver, td as refuseMalformedOutputs, tf as listNestedTemplateRows, ti as noEchoValueMacsOf, tl as parseCfnTemplate, to as canonicalizeIpProtocolValue, tr as pendingRequestCount, tu as tryGetTopLevelWriteOnlyProperties, u as inheritedProvenanceForChildDiff, ua as reachableDivergentParameters, uc as AWS_CREDENTIAL_ENV_KEYS, ud as refuseMalformedResourcesForDestroy, uf as uploadCfnTemplate, ui as sgRuleOwnershipIdentity, ul as bold, uo as maskEventTextWithBoundBags, ur as nestedChildStackName$1, us as WaitConditionSignalStore, uu as isReadableOrphanRecord, v as hasPendingMovesOut, va as carriedExportAliasExposure, vc as withoutLapsedStaleShapeStamp, vd as UNREADABLE_RESOURCES_MAP_ROW, vf as createLazyAssetModeContext, vi as PLANNED_EARLY_DELETE_CONSEQUENCE, vl as keepHeldTokenProvenance, vo as stateSecretNameNeedles, vr as deleteJournaledOrphans, vu as repairMalformedOrphanRecordsForReadOnly, w as slashedSsmNameHealAdoptedNote, wa as collectPublishedOutputNames, wi as withUnprovenUnsettled, wl as isImpossibleEmptyStoredAttribute, wo as ccRoutedInstanceTakesNoSnapshot, wr as sameJournaledOrphans, ws as readsNoEchoDeleteValues, wu as malformedResourceEntriesWarning, x as refusePendingMovesOut, xa as isWholeDynamicReferenceValue, xd as hasReadableResources, xi as buildReadCurrentStateContext, xl as recordedReferenceRegions, xo as ATOMIC_FINAL_SNAPSHOT_TYPES, xr as isHandledOrphan, xs as customResourceResponseExpirationWarning, xu as isReadableResourceEntry, y as pendingMovesOutOf, ya as exportNameNoEchoParameters, yc as isUnexposedRecordedIdentity, yd as displayLogicalId, yi as earlyDeleteWhen, yo as storedSecretNameNeedles, yr as dropFailedCommands, ys as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, yu as unpreviewableOrphanRecords, z as perType, za as supersededHeldByOtherTypeWarning, zc as maskPassedSecretChanges, zd as hasUnverifiableParameterRefusal, zf as parseBootstrapMarker, zi as seedsDeleteFirstGuard, zl as isStatefulRecreateTargetSync, zn as sameMove, zr as withMovedTo, zs as deleteIndeterminateGuards, zu as refuseMalformedResourcePropertiesForExport } from "./deploy-engine-DQU_GZet.js";
|
|
10
10
|
import { n as canonicalizeRegion, r as derivePartitionAndUrlSuffix, t as PARTITION_TABLE } from "./aws-partition-DA0r2sr-.js";
|
|
11
|
-
import {
|
|
12
|
-
import { l as setResolvedResourceTimeouts } from "./ec2-termination-protection-
|
|
13
|
-
import { t as expectedOwnerParam } from "./expected-bucket-owner-DIMD36_h.js";
|
|
14
|
-
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-C9z4Yf_c.js";
|
|
15
|
-
import { C as observedMaskedLeavesOf, D as canonicalCoordinates, E as noEchoOutputsComparison, H as readsNoEchoSource, I as noEchoCoordinatesOf, J as liveMatchesUnresolvedTokenFrame, K as valueAtCoordinate, L as noEchoLeavesOf, M as maskReadbackAtCoordinates, N as maskWholeValue, P as maskedLeafCoordinatesOf, S as maskOffTemplateEchoes, W as recordedNoEchoValuesOf, _ as storedNoEchoInputsKnown, j as maskAtCoordinates, k as isMarkedCoordinate, v as storedRecordFinisher, w as withOffTemplateEchoesMasked } from "./replacement-rules-BAJWgr5f.js";
|
|
16
|
-
import { m as SURVIVOR_IDENTITY_ATTRIBUTES, u as differingIdentityWarning } from "./identity-read-denied-DU0YqxNk.js";
|
|
17
|
-
import { S as unsettledPropertiesOf, T as withoutUnsettledProperties, b as unsettledItemsOf, w as withUnsettledProperties, y as unsettledItemsField } from "./restore-source-guard-BL2O_O6r.js";
|
|
18
|
-
import { n as isRedactedRecordedValue } from "./redacted-delete-address-DGHv9GNm.js";
|
|
19
|
-
import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-CrQgKKRC.js";
|
|
11
|
+
import { c as timePhase, n as withRetry, r as PhaseClock, s as renderPhaseTimings } from "./retry-ClxjEovs.js";
|
|
12
|
+
import { l as setResolvedResourceTimeouts } from "./ec2-termination-protection-CGDF52lA.js";
|
|
20
13
|
import { t as cdkdCacheHome } from "./cache-home-BVYKj3de.js";
|
|
14
|
+
import { S as utf8ByteLength, a as getCreateOnlyPropertyPaths, b as parseFailureDebugDetail, c as templateResourceTypes, f as describeTypeWithThrottleRetry, h as reportAwsEmulatorRegistryMiss, s as prefetchCreateOnlyPropertyPaths, v as describeJsonParseFailure } from "./secret-reference-immutable-CSgI6Td9.js";
|
|
15
|
+
import { t as expectedOwnerParam } from "./expected-bucket-owner-DyFD7Dw5.js";
|
|
16
|
+
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-CJq_moaK.js";
|
|
17
|
+
import { C as observedMaskedLeavesOf, D as canonicalCoordinates, E as noEchoOutputsComparison, H as readsNoEchoSource, I as noEchoCoordinatesOf, J as liveMatchesUnresolvedTokenFrame, K as valueAtCoordinate, L as noEchoLeavesOf, M as maskReadbackAtCoordinates, N as maskWholeValue, P as maskedLeafCoordinatesOf, S as maskOffTemplateEchoes, W as recordedNoEchoValuesOf, _ as storedNoEchoInputsKnown, j as maskAtCoordinates, k as isMarkedCoordinate, v as storedRecordFinisher, w as withOffTemplateEchoesMasked } from "./replacement-rules-BQ-sbuiR.js";
|
|
18
|
+
import { m as SURVIVOR_IDENTITY_ATTRIBUTES, u as differingIdentityWarning } from "./identity-read-denied-DRjvF3oA.js";
|
|
19
|
+
import { S as unsettledPropertiesOf, T as withoutUnsettledProperties, b as unsettledItemsOf, w as withUnsettledProperties, y as unsettledItemsField } from "./restore-source-guard-CWbzgUdy.js";
|
|
20
|
+
import { n as withGuardReadRetry } from "./guard-read-retry-CaBmRzwo.js";
|
|
21
|
+
import { n as isRedactedRecordedValue } from "./redacted-delete-address-DGufa4wz.js";
|
|
22
|
+
import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-CJJjp-MO.js";
|
|
21
23
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
22
24
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetObjectCommand, HeadBucketCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutBucketVersioningCommand, PutObjectCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
23
25
|
import { GetRoleCommand, GetUserCommand } from "@aws-sdk/client-iam";
|
|
@@ -28,13 +30,13 @@ import { GetSecretValueCommand, SecretsManagerClient } from "@aws-sdk/client-sec
|
|
|
28
30
|
import { GetParameterCommand, SSMClient } from "@aws-sdk/client-ssm";
|
|
29
31
|
import { DescribeLogStreamsCommand, ResourceNotFoundException as ResourceNotFoundException$1 } from "@aws-sdk/client-cloudwatch-logs";
|
|
30
32
|
import * as fs from "node:fs";
|
|
31
|
-
import { existsSync, lstatSync, mkdirSync, mkdtempSync, promises, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
33
|
+
import { existsSync, lstatSync, mkdirSync, mkdtempSync, promises, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
32
34
|
import * as path from "node:path";
|
|
33
35
|
import { basename, dirname, isAbsolute, join, resolve } from "node:path";
|
|
34
36
|
import { execFile } from "node:child_process";
|
|
35
37
|
import { devNull, tmpdir } from "node:os";
|
|
36
38
|
import { BatchDeleteImageCommand, DeleteRepositoryCommand, DescribeImagesCommand as DescribeImagesCommand$1, ECRClient, GetAuthorizationTokenCommand } from "@aws-sdk/client-ecr";
|
|
37
|
-
import {
|
|
39
|
+
import { DescribeKeyCommand, KMSClient } from "@aws-sdk/client-kms";
|
|
38
40
|
import { A2A_CONTAINER_PORT, A2A_PATH, AGENTCORE_A2A_PROTOCOL, AGENTCORE_AGUI_PROTOCOL, AGENTCORE_MCP_PROTOCOL, ConnectionRegistry, DEFAULT_AWS_EMULATOR_URL, DynamicReferenceResolver, EMULATOR_SCRUBBED_ENV_KEYS, EcsTaskResolutionError, MCP_CONTAINER_PORT, MCP_PATH, UNNAMED_WORKLOAD, a2aInvokeOnce, addAlbSpecificOptions, addAwsEndpointOptions, addCommonEcsServiceOptions, addImageOverrideOptions, addStartServiceSpecificOptions, albStrategy, applyWorkloadAwsWiringToEnv, attachAuthorizers, attachStageContext, availableApiIdentifiers, awaitLoopbackForwarderStatus, awsEmulatorEnvName, awsEmulatorRealServices, awsEmulatorSqsHostBlocks, bufferToBody, buildAgentCoreCodeImage, buildCognitoJwksUrl, buildConnectEvent, buildCorsConfigByApiId, buildCorsConfigFromCloudFrontChain, buildDisconnectEvent, buildJwksUrlFromIssuer, buildMessageEvent, buildMgmtEndpointEnvUrl, buildNamespaceOwnerForwarderDockerArgs, buildStageMap, canonicalizeImageOverrideKeys, classifySourceChange, containsCrossStackIntrinsic, containsDynamicReference, createAuthorizerCache, createFileWatcher, createFileWatcher as createFileWatcher$1, createJwksCache, createMixedModeStateProvider, createWatchPredicates, defaultCredentialsLoader, describeAwsFailureForWarn, describeForwarderFailure, discoverRoutes, discoverWebSocketApis, dockerRegistryEnv, downloadAndExtractS3Bundle, effectiveLoopbackPorts, enforceImageOverrideOrphans, expandNestedStacks, filterRoutesByApiIdentifier, firstUsableRegion, getActiveWorkloadAwsWiring, getAwsEndpointOverride, groupRoutesByServer, groupWorkloadsRoutedApart, handleConnectionsRequest, invokeAgentCore, invokeAgentCoreWs, isAwsServiceRoutedToEmulator, keysNotFromTemplate, keysOverriddenBy, logMixedModeForWorkload, loopbackForwarderPlan, mcpInvokeOnce, noImplicitEcrPullArgs, parseAwsEndpoint, parseConnectionsPath, parseImageOverrideFlags, parseSelectionExpressionPath, pickAgentCoreCandidateStack, pickAgentCoreCandidateStack as pickAgentCoreCandidateStack$1, readAwsEmulatorEnvVarsFile, readEmulatorRunFiles, readEnvVarsFileText, readMtlsMaterialsFromDisk, realAwsServicesOf, resolveAgentCoreTarget, resolveAwsEmulatorOption, resolveDynamicReferencesInEnv, resolveEnvVars, resolveHostDefaultCredentials, resolveImageOverrides, resolveJwtAuthorizerIntrinsics, resolveSingleTarget, resolveWatchConfig, resolveWorkloadAwsWiring, runEcsServiceEmulator, runImageOverrideBuilds, setActiveWorkloadAwsWiring, setAwsEndpointOverride, signAgentCoreInvocation, startApiServer, topLevelStacks, verifyJwtViaDiscovery, waitForAgentCorePing, warnUnenforcedRouteAuthSettings, withNestedDescendants, withoutKeys } from "cdk-local/internal";
|
|
39
41
|
import { isDeepStrictEqual, promisify } from "node:util";
|
|
40
42
|
import graphlib from "graphlib";
|
|
@@ -606,115 +608,111 @@ async function configureStateBucket(args) {
|
|
|
606
608
|
else report(safeMsg`✓ Lifecycle rule ${CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID} already present (left unchanged)`);
|
|
607
609
|
}
|
|
608
610
|
|
|
609
|
-
// src/
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
const
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
}
|
|
643
|
-
Sid: "GenerateMacThroughIam",
|
|
644
|
-
Effect: "Allow",
|
|
645
|
-
Principal: root,
|
|
646
|
-
Action: "kms:GenerateMac",
|
|
647
|
-
Resource: "*"
|
|
648
|
-
}]
|
|
649
|
-
});
|
|
650
|
-
}
|
|
651
|
-
function partitionOfArn$1(arn) {
|
|
652
|
-
const partition = arn?.split(":")[1];
|
|
653
|
-
return partition !== void 0 && /^aws(-[a-z]+)*$/.test(partition) ? partition : "aws";
|
|
654
|
-
}
|
|
655
|
-
async function ensureNoEchoMacKey(args) {
|
|
656
|
-
const { kms, region, accountId, partition, report, warn } = args;
|
|
657
|
-
if (awsEndpointOverrideActive()) {
|
|
658
|
-
report(`Skipping the NoEcho value MAC key (${NOECHO_MAC_KEY_ALIAS}): AWS Emulator target`);
|
|
659
|
-
return "skipped";
|
|
611
|
+
// src/deployment/noecho-mac-key-retire.ts
|
|
612
|
+
const KEY_ARN = /^arn:aws(?:-[a-z]+)*:kms:([a-z]{2}(?:-[a-z]+)+-\d):\d{12}:key\/[0-9a-f-]{1,64}$/;
|
|
613
|
+
function noEchoMacKeyArnsOf(state) {
|
|
614
|
+
const arns = /* @__PURE__ */ new Set();
|
|
615
|
+
for (const record of storedRecordsOf(state)) for (const macs of noEchoValueMacsOf(record).values()) for (const text of macs.values()) {
|
|
616
|
+
const keyArn = parseNoEchoMac(text)?.keyArn;
|
|
617
|
+
if (keyArn !== void 0) arns.add(keyArn);
|
|
618
|
+
}
|
|
619
|
+
return arns;
|
|
620
|
+
}
|
|
621
|
+
function noEchoMacKeyDeleteCommand(keyArn) {
|
|
622
|
+
const region = KEY_ARN.exec(keyArn)?.[1];
|
|
623
|
+
if (region === void 0) return void 0;
|
|
624
|
+
return withPasteableAwsProfile(`aws kms schedule-key-deletion --key-id ${keyArn} --pending-window-in-days 7 --region ${region}`);
|
|
625
|
+
}
|
|
626
|
+
const READ_CONCURRENCY = 32;
|
|
627
|
+
async function countNoEchoMacKeyUsers(source, region, keyArns, signal) {
|
|
628
|
+
const users = new Map([...keyArns].map((arn) => [arn, 0]));
|
|
629
|
+
let unreadable = 0;
|
|
630
|
+
const refs = (await source.list()).filter((ref) => ref.region === region);
|
|
631
|
+
for (let i = 0; i < refs.length; i += READ_CONCURRENCY) {
|
|
632
|
+
if (signal?.aborted === true) break;
|
|
633
|
+
const reads = await Promise.allSettled(refs.slice(i, i + READ_CONCURRENCY).map((ref) => source.read(ref.stackName, region)));
|
|
634
|
+
for (const read of reads) {
|
|
635
|
+
if (read.status === "rejected") {
|
|
636
|
+
unreadable++;
|
|
637
|
+
continue;
|
|
638
|
+
}
|
|
639
|
+
if (read.value === void 0) continue;
|
|
640
|
+
for (const arn of noEchoMacKeyArnsOf(read.value)) {
|
|
641
|
+
const count = users.get(arn);
|
|
642
|
+
if (count !== void 0) users.set(arn, count + 1);
|
|
643
|
+
}
|
|
644
|
+
}
|
|
660
645
|
}
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
646
|
+
return {
|
|
647
|
+
users,
|
|
648
|
+
unreadable
|
|
664
649
|
};
|
|
650
|
+
}
|
|
651
|
+
const announced = /* @__PURE__ */ new Set();
|
|
652
|
+
async function noEchoMacKeyRetireNotes(destroyed, region, source, debug) {
|
|
653
|
+
const keyArns = new Set([...noEchoMacKeyArnsOf(destroyed)].filter((arn) => !announced.has(arn) && noEchoMacKeyDeleteCommand(arn) !== void 0));
|
|
654
|
+
if (keyArns.size === 0) return [];
|
|
655
|
+
let counted;
|
|
665
656
|
try {
|
|
666
|
-
|
|
667
|
-
if (meta?.KeySpec === "HMAC_256" && meta.KeyUsage === "GENERATE_VERIFY_MAC" && meta.KeyState === "Enabled") {
|
|
668
|
-
report(`NoEcho value MAC key ${NOECHO_MAC_KEY_ALIAS} already exists`);
|
|
669
|
-
return "exists";
|
|
670
|
-
}
|
|
671
|
-
warn(`${NOECHO_MAC_KEY_ALIAS} in ${region} does not name an enabled HMAC_256 key (${meta?.KeySpec ?? "unknown spec"}, ${meta?.KeyState ?? "unknown state"}), so deploys make no NoEcho value MACs. Point the alias at an enabled HMAC_256 key, or delete it and re-run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))}.`);
|
|
672
|
-
return "failed";
|
|
657
|
+
counted = await countNoEchoMacKeyUsers(source, region, keyArns);
|
|
673
658
|
} catch (error) {
|
|
674
|
-
|
|
659
|
+
debug(`NoEcho value MAC key users not counted (${errorName$3(error)} listing the state bucket)`);
|
|
660
|
+
return [];
|
|
661
|
+
}
|
|
662
|
+
if (counted.unreadable > 0) {
|
|
663
|
+
debug(`NoEcho value MAC key users not counted: ${counted.unreadable} state file(s) unreadable`);
|
|
664
|
+
return [];
|
|
665
|
+
}
|
|
666
|
+
const notes = [];
|
|
667
|
+
for (const [keyArn, users] of counted.users) {
|
|
668
|
+
if (users > 0) continue;
|
|
669
|
+
announced.add(keyArn);
|
|
670
|
+
notes.push(`No stack of this state bucket in ${region} uses the NoEcho value MAC key ${keyArn} any more. It is kept: stacks of another state bucket or prefix may share it. If none does, delete it to stop its monthly charge: ${noEchoMacKeyDeleteCommand(keyArn)}`);
|
|
675
671
|
}
|
|
676
|
-
|
|
672
|
+
return notes;
|
|
673
|
+
}
|
|
674
|
+
function errorName$3(error) {
|
|
675
|
+
const raw = error?.name;
|
|
676
|
+
return typeof raw === "string" && /^[A-Za-z][A-Za-z0-9]{0,63}$/.test(raw) ? raw : "Error";
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// src/cli/commands/bootstrap-noecho-mac-key.ts
|
|
680
|
+
async function reportNoEchoMacKey(args) {
|
|
681
|
+
const { kms, region, bucketName, prefix, stacks, report, debug } = args;
|
|
682
|
+
if (awsEndpointOverrideActive()) return;
|
|
683
|
+
let keyArn;
|
|
677
684
|
try {
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
Policy: noEchoMacKeyPolicy(partition, accountId),
|
|
682
|
-
Description: "cdkd: MACs of NoEcho parameter values, so a deploy re-sends a write-only property only when its value changed",
|
|
683
|
-
Tags: [{
|
|
684
|
-
TagKey: "cdkd:purpose",
|
|
685
|
-
TagValue: "noecho-value-mac"
|
|
686
|
-
}]
|
|
687
|
-
}))).KeyMetadata?.KeyId;
|
|
688
|
-
if (keyId === void 0) return failed("kms:CreateKey", /* @__PURE__ */ new Error("no key id"));
|
|
685
|
+
const meta = (await kms.send(new DescribeKeyCommand({ KeyId: NOECHO_MAC_KEY_ALIAS }))).KeyMetadata;
|
|
686
|
+
if (!isUsableNoEchoMacKey(meta) || typeof meta?.Arn !== "string") return;
|
|
687
|
+
keyArn = meta.Arn;
|
|
689
688
|
} catch (error) {
|
|
690
|
-
|
|
689
|
+
debug(`NoEcho value MAC key not read (${errorName$2(error)} from kms:DescribeKey)`);
|
|
690
|
+
return;
|
|
691
691
|
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
692
|
+
let using = 0;
|
|
693
|
+
let unreadable = 0;
|
|
694
|
+
if (stacks !== void 0) try {
|
|
695
|
+
const counted = await countNoEchoMacKeyUsers(stacks, region, /* @__PURE__ */ new Set([keyArn]));
|
|
696
|
+
using = counted.users.get(keyArn) ?? 0;
|
|
697
|
+
unreadable = counted.unreadable;
|
|
697
698
|
} catch (error) {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
KeyId: keyId,
|
|
701
|
-
PendingWindowInDays: 7
|
|
702
|
-
})).catch((retireError) => warn(`Could not schedule the deletion of the unused KMS key ${keyId} in ${region} (${errorName(retireError)}); schedule it by hand: aws kms schedule-key-deletion --key-id ${keyId} --pending-window-in-days 7 --region ${region}`));
|
|
703
|
-
if (name !== "AlreadyExistsException") return failed("kms:CreateAlias", error);
|
|
704
|
-
try {
|
|
705
|
-
const won = (await kms.send(new DescribeKeyCommand({ KeyId: NOECHO_MAC_KEY_ALIAS }))).KeyMetadata;
|
|
706
|
-
if (won?.KeySpec === "HMAC_256" && won.KeyUsage === "GENERATE_VERIFY_MAC" && won.KeyState === "Enabled") {
|
|
707
|
-
report(`NoEcho value MAC key ${NOECHO_MAC_KEY_ALIAS} already exists`);
|
|
708
|
-
return "exists";
|
|
709
|
-
}
|
|
710
|
-
} catch (describeError) {
|
|
711
|
-
return failed("kms:DescribeKey", describeError);
|
|
712
|
-
}
|
|
713
|
-
warn(`${NOECHO_MAC_KEY_ALIAS} in ${region} does not name an enabled HMAC_256 key, so deploys make no NoEcho value MACs. Point the alias at an enabled HMAC_256 key, or delete it and re-run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))}.`);
|
|
714
|
-
return "failed";
|
|
699
|
+
debug(`NoEcho value MAC key: state not listed (${errorName$2(error)})`);
|
|
700
|
+
return;
|
|
715
701
|
}
|
|
716
|
-
|
|
717
|
-
|
|
702
|
+
if (using > 0) {
|
|
703
|
+
report(`NoEcho value MAC key: ${NOECHO_MAC_KEY_ALIAS} (${using} stack${using === 1 ? "" : "s"} of ${bucketName} (prefix ${prefix}) in ${region} compare${using === 1 ? "s" : ""} NoEcho parameter values with it)`);
|
|
704
|
+
return;
|
|
705
|
+
}
|
|
706
|
+
if (unreadable > 0) {
|
|
707
|
+
report(`NoEcho value MAC key: ${NOECHO_MAC_KEY_ALIAS} (${unreadable} state file${unreadable === 1 ? "" : "s"} of ${bucketName} (prefix ${prefix}) in ${region} could not be read to tell whether it is used)`);
|
|
708
|
+
return;
|
|
709
|
+
}
|
|
710
|
+
const command = noEchoMacKeyDeleteCommand(keyArn);
|
|
711
|
+
report(`NoEcho value MAC key ${NOECHO_MAC_KEY_ALIAS} exists in ${region}, and no stack of ${bucketName} (prefix ${prefix}) there holds a value MAC made with it. cdkd bootstrap no longer creates this key: a deploy creates it when it creates or updates a resource that reads a NoEcho parameter. If no stack of another state bucket or prefix uses it either, delete it to stop its monthly charge${command === void 0 ? "." : `: ${command}`} A stack that did use it re-sends that property once, and its next deploy creates a new key.`);
|
|
712
|
+
}
|
|
713
|
+
function errorName$2(error) {
|
|
714
|
+
const raw = error?.name;
|
|
715
|
+
return typeof raw === "string" && /^[A-Za-z][A-Za-z0-9]{0,63}$/.test(raw) ? raw : "Error";
|
|
718
716
|
}
|
|
719
717
|
|
|
720
718
|
// src/cli/commands/bootstrap.ts
|
|
@@ -738,17 +736,12 @@ async function bootstrapCommand(options) {
|
|
|
738
736
|
let s3Client = awsClients.s3;
|
|
739
737
|
let bucketName;
|
|
740
738
|
let accountId;
|
|
741
|
-
let partition;
|
|
742
739
|
if (options.stateBucket) {
|
|
743
740
|
bucketName = options.stateBucket;
|
|
744
|
-
|
|
745
|
-
accountId = identity.Account;
|
|
746
|
-
partition = partitionOfArn$1(identity.Arn);
|
|
741
|
+
accountId = (await awsClients.sts.send(new GetCallerIdentityCommand({}))).Account;
|
|
747
742
|
} else {
|
|
748
743
|
logger.info("No --state-bucket specified, resolving default bucket name...");
|
|
749
|
-
|
|
750
|
-
accountId = identity.Account;
|
|
751
|
-
partition = partitionOfArn$1(identity.Arn);
|
|
744
|
+
accountId = (await awsClients.sts.send(new GetCallerIdentityCommand({}))).Account;
|
|
752
745
|
bucketName = getDefaultStateBucketName(accountId);
|
|
753
746
|
logger.info(`Using default state bucket: ${bucketName}`);
|
|
754
747
|
}
|
|
@@ -817,18 +810,35 @@ async function bootstrapCommand(options) {
|
|
|
817
810
|
region,
|
|
818
811
|
...options.profile && { profile: options.profile }
|
|
819
812
|
});
|
|
820
|
-
|
|
813
|
+
const scanS3Client = new S3Client({
|
|
814
|
+
...awsClientDefaults({ profile: options.profile }),
|
|
815
|
+
...s3ClientDefaults(),
|
|
816
|
+
region,
|
|
817
|
+
...options.profile && { profile: options.profile }
|
|
818
|
+
});
|
|
819
|
+
const scanBackend = new S3StateBackend(scanS3Client, {
|
|
820
|
+
bucket: bucketName,
|
|
821
|
+
prefix: DEFAULT_STATE_PREFIX
|
|
822
|
+
}, {
|
|
823
|
+
region,
|
|
824
|
+
...options.profile && { profile: options.profile }
|
|
825
|
+
});
|
|
821
826
|
try {
|
|
822
|
-
|
|
827
|
+
await reportNoEchoMacKey({
|
|
823
828
|
kms: kmsClient,
|
|
824
829
|
region,
|
|
825
|
-
|
|
826
|
-
|
|
830
|
+
bucketName,
|
|
831
|
+
prefix: DEFAULT_STATE_PREFIX,
|
|
832
|
+
...bucketExists && { stacks: {
|
|
833
|
+
list: () => scanBackend.listStacks(),
|
|
834
|
+
read: async (stackName, stackRegion) => (await scanBackend.getState(stackName, stackRegion, { readOnly: true }))?.state
|
|
835
|
+
} },
|
|
827
836
|
report: (message) => logger.info(message),
|
|
828
|
-
|
|
837
|
+
debug: (message) => logger.debug(message)
|
|
829
838
|
});
|
|
830
839
|
} finally {
|
|
831
840
|
kmsClient.destroy();
|
|
841
|
+
scanBackend.destroyClient();
|
|
832
842
|
}
|
|
833
843
|
let skipStateBucketConfig = false;
|
|
834
844
|
if (bucketExists) {
|
|
@@ -891,7 +901,6 @@ async function bootstrapCommand(options) {
|
|
|
891
901
|
logger.info(`Asset bucket: ${assetStorage.assetBucket}`);
|
|
892
902
|
logger.info(`Container-asset repository: ${assetStorage.containerRepo}`);
|
|
893
903
|
}
|
|
894
|
-
if (noEchoMacKey === "created" || noEchoMacKey === "exists") logger.info(`NoEcho value MAC key: ${NOECHO_MAC_KEY_ALIAS}`);
|
|
895
904
|
logger.info(`Region: ${region}`);
|
|
896
905
|
if (assetStorage) logger.info(`\ncdkd asset storage is now ON for region ${region}: deploys in this region publish assets to the cdkd-owned bucket/repo (out of 'cdk gc' reach) instead of the CDK bootstrap storage. The first deploy of each existing stack with assets will show a one-time UPDATE re-pointing asset references — content is identical, no replacement.`);
|
|
897
906
|
logger.info("\nYou can now use cdkd deploy with:");
|
|
@@ -903,7 +912,7 @@ async function bootstrapCommand(options) {
|
|
|
903
912
|
}
|
|
904
913
|
}
|
|
905
914
|
function createBootstrapCommand() {
|
|
906
|
-
const cmd = new Command("bootstrap").description("Bootstrap cdkd by creating the S3 state bucket plus cdkd-owned asset storage (asset bucket + container-asset ECR repo) for the region. With --destroy, tear down the region's asset storage instead.
|
|
915
|
+
const cmd = new Command("bootstrap").description("Bootstrap cdkd by creating the S3 state bucket plus cdkd-owned asset storage (asset bucket + container-asset ECR repo) for the region. With --destroy, tear down the region's asset storage instead. Reports an existing NoEcho value MAC key (alias/cdkd-noecho-mac; deploys create it when they need it) and whether a stack uses it.").option("--state-bucket <bucket>", "Name of S3 bucket to create for state storage (default: cdkd-state-{accountId})").option("--force", "Create: force reconfiguration of an existing bucket. Destroy: delete the asset storage even when deployed stacks still reference it", false).option("--no-assets", "Skip cdkd asset storage (asset bucket / ECR repo / marker) — deploys keep publishing assets to the CDK bootstrap bucket/repo").option("--asset-bucket <name>", "Custom name for the cdkd asset bucket (default: cdkd-assets-{accountId}-{region}). Written into the bootstrap marker; re-bootstrapping a region with a different name is refused").option("--container-repo <name>", "Custom name for the container-asset ECR repository (default: cdkd-container-assets-{accountId}-{region}). Written into the bootstrap marker; re-bootstrapping a region with a different name is refused").option("--destroy", "Tear down the region's cdkd asset storage (empty + delete the asset bucket, force-delete the container-asset ECR repo, then delete the bootstrap marker last). The state bucket is kept unless --include-state-bucket is also passed", false).option("--include-state-bucket", "With --destroy: also delete the S3 state bucket. Refused while any stack state exists or any other region is still opted in to asset storage", false).addOption(new Option("--region <region>", "AWS region to bootstrap, or to tear down with --destroy (defaults to AWS_REGION, AWS_DEFAULT_REGION, the profile's region, else us-east-1; an inferred region keeps existing us-east-1 asset storage)")).action(withErrorHandling(async (options) => {
|
|
907
916
|
if (options.destroy) {
|
|
908
917
|
if (options.assetBucket !== void 0 || options.containerRepo !== void 0) throw new CdkdError("--asset-bucket / --container-repo cannot be combined with --destroy. The teardown reads the region's asset storage names from the bootstrap marker.", "INVALID_OPTIONS");
|
|
909
918
|
if (!options.assets) throw new CdkdError("--no-assets cannot be combined with --destroy. The teardown scope is the asset storage itself; use --include-state-bucket to also delete the state bucket.", "INVALID_OPTIONS");
|
|
@@ -1213,7 +1222,7 @@ function renderApprovalRequest(request) {
|
|
|
1213
1222
|
for (const change of request.destructiveChanges) lines.push(` ${formatDestructiveChange(change)}`);
|
|
1214
1223
|
lines.push("");
|
|
1215
1224
|
}
|
|
1216
|
-
lines.push(request.outputsOnly ? `Stack ${displayIdent(request.stackName)}: no resource changes; its Outputs change.` : `Stack ${displayIdent(request.stackName)}: ${formatChangeCounts({
|
|
1225
|
+
lines.push(request.outputsOnly ? `Stack ${displayIdent(request.stackName)}: no resource changes${request.destructiveChanges.length > 0 ? " besides the old resources above" : ""}; its Outputs change.` : `Stack ${displayIdent(request.stackName)}: ${formatChangeCounts({
|
|
1217
1226
|
orphan: 0,
|
|
1218
1227
|
...request.counts
|
|
1219
1228
|
})}.`);
|
|
@@ -1560,11 +1569,11 @@ function collectCrossStackRefs(node, onRef, unconditional) {
|
|
|
1560
1569
|
// src/provisioning/register-providers.ts
|
|
1561
1570
|
let providerClasses;
|
|
1562
1571
|
function loadProviderClasses() {
|
|
1563
|
-
providerClasses ??= import("./provider-classes-
|
|
1572
|
+
providerClasses ??= import("./provider-classes-CNMjjxoS.js");
|
|
1564
1573
|
return providerClasses;
|
|
1565
1574
|
}
|
|
1566
1575
|
function registerAllProviders(registry, classes) {
|
|
1567
|
-
const { IAMRoleProvider, IAMPolicyProvider, IAMManagedPolicyProvider, IAMInstanceProfileProvider, IAMAccessKeyProvider, IAMUserGroupProvider, S3BucketProvider, S3BucketPolicyProvider, SQSQueueProvider, SQSQueuePolicyProvider, SNSTopicProvider, SNSSubscriptionProvider, SNSTopicPolicyProvider, LambdaFunctionProvider, LambdaPermissionProvider, LambdaUrlProvider, LambdaEventSourceMappingProvider, LambdaLayerVersionProvider, LambdaEventInvokeConfigProvider, LambdaMicrovmImageProvider, LambdaWebFunctionRevisionProvider, LambdaWebFunctionEndpointProvider, LambdaNetworkConnectorProvider, DynamoDBTableProvider, DynamoDBGlobalTableProvider, LogsLogGroupProvider, LogsDeliverySourceProvider, LogsDeliveryDestinationProvider, LogsDeliveryProvider, CloudWatchAlarmProvider, LightsailAlarmProvider, CloudWatchAnomalyDetectorProvider, SecretsManagerSecretProvider, SSMParameterProvider, EventBridgeRuleProvider, EventBridgeBusProvider, EventBridgeArchiveProvider, ConnectInstanceProvider, EC2Provider, EC2VPCEndpointProvider, ApiGatewayProvider, ApiGatewayV2Provider, CloudFrontOAIProvider, CloudFrontOACProvider, CloudFrontDistributionProvider, AgentCoreRuntimeProvider, AgentCoreBrowserProvider, AgentCoreCodeInterpreterProvider, AgentCoreEvaluatorProvider, StepFunctionsProvider, ECSProvider, ELBv2Provider, RDSProvider, RDSDBProxyProvider, RDSDBProxyEndpointProvider, RDSDBProxyTargetGroupProvider, DocDBProvider, DocDBSubnetGroupProvider, AppConfigEnvironmentProvider, NeptuneProvider, Route53Provider, WAFv2WebACLProvider, CognitoUserPoolProvider, ElastiCacheProvider, ServiceDiscoveryProvider, AppSyncProvider, GlueProvider, GlueWorkflowProvider, GlueSecurityConfigurationProvider, GlueJobProvider, GlueCrawlerProvider, GlueConnectionProvider, GlueTriggerProvider, KMSProvider, BudgetsBudgetProvider, KinesisStreamProvider, KinesisStreamConsumerProvider, SchedulerScheduleProvider, PipesPipeProvider, EFSProvider, FSxFileSystemProvider, EMRClusterProvider, EMRInstanceGroupConfigProvider, EMRInstanceFleetConfigProvider, FirehoseProvider, CloudTrailProvider, CodeBuildProvider, CodeCommitRepositoryProvider, DLMLifecyclePolicyProvider, S3VectorsProvider, S3DirectoryBucketProvider, S3TablesProvider, ECRProvider, ASGProvider, NestedStackProvider, WaitConditionHandleProvider, WaitConditionProvider, ACMCertificateProvider } = classes;
|
|
1576
|
+
const { IAMRoleProvider, IAMPolicyProvider, IAMManagedPolicyProvider, IAMInstanceProfileProvider, IAMAccessKeyProvider, IAMUserGroupProvider, S3BucketProvider, S3BucketPolicyProvider, SQSQueueProvider, SQSQueuePolicyProvider, SNSTopicProvider, SNSSubscriptionProvider, SNSTopicPolicyProvider, LambdaFunctionProvider, LambdaPermissionProvider, LambdaUrlProvider, LambdaEventSourceMappingProvider, LambdaLayerVersionProvider, LambdaEventInvokeConfigProvider, LambdaMicrovmImageProvider, LambdaWebFunctionRevisionProvider, LambdaWebFunctionEndpointProvider, LambdaNetworkConnectorProvider, DynamoDBTableProvider, DynamoDBGlobalTableProvider, LogsLogGroupProvider, LogsDeliverySourceProvider, LogsDeliveryDestinationProvider, LogsDeliveryProvider, CloudWatchAlarmProvider, LightsailAlarmProvider, CloudWatchAnomalyDetectorProvider, SecretsManagerSecretProvider, SSMParameterProvider, EventBridgeRuleProvider, EventBridgeBusProvider, EventBridgeArchiveProvider, ConnectInstanceProvider, EC2Provider, EC2VPCEndpointProvider, ApiGatewayProvider, ApiGatewayV2Provider, CloudFrontOAIProvider, CloudFrontOACProvider, CloudFrontDistributionProvider, AgentCoreRuntimeProvider, AgentCoreBrowserProvider, AgentCoreCodeInterpreterProvider, AgentCoreEvaluatorProvider, StepFunctionsProvider, ECSProvider, ELBv2Provider, ELBv2ListenerCertificateProvider, EC2VPNGatewayRoutePropagationProvider, RDSProvider, RDSDBProxyProvider, RDSDBProxyEndpointProvider, RDSDBProxyTargetGroupProvider, DocDBProvider, DocDBSubnetGroupProvider, AppConfigEnvironmentProvider, NeptuneProvider, Route53Provider, WAFv2WebACLProvider, CognitoUserPoolProvider, ElastiCacheProvider, ServiceDiscoveryProvider, AppSyncProvider, GlueProvider, GlueWorkflowProvider, GlueSecurityConfigurationProvider, GlueJobProvider, GlueCrawlerProvider, GlueConnectionProvider, GlueTriggerProvider, KMSProvider, BudgetsBudgetProvider, KinesisStreamProvider, KinesisStreamConsumerProvider, SchedulerScheduleProvider, PipesPipeProvider, EFSProvider, FSxFileSystemProvider, EMRClusterProvider, EMRInstanceGroupConfigProvider, EMRInstanceFleetConfigProvider, FirehoseProvider, CloudTrailProvider, CodeBuildProvider, CodeCommitRepositoryProvider, DLMLifecyclePolicyProvider, S3VectorsProvider, S3DirectoryBucketProvider, S3TablesProvider, ECRProvider, ASGProvider, NestedStackProvider, WaitConditionHandleProvider, WaitConditionProvider, ACMCertificateProvider } = classes;
|
|
1568
1577
|
registry.register("AWS::IAM::Role", new IAMRoleProvider());
|
|
1569
1578
|
registry.register("AWS::IAM::Policy", new IAMPolicyProvider());
|
|
1570
1579
|
registry.register("AWS::IAM::ManagedPolicy", new IAMManagedPolicyProvider());
|
|
@@ -1622,6 +1631,7 @@ function registerAllProviders(registry, classes) {
|
|
|
1622
1631
|
registry.register("AWS::EC2::Instance", ec2Provider);
|
|
1623
1632
|
registry.register("AWS::EC2::NetworkAcl", ec2Provider);
|
|
1624
1633
|
registry.register("AWS::EC2::NetworkAclEntry", ec2Provider);
|
|
1634
|
+
registry.register("AWS::EC2::VPNGatewayRoutePropagation", new EC2VPNGatewayRoutePropagationProvider());
|
|
1625
1635
|
registry.register("AWS::EC2::SubnetNetworkAclAssociation", ec2Provider);
|
|
1626
1636
|
registry.register("AWS::EC2::VPCEndpoint", new EC2VPCEndpointProvider());
|
|
1627
1637
|
const apigwProvider = new ApiGatewayProvider();
|
|
@@ -1650,6 +1660,7 @@ function registerAllProviders(registry, classes) {
|
|
|
1650
1660
|
registry.register("AWS::ElasticLoadBalancingV2::LoadBalancer", elbv2Provider);
|
|
1651
1661
|
registry.register("AWS::ElasticLoadBalancingV2::TargetGroup", elbv2Provider);
|
|
1652
1662
|
registry.register("AWS::ElasticLoadBalancingV2::Listener", elbv2Provider);
|
|
1663
|
+
registry.register("AWS::ElasticLoadBalancingV2::ListenerCertificate", new ELBv2ListenerCertificateProvider());
|
|
1653
1664
|
const rdsProvider = new RDSProvider();
|
|
1654
1665
|
registry.register("AWS::RDS::DBSubnetGroup", rdsProvider);
|
|
1655
1666
|
registry.register("AWS::RDS::DBCluster", rdsProvider);
|
|
@@ -1756,9 +1767,6 @@ var ConsumerCleanupHold = class ConsumerCleanupHold {
|
|
|
1756
1767
|
hasConsumers(producer) {
|
|
1757
1768
|
return this.consumers.has(producer);
|
|
1758
1769
|
}
|
|
1759
|
-
consumersOf(producer) {
|
|
1760
|
-
return [...this.consumers.get(producer) ?? []];
|
|
1761
|
-
}
|
|
1762
1770
|
queueFor(producer) {
|
|
1763
1771
|
return this.hasConsumers(producer) ? new NestedCleanupQueue() : void 0;
|
|
1764
1772
|
}
|
|
@@ -1802,11 +1810,12 @@ async function runHeldProducerCleanup(hold, queue, producer, logger, concurrency
|
|
|
1802
1810
|
const notDeployed = await hold.waitForConsumers(producer);
|
|
1803
1811
|
if (notDeployed.length > 0) {
|
|
1804
1812
|
logger.info(safeMsg`Keeping the replaced resources of stack ${displayStackName(producer.stackName)}: ${notDeployed.map((c) => displayStackName(c.stackName)).join(", ")} (importing its outputs) did not deploy and may still use them. cdkd keeps them in state, and the next deploy deletes them`);
|
|
1805
|
-
queue.abandon("consumer-failed");
|
|
1806
1813
|
return {
|
|
1807
1814
|
updatePartial: 0,
|
|
1808
1815
|
nestedUpdatePartial: 0,
|
|
1809
|
-
updatedToPartial: 0
|
|
1816
|
+
updatedToPartial: 0,
|
|
1817
|
+
deleted: 0,
|
|
1818
|
+
deleteSkipped: queue.abandon("consumer-failed")
|
|
1810
1819
|
};
|
|
1811
1820
|
}
|
|
1812
1821
|
let interrupted = false;
|
|
@@ -1929,6 +1938,208 @@ function composeStateLoadedGates(crossPrefix, migration) {
|
|
|
1929
1938
|
};
|
|
1930
1939
|
}
|
|
1931
1940
|
|
|
1941
|
+
// src/deployment/noecho-mac-key-notice.ts
|
|
1942
|
+
const NOTICE_RECHECK_MS = 864e5;
|
|
1943
|
+
const CHECK_TIMEOUT_MS = 15e3;
|
|
1944
|
+
const CACHE_FILE = "noecho-mac-key-notice.json";
|
|
1945
|
+
function readCache(dir) {
|
|
1946
|
+
try {
|
|
1947
|
+
const parsed = JSON.parse(readFileSync(join(dir, CACHE_FILE), "utf8"));
|
|
1948
|
+
return parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
|
|
1949
|
+
} catch {
|
|
1950
|
+
return {};
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
function writeCache(dir, cache) {
|
|
1954
|
+
try {
|
|
1955
|
+
mkdirSync(dir, {
|
|
1956
|
+
recursive: true,
|
|
1957
|
+
mode: 448
|
|
1958
|
+
});
|
|
1959
|
+
const tmp = join(dir, `${CACHE_FILE}.${process.pid}.tmp`);
|
|
1960
|
+
writeFileSync(tmp, JSON.stringify(cache), { mode: 384 });
|
|
1961
|
+
renameSync(tmp, join(dir, CACHE_FILE));
|
|
1962
|
+
} catch {}
|
|
1963
|
+
}
|
|
1964
|
+
function noticeFor(keyArn, bucket, prefix, region) {
|
|
1965
|
+
const command = noEchoMacKeyDeleteCommand(keyArn);
|
|
1966
|
+
if (command === void 0) return void 0;
|
|
1967
|
+
return `The NoEcho value MAC key ${keyArn} in ${region} is billed monthly, and no stack of ${bucket} (prefix ${prefix}) there uses it: an earlier cdkd bootstrap created it, and a deploy now creates one only when a resource reads a NoEcho parameter. Unless a stack of another state bucket or prefix uses it, delete it: ${command}`;
|
|
1968
|
+
}
|
|
1969
|
+
const inFlight$1 = /* @__PURE__ */ new Map();
|
|
1970
|
+
const printed = /* @__PURE__ */ new Set();
|
|
1971
|
+
function noEchoMacKeyCheck(args) {
|
|
1972
|
+
const slot = JSON.stringify([
|
|
1973
|
+
args.bucket,
|
|
1974
|
+
args.prefix,
|
|
1975
|
+
args.region
|
|
1976
|
+
]);
|
|
1977
|
+
let pending = inFlight$1.get(slot);
|
|
1978
|
+
if (pending === void 0) {
|
|
1979
|
+
pending = checkOnce(slot, args).catch(() => ({ settled: false }));
|
|
1980
|
+
inFlight$1.set(slot, pending);
|
|
1981
|
+
}
|
|
1982
|
+
return pending.then((found) => {
|
|
1983
|
+
if (found.notice === void 0 || printed.has(found.notice)) return { settled: found.settled };
|
|
1984
|
+
printed.add(found.notice);
|
|
1985
|
+
return found;
|
|
1986
|
+
});
|
|
1987
|
+
}
|
|
1988
|
+
async function checkOnce(slot, args) {
|
|
1989
|
+
const { kms, region, bucket, prefix, source, cacheDir, debug } = args;
|
|
1990
|
+
if (awsEndpointOverrideActive()) return { settled: false };
|
|
1991
|
+
const now = (args.now ?? Date.now)();
|
|
1992
|
+
const cache = cacheDir === void 0 ? {} : readCache(cacheDir);
|
|
1993
|
+
const cached = cache[slot];
|
|
1994
|
+
if (cached !== void 0 && typeof cached.checkedAt === "number" && now - cached.checkedAt >= 0 && now - cached.checkedAt < 864e5) {
|
|
1995
|
+
if (typeof cached.unusedKeyArn !== "string") return { settled: cached.settled === true };
|
|
1996
|
+
if (noEchoMacKeyDeleteCommand(cached.unusedKeyArn) === void 0) return { settled: false };
|
|
1997
|
+
if (wasNoEchoMacKeyUsed(cached.unusedKeyArn)) {
|
|
1998
|
+
delete cache[slot];
|
|
1999
|
+
if (cacheDir !== void 0) writeCache(cacheDir, cache);
|
|
2000
|
+
return { settled: false };
|
|
2001
|
+
}
|
|
2002
|
+
const state = await keyState(kms, cached.unusedKeyArn);
|
|
2003
|
+
if (state === "gone") {
|
|
2004
|
+
cache[slot] = {
|
|
2005
|
+
checkedAt: now,
|
|
2006
|
+
settled: true
|
|
2007
|
+
};
|
|
2008
|
+
if (cacheDir !== void 0) writeCache(cacheDir, cache);
|
|
2009
|
+
return { settled: true };
|
|
2010
|
+
}
|
|
2011
|
+
const notice = state === "usable" ? noticeFor(cached.unusedKeyArn, bucket, prefix, region) : void 0;
|
|
2012
|
+
return {
|
|
2013
|
+
...notice !== void 0 && { notice },
|
|
2014
|
+
settled: false
|
|
2015
|
+
};
|
|
2016
|
+
}
|
|
2017
|
+
const abort = new AbortController();
|
|
2018
|
+
const timer = setTimeout(() => abort.abort(), CHECK_TIMEOUT_MS);
|
|
2019
|
+
timer.unref?.();
|
|
2020
|
+
let unusedKeyArn;
|
|
2021
|
+
let settled = false;
|
|
2022
|
+
try {
|
|
2023
|
+
let keyArn;
|
|
2024
|
+
try {
|
|
2025
|
+
const meta = (await kms.send(new DescribeKeyCommand({ KeyId: NOECHO_MAC_KEY_ALIAS }), { abortSignal: abort.signal })).KeyMetadata;
|
|
2026
|
+
if (isUsableNoEchoMacKey(meta) && typeof meta?.Arn === "string") keyArn = meta.Arn;
|
|
2027
|
+
else if (meta?.KeyState === "PendingDeletion") settled = true;
|
|
2028
|
+
} catch (error) {
|
|
2029
|
+
if (errorName$1(error) !== "NotFoundException") throw error;
|
|
2030
|
+
settled = true;
|
|
2031
|
+
}
|
|
2032
|
+
if (keyArn !== void 0) {
|
|
2033
|
+
const counted = await Promise.race([countNoEchoMacKeyUsers(source, region, /* @__PURE__ */ new Set([keyArn]), abort.signal), new Promise((_resolve, reject) => abort.signal.addEventListener("abort", () => reject(Object.assign(/* @__PURE__ */ new Error("timeout"), { name: "TimeoutError" }))))]);
|
|
2034
|
+
if (counted.unreadable === 0) {
|
|
2035
|
+
if ((counted.users.get(keyArn) ?? 0) === 0) unusedKeyArn = keyArn;
|
|
2036
|
+
else settled = true;
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
} catch (error) {
|
|
2040
|
+
debug(`NoEcho value MAC key not checked (${errorName$1(error)})`);
|
|
2041
|
+
return { settled: false };
|
|
2042
|
+
} finally {
|
|
2043
|
+
clearTimeout(timer);
|
|
2044
|
+
}
|
|
2045
|
+
if (unusedKeyArn !== void 0 && wasNoEchoMacKeyUsed(unusedKeyArn)) {
|
|
2046
|
+
unusedKeyArn = void 0;
|
|
2047
|
+
settled = true;
|
|
2048
|
+
}
|
|
2049
|
+
if (cacheDir !== void 0) {
|
|
2050
|
+
cache[slot] = {
|
|
2051
|
+
checkedAt: now,
|
|
2052
|
+
...unusedKeyArn !== void 0 && { unusedKeyArn },
|
|
2053
|
+
...settled && { settled: true }
|
|
2054
|
+
};
|
|
2055
|
+
writeCache(cacheDir, cache);
|
|
2056
|
+
}
|
|
2057
|
+
const notice = unusedKeyArn === void 0 ? void 0 : noticeFor(unusedKeyArn, bucket, prefix, region);
|
|
2058
|
+
return {
|
|
2059
|
+
...notice !== void 0 && { notice },
|
|
2060
|
+
settled
|
|
2061
|
+
};
|
|
2062
|
+
}
|
|
2063
|
+
async function keyState(kms, keyArn) {
|
|
2064
|
+
const abort = new AbortController();
|
|
2065
|
+
const timer = setTimeout(() => abort.abort(), CHECK_TIMEOUT_MS);
|
|
2066
|
+
timer.unref?.();
|
|
2067
|
+
try {
|
|
2068
|
+
const meta = (await kms.send(new DescribeKeyCommand({ KeyId: keyArn }), { abortSignal: abort.signal })).KeyMetadata;
|
|
2069
|
+
return isUsableNoEchoMacKey(meta) ? "usable" : "gone";
|
|
2070
|
+
} catch (error) {
|
|
2071
|
+
return errorName$1(error) === "NotFoundException" ? "gone" : "unknown";
|
|
2072
|
+
} finally {
|
|
2073
|
+
clearTimeout(timer);
|
|
2074
|
+
}
|
|
2075
|
+
}
|
|
2076
|
+
function errorName$1(error) {
|
|
2077
|
+
const raw = error?.name;
|
|
2078
|
+
return typeof raw === "string" && /^[A-Za-z][A-Za-z0-9]{0,63}$/.test(raw) ? raw : "Error";
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
// src/cli/commands/deploy/noecho-mac-key-notice.ts
|
|
2082
|
+
async function printNoEchoMacKeyNotices(args) {
|
|
2083
|
+
const { regions, assetMode, bucket, prefix, stateBackend, profile, logger } = args;
|
|
2084
|
+
const cacheDir = cdkdCacheHome(process.env);
|
|
2085
|
+
const source = {
|
|
2086
|
+
list: () => stateBackend.listStacks(),
|
|
2087
|
+
read: async (stackName, region) => (await stateBackend.getState(stackName, region, { readOnly: true }))?.state
|
|
2088
|
+
};
|
|
2089
|
+
for (const region of regions) {
|
|
2090
|
+
const resolved = assetMode(region);
|
|
2091
|
+
if (resolved === void 0) continue;
|
|
2092
|
+
let mode;
|
|
2093
|
+
try {
|
|
2094
|
+
mode = await resolved;
|
|
2095
|
+
} catch {
|
|
2096
|
+
continue;
|
|
2097
|
+
}
|
|
2098
|
+
if (mode.mode !== "cdkd-assets" || mode.marker.noEchoMacKeyChecked === true) continue;
|
|
2099
|
+
const kms = new KMSClient({
|
|
2100
|
+
...awsClientDefaults({ profile }),
|
|
2101
|
+
region,
|
|
2102
|
+
...profile && { profile }
|
|
2103
|
+
});
|
|
2104
|
+
try {
|
|
2105
|
+
const found = await noEchoMacKeyCheck({
|
|
2106
|
+
kms,
|
|
2107
|
+
region,
|
|
2108
|
+
bucket,
|
|
2109
|
+
prefix,
|
|
2110
|
+
source,
|
|
2111
|
+
cacheDir,
|
|
2112
|
+
debug: (message) => logger.debug(message)
|
|
2113
|
+
});
|
|
2114
|
+
if (found.notice !== void 0) logger.info(found.notice);
|
|
2115
|
+
if (found.settled) {
|
|
2116
|
+
const used = mode.marker;
|
|
2117
|
+
await stateBackend.rewriteRawObjectIfUnchanged(mode.markerKey ?? getBootstrapMarkerKey(region), (body) => {
|
|
2118
|
+
let parsed;
|
|
2119
|
+
try {
|
|
2120
|
+
parsed = JSON.parse(body);
|
|
2121
|
+
} catch {
|
|
2122
|
+
return;
|
|
2123
|
+
}
|
|
2124
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return void 0;
|
|
2125
|
+
const now = parsed;
|
|
2126
|
+
if (now["assetBucket"] !== used.assetBucket || now["containerRepo"] !== used.containerRepo || now["assetSupportVersion"] !== used.assetSupportVersion || now["noEchoMacKeyChecked"] === true) return;
|
|
2127
|
+
return JSON.stringify({
|
|
2128
|
+
...now,
|
|
2129
|
+
noEchoMacKeyChecked: true
|
|
2130
|
+
}, null, 2);
|
|
2131
|
+
}).catch((error) => logger.debug(safeMsg`NoEcho value MAC key check not recorded on the bootstrap marker (${errorName(error)})`));
|
|
2132
|
+
}
|
|
2133
|
+
} finally {
|
|
2134
|
+
kms.destroy();
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2137
|
+
}
|
|
2138
|
+
function errorName(error) {
|
|
2139
|
+
const raw = error?.name;
|
|
2140
|
+
return typeof raw === "string" && /^[A-Za-z][A-Za-z0-9]{0,63}$/.test(raw) ? raw : "Error";
|
|
2141
|
+
}
|
|
2142
|
+
|
|
1932
2143
|
// src/state/stack-registry.ts
|
|
1933
2144
|
function unwrapReadError(error) {
|
|
1934
2145
|
return error instanceof CrossPrefixReadError ? error.cause : error;
|
|
@@ -3323,10 +3534,6 @@ async function deployStackInScope(ctx, stackInfo, stackRegion, stackAwsClients)
|
|
|
3323
3534
|
});
|
|
3324
3535
|
let runResult = "SUCCEEDED";
|
|
3325
3536
|
const consumerCleanupQueue = ctx.consumerHold?.queueFor(stackInfo);
|
|
3326
|
-
const consumerStacks = consumerCleanupQueue === void 0 ? void 0 : ctx.consumerHold.consumersOf(stackInfo).map((consumer) => ({
|
|
3327
|
-
stackName: consumer.stackName,
|
|
3328
|
-
region: ctx.stackRegionOf(consumer)
|
|
3329
|
-
}));
|
|
3330
3537
|
try {
|
|
3331
3538
|
const migrationGate = createPrefixMigrationGate({
|
|
3332
3539
|
stackName: stackInfo.stackName,
|
|
@@ -3454,8 +3661,7 @@ async function deployStackInScope(ctx, stackInfo, stackRegion, stackAwsClients)
|
|
|
3454
3661
|
...stackInfo.terminationProtection === true && { terminationProtection: true },
|
|
3455
3662
|
...stackTags !== void 0 && { stackTags },
|
|
3456
3663
|
inRunStacks: ctx.inRunStacks,
|
|
3457
|
-
...consumerCleanupQueue !== void 0 && { consumerCleanupQueue }
|
|
3458
|
-
...consumerStacks !== void 0 && { consumerStacks }
|
|
3664
|
+
...consumerCleanupQueue !== void 0 && { consumerCleanupQueue }
|
|
3459
3665
|
};
|
|
3460
3666
|
const stackDeployEngine = new DeployEngine(stackStateBackend, stackLockManager, dagBuilder, diffCalculator, stackProviderRegistry, deployEngineOptions, stackRegion, exportIndexStore);
|
|
3461
3667
|
const deployed = await withNestedStackContext({
|
|
@@ -3486,7 +3692,9 @@ async function deployStackInScope(ctx, stackInfo, stackRegion, stackAwsClients)
|
|
|
3486
3692
|
...deployed,
|
|
3487
3693
|
updated: Math.max(0, deployed.updated - held.updatedToPartial),
|
|
3488
3694
|
updatePartial: deployed.updatePartial + held.updatePartial,
|
|
3489
|
-
nestedUpdatePartial: (deployed.nestedUpdatePartial ?? 0) + held.nestedUpdatePartial
|
|
3695
|
+
nestedUpdatePartial: (deployed.nestedUpdatePartial ?? 0) + held.nestedUpdatePartial,
|
|
3696
|
+
deleted: deployed.deleted + held.deleted,
|
|
3697
|
+
deleteSkipped: deployed.deleteSkipped + held.deleteSkipped
|
|
3490
3698
|
};
|
|
3491
3699
|
}
|
|
3492
3700
|
logger.info(`\n${bold("Deployment Summary:")}`);
|
|
@@ -3869,8 +4077,7 @@ async function deployCommand(stacks, options) {
|
|
|
3869
4077
|
cancelledStacks++;
|
|
3870
4078
|
},
|
|
3871
4079
|
inRunStacks: new Set(targetStacks.map((s) => inRunStackKey(s.stackName, stackRegions.get(s) ?? deployStackRegion(s, baseRegion)))),
|
|
3872
|
-
...consumerHold !== void 0 && { consumerHold }
|
|
3873
|
-
stackRegionOf: (s) => stackRegions.get(s) ?? deployStackRegion(s, baseRegion)
|
|
4080
|
+
...consumerHold !== void 0 && { consumerHold }
|
|
3874
4081
|
};
|
|
3875
4082
|
checkPinCcApiOptions(options, targetStacks, logger);
|
|
3876
4083
|
checkReplaceResourceOptions(options, targetStacks);
|
|
@@ -3913,6 +4120,15 @@ async function deployCommand(stacks, options) {
|
|
|
3913
4120
|
if (outputsFile !== void 0) writeStackOutputsFile(outputsFile, stackOutputs, { deployFailed: !workGraphCompleted });
|
|
3914
4121
|
}
|
|
3915
4122
|
if (heldFailure !== void 0) throw heldFailure;
|
|
4123
|
+
if (workGraphCompleted && !options.dryRun) await printNoEchoMacKeyNotices({
|
|
4124
|
+
regions: new Set(targetStacks.filter((s) => s.account === void 0 || s.account === accountId).map((s) => stackRegions.get(s) ?? deployStackRegion(s, baseRegion))),
|
|
4125
|
+
assetMode: (region) => assetModeResolver.resolved(region),
|
|
4126
|
+
bucket: stateBucket,
|
|
4127
|
+
prefix: options.statePrefix,
|
|
4128
|
+
stateBackend: preflightStateBackend,
|
|
4129
|
+
profile: options.profile,
|
|
4130
|
+
logger
|
|
4131
|
+
});
|
|
3916
4132
|
if (totalUnaddressed > 0 && !options.allowUnaddressed) throw new PartialFailureError(`Deploy left ${totalUnaddressed} resource(s) unaddressed, so they may still exist in AWS. The two cases differ in what happens next: a DELETE the provider could not issue KEEPS its state record, so the next 'cdkd deploy' re-attempts it, while a replacement's surviving predecessor is NOT tracked and will never be retried — delete it by hand. ` + (totalCrossPrefixKept > 0 ? "A replacement kept because another state prefix records the stack, or the check could not run, keeps its old resource and applies no new value — resolve the pair, or let the check run, and re-deploy. " : "") + "The per-stack summaries above give the breakdown, and each resource's own warning names its cause and remedy. " + (cancelledStacks > 0 ? `Note ${cancelledStacks} stack(s) were also cancelled and never deployed, so the template is not fully applied beyond the resources named above. ` : "") + `Pass --allow-unaddressed to exit 0 instead.`);
|
|
3917
4133
|
} finally {
|
|
3918
4134
|
runClock.lap("assets + stacks, summary");
|
|
@@ -6175,7 +6391,10 @@ async function buildDiffTree(args) {
|
|
|
6175
6391
|
unreadable,
|
|
6176
6392
|
unreadableContainers,
|
|
6177
6393
|
unreadableOrphans,
|
|
6178
|
-
destructiveChanges: findDestructiveChanges(stackName, changes.values(), stateAfterAdoption.resources, effectiveTemplate),
|
|
6394
|
+
destructiveChanges: [...findDestructiveChanges(stackName, changes.values(), stateAfterAdoption.resources, effectiveTemplate), ...ssmNameHeal === "pending" ? [] : pendingOldCopyDeletes(stackName, {
|
|
6395
|
+
...state,
|
|
6396
|
+
resources: stateAfterAdoption.resources
|
|
6397
|
+
})],
|
|
6179
6398
|
children: []
|
|
6180
6399
|
};
|
|
6181
6400
|
if (found && !isNestedChild && node.blocking.length === 0) node.refactorSides = hintSidesOf(changes.values(), effectiveTemplate, rollbackOrphanIds(state.orphans), stateAfterAdoption.resources);
|
|
@@ -6302,7 +6521,7 @@ async function buildDeletedSubtree(stackName, region, stateBackend, diffCalculat
|
|
|
6302
6521
|
unreadableContainers,
|
|
6303
6522
|
unreadableOrphans: [],
|
|
6304
6523
|
outputChanges,
|
|
6305
|
-
destructiveChanges: findDestructiveChanges(stackName, changes.values(), state.resources),
|
|
6524
|
+
destructiveChanges: [...findDestructiveChanges(stackName, changes.values(), state.resources), ...pendingOldCopyDeletes(stackName, state)],
|
|
6306
6525
|
children: []
|
|
6307
6526
|
};
|
|
6308
6527
|
for (const [logicalId, resource] of Object.entries(state.resources ?? {})) {
|
|
@@ -6318,7 +6537,7 @@ function stateDerivedNames(resources) {
|
|
|
6318
6537
|
// src/cli/commands/diff-recursive/tree.ts
|
|
6319
6538
|
function nodeHasChanges(node) {
|
|
6320
6539
|
for (const change of node.changes.values()) if (change.changeType !== "NO_CHANGE") return true;
|
|
6321
|
-
return node.outputChanges.length > 0 || node.adoptedOrphans.length > 0 || unreadableCount(node) > 0;
|
|
6540
|
+
return node.outputChanges.length > 0 || node.adoptedOrphans.length > 0 || unreadableCount(node) > 0 || node.destructiveChanges.some((change) => change.oldCopy === true);
|
|
6322
6541
|
}
|
|
6323
6542
|
function unreadableCount(node) {
|
|
6324
6543
|
return node.unreadable.length + node.unreadableContainers.length + node.unreadableOrphans.length;
|
|
@@ -6393,13 +6612,14 @@ function diffTreeToJson(node) {
|
|
|
6393
6612
|
unreadable: node.unreadable,
|
|
6394
6613
|
unreadableContainers: node.unreadableContainers,
|
|
6395
6614
|
unreadableOrphans: node.unreadableOrphans,
|
|
6396
|
-
destructiveChanges: node.destructiveChanges.map(({ logicalId, resourceType, constructPath, impact, movedTo, earlyDelete }) => ({
|
|
6615
|
+
destructiveChanges: node.destructiveChanges.map(({ logicalId, resourceType, constructPath, impact, movedTo, earlyDelete, oldCopy }) => ({
|
|
6397
6616
|
logicalId,
|
|
6398
6617
|
resourceType,
|
|
6399
6618
|
...constructPath !== void 0 && { constructPath },
|
|
6400
6619
|
impact,
|
|
6401
6620
|
...movedTo !== void 0 && { movedTo },
|
|
6402
|
-
...earlyDelete !== void 0 && { earlyDelete }
|
|
6621
|
+
...earlyDelete !== void 0 && { earlyDelete },
|
|
6622
|
+
...oldCopy === true && { oldCopy }
|
|
6403
6623
|
})),
|
|
6404
6624
|
children: node.children.map(diffTreeToJson)
|
|
6405
6625
|
};
|
|
@@ -6576,6 +6796,8 @@ function renderDiffTree(node, isRoot, logFn) {
|
|
|
6576
6796
|
logFn(`\n${formatChangeCounts(counts)}`);
|
|
6577
6797
|
if (outputs.add + outputs.change + outputs.remove > 0) logFn(`${outputs.add} output(s) to add, ${outputs.change} to change, ${outputs.remove} to remove`);
|
|
6578
6798
|
if (node.adoptedOrphans.length > 0) logFn(`${node.adoptedOrphans.length} resource(s) to adopt from a previous rollback: ${node.adoptedOrphans.map((id) => displayLogicalId(id)).join(", ")}`);
|
|
6799
|
+
const oldCopies = node.destructiveChanges.filter((change) => change.oldCopy === true);
|
|
6800
|
+
if (oldCopies.length > 0) logFn(`${oldCopies.length} old resource(s) an earlier deploy replaced, to delete: ` + oldCopies.map((change) => `${displayLogicalId(change.logicalId)} (${displaySafe(change.resourceType)})`).join(", "));
|
|
6579
6801
|
const unreadableTotal = unreadableCount(node);
|
|
6580
6802
|
if (unreadableTotal > 0) {
|
|
6581
6803
|
const named = unreadableRowNames(node, UNREADABLE_PREVIEW_NAMES);
|
|
@@ -9332,7 +9554,12 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
|
|
|
9332
9554
|
return storedNoEchoInputsKnown(row.state, stored) && finishStored(row.state, void 0, stored) !== row.state;
|
|
9333
9555
|
});
|
|
9334
9556
|
const totalSecrets = outputSecrets.size + [...perResourceSecrets.values()].reduce((n, m) => n + m.size, 0) + [...orphanSecrets.values()].reduce((n, m) => n + m.size, 0);
|
|
9335
|
-
|
|
9557
|
+
const subFloorEvidence = [
|
|
9558
|
+
outputSecrets,
|
|
9559
|
+
...perResourceSecrets.values(),
|
|
9560
|
+
...orphanSecrets.values()
|
|
9561
|
+
].some(carriesSubFloorEvidence);
|
|
9562
|
+
if (totalSecrets === 0 && !subFloorEvidence && !noEchoPlans.changesAny && !storedNoEcho.changesAny && unpositioned.masked.size === 0 && !finishRepairsAny()) {
|
|
9336
9563
|
emitAbandonedScanNotes();
|
|
9337
9564
|
return {
|
|
9338
9565
|
...await purgeExaminedHistory(loaded.migrationPending),
|
|
@@ -9416,7 +9643,7 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
|
|
|
9416
9643
|
shownStack
|
|
9417
9644
|
});
|
|
9418
9645
|
recordsChanged += changed;
|
|
9419
|
-
const positionedOutputs = outputSecrets.size > 0 ? redactForState(state.outputs, outputsSourceUntrusted ? {
|
|
9646
|
+
const positionedOutputs = outputSecrets.size > 0 || carriesSubFloorEvidence(outputSecrets) ? redactForState(state.outputs, outputsSourceUntrusted ? {
|
|
9420
9647
|
provenance: "value-scan",
|
|
9421
9648
|
secrets: outputSecrets
|
|
9422
9649
|
} : {
|
|
@@ -9547,7 +9774,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
9547
9774
|
const { logger } = opts;
|
|
9548
9775
|
const shownStack = displayStackName(stack.stackName);
|
|
9549
9776
|
const nestedInput = opts.nestedChild?.input;
|
|
9550
|
-
const inheritedSecrets = nestedInput &&
|
|
9777
|
+
const inheritedSecrets = nestedInput && carriesInheritedRedaction(nestedInput.inheritedSecrets) ? nestedInput.inheritedSecrets : void 0;
|
|
9551
9778
|
const newBag = () => {
|
|
9552
9779
|
const bag = /* @__PURE__ */ new Map();
|
|
9553
9780
|
if (inheritedSecrets) inheritNestedStackParameterAssociations(bag, inheritedSecrets);
|
|
@@ -12200,6 +12427,162 @@ function removedGrantMembers(key, awsValue, stateValue) {
|
|
|
12200
12427
|
return out;
|
|
12201
12428
|
}
|
|
12202
12429
|
|
|
12430
|
+
// src/cli/commands/drift/revert-write-only.ts
|
|
12431
|
+
function revertWriteOnlyResendNames(resourceType, properties, writeOnlyNames, outcome) {
|
|
12432
|
+
if (!writeOnlyNames || writeOnlyNames.size === 0 || !isPlainRecord$3(properties)) return [];
|
|
12433
|
+
const unreadableCreateOnly = getTopLevelKeysHoldingUnreadableCreateOnly(resourceType, properties);
|
|
12434
|
+
const changedKeys = new Set(outcome.changes.map((d) => d.path.split(".", 1)[0]));
|
|
12435
|
+
const keptWhenOmitted = getWriteOnlyKeysKeptWhenOmittedOnRevert(resourceType, properties, outcome.awsProperties, changedKeys, writeOnlyNames);
|
|
12436
|
+
const names = [];
|
|
12437
|
+
for (const name of writeOnlyNames) {
|
|
12438
|
+
if (!hasOwnKey(properties, name) || unreadableCreateOnly.has(name)) continue;
|
|
12439
|
+
if (keptWhenOmitted.has(name)) continue;
|
|
12440
|
+
const value = properties[name];
|
|
12441
|
+
if (value === void 0 || value === null) continue;
|
|
12442
|
+
if (holdsMaskLeaf(value) || carriesIntrinsicObject(value)) continue;
|
|
12443
|
+
names.push(name);
|
|
12444
|
+
}
|
|
12445
|
+
return names;
|
|
12446
|
+
}
|
|
12447
|
+
function writeOnlyLookupFailedReason(resourceType) {
|
|
12448
|
+
return `NOT reverted — cdkd could not read the ${resourceType} schema (cloudformation:DescribeType failed twice), and its committed registry schema snapshot does not carry the type, so it cannot tell which properties AWS never returns on a read. An update built from the read would leave the template's values of those out: AWS may refuse it, or apply defaults there. Re-run the revert; if this persists, grant cloudformation:DescribeType.`;
|
|
12449
|
+
}
|
|
12450
|
+
function withDeclaredWriteOnlyValues(send, resolvedProperties, names, paths) {
|
|
12451
|
+
const skipped = [];
|
|
12452
|
+
const wholesale = [];
|
|
12453
|
+
if (names.length === 0 || !isPlainRecord$3(resolvedProperties)) return {
|
|
12454
|
+
properties: send,
|
|
12455
|
+
skipped,
|
|
12456
|
+
wholesale
|
|
12457
|
+
};
|
|
12458
|
+
let out = send;
|
|
12459
|
+
for (const name of names) {
|
|
12460
|
+
if (!hasOwnKey(resolvedProperties, name)) continue;
|
|
12461
|
+
const declared = resolvedProperties[name];
|
|
12462
|
+
if (declared === void 0 || declared === null) continue;
|
|
12463
|
+
let next;
|
|
12464
|
+
if (!hasOwnKey(send, name)) next = declared;
|
|
12465
|
+
else {
|
|
12466
|
+
const own = paths.filter((p) => p[0] === name).map((p) => p.slice(1));
|
|
12467
|
+
let value = send[name];
|
|
12468
|
+
let matched = true;
|
|
12469
|
+
for (const rest of own) {
|
|
12470
|
+
const grafted = graftAt(value, declared, rest, own);
|
|
12471
|
+
if (!grafted.ok) matched = false;
|
|
12472
|
+
value = grafted.value;
|
|
12473
|
+
}
|
|
12474
|
+
if (matched) next = value;
|
|
12475
|
+
else {
|
|
12476
|
+
next = declared;
|
|
12477
|
+
wholesale.push(name);
|
|
12478
|
+
}
|
|
12479
|
+
}
|
|
12480
|
+
if (carriesDynamicReference(next) || holdsMaskLeaf(next)) {
|
|
12481
|
+
skipped.push(name);
|
|
12482
|
+
const at = wholesale.indexOf(name);
|
|
12483
|
+
if (at !== -1) wholesale.splice(at, 1);
|
|
12484
|
+
continue;
|
|
12485
|
+
}
|
|
12486
|
+
if (out === send) out = { ...send };
|
|
12487
|
+
defineOwnKey(out, name, next);
|
|
12488
|
+
}
|
|
12489
|
+
return {
|
|
12490
|
+
properties: out,
|
|
12491
|
+
skipped,
|
|
12492
|
+
wholesale
|
|
12493
|
+
};
|
|
12494
|
+
}
|
|
12495
|
+
function graftAt(send, declared, path, writeOnly) {
|
|
12496
|
+
if (path.length === 0 || send === void 0 || send === null) return {
|
|
12497
|
+
value: declared,
|
|
12498
|
+
ok: true
|
|
12499
|
+
};
|
|
12500
|
+
const [segment, ...rest] = path;
|
|
12501
|
+
const below = writeOnly.filter((p) => p[0] === segment).map((p) => p.slice(1));
|
|
12502
|
+
if (segment === "*") {
|
|
12503
|
+
if (!Array.isArray(declared)) return {
|
|
12504
|
+
value: send,
|
|
12505
|
+
ok: true
|
|
12506
|
+
};
|
|
12507
|
+
if (!Array.isArray(send)) return {
|
|
12508
|
+
value: send,
|
|
12509
|
+
ok: false
|
|
12510
|
+
};
|
|
12511
|
+
const partners = pairListItems(send, declared, below);
|
|
12512
|
+
if (!partners) return {
|
|
12513
|
+
value: send,
|
|
12514
|
+
ok: false
|
|
12515
|
+
};
|
|
12516
|
+
let ok = true;
|
|
12517
|
+
return {
|
|
12518
|
+
value: send.map((element, index) => {
|
|
12519
|
+
const grafted = graftAt(element, partners[index], rest, below);
|
|
12520
|
+
if (!grafted.ok) ok = false;
|
|
12521
|
+
return grafted.value;
|
|
12522
|
+
}),
|
|
12523
|
+
ok
|
|
12524
|
+
};
|
|
12525
|
+
}
|
|
12526
|
+
if (!isPlainRecord$3(declared) || !hasOwnKey(declared, segment)) return {
|
|
12527
|
+
value: send,
|
|
12528
|
+
ok: true
|
|
12529
|
+
};
|
|
12530
|
+
if (!isPlainRecord$3(send)) return {
|
|
12531
|
+
value: send,
|
|
12532
|
+
ok: false
|
|
12533
|
+
};
|
|
12534
|
+
const base = { ...send };
|
|
12535
|
+
const grafted = graftAt(hasOwnKey(base, segment) ? base[segment] : void 0, declared[segment], rest, below);
|
|
12536
|
+
defineOwnKey(base, segment, grafted.value);
|
|
12537
|
+
return {
|
|
12538
|
+
value: base,
|
|
12539
|
+
ok: grafted.ok
|
|
12540
|
+
};
|
|
12541
|
+
}
|
|
12542
|
+
function pairListItems(send, declared, writeOnly) {
|
|
12543
|
+
if (send.length !== declared.length) return void 0;
|
|
12544
|
+
const templates = declared.map((item) => withoutPaths(item, writeOnly));
|
|
12545
|
+
const partners = [];
|
|
12546
|
+
const used = /* @__PURE__ */ new Set();
|
|
12547
|
+
for (const item of send) {
|
|
12548
|
+
const candidates = templates.map((t, index) => covers(t, item) ? index : -1).filter((index) => index !== -1);
|
|
12549
|
+
if (candidates.length !== 1 || used.has(candidates[0])) return void 0;
|
|
12550
|
+
used.add(candidates[0]);
|
|
12551
|
+
partners.push(declared[candidates[0]]);
|
|
12552
|
+
}
|
|
12553
|
+
return partners;
|
|
12554
|
+
}
|
|
12555
|
+
function withoutPaths(value, paths) {
|
|
12556
|
+
if (paths.length === 0) return value;
|
|
12557
|
+
if (Array.isArray(value)) {
|
|
12558
|
+
const inner = paths.filter((p) => p[0] === "*").map((p) => p.slice(1));
|
|
12559
|
+
return value.map((item) => withoutPaths(item, inner));
|
|
12560
|
+
}
|
|
12561
|
+
if (!isPlainRecord$3(value)) return value;
|
|
12562
|
+
const out = {};
|
|
12563
|
+
for (const [key, child] of Object.entries(value)) {
|
|
12564
|
+
const inner = paths.filter((p) => p[0] === key).map((p) => p.slice(1));
|
|
12565
|
+
if (inner.some((p) => p.length === 0)) continue;
|
|
12566
|
+
defineOwnKey(out, key, withoutPaths(child, inner));
|
|
12567
|
+
}
|
|
12568
|
+
return out;
|
|
12569
|
+
}
|
|
12570
|
+
function covers(template, actual) {
|
|
12571
|
+
if (isPlainRecord$3(template)) {
|
|
12572
|
+
if (!isPlainRecord$3(actual)) return false;
|
|
12573
|
+
return Object.entries(template).every(([key, child]) => hasOwnKey(actual, key) && covers(child, actual[key]));
|
|
12574
|
+
}
|
|
12575
|
+
if (Array.isArray(template)) return Array.isArray(actual) && template.length === actual.length && template.every((child, index) => covers(child, actual[index]));
|
|
12576
|
+
return deepEqualUnordered(template, actual);
|
|
12577
|
+
}
|
|
12578
|
+
function carriesIntrinsicObject(value) {
|
|
12579
|
+
if (Array.isArray(value)) return value.some(carriesIntrinsicObject);
|
|
12580
|
+
if (value === null || typeof value !== "object") return false;
|
|
12581
|
+
const keys = Object.keys(value);
|
|
12582
|
+
if (keys.length === 1 && (keys[0] === "Ref" || keys[0].startsWith("Fn::"))) return true;
|
|
12583
|
+
return Object.values(value).some(carriesIntrinsicObject);
|
|
12584
|
+
}
|
|
12585
|
+
|
|
12203
12586
|
// src/cli/commands/drift/report-json.ts
|
|
12204
12587
|
async function settleUnsettled(record, logicalId, providerOf) {
|
|
12205
12588
|
const names = unsettledPropertiesOf(record);
|
|
@@ -12207,7 +12590,10 @@ async function settleUnsettled(record, logicalId, providerOf) {
|
|
|
12207
12590
|
let kept = /* @__PURE__ */ new Set();
|
|
12208
12591
|
try {
|
|
12209
12592
|
const provider = providerOf();
|
|
12210
|
-
if (provider?.unsettledInTransition !== void 0)
|
|
12593
|
+
if (provider?.unsettledInTransition !== void 0) {
|
|
12594
|
+
const inTransition = provider.unsettledInTransition.bind(provider);
|
|
12595
|
+
kept = await withGuardReadRetry(() => inTransition(record.physicalId, logicalId, record.resourceType, names, record.properties), logicalId);
|
|
12596
|
+
}
|
|
12211
12597
|
} catch {
|
|
12212
12598
|
kept = names;
|
|
12213
12599
|
}
|
|
@@ -12578,7 +12964,7 @@ function revertCommandLine(stackName, region) {
|
|
|
12578
12964
|
hole: "region"
|
|
12579
12965
|
}]).command} --revert`;
|
|
12580
12966
|
}
|
|
12581
|
-
function printRevertPlan(reports, out, recovery, writeOnlyResend) {
|
|
12967
|
+
function printRevertPlan(reports, out, recovery, writeOnlyResend, writeOnlyUnknown) {
|
|
12582
12968
|
for (const report of reports) {
|
|
12583
12969
|
const drifted = report.outcomes.flatMap((o) => matchOutcome(o, {
|
|
12584
12970
|
drifted: (d) => [d],
|
|
@@ -12595,6 +12981,10 @@ function printRevertPlan(reports, out, recovery, writeOnlyResend) {
|
|
|
12595
12981
|
out.write(` ! ${reportResource(o)}: NOT reverted — a 'cdkd import' run refused this resource's observed-properties baseline, so the only baseline available is the one that refusal already found untrustworthy. ` + (refusedBaselineRemedy(report.state.resources[o.logicalId]) ?? `Deploy a change to this resource first.`) + `\n`);
|
|
12596
12982
|
continue;
|
|
12597
12983
|
}
|
|
12984
|
+
if (writeOnlyUnknown?.has(o) === true) {
|
|
12985
|
+
out.write(` ! ${reportResource(o)}: ${writeOnlyLookupFailedReason(o.resourceType)}\n`);
|
|
12986
|
+
continue;
|
|
12987
|
+
}
|
|
12598
12988
|
const word = o.changes.length === 1 ? "property path" : "property paths";
|
|
12599
12989
|
out.write(` → provider.update on ${reportResource(o)}: revert ${o.changes.length} ${word}\n`);
|
|
12600
12990
|
for (const change of o.changes) out.write(reportPlanChangeLine(displayDriftPath(o, change.path), displayDriftValue(o, change.awsValue), displayDriftValue(o, change.stateValue)));
|
|
@@ -13729,156 +14119,6 @@ async function writeAheadRevertAttestations(report, logicalIds, stateBackend) {
|
|
|
13729
14119
|
report.migrationPending = false;
|
|
13730
14120
|
}
|
|
13731
14121
|
|
|
13732
|
-
// src/cli/commands/drift/revert-write-only.ts
|
|
13733
|
-
function revertWriteOnlyResendNames(resourceType, properties, writeOnlyNames) {
|
|
13734
|
-
if (!writeOnlyNames || writeOnlyNames.size === 0 || !isPlainRecord$3(properties)) return [];
|
|
13735
|
-
const unreadableCreateOnly = getTopLevelKeysHoldingUnreadableCreateOnly(resourceType, properties);
|
|
13736
|
-
const names = [];
|
|
13737
|
-
for (const name of writeOnlyNames) {
|
|
13738
|
-
if (!hasOwnKey(properties, name) || unreadableCreateOnly.has(name)) continue;
|
|
13739
|
-
const value = properties[name];
|
|
13740
|
-
if (value === void 0 || value === null) continue;
|
|
13741
|
-
if (holdsMaskLeaf(value) || carriesIntrinsicObject(value)) continue;
|
|
13742
|
-
names.push(name);
|
|
13743
|
-
}
|
|
13744
|
-
return names;
|
|
13745
|
-
}
|
|
13746
|
-
function withDeclaredWriteOnlyValues(send, resolvedProperties, names, paths) {
|
|
13747
|
-
const skipped = [];
|
|
13748
|
-
const wholesale = [];
|
|
13749
|
-
if (names.length === 0 || !isPlainRecord$3(resolvedProperties)) return {
|
|
13750
|
-
properties: send,
|
|
13751
|
-
skipped,
|
|
13752
|
-
wholesale
|
|
13753
|
-
};
|
|
13754
|
-
let out = send;
|
|
13755
|
-
for (const name of names) {
|
|
13756
|
-
if (!hasOwnKey(resolvedProperties, name)) continue;
|
|
13757
|
-
const declared = resolvedProperties[name];
|
|
13758
|
-
if (declared === void 0 || declared === null) continue;
|
|
13759
|
-
let next;
|
|
13760
|
-
if (!hasOwnKey(send, name)) next = declared;
|
|
13761
|
-
else {
|
|
13762
|
-
const own = paths.filter((p) => p[0] === name).map((p) => p.slice(1));
|
|
13763
|
-
let value = send[name];
|
|
13764
|
-
let matched = true;
|
|
13765
|
-
for (const rest of own) {
|
|
13766
|
-
const grafted = graftAt(value, declared, rest, own);
|
|
13767
|
-
if (!grafted.ok) matched = false;
|
|
13768
|
-
value = grafted.value;
|
|
13769
|
-
}
|
|
13770
|
-
if (matched) next = value;
|
|
13771
|
-
else {
|
|
13772
|
-
next = declared;
|
|
13773
|
-
wholesale.push(name);
|
|
13774
|
-
}
|
|
13775
|
-
}
|
|
13776
|
-
if (carriesDynamicReference(next) || holdsMaskLeaf(next)) {
|
|
13777
|
-
skipped.push(name);
|
|
13778
|
-
const at = wholesale.indexOf(name);
|
|
13779
|
-
if (at !== -1) wholesale.splice(at, 1);
|
|
13780
|
-
continue;
|
|
13781
|
-
}
|
|
13782
|
-
if (out === send) out = { ...send };
|
|
13783
|
-
defineOwnKey(out, name, next);
|
|
13784
|
-
}
|
|
13785
|
-
return {
|
|
13786
|
-
properties: out,
|
|
13787
|
-
skipped,
|
|
13788
|
-
wholesale
|
|
13789
|
-
};
|
|
13790
|
-
}
|
|
13791
|
-
function graftAt(send, declared, path, writeOnly) {
|
|
13792
|
-
if (path.length === 0 || send === void 0 || send === null) return {
|
|
13793
|
-
value: declared,
|
|
13794
|
-
ok: true
|
|
13795
|
-
};
|
|
13796
|
-
const [segment, ...rest] = path;
|
|
13797
|
-
const below = writeOnly.filter((p) => p[0] === segment).map((p) => p.slice(1));
|
|
13798
|
-
if (segment === "*") {
|
|
13799
|
-
if (!Array.isArray(declared)) return {
|
|
13800
|
-
value: send,
|
|
13801
|
-
ok: true
|
|
13802
|
-
};
|
|
13803
|
-
if (!Array.isArray(send)) return {
|
|
13804
|
-
value: send,
|
|
13805
|
-
ok: false
|
|
13806
|
-
};
|
|
13807
|
-
const partners = pairListItems(send, declared, below);
|
|
13808
|
-
if (!partners) return {
|
|
13809
|
-
value: send,
|
|
13810
|
-
ok: false
|
|
13811
|
-
};
|
|
13812
|
-
let ok = true;
|
|
13813
|
-
return {
|
|
13814
|
-
value: send.map((element, index) => {
|
|
13815
|
-
const grafted = graftAt(element, partners[index], rest, below);
|
|
13816
|
-
if (!grafted.ok) ok = false;
|
|
13817
|
-
return grafted.value;
|
|
13818
|
-
}),
|
|
13819
|
-
ok
|
|
13820
|
-
};
|
|
13821
|
-
}
|
|
13822
|
-
if (!isPlainRecord$3(declared) || !hasOwnKey(declared, segment)) return {
|
|
13823
|
-
value: send,
|
|
13824
|
-
ok: true
|
|
13825
|
-
};
|
|
13826
|
-
if (!isPlainRecord$3(send)) return {
|
|
13827
|
-
value: send,
|
|
13828
|
-
ok: false
|
|
13829
|
-
};
|
|
13830
|
-
const base = { ...send };
|
|
13831
|
-
const grafted = graftAt(hasOwnKey(base, segment) ? base[segment] : void 0, declared[segment], rest, below);
|
|
13832
|
-
defineOwnKey(base, segment, grafted.value);
|
|
13833
|
-
return {
|
|
13834
|
-
value: base,
|
|
13835
|
-
ok: grafted.ok
|
|
13836
|
-
};
|
|
13837
|
-
}
|
|
13838
|
-
function pairListItems(send, declared, writeOnly) {
|
|
13839
|
-
if (send.length !== declared.length) return void 0;
|
|
13840
|
-
const templates = declared.map((item) => withoutPaths(item, writeOnly));
|
|
13841
|
-
const partners = [];
|
|
13842
|
-
const used = /* @__PURE__ */ new Set();
|
|
13843
|
-
for (const item of send) {
|
|
13844
|
-
const candidates = templates.map((t, index) => covers(t, item) ? index : -1).filter((index) => index !== -1);
|
|
13845
|
-
if (candidates.length !== 1 || used.has(candidates[0])) return void 0;
|
|
13846
|
-
used.add(candidates[0]);
|
|
13847
|
-
partners.push(declared[candidates[0]]);
|
|
13848
|
-
}
|
|
13849
|
-
return partners;
|
|
13850
|
-
}
|
|
13851
|
-
function withoutPaths(value, paths) {
|
|
13852
|
-
if (paths.length === 0) return value;
|
|
13853
|
-
if (Array.isArray(value)) {
|
|
13854
|
-
const inner = paths.filter((p) => p[0] === "*").map((p) => p.slice(1));
|
|
13855
|
-
return value.map((item) => withoutPaths(item, inner));
|
|
13856
|
-
}
|
|
13857
|
-
if (!isPlainRecord$3(value)) return value;
|
|
13858
|
-
const out = {};
|
|
13859
|
-
for (const [key, child] of Object.entries(value)) {
|
|
13860
|
-
const inner = paths.filter((p) => p[0] === key).map((p) => p.slice(1));
|
|
13861
|
-
if (inner.some((p) => p.length === 0)) continue;
|
|
13862
|
-
defineOwnKey(out, key, withoutPaths(child, inner));
|
|
13863
|
-
}
|
|
13864
|
-
return out;
|
|
13865
|
-
}
|
|
13866
|
-
function covers(template, actual) {
|
|
13867
|
-
if (isPlainRecord$3(template)) {
|
|
13868
|
-
if (!isPlainRecord$3(actual)) return false;
|
|
13869
|
-
return Object.entries(template).every(([key, child]) => hasOwnKey(actual, key) && covers(child, actual[key]));
|
|
13870
|
-
}
|
|
13871
|
-
if (Array.isArray(template)) return Array.isArray(actual) && template.length === actual.length && template.every((child, index) => covers(child, actual[index]));
|
|
13872
|
-
return deepEqualUnordered(template, actual);
|
|
13873
|
-
}
|
|
13874
|
-
function carriesIntrinsicObject(value) {
|
|
13875
|
-
if (Array.isArray(value)) return value.some(carriesIntrinsicObject);
|
|
13876
|
-
if (value === null || typeof value !== "object") return false;
|
|
13877
|
-
const keys = Object.keys(value);
|
|
13878
|
-
if (keys.length === 1 && (keys[0] === "Ref" || keys[0].startsWith("Fn::"))) return true;
|
|
13879
|
-
return Object.values(value).some(carriesIntrinsicObject);
|
|
13880
|
-
}
|
|
13881
|
-
|
|
13882
14122
|
// src/provisioning/providers/ec2/sg-support.ts
|
|
13883
14123
|
const SG_INGRESS_IP_PROTOCOL_DEFAULT = "-1";
|
|
13884
14124
|
const SG_INGRESS_IP_PROTOCOL_PATH = "AWS::EC2::SecurityGroupIngress IpProtocol";
|
|
@@ -14630,6 +14870,11 @@ async function revertDriftedOutcome(args) {
|
|
|
14630
14870
|
logger.warn(` ! ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): NOT reverted — a 'cdkd import' run refused to capture this resource's observed-properties baseline, so the only baseline available is its recorded properties, which the refusal already found untrustworthy. Reverting from them could overwrite a live value (a resolved secret among them) with a placeholder the deployed stack never used. ` + safeMsg`${refusedBaselineRemedy(stateResource) ?? "Deploy a change to this resource to restore a baseline first."}`);
|
|
14631
14871
|
return;
|
|
14632
14872
|
}
|
|
14873
|
+
if (args.writeOnlyLookupFailed) {
|
|
14874
|
+
tally.totalUnresolvable++;
|
|
14875
|
+
logger.warn(safeMsg` ! ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): ${writeOnlyLookupFailedReason(outcome.resourceType)}`);
|
|
14876
|
+
return;
|
|
14877
|
+
}
|
|
14633
14878
|
const provider = scope.registry.getProviderFor({
|
|
14634
14879
|
resourceType: outcome.resourceType,
|
|
14635
14880
|
provisionedBy: stateResource.provisionedBy
|
|
@@ -14747,6 +14992,7 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
|
|
|
14747
14992
|
statePrefix: stateConfig.prefix
|
|
14748
14993
|
};
|
|
14749
14994
|
const writeOnlyResend = /* @__PURE__ */ new Map();
|
|
14995
|
+
const writeOnlyUnknown = /* @__PURE__ */ new Set();
|
|
14750
14996
|
const writeOnlyLookups = /* @__PURE__ */ new Map();
|
|
14751
14997
|
await Promise.all(reports.flatMap((report) => report.outcomes.flatMap((o) => {
|
|
14752
14998
|
if (o.kind !== "drifted") return [];
|
|
@@ -14765,15 +15011,29 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
|
|
|
14765
15011
|
}
|
|
14766
15012
|
let lookup = byType.get(o.resourceType);
|
|
14767
15013
|
if (!lookup) {
|
|
14768
|
-
lookup = runWithStackAwsClients(scope.clients, () =>
|
|
15014
|
+
lookup = runWithStackAwsClients(scope.clients, async () => {
|
|
15015
|
+
const names = await tryGetTopLevelWriteOnlyProperties(o.resourceType) ?? await tryGetTopLevelWriteOnlyProperties(o.resourceType);
|
|
15016
|
+
if (names === void 0 && isWriteOnlyEmulatorRegistryMissType(o.resourceType)) {
|
|
15017
|
+
reportAwsEmulatorRegistryMiss(o.resourceType, "the revert sends no write-only value");
|
|
15018
|
+
return /* @__PURE__ */ new Set();
|
|
15019
|
+
}
|
|
15020
|
+
if (names !== void 0) return names;
|
|
15021
|
+
const snapshot = getSnapshotTopLevelWriteOnlyProperties(o.resourceType);
|
|
15022
|
+
if (snapshot !== void 0) logger.warn(safeMsg`cdkd could not read the ${o.resourceType} schema (cloudformation:DescribeType ` + "failed twice): its write-only properties come from cdkd's committed registry schema snapshot.");
|
|
15023
|
+
return snapshot;
|
|
15024
|
+
});
|
|
14769
15025
|
byType.set(o.resourceType, lookup);
|
|
14770
15026
|
}
|
|
14771
15027
|
return [lookup.then((writeOnlyNames) => {
|
|
14772
|
-
|
|
15028
|
+
if (writeOnlyNames === void 0) {
|
|
15029
|
+
writeOnlyUnknown.add(o);
|
|
15030
|
+
return;
|
|
15031
|
+
}
|
|
15032
|
+
const names = revertWriteOnlyResendNames(o.resourceType, record.properties, writeOnlyNames, o);
|
|
14773
15033
|
if (names.length > 0) writeOnlyResend.set(o, names);
|
|
14774
15034
|
})];
|
|
14775
15035
|
})));
|
|
14776
|
-
printRevertPlan(reports, out, lockRecovery, writeOnlyResend);
|
|
15036
|
+
printRevertPlan(reports, out, lockRecovery, writeOnlyResend, writeOnlyUnknown);
|
|
14777
15037
|
if (options.dryRun) {
|
|
14778
15038
|
logger.info("--dry-run: AWS will NOT be modified. Re-run without --dry-run to apply.");
|
|
14779
15039
|
return;
|
|
@@ -14818,7 +15078,7 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
|
|
|
14818
15078
|
const settledByRevert = /* @__PURE__ */ new Map();
|
|
14819
15079
|
try {
|
|
14820
15080
|
try {
|
|
14821
|
-
await writeAheadRevertAttestations(report, driftedOutcomes.map((o) => o.logicalId), stateBackend);
|
|
15081
|
+
await writeAheadRevertAttestations(report, driftedOutcomes.filter((o) => !writeOnlyUnknown.has(o)).map((o) => o.logicalId), stateBackend);
|
|
14822
15082
|
} catch (err) {
|
|
14823
15083
|
const refused = new CdkdError(`${report.stackName} (${report.region}): nothing reverted -- cdkd could not save state before sending secret values (${describeAwsFailure(err).detail}). Re-run once state writes succeed.`, "DRIFT_REVERT_WRITE_AHEAD_FAILED", err instanceof Error ? err : void 0);
|
|
14824
15084
|
logger.error(refused.message);
|
|
@@ -14839,7 +15099,8 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
|
|
|
14839
15099
|
reRecordedByLogicalId,
|
|
14840
15100
|
settledByRevert,
|
|
14841
15101
|
outcome,
|
|
14842
|
-
writeOnlyResend: writeOnlyResend.get(outcome) ?? []
|
|
15102
|
+
writeOnlyResend: writeOnlyResend.get(outcome) ?? [],
|
|
15103
|
+
writeOnlyLookupFailed: writeOnlyUnknown.has(outcome)
|
|
14843
15104
|
});
|
|
14844
15105
|
}));
|
|
14845
15106
|
await runWithConcurrency(tasks, concurrency);
|
|
@@ -15613,6 +15874,11 @@ async function deleteStateAndReceiver(frame, region) {
|
|
|
15613
15874
|
if (typeof state.signalReceiverStackId === "string") await deleteSignalReceiver((frame.destroyAwsClients ?? ctx.baseAwsClients).cloudFormation, state.signalReceiverStackId, logger);
|
|
15614
15875
|
await ctx.stateBackend.deleteState(stackName, region);
|
|
15615
15876
|
logger.debug("State deleted");
|
|
15877
|
+
const notes = await noEchoMacKeyRetireNotes(state, region, {
|
|
15878
|
+
list: () => ctx.stateBackend.listStacks(),
|
|
15879
|
+
read: async (name, stackRegion) => (await ctx.stateBackend.getState(name, stackRegion, { readOnly: true }))?.state
|
|
15880
|
+
}, (message) => logger.debug(message));
|
|
15881
|
+
for (const note of notes) logger.info(note);
|
|
15616
15882
|
return true;
|
|
15617
15883
|
}
|
|
15618
15884
|
|
|
@@ -15801,6 +16067,65 @@ function scheduleSupersededDeletes(state, executionLevels, retryLate) {
|
|
|
15801
16067
|
return slots;
|
|
15802
16068
|
}
|
|
15803
16069
|
|
|
16070
|
+
// src/cli/commands/destroy-runner/delete-dag.ts
|
|
16071
|
+
const DESTROY_DELETE_CONCURRENCY_FLOOR = 20;
|
|
16072
|
+
function destroyDeleteConcurrency(executionLevels) {
|
|
16073
|
+
let widest = 0;
|
|
16074
|
+
for (const level of executionLevels) widest = Math.max(widest, level.length);
|
|
16075
|
+
return Math.max(20, widest);
|
|
16076
|
+
}
|
|
16077
|
+
async function runDeletesInDependencyOrder(args) {
|
|
16078
|
+
const { dagBuilder, graph, executionLevels, supersededSlots } = args;
|
|
16079
|
+
const last = executionLevels.length;
|
|
16080
|
+
const executor = new DagExecutor();
|
|
16081
|
+
const resourcesByStep = [];
|
|
16082
|
+
executionLevels.forEach((level, index) => {
|
|
16083
|
+
resourcesByStep[last - 1 - index] = [...level];
|
|
16084
|
+
});
|
|
16085
|
+
const deps = /* @__PURE__ */ new Map();
|
|
16086
|
+
for (const level of executionLevels) for (const logicalId of level) deps.set(logicalId, new Set(dagBuilder.getDirectDependents(graph, logicalId)));
|
|
16087
|
+
let rowCount = 0;
|
|
16088
|
+
const rowId = () => {
|
|
16089
|
+
let id;
|
|
16090
|
+
do
|
|
16091
|
+
id = `\u0000superseded#${rowCount++}`;
|
|
16092
|
+
while (deps.has(id));
|
|
16093
|
+
return id;
|
|
16094
|
+
};
|
|
16095
|
+
const earlier = [];
|
|
16096
|
+
let previous;
|
|
16097
|
+
for (let step = 0; step < last; step++) {
|
|
16098
|
+
let first = true;
|
|
16099
|
+
for (const entry of supersededSlots[step] ?? []) {
|
|
16100
|
+
const id = rowId();
|
|
16101
|
+
executor.add({
|
|
16102
|
+
id,
|
|
16103
|
+
dependencies: new Set(first ? earlier : [previous]),
|
|
16104
|
+
state: "pending",
|
|
16105
|
+
data: {
|
|
16106
|
+
kind: "superseded",
|
|
16107
|
+
entry
|
|
16108
|
+
}
|
|
16109
|
+
});
|
|
16110
|
+
previous = id;
|
|
16111
|
+
first = false;
|
|
16112
|
+
}
|
|
16113
|
+
const level = resourcesByStep[step] ?? [];
|
|
16114
|
+
if (previous !== void 0) for (const logicalId of level) deps.get(logicalId).add(previous);
|
|
16115
|
+
earlier.push(...level);
|
|
16116
|
+
}
|
|
16117
|
+
for (const [logicalId, dependencies] of deps) executor.add({
|
|
16118
|
+
id: logicalId,
|
|
16119
|
+
dependencies,
|
|
16120
|
+
state: "pending",
|
|
16121
|
+
data: {
|
|
16122
|
+
kind: "resource",
|
|
16123
|
+
logicalId
|
|
16124
|
+
}
|
|
16125
|
+
});
|
|
16126
|
+
await executor.execute(destroyDeleteConcurrency(executionLevels), (node) => node.data.kind === "resource" ? args.deleteResource(node.data.logicalId) : args.deleteSupersededRow(node.data.entry), args.interrupted);
|
|
16127
|
+
}
|
|
16128
|
+
|
|
15804
16129
|
// src/cli/commands/destroy-runner/under-lock-steps.ts
|
|
15805
16130
|
async function recheckUnderLock({ ctx, stackName, state, regionForState, refusalRecovery, lock, restoreBaseRegionAndClients, needsStrongRefCheck }) {
|
|
15806
16131
|
try {
|
|
@@ -15931,6 +16256,7 @@ function buildDeleteGraph(state, logger) {
|
|
|
15931
16256
|
logger.debug(`Dependency graph: ${executionLevels.length} level(s)`);
|
|
15932
16257
|
return {
|
|
15933
16258
|
dagBuilder,
|
|
16259
|
+
graph,
|
|
15934
16260
|
blockingGraph,
|
|
15935
16261
|
executionLevels
|
|
15936
16262
|
};
|
|
@@ -16424,7 +16750,7 @@ async function destroyStackUnderLock({ stackName, state, ctx, logger, result, re
|
|
|
16424
16750
|
logger.warn(safeMsg`Failed to strip the deleted journal entries (a re-run repeats their deletes): ${describeAwsFailure(stripError).detail}`);
|
|
16425
16751
|
}
|
|
16426
16752
|
}
|
|
16427
|
-
const { dagBuilder, blockingGraph, executionLevels } = buildDeleteGraph(state, logger);
|
|
16753
|
+
const { dagBuilder, graph, blockingGraph, executionLevels } = buildDeleteGraph(state, logger);
|
|
16428
16754
|
const blockedBy = /* @__PURE__ */ new Map();
|
|
16429
16755
|
const blockedIds = [];
|
|
16430
16756
|
const blockDependenciesOf = (logicalId) => {
|
|
@@ -16538,23 +16864,19 @@ async function destroyStackUnderLock({ stackName, state, ctx, logger, result, re
|
|
|
16538
16864
|
if (await deleteSupersededRow(entry, true)) retryLate.add(entry);
|
|
16539
16865
|
}
|
|
16540
16866
|
const slots = scheduleSupersededDeletes(state, executionLevels, retryLate);
|
|
16541
|
-
const
|
|
16542
|
-
|
|
16543
|
-
|
|
16544
|
-
|
|
16545
|
-
|
|
16546
|
-
|
|
16547
|
-
|
|
16548
|
-
|
|
16549
|
-
|
|
16550
|
-
|
|
16551
|
-
|
|
16552
|
-
|
|
16553
|
-
|
|
16554
|
-
const deletePromises = level.map((logicalId) => withPrintingSecrets(printingBagOf(logicalId), () => deleteStackResource(resourceFrame, logicalId, stackRegion)));
|
|
16555
|
-
await Promise.all(deletePromises);
|
|
16556
|
-
}
|
|
16557
|
-
await deleteSupersededSlot(executionLevels.length);
|
|
16867
|
+
const stackRegion = state.region ?? ctx.baseRegion;
|
|
16868
|
+
await runDeletesInDependencyOrder({
|
|
16869
|
+
dagBuilder,
|
|
16870
|
+
graph,
|
|
16871
|
+
executionLevels,
|
|
16872
|
+
supersededSlots: slots,
|
|
16873
|
+
deleteResource: (logicalId) => withPrintingSecrets(printingBagOf(logicalId), () => deleteStackResource(resourceFrame, logicalId, stackRegion)),
|
|
16874
|
+
deleteSupersededRow: async (entry) => {
|
|
16875
|
+
if (!lock.interrupted) await deleteSupersededRow(entry);
|
|
16876
|
+
},
|
|
16877
|
+
interrupted: () => lock.interrupted
|
|
16878
|
+
});
|
|
16879
|
+
for (const entry of slots[executionLevels.length] ?? []) if (!lock.interrupted) await deleteSupersededRow(entry);
|
|
16558
16880
|
const unreadableSuperseded = Array.isArray(state.supersededResources) ? state.supersededResources.filter((row) => !isSupersededResourceRecord(row)).length : holdsSupersededResources(state) ? 1 : 0;
|
|
16559
16881
|
if (unreadableSuperseded > 0) {
|
|
16560
16882
|
result.skippedCount += unreadableSuperseded;
|
|
@@ -17140,7 +17462,7 @@ function refuseDestroyTargetsWithoutApp(targets, stateBackend, clients) {
|
|
|
17140
17462
|
async function callerAccountOf(clients) {
|
|
17141
17463
|
try {
|
|
17142
17464
|
const { GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
|
|
17143
|
-
return (await clients.sts.send(new GetCallerIdentityCommand({}))).Account;
|
|
17465
|
+
return (await withGuardReadRetry(() => clients.sts.send(new GetCallerIdentityCommand({})), "GetCallerIdentity")).Account;
|
|
17144
17466
|
} catch {
|
|
17145
17467
|
return;
|
|
17146
17468
|
}
|
|
@@ -17319,7 +17641,7 @@ async function destroyCommand(stackArgs, options) {
|
|
|
17319
17641
|
callerAccountUnreadable = true;
|
|
17320
17642
|
try {
|
|
17321
17643
|
const { GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
|
|
17322
|
-
callerAccount = (await awsClients.sts.send(new GetCallerIdentityCommand({}))).Account;
|
|
17644
|
+
callerAccount = (await withGuardReadRetry(() => awsClients.sts.send(new GetCallerIdentityCommand({})), "GetCallerIdentity")).Account;
|
|
17323
17645
|
callerAccountUnreadable = callerAccount === void 0;
|
|
17324
17646
|
} catch (err) {
|
|
17325
17647
|
logger.debug(safeMsg`Could not read the caller account: ${describeAwsFailure(err).detail}`);
|
|
@@ -38341,4 +38663,4 @@ function collectVerbFlags(program) {
|
|
|
38341
38663
|
}
|
|
38342
38664
|
|
|
38343
38665
|
export { effectiveIntelligentTieringItem as $, tagListsMatch as A, takeLifecycleWrite as B, securityGroupReadbackDelays as C, singleSecurityGroupRuleId as D, sharedIngressRuleDescriptions as E, LIFECYCLE_BASELINE_REREAD_DELAYS_MS as F, canonicalizeBlock as G, LIFECYCLE_FILTER_PATH as H, clearLifecycleWritesOf as I, lifecycleRuleScope as J, canonicalizeItemList as K, lifecycleSettleTarget as L, markCopiesAgreed as M, sgRemovalRuleKey as N, stackIngressRuleHolder as O, sgRuleListMember as P, effectiveAnalyticsItem as Q, recordLifecycleWrite as R, reconcileSgRules as S, sgRuleKey as T, LIFECYCLE_RULE_PATH as U, LIFECYCLE_DEFAULT_STATUS as V, LIFECYCLE_TAG_FILTERS_PATH as W, parseCfnTimestamp as X, lifecycleUsesFilterForm as Y, EVENTBRIDGE_CONFIG_PATH as Z, ingressRuleIdentity as _, refuseRevertRevokingSiblingRules as a, configItemId as at, isResendableSocketFailure as b, buildProgram, siblingIdOwnedSgRules as c, describeValue as ct, authorizeDefinitelyNotApplied as d, mergeLegacySingular as dt, effectiveInventoryItem as et, canonicalizeSgInlineRuleProtocols as f, shownLifecycleRuleId as ft, flattenIpPermissions as g, descriptionKey as h, resolveSecretDerivedPrincipals as i, coerceCfnNumber as it, withRecordedCidrSpelling as j, survivingRecordOfRuleId as k, SG_READBACK_RETRY_DELAY_MS as l, isPlainObject as lt, comparableIngressIdentity as m, holdsUnprovenSecretPrincipalToken as n, eventBridgeEnabledOf as nt, sgRuleDiffKey as o, declaresBucketObjectLock as ot, canonicalizeSgRuleProtocol as p, effectiveLifecycleConfiguration as q, isResolvableSecretPrincipalList as r, caughtErrorName as rt, readSgIngressById as s, declaresNestedObjectLock as st, runDestroyForStack as t, effectiveNotificationConfiguration as tt, SG_RULE_PAGE_SIZE$1 as u, manualBucketDeletionClause as ut, isConnectTimeout as v, securityGroupRuleMatchesCfnIngress as w, narrowIngressIpProtocol as x, isDefaultEgressRule as y, settleLifecycleRead as z };
|
|
38344
|
-
//# sourceMappingURL=program-
|
|
38666
|
+
//# sourceMappingURL=program-CQZs9Ljn.js.map
|