@cdkd/cli 0.373.5 → 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-D2ziUucm.js → ambient-client-defaults-Bz-RIOwy.js} +3 -3
- package/dist/{ambient-client-defaults-D2ziUucm.js.map → ambient-client-defaults-Bz-RIOwy.js.map} +1 -1
- package/dist/{asg-provider-DXerSmY8.js → asg-provider-CAUjmdq9.js} +31 -14
- package/dist/{asg-provider-DXerSmY8.js.map → asg-provider-CAUjmdq9.js.map} +1 -1
- package/dist/cli.js +3 -3
- package/dist/{custom-resource-runtime-Z0UesGu4.js → custom-resource-runtime-CWVAEO2K.js} +6 -6
- package/dist/{custom-resource-runtime-Z0UesGu4.js.map → custom-resource-runtime-CWVAEO2K.js.map} +1 -1
- package/dist/{db-associated-roles-BVE6a5hy.js → db-associated-roles-lNcEBB6O.js} +2 -2
- package/dist/{db-associated-roles-BVE6a5hy.js.map → db-associated-roles-lNcEBB6O.js.map} +1 -1
- package/dist/{delete-started-C-Fplb9I.js → delete-started-CJq_moaK.js} +4 -4
- package/dist/{delete-started-C-Fplb9I.js.map → delete-started-CJq_moaK.js.map} +1 -1
- package/dist/{deploy-engine-7gPM_z0r.js → deploy-engine-DQU_GZet.js} +11052 -994
- package/dist/deploy-engine-DQU_GZet.js.map +1 -0
- package/dist/{ec2-termination-protection-C3bNJVAK.js → ec2-termination-protection-CGDF52lA.js} +3 -3
- package/dist/{ec2-termination-protection-C3bNJVAK.js.map → ec2-termination-protection-CGDF52lA.js.map} +1 -1
- package/dist/{ecr-uri-Dy7a2hEI.js → ecr-uri-CJJjp-MO.js} +2 -2
- package/dist/{ecr-uri-Dy7a2hEI.js.map → ecr-uri-CJJjp-MO.js.map} +1 -1
- package/dist/{emr-cluster-provider-DpzQ2tXe.js → emr-cluster-provider-2hRUEW1E.js} +13 -11
- package/dist/emr-cluster-provider-2hRUEW1E.js.map +1 -0
- package/dist/{expected-bucket-owner-NU2Veqhr.js → expected-bucket-owner-DyFD7Dw5.js} +2 -2
- package/dist/{expected-bucket-owner-NU2Veqhr.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-BK7LqipH.js → iam-role-provider-c32ZQo8P.js} +12 -12
- package/dist/{iam-role-provider-BK7LqipH.js.map → iam-role-provider-c32ZQo8P.js.map} +1 -1
- package/dist/{identity-read-denied-BnZ-p9kt.js → identity-read-denied-DRjvF3oA.js} +4 -4
- package/dist/{identity-read-denied-BnZ-p9kt.js.map → identity-read-denied-DRjvF3oA.js.map} +1 -1
- package/dist/{image-plan-7isjcxk3.js → image-plan-Cmjgc6iE.js} +8 -8
- package/dist/{image-plan-7isjcxk3.js.map → image-plan-Cmjgc6iE.js.map} +1 -1
- package/dist/index.d.ts +21 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/{logger-CC9C99az.js → logger-BlKwgEgV.js} +3 -3
- package/dist/{logger-CC9C99az.js.map → logger-BlKwgEgV.js.map} +1 -1
- package/dist/{neptune-provider-CjjpqzLj.js → neptune-provider-BiLAHYo4.js} +12 -10
- package/dist/neptune-provider-BiLAHYo4.js.map +1 -0
- package/dist/{program-Ce2id6tt.js → program-CQZs9Ljn.js} +706 -344
- package/dist/program-CQZs9Ljn.js.map +1 -0
- package/dist/{provider-classes-BesMsi8i.js → provider-classes-CNMjjxoS.js} +614 -98
- package/dist/provider-classes-CNMjjxoS.js.map +1 -0
- package/dist/{rds-provider-j7YCssyt.js → rds-provider-By5mf53G.js} +13 -13
- package/dist/{rds-provider-j7YCssyt.js.map → rds-provider-By5mf53G.js.map} +1 -1
- package/dist/{read-replica-B3tUZd7q.js → read-replica-BIjj_bfE.js} +3 -3
- package/dist/{read-replica-B3tUZd7q.js.map → read-replica-BIjj_bfE.js.map} +1 -1
- package/dist/{redacted-delete-address-DAZayV8w.js → redacted-delete-address-DGufa4wz.js} +4 -4
- package/dist/{redacted-delete-address-DAZayV8w.js.map → redacted-delete-address-DGufa4wz.js.map} +1 -1
- package/dist/{replacement-rules-bf4K_Yka.js → replacement-rules-BQ-sbuiR.js} +3 -3
- package/dist/{replacement-rules-bf4K_Yka.js.map → replacement-rules-BQ-sbuiR.js.map} +1 -1
- package/dist/{resource-deadline-D6p4x_pl.js → resource-deadline-0dfvU7D5.js} +2112 -2058
- package/dist/resource-deadline-0dfvU7D5.js.map +1 -0
- package/dist/{restore-source-guard-DRxM4nEI.js → restore-source-guard-CWbzgUdy.js} +4 -4
- package/dist/{restore-source-guard-DRxM4nEI.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-B1pXbQh9.js → run-cli-DBXWGhyD.js} +2 -2
- package/dist/{run-cli-B1pXbQh9.js.map → run-cli-DBXWGhyD.js.map} +1 -1
- package/dist/{secret-reference-immutable-CGZO-iyw.js → secret-reference-immutable-CSgI6Td9.js} +10 -211
- package/dist/secret-reference-immutable-CSgI6Td9.js.map +1 -0
- package/dist/{settle-own-write-members-WuNz0klP.js → settle-own-write-members-DqlMjdQV.js} +10 -10
- package/dist/{settle-own-write-members-WuNz0klP.js.map → settle-own-write-members-DqlMjdQV.js.map} +1 -1
- package/dist/{tag-list-DiQb3Tm9.js → tag-list-B4IlIPvY.js} +4 -4
- package/dist/{tag-list-DiQb3Tm9.js.map → tag-list-B4IlIPvY.js.map} +1 -1
- package/dist/{update-removal-CBAhk3SI.js → update-removal-VyphayB2.js} +2 -2
- package/dist/{update-removal-CBAhk3SI.js.map → update-removal-VyphayB2.js.map} +1 -1
- package/dist/{version-CdLI5JxZ.js → version-fHMzKIi5.js} +2 -2
- package/dist/{version-CdLI5JxZ.js.map → version-fHMzKIi5.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-7gPM_z0r.js.map +0 -1
- package/dist/emr-cluster-provider-DpzQ2tXe.js.map +0 -1
- package/dist/neptune-provider-CjjpqzLj.js.map +0 -1
- package/dist/program-Ce2id6tt.js.map +0 -1
- package/dist/provider-classes-BesMsi8i.js.map +0 -1
- package/dist/resource-deadline-D6p4x_pl.js.map +0 -1
- package/dist/secret-reference-immutable-CGZO-iyw.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 { $i as
|
|
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, $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 attemptUsesCompletedCreate, 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 orphanNeedsIdentity, 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 segmentCleanupOptions, 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 nameScopeOf, 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 nameGenerationCarriedFrom, 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 IMPLICIT_DELETE_DEPENDENCIES, 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 withNameGenerationReached, 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 computeImplicitDeleteEdges, Rl as maskedPropertyFingerprintsOf, Rn as childTemplateLoader, Ro as efsPolicyMatchesDeclared, Rr as looselyEqual, Rs as resolveDynamicReferences, Ru as repairMalformedOutputsForReadOnly, S as warnLegacySpelling, Sa as maskingRetryLogger, 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 removeProtectionTypeList, 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 readsRegeneratingSecret, Vo as policyDocumentMatchesDeclared, Vr as propertiesChangedReason, Vs as applyRoleArnIfSet, Vu as malformedRenderedContainersWarning, Wa as canonicalizeIpProtocolValue, Wc as confirmOrRefuse, Wd as findLargeInlineResources, Wi as removeProtectionTypes, Wl as deployRefusesOrphanRowsReason, Wn as macWriteOnlyKeys, Wr as NOECHO_MAC_KEY_ALIAS, Ws as explicitRoleArnOrThrow, Wu as refuseMalformedResourcesForDeploy, Xa as createReadOnlyAttributeHealerFactory, Xc as gray, Xi as retiredNameGenerationsAfter, 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 retiredAfterRollback, 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 retiredNameGenerationsLeaving, Zl as refuseMalformedOrphanRecordsForDestroy, Zn as makeSiblingClaimReader, Zo as isCustomResource, Zr as stripSiblingOwnedParentMembers, Zs as envCredentialsAreAssumedRole, Zu as withheldAccountClause, _ as readRecordedConditionVerdicts, _a as collectPublishedOutputNames, _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 WITHHELD_NAME_DISPLAY, ai as replayFailedOperations, al as recordedReferenceRegions, ao as secretNamedRecordNeedles, ar as recordDisplacedSkips, as as customResourceResponseExpirationWarning, au as malformedResourceEntriesWarning, b as pendingMovesRefusalMessage, ba as DEFAULT_RESOURCE_TIMEOUT_MS, 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 secretBearing, 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 carriedExportAliasExposure, 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 inheritProducerRegions, 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 exportNameNoEchoParameters, 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 collectDeclaredOutputNames, 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 noEchoParameterValueSeed, 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 resourcesNamingDeclaredParameter, 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 secretBearingStateKeyWarning, 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 isWholeDynamicReferenceValue, 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 namesAnyDeclaredParameter, 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 displayTextOrWithheld, od as unwrittenCreateOnlyReplacement, of as rewriteTemplateAssetReferences, oi as replayRollback, ol as withoutVersionAttestation, oo as stackSecretNamesMasker, ou as malformedScrubResourceEntriesRefusalMessage, p as healZonelessDbInstanceRecords, pa as exportNameSecretExposure, 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 nameGenerationHighWaterOf, ql as malformedOrphanRecordsWarning, qn as formatResourceLine, qr as noEchoMacParametersOf, qs as sendableAssumeRoleCommand, qu as refuseMalformedState, r as isSecretBearingReferenceString, ra as reachableDivergentParameters, 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 exportAliasCollisionScrubWarning, 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 computeParameterTaint, 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 secretSafeKeyDisplay, 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 isExportAliasCollision, 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 DEFAULT_RESOURCE_WARN_AFTER_MS, 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 bindingSkippedOutputs, 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 typesDeletedBefore, zl as parameterInputsFor, zn as inRunStackKey, zo as lambdaPermissionMatchesDeclared, zr as mappingPairs, zs as producerLookupOver, zu as STATE_REGION_DIVERGED } from "./deploy-engine-7gPM_z0r.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-NU2Veqhr.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-C-Fplb9I.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-bf4K_Yka.js";
|
|
16
|
-
import { m as SURVIVOR_IDENTITY_ATTRIBUTES, u as differingIdentityWarning } from "./identity-read-denied-BnZ-p9kt.js";
|
|
17
|
-
import { S as unsettledPropertiesOf, T as withoutUnsettledProperties, b as unsettledItemsOf, w as withUnsettledProperties, y as unsettledItemsField } from "./restore-source-guard-DRxM4nEI.js";
|
|
18
|
-
import { n as isRedactedRecordedValue } from "./redacted-delete-address-DAZayV8w.js";
|
|
19
|
-
import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-Dy7a2hEI.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 [];
|
|
675
661
|
}
|
|
676
|
-
|
|
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)}`);
|
|
671
|
+
}
|
|
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
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
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;
|
|
701
|
+
}
|
|
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;
|
|
715
709
|
}
|
|
716
|
-
|
|
717
|
-
|
|
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);
|
|
@@ -1795,14 +1806,16 @@ var ConsumerCleanupHold = class ConsumerCleanupHold {
|
|
|
1795
1806
|
return release;
|
|
1796
1807
|
}
|
|
1797
1808
|
};
|
|
1798
|
-
async function runHeldProducerCleanup(hold, queue, producer, logger) {
|
|
1809
|
+
async function runHeldProducerCleanup(hold, queue, producer, logger, concurrency) {
|
|
1799
1810
|
const notDeployed = await hold.waitForConsumers(producer);
|
|
1800
1811
|
if (notDeployed.length > 0) {
|
|
1801
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`);
|
|
1802
|
-
queue.abandon("consumer-failed");
|
|
1803
1813
|
return {
|
|
1804
1814
|
updatePartial: 0,
|
|
1805
|
-
nestedUpdatePartial: 0
|
|
1815
|
+
nestedUpdatePartial: 0,
|
|
1816
|
+
updatedToPartial: 0,
|
|
1817
|
+
deleted: 0,
|
|
1818
|
+
deleteSkipped: queue.abandon("consumer-failed")
|
|
1806
1819
|
};
|
|
1807
1820
|
}
|
|
1808
1821
|
let interrupted = false;
|
|
@@ -1811,7 +1824,7 @@ async function runHeldProducerCleanup(hold, queue, producer, logger) {
|
|
|
1811
1824
|
};
|
|
1812
1825
|
process.on("SIGINT", onSigint);
|
|
1813
1826
|
try {
|
|
1814
|
-
return await queue.runAll({ interrupted: () => interrupted }, logger);
|
|
1827
|
+
return await queue.runAll({ interrupted: () => interrupted }, logger, concurrency);
|
|
1815
1828
|
} finally {
|
|
1816
1829
|
process.removeListener("SIGINT", onSigint);
|
|
1817
1830
|
}
|
|
@@ -1925,6 +1938,208 @@ function composeStateLoadedGates(crossPrefix, migration) {
|
|
|
1925
1938
|
};
|
|
1926
1939
|
}
|
|
1927
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
|
+
|
|
1928
2143
|
// src/state/stack-registry.ts
|
|
1929
2144
|
function unwrapReadError(error) {
|
|
1930
2145
|
return error instanceof CrossPrefixReadError ? error.cause : error;
|
|
@@ -3472,11 +3687,14 @@ async function deployStackInScope(ctx, stackInfo, stackRegion, stackAwsClients)
|
|
|
3472
3687
|
ctx.consumerHold?.settle(stackInfo, true);
|
|
3473
3688
|
let deployResult = deployed;
|
|
3474
3689
|
if (ctx.consumerHold !== void 0 && (consumerCleanupQueue?.size ?? 0) > 0) {
|
|
3475
|
-
const held = await runHeldProducerCleanup(ctx.consumerHold, consumerCleanupQueue, stackInfo, logger);
|
|
3690
|
+
const held = await runHeldProducerCleanup(ctx.consumerHold, consumerCleanupQueue, stackInfo, logger, options.concurrency);
|
|
3476
3691
|
deployResult = {
|
|
3477
3692
|
...deployed,
|
|
3693
|
+
updated: Math.max(0, deployed.updated - held.updatedToPartial),
|
|
3478
3694
|
updatePartial: deployed.updatePartial + held.updatePartial,
|
|
3479
|
-
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
|
|
3480
3698
|
};
|
|
3481
3699
|
}
|
|
3482
3700
|
logger.info(`\n${bold("Deployment Summary:")}`);
|
|
@@ -3902,6 +4120,15 @@ async function deployCommand(stacks, options) {
|
|
|
3902
4120
|
if (outputsFile !== void 0) writeStackOutputsFile(outputsFile, stackOutputs, { deployFailed: !workGraphCompleted });
|
|
3903
4121
|
}
|
|
3904
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
|
+
});
|
|
3905
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.`);
|
|
3906
4133
|
} finally {
|
|
3907
4134
|
runClock.lap("assets + stacks, summary");
|
|
@@ -6164,7 +6391,10 @@ async function buildDiffTree(args) {
|
|
|
6164
6391
|
unreadable,
|
|
6165
6392
|
unreadableContainers,
|
|
6166
6393
|
unreadableOrphans,
|
|
6167
|
-
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
|
+
})],
|
|
6168
6398
|
children: []
|
|
6169
6399
|
};
|
|
6170
6400
|
if (found && !isNestedChild && node.blocking.length === 0) node.refactorSides = hintSidesOf(changes.values(), effectiveTemplate, rollbackOrphanIds(state.orphans), stateAfterAdoption.resources);
|
|
@@ -6291,7 +6521,7 @@ async function buildDeletedSubtree(stackName, region, stateBackend, diffCalculat
|
|
|
6291
6521
|
unreadableContainers,
|
|
6292
6522
|
unreadableOrphans: [],
|
|
6293
6523
|
outputChanges,
|
|
6294
|
-
destructiveChanges: findDestructiveChanges(stackName, changes.values(), state.resources),
|
|
6524
|
+
destructiveChanges: [...findDestructiveChanges(stackName, changes.values(), state.resources), ...pendingOldCopyDeletes(stackName, state)],
|
|
6295
6525
|
children: []
|
|
6296
6526
|
};
|
|
6297
6527
|
for (const [logicalId, resource] of Object.entries(state.resources ?? {})) {
|
|
@@ -6307,7 +6537,7 @@ function stateDerivedNames(resources) {
|
|
|
6307
6537
|
// src/cli/commands/diff-recursive/tree.ts
|
|
6308
6538
|
function nodeHasChanges(node) {
|
|
6309
6539
|
for (const change of node.changes.values()) if (change.changeType !== "NO_CHANGE") return true;
|
|
6310
|
-
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);
|
|
6311
6541
|
}
|
|
6312
6542
|
function unreadableCount(node) {
|
|
6313
6543
|
return node.unreadable.length + node.unreadableContainers.length + node.unreadableOrphans.length;
|
|
@@ -6382,13 +6612,14 @@ function diffTreeToJson(node) {
|
|
|
6382
6612
|
unreadable: node.unreadable,
|
|
6383
6613
|
unreadableContainers: node.unreadableContainers,
|
|
6384
6614
|
unreadableOrphans: node.unreadableOrphans,
|
|
6385
|
-
destructiveChanges: node.destructiveChanges.map(({ logicalId, resourceType, constructPath, impact, movedTo, earlyDelete }) => ({
|
|
6615
|
+
destructiveChanges: node.destructiveChanges.map(({ logicalId, resourceType, constructPath, impact, movedTo, earlyDelete, oldCopy }) => ({
|
|
6386
6616
|
logicalId,
|
|
6387
6617
|
resourceType,
|
|
6388
6618
|
...constructPath !== void 0 && { constructPath },
|
|
6389
6619
|
impact,
|
|
6390
6620
|
...movedTo !== void 0 && { movedTo },
|
|
6391
|
-
...earlyDelete !== void 0 && { earlyDelete }
|
|
6621
|
+
...earlyDelete !== void 0 && { earlyDelete },
|
|
6622
|
+
...oldCopy === true && { oldCopy }
|
|
6392
6623
|
})),
|
|
6393
6624
|
children: node.children.map(diffTreeToJson)
|
|
6394
6625
|
};
|
|
@@ -6565,6 +6796,8 @@ function renderDiffTree(node, isRoot, logFn) {
|
|
|
6565
6796
|
logFn(`\n${formatChangeCounts(counts)}`);
|
|
6566
6797
|
if (outputs.add + outputs.change + outputs.remove > 0) logFn(`${outputs.add} output(s) to add, ${outputs.change} to change, ${outputs.remove} to remove`);
|
|
6567
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(", "));
|
|
6568
6801
|
const unreadableTotal = unreadableCount(node);
|
|
6569
6802
|
if (unreadableTotal > 0) {
|
|
6570
6803
|
const named = unreadableRowNames(node, UNREADABLE_PREVIEW_NAMES);
|
|
@@ -9321,7 +9554,12 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
|
|
|
9321
9554
|
return storedNoEchoInputsKnown(row.state, stored) && finishStored(row.state, void 0, stored) !== row.state;
|
|
9322
9555
|
});
|
|
9323
9556
|
const totalSecrets = outputSecrets.size + [...perResourceSecrets.values()].reduce((n, m) => n + m.size, 0) + [...orphanSecrets.values()].reduce((n, m) => n + m.size, 0);
|
|
9324
|
-
|
|
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()) {
|
|
9325
9563
|
emitAbandonedScanNotes();
|
|
9326
9564
|
return {
|
|
9327
9565
|
...await purgeExaminedHistory(loaded.migrationPending),
|
|
@@ -9405,7 +9643,7 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
|
|
|
9405
9643
|
shownStack
|
|
9406
9644
|
});
|
|
9407
9645
|
recordsChanged += changed;
|
|
9408
|
-
const positionedOutputs = outputSecrets.size > 0 ? redactForState(state.outputs, outputsSourceUntrusted ? {
|
|
9646
|
+
const positionedOutputs = outputSecrets.size > 0 || carriesSubFloorEvidence(outputSecrets) ? redactForState(state.outputs, outputsSourceUntrusted ? {
|
|
9409
9647
|
provenance: "value-scan",
|
|
9410
9648
|
secrets: outputSecrets
|
|
9411
9649
|
} : {
|
|
@@ -9536,7 +9774,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
9536
9774
|
const { logger } = opts;
|
|
9537
9775
|
const shownStack = displayStackName(stack.stackName);
|
|
9538
9776
|
const nestedInput = opts.nestedChild?.input;
|
|
9539
|
-
const inheritedSecrets = nestedInput &&
|
|
9777
|
+
const inheritedSecrets = nestedInput && carriesInheritedRedaction(nestedInput.inheritedSecrets) ? nestedInput.inheritedSecrets : void 0;
|
|
9540
9778
|
const newBag = () => {
|
|
9541
9779
|
const bag = /* @__PURE__ */ new Map();
|
|
9542
9780
|
if (inheritedSecrets) inheritNestedStackParameterAssociations(bag, inheritedSecrets);
|
|
@@ -11533,23 +11771,36 @@ async function lookUpWriteOnlyDriftPaths(resourceType) {
|
|
|
11533
11771
|
return;
|
|
11534
11772
|
}
|
|
11535
11773
|
}
|
|
11536
|
-
const DERIVED_ECHO_MEMBERS = {
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
|
|
11774
|
+
const DERIVED_ECHO_MEMBERS = {
|
|
11775
|
+
"AWS::AutoScaling::ScheduledAction": [{
|
|
11776
|
+
source: "Recurrence",
|
|
11777
|
+
echo: "StartTime",
|
|
11778
|
+
undeclaredOnly: true
|
|
11779
|
+
}],
|
|
11780
|
+
"AWS::SecretsManager::RotationSchedule": [{
|
|
11781
|
+
parent: "RotationRules",
|
|
11782
|
+
source: "ScheduleExpression",
|
|
11783
|
+
echo: "AutomaticallyAfterDays"
|
|
11784
|
+
}]
|
|
11785
|
+
};
|
|
11786
|
+
function stripDerivedEchoMembers(resourceType, bag, declared, options) {
|
|
11542
11787
|
const rules = DERIVED_ECHO_MEMBERS[resourceType];
|
|
11543
11788
|
if (!rules) return bag;
|
|
11544
11789
|
let out = bag;
|
|
11545
|
-
for (const { parent, source, echo } of rules) {
|
|
11546
|
-
|
|
11790
|
+
for (const { parent, source, echo, undeclaredOnly } of rules) {
|
|
11791
|
+
if (options?.undeclaredOnlyRules && !undeclaredOnly) continue;
|
|
11792
|
+
if (undeclaredOnly) {
|
|
11793
|
+
const declaredNode = parent === void 0 ? declared : declared?.[parent];
|
|
11794
|
+
if (typeof declaredNode !== "object" || declaredNode === null) continue;
|
|
11795
|
+
if (hasOwnKey(declaredNode, echo)) continue;
|
|
11796
|
+
}
|
|
11797
|
+
const node = parent === void 0 ? out : hasOwnKey(out, parent) ? out[parent] : void 0;
|
|
11547
11798
|
if (typeof node !== "object" || node === null || Array.isArray(node)) continue;
|
|
11548
11799
|
const members = node;
|
|
11549
11800
|
if (!hasOwnKey(members, echo) || !hasOwnKey(members, source)) continue;
|
|
11550
11801
|
if (members[source] === void 0 || members[source] === null) continue;
|
|
11551
11802
|
const { [echo]: _echo, ...rest } = members;
|
|
11552
|
-
out = {
|
|
11803
|
+
out = parent === void 0 ? rest : {
|
|
11553
11804
|
...out,
|
|
11554
11805
|
[parent]: rest
|
|
11555
11806
|
};
|
|
@@ -12176,6 +12427,162 @@ function removedGrantMembers(key, awsValue, stateValue) {
|
|
|
12176
12427
|
return out;
|
|
12177
12428
|
}
|
|
12178
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
|
+
|
|
12179
12586
|
// src/cli/commands/drift/report-json.ts
|
|
12180
12587
|
async function settleUnsettled(record, logicalId, providerOf) {
|
|
12181
12588
|
const names = unsettledPropertiesOf(record);
|
|
@@ -12183,7 +12590,10 @@ async function settleUnsettled(record, logicalId, providerOf) {
|
|
|
12183
12590
|
let kept = /* @__PURE__ */ new Set();
|
|
12184
12591
|
try {
|
|
12185
12592
|
const provider = providerOf();
|
|
12186
|
-
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
|
+
}
|
|
12187
12597
|
} catch {
|
|
12188
12598
|
kept = names;
|
|
12189
12599
|
}
|
|
@@ -12554,7 +12964,7 @@ function revertCommandLine(stackName, region) {
|
|
|
12554
12964
|
hole: "region"
|
|
12555
12965
|
}]).command} --revert`;
|
|
12556
12966
|
}
|
|
12557
|
-
function printRevertPlan(reports, out, recovery, writeOnlyResend) {
|
|
12967
|
+
function printRevertPlan(reports, out, recovery, writeOnlyResend, writeOnlyUnknown) {
|
|
12558
12968
|
for (const report of reports) {
|
|
12559
12969
|
const drifted = report.outcomes.flatMap((o) => matchOutcome(o, {
|
|
12560
12970
|
drifted: (d) => [d],
|
|
@@ -12571,6 +12981,10 @@ function printRevertPlan(reports, out, recovery, writeOnlyResend) {
|
|
|
12571
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`);
|
|
12572
12982
|
continue;
|
|
12573
12983
|
}
|
|
12984
|
+
if (writeOnlyUnknown?.has(o) === true) {
|
|
12985
|
+
out.write(` ! ${reportResource(o)}: ${writeOnlyLookupFailedReason(o.resourceType)}\n`);
|
|
12986
|
+
continue;
|
|
12987
|
+
}
|
|
12574
12988
|
const word = o.changes.length === 1 ? "property path" : "property paths";
|
|
12575
12989
|
out.write(` → provider.update on ${reportResource(o)}: revert ${o.changes.length} ${word}\n`);
|
|
12576
12990
|
for (const change of o.changes) out.write(reportPlanChangeLine(displayDriftPath(o, change.path), displayDriftValue(o, change.awsValue), displayDriftValue(o, change.stateValue)));
|
|
@@ -13276,8 +13690,8 @@ async function compareDriftReadback(args) {
|
|
|
13276
13690
|
} : siblingStripped;
|
|
13277
13691
|
const pairCanonicalized = provider.canonicalizeDriftPair ? await provider.canonicalizeDriftPair(resource.resourceType, canonicalized.baseline, canonicalized.aws, resource.properties ?? {}) : canonicalized;
|
|
13278
13692
|
const paired = {
|
|
13279
|
-
baseline: stripDerivedEchoMembers(resource.resourceType, pairCanonicalized.baseline),
|
|
13280
|
-
aws: stripDerivedEchoMembers(resource.resourceType, pairCanonicalized.aws)
|
|
13693
|
+
baseline: stripDerivedEchoMembers(resource.resourceType, pairCanonicalized.baseline, resource.properties ?? {}),
|
|
13694
|
+
aws: stripDerivedEchoMembers(resource.resourceType, pairCanonicalized.aws, resource.properties ?? {})
|
|
13281
13695
|
};
|
|
13282
13696
|
const nameBaseline = canonicalizeDerivedPatternBName(resource.resourceType, paired.baseline, paired.aws);
|
|
13283
13697
|
const absentDefaultBaseline = useObserved ? withAbsentDefaultKeys(nameBaseline, paired.aws, driftAbsentMeansDefaultKeys(provider, resource.resourceType, resource.properties)) : nameBaseline;
|
|
@@ -13705,156 +14119,6 @@ async function writeAheadRevertAttestations(report, logicalIds, stateBackend) {
|
|
|
13705
14119
|
report.migrationPending = false;
|
|
13706
14120
|
}
|
|
13707
14121
|
|
|
13708
|
-
// src/cli/commands/drift/revert-write-only.ts
|
|
13709
|
-
function revertWriteOnlyResendNames(resourceType, properties, writeOnlyNames) {
|
|
13710
|
-
if (!writeOnlyNames || writeOnlyNames.size === 0 || !isPlainRecord$3(properties)) return [];
|
|
13711
|
-
const unreadableCreateOnly = getTopLevelKeysHoldingUnreadableCreateOnly(resourceType, properties);
|
|
13712
|
-
const names = [];
|
|
13713
|
-
for (const name of writeOnlyNames) {
|
|
13714
|
-
if (!hasOwnKey(properties, name) || unreadableCreateOnly.has(name)) continue;
|
|
13715
|
-
const value = properties[name];
|
|
13716
|
-
if (value === void 0 || value === null) continue;
|
|
13717
|
-
if (holdsMaskLeaf(value) || carriesIntrinsicObject(value)) continue;
|
|
13718
|
-
names.push(name);
|
|
13719
|
-
}
|
|
13720
|
-
return names;
|
|
13721
|
-
}
|
|
13722
|
-
function withDeclaredWriteOnlyValues(send, resolvedProperties, names, paths) {
|
|
13723
|
-
const skipped = [];
|
|
13724
|
-
const wholesale = [];
|
|
13725
|
-
if (names.length === 0 || !isPlainRecord$3(resolvedProperties)) return {
|
|
13726
|
-
properties: send,
|
|
13727
|
-
skipped,
|
|
13728
|
-
wholesale
|
|
13729
|
-
};
|
|
13730
|
-
let out = send;
|
|
13731
|
-
for (const name of names) {
|
|
13732
|
-
if (!hasOwnKey(resolvedProperties, name)) continue;
|
|
13733
|
-
const declared = resolvedProperties[name];
|
|
13734
|
-
if (declared === void 0 || declared === null) continue;
|
|
13735
|
-
let next;
|
|
13736
|
-
if (!hasOwnKey(send, name)) next = declared;
|
|
13737
|
-
else {
|
|
13738
|
-
const own = paths.filter((p) => p[0] === name).map((p) => p.slice(1));
|
|
13739
|
-
let value = send[name];
|
|
13740
|
-
let matched = true;
|
|
13741
|
-
for (const rest of own) {
|
|
13742
|
-
const grafted = graftAt(value, declared, rest, own);
|
|
13743
|
-
if (!grafted.ok) matched = false;
|
|
13744
|
-
value = grafted.value;
|
|
13745
|
-
}
|
|
13746
|
-
if (matched) next = value;
|
|
13747
|
-
else {
|
|
13748
|
-
next = declared;
|
|
13749
|
-
wholesale.push(name);
|
|
13750
|
-
}
|
|
13751
|
-
}
|
|
13752
|
-
if (carriesDynamicReference(next) || holdsMaskLeaf(next)) {
|
|
13753
|
-
skipped.push(name);
|
|
13754
|
-
const at = wholesale.indexOf(name);
|
|
13755
|
-
if (at !== -1) wholesale.splice(at, 1);
|
|
13756
|
-
continue;
|
|
13757
|
-
}
|
|
13758
|
-
if (out === send) out = { ...send };
|
|
13759
|
-
defineOwnKey(out, name, next);
|
|
13760
|
-
}
|
|
13761
|
-
return {
|
|
13762
|
-
properties: out,
|
|
13763
|
-
skipped,
|
|
13764
|
-
wholesale
|
|
13765
|
-
};
|
|
13766
|
-
}
|
|
13767
|
-
function graftAt(send, declared, path, writeOnly) {
|
|
13768
|
-
if (path.length === 0 || send === void 0 || send === null) return {
|
|
13769
|
-
value: declared,
|
|
13770
|
-
ok: true
|
|
13771
|
-
};
|
|
13772
|
-
const [segment, ...rest] = path;
|
|
13773
|
-
const below = writeOnly.filter((p) => p[0] === segment).map((p) => p.slice(1));
|
|
13774
|
-
if (segment === "*") {
|
|
13775
|
-
if (!Array.isArray(declared)) return {
|
|
13776
|
-
value: send,
|
|
13777
|
-
ok: true
|
|
13778
|
-
};
|
|
13779
|
-
if (!Array.isArray(send)) return {
|
|
13780
|
-
value: send,
|
|
13781
|
-
ok: false
|
|
13782
|
-
};
|
|
13783
|
-
const partners = pairListItems(send, declared, below);
|
|
13784
|
-
if (!partners) return {
|
|
13785
|
-
value: send,
|
|
13786
|
-
ok: false
|
|
13787
|
-
};
|
|
13788
|
-
let ok = true;
|
|
13789
|
-
return {
|
|
13790
|
-
value: send.map((element, index) => {
|
|
13791
|
-
const grafted = graftAt(element, partners[index], rest, below);
|
|
13792
|
-
if (!grafted.ok) ok = false;
|
|
13793
|
-
return grafted.value;
|
|
13794
|
-
}),
|
|
13795
|
-
ok
|
|
13796
|
-
};
|
|
13797
|
-
}
|
|
13798
|
-
if (!isPlainRecord$3(declared) || !hasOwnKey(declared, segment)) return {
|
|
13799
|
-
value: send,
|
|
13800
|
-
ok: true
|
|
13801
|
-
};
|
|
13802
|
-
if (!isPlainRecord$3(send)) return {
|
|
13803
|
-
value: send,
|
|
13804
|
-
ok: false
|
|
13805
|
-
};
|
|
13806
|
-
const base = { ...send };
|
|
13807
|
-
const grafted = graftAt(hasOwnKey(base, segment) ? base[segment] : void 0, declared[segment], rest, below);
|
|
13808
|
-
defineOwnKey(base, segment, grafted.value);
|
|
13809
|
-
return {
|
|
13810
|
-
value: base,
|
|
13811
|
-
ok: grafted.ok
|
|
13812
|
-
};
|
|
13813
|
-
}
|
|
13814
|
-
function pairListItems(send, declared, writeOnly) {
|
|
13815
|
-
if (send.length !== declared.length) return void 0;
|
|
13816
|
-
const templates = declared.map((item) => withoutPaths(item, writeOnly));
|
|
13817
|
-
const partners = [];
|
|
13818
|
-
const used = /* @__PURE__ */ new Set();
|
|
13819
|
-
for (const item of send) {
|
|
13820
|
-
const candidates = templates.map((t, index) => covers(t, item) ? index : -1).filter((index) => index !== -1);
|
|
13821
|
-
if (candidates.length !== 1 || used.has(candidates[0])) return void 0;
|
|
13822
|
-
used.add(candidates[0]);
|
|
13823
|
-
partners.push(declared[candidates[0]]);
|
|
13824
|
-
}
|
|
13825
|
-
return partners;
|
|
13826
|
-
}
|
|
13827
|
-
function withoutPaths(value, paths) {
|
|
13828
|
-
if (paths.length === 0) return value;
|
|
13829
|
-
if (Array.isArray(value)) {
|
|
13830
|
-
const inner = paths.filter((p) => p[0] === "*").map((p) => p.slice(1));
|
|
13831
|
-
return value.map((item) => withoutPaths(item, inner));
|
|
13832
|
-
}
|
|
13833
|
-
if (!isPlainRecord$3(value)) return value;
|
|
13834
|
-
const out = {};
|
|
13835
|
-
for (const [key, child] of Object.entries(value)) {
|
|
13836
|
-
const inner = paths.filter((p) => p[0] === key).map((p) => p.slice(1));
|
|
13837
|
-
if (inner.some((p) => p.length === 0)) continue;
|
|
13838
|
-
defineOwnKey(out, key, withoutPaths(child, inner));
|
|
13839
|
-
}
|
|
13840
|
-
return out;
|
|
13841
|
-
}
|
|
13842
|
-
function covers(template, actual) {
|
|
13843
|
-
if (isPlainRecord$3(template)) {
|
|
13844
|
-
if (!isPlainRecord$3(actual)) return false;
|
|
13845
|
-
return Object.entries(template).every(([key, child]) => hasOwnKey(actual, key) && covers(child, actual[key]));
|
|
13846
|
-
}
|
|
13847
|
-
if (Array.isArray(template)) return Array.isArray(actual) && template.length === actual.length && template.every((child, index) => covers(child, actual[index]));
|
|
13848
|
-
return deepEqualUnordered(template, actual);
|
|
13849
|
-
}
|
|
13850
|
-
function carriesIntrinsicObject(value) {
|
|
13851
|
-
if (Array.isArray(value)) return value.some(carriesIntrinsicObject);
|
|
13852
|
-
if (value === null || typeof value !== "object") return false;
|
|
13853
|
-
const keys = Object.keys(value);
|
|
13854
|
-
if (keys.length === 1 && (keys[0] === "Ref" || keys[0].startsWith("Fn::"))) return true;
|
|
13855
|
-
return Object.values(value).some(carriesIntrinsicObject);
|
|
13856
|
-
}
|
|
13857
|
-
|
|
13858
14122
|
// src/provisioning/providers/ec2/sg-support.ts
|
|
13859
14123
|
const SG_INGRESS_IP_PROTOCOL_DEFAULT = "-1";
|
|
13860
14124
|
const SG_INGRESS_IP_PROTOCOL_PATH = "AWS::EC2::SecurityGroupIngress IpProtocol";
|
|
@@ -14005,6 +14269,22 @@ function stackIngressRuleHolder(records, selfLogicalId, groupId, rule, idCheck)
|
|
|
14005
14269
|
}
|
|
14006
14270
|
}
|
|
14007
14271
|
}
|
|
14272
|
+
function sharedIngressRuleDescriptions(records, groupId, rule, ruleId) {
|
|
14273
|
+
const wanted = comparableIngressIdentity(groupId, rule);
|
|
14274
|
+
const descriptions = [];
|
|
14275
|
+
for (const [, record] of records) {
|
|
14276
|
+
const props = record.properties;
|
|
14277
|
+
if (record.resourceType === "AWS::EC2::SecurityGroupIngress") {
|
|
14278
|
+
const sameId = recordedSgRuleId(record.attributes) === ruleId;
|
|
14279
|
+
const sameIdentity = wanted !== void 0 && isPlainRecord$2(props) && comparableIngressIdentity(props["GroupId"], props) === wanted;
|
|
14280
|
+
if (!sameId && !sameIdentity) continue;
|
|
14281
|
+
if (!sameId || !isPlainRecord$2(props) || props["GroupId"] !== groupId) return void 0;
|
|
14282
|
+
if (isRedactedRecordedValue(props["Description"])) return void 0;
|
|
14283
|
+
descriptions.push(props["Description"]);
|
|
14284
|
+
} else if (record.resourceType === "AWS::EC2::SecurityGroup" && stackIngressRuleHolder([["", record]], "self", groupId, rule) !== void 0) return;
|
|
14285
|
+
}
|
|
14286
|
+
return descriptions;
|
|
14287
|
+
}
|
|
14008
14288
|
function tagListsMatch(live, declared) {
|
|
14009
14289
|
const pairs = (list) => list.every((entry) => isPlainRecord$2(entry) && typeof entry["Key"] === "string") ? list.map((entry) => {
|
|
14010
14290
|
const tag = entry;
|
|
@@ -14590,6 +14870,11 @@ async function revertDriftedOutcome(args) {
|
|
|
14590
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."}`);
|
|
14591
14871
|
return;
|
|
14592
14872
|
}
|
|
14873
|
+
if (args.writeOnlyLookupFailed) {
|
|
14874
|
+
tally.totalUnresolvable++;
|
|
14875
|
+
logger.warn(safeMsg` ! ${report.stackName}/${outcome.logicalId} (${outcome.resourceType}): ${writeOnlyLookupFailedReason(outcome.resourceType)}`);
|
|
14876
|
+
return;
|
|
14877
|
+
}
|
|
14593
14878
|
const provider = scope.registry.getProviderFor({
|
|
14594
14879
|
resourceType: outcome.resourceType,
|
|
14595
14880
|
provisionedBy: stateResource.provisionedBy
|
|
@@ -14649,12 +14934,12 @@ async function revertDriftedOutcome(args) {
|
|
|
14649
14934
|
desiredProperties = noBoundary.desired;
|
|
14650
14935
|
desiredProperties = siblingOwnedRevertDesired(outcome.resourceType, stateResource.physicalId, desiredProperties, outcome.awsProperties, stateResource.properties, siblingContext);
|
|
14651
14936
|
if (provider.canonicalizeDriftPair) desiredProperties = (await provider.canonicalizeDriftPair(outcome.resourceType, desiredProperties, outcome.awsProperties, stateResource.properties ?? {})).baseline;
|
|
14652
|
-
desiredProperties = stripDerivedEchoMembers(outcome.resourceType, desiredProperties);
|
|
14653
|
-
const overlaid = buildRevertNewProperties(outcome.changes, desiredProperties, outcome.awsProperties, stateResource.observedProperties === void 0 ? {
|
|
14937
|
+
desiredProperties = stripDerivedEchoMembers(outcome.resourceType, desiredProperties, stateResource.properties ?? {});
|
|
14938
|
+
const overlaid = stripDerivedEchoMembers(outcome.resourceType, buildRevertNewProperties(outcome.changes, desiredProperties, outcome.awsProperties, stateResource.observedProperties === void 0 ? {
|
|
14654
14939
|
preserveUntemplated: true,
|
|
14655
14940
|
verbatimKeys: verbatimEchoDriftKeys(outcome.resourceType),
|
|
14656
14941
|
absentMeansDefault: noBoundary.absent
|
|
14657
|
-
} : { absentMeansDefault: [...driftAbsentMeansDefaultKeys(provider, outcome.resourceType, stateResource.properties), ...noBoundary.absent] });
|
|
14942
|
+
} : { absentMeansDefault: [...driftAbsentMeansDefaultKeys(provider, outcome.resourceType, stateResource.properties), ...noBoundary.absent] }), stateResource.properties ?? {}, { undeclaredOnlyRules: true });
|
|
14658
14943
|
const certifiedOverlay = overlayLiveAtUncertifiedPaths(overlaid, [...outcome.uncertifiedPaths, ...outcome.noEchoParameterPaths ?? []], outcome.awsProperties, desiredProperties, secrets, new Set(outcome.changes.map((change) => change.path.split(".", 1)[0] ?? "")), spelledKeysOf(stateResource.properties ?? {}));
|
|
14659
14944
|
const tokenPreserved = unresolvedTokens.size > 0 ? preserveLiveValuesAtUnresolvedTokens(certifiedOverlay, outcome.awsProperties, unresolvedTokens, secrets) : certifiedOverlay;
|
|
14660
14945
|
const maskPreserved = preserveLiveValuesAtMaskedLeaves(tokenPreserved, outcome.awsProperties, secrets, certifiedOverlay, spelledKeysOf(stateResource.properties ?? {}));
|
|
@@ -14707,6 +14992,7 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
|
|
|
14707
14992
|
statePrefix: stateConfig.prefix
|
|
14708
14993
|
};
|
|
14709
14994
|
const writeOnlyResend = /* @__PURE__ */ new Map();
|
|
14995
|
+
const writeOnlyUnknown = /* @__PURE__ */ new Set();
|
|
14710
14996
|
const writeOnlyLookups = /* @__PURE__ */ new Map();
|
|
14711
14997
|
await Promise.all(reports.flatMap((report) => report.outcomes.flatMap((o) => {
|
|
14712
14998
|
if (o.kind !== "drifted") return [];
|
|
@@ -14725,15 +15011,29 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
|
|
|
14725
15011
|
}
|
|
14726
15012
|
let lookup = byType.get(o.resourceType);
|
|
14727
15013
|
if (!lookup) {
|
|
14728
|
-
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
|
+
});
|
|
14729
15025
|
byType.set(o.resourceType, lookup);
|
|
14730
15026
|
}
|
|
14731
15027
|
return [lookup.then((writeOnlyNames) => {
|
|
14732
|
-
|
|
15028
|
+
if (writeOnlyNames === void 0) {
|
|
15029
|
+
writeOnlyUnknown.add(o);
|
|
15030
|
+
return;
|
|
15031
|
+
}
|
|
15032
|
+
const names = revertWriteOnlyResendNames(o.resourceType, record.properties, writeOnlyNames, o);
|
|
14733
15033
|
if (names.length > 0) writeOnlyResend.set(o, names);
|
|
14734
15034
|
})];
|
|
14735
15035
|
})));
|
|
14736
|
-
printRevertPlan(reports, out, lockRecovery, writeOnlyResend);
|
|
15036
|
+
printRevertPlan(reports, out, lockRecovery, writeOnlyResend, writeOnlyUnknown);
|
|
14737
15037
|
if (options.dryRun) {
|
|
14738
15038
|
logger.info("--dry-run: AWS will NOT be modified. Re-run without --dry-run to apply.");
|
|
14739
15039
|
return;
|
|
@@ -14778,7 +15078,7 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
|
|
|
14778
15078
|
const settledByRevert = /* @__PURE__ */ new Map();
|
|
14779
15079
|
try {
|
|
14780
15080
|
try {
|
|
14781
|
-
await writeAheadRevertAttestations(report, driftedOutcomes.map((o) => o.logicalId), stateBackend);
|
|
15081
|
+
await writeAheadRevertAttestations(report, driftedOutcomes.filter((o) => !writeOnlyUnknown.has(o)).map((o) => o.logicalId), stateBackend);
|
|
14782
15082
|
} catch (err) {
|
|
14783
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);
|
|
14784
15084
|
logger.error(refused.message);
|
|
@@ -14799,7 +15099,8 @@ async function runRevert(reports, regionScope, stateBackend, stateConfig, awsCli
|
|
|
14799
15099
|
reRecordedByLogicalId,
|
|
14800
15100
|
settledByRevert,
|
|
14801
15101
|
outcome,
|
|
14802
|
-
writeOnlyResend: writeOnlyResend.get(outcome) ?? []
|
|
15102
|
+
writeOnlyResend: writeOnlyResend.get(outcome) ?? [],
|
|
15103
|
+
writeOnlyLookupFailed: writeOnlyUnknown.has(outcome)
|
|
14803
15104
|
});
|
|
14804
15105
|
}));
|
|
14805
15106
|
await runWithConcurrency(tasks, concurrency);
|
|
@@ -15573,6 +15874,11 @@ async function deleteStateAndReceiver(frame, region) {
|
|
|
15573
15874
|
if (typeof state.signalReceiverStackId === "string") await deleteSignalReceiver((frame.destroyAwsClients ?? ctx.baseAwsClients).cloudFormation, state.signalReceiverStackId, logger);
|
|
15574
15875
|
await ctx.stateBackend.deleteState(stackName, region);
|
|
15575
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);
|
|
15576
15882
|
return true;
|
|
15577
15883
|
}
|
|
15578
15884
|
|
|
@@ -15761,6 +16067,65 @@ function scheduleSupersededDeletes(state, executionLevels, retryLate) {
|
|
|
15761
16067
|
return slots;
|
|
15762
16068
|
}
|
|
15763
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
|
+
|
|
15764
16129
|
// src/cli/commands/destroy-runner/under-lock-steps.ts
|
|
15765
16130
|
async function recheckUnderLock({ ctx, stackName, state, regionForState, refusalRecovery, lock, restoreBaseRegionAndClients, needsStrongRefCheck }) {
|
|
15766
16131
|
try {
|
|
@@ -15891,6 +16256,7 @@ function buildDeleteGraph(state, logger) {
|
|
|
15891
16256
|
logger.debug(`Dependency graph: ${executionLevels.length} level(s)`);
|
|
15892
16257
|
return {
|
|
15893
16258
|
dagBuilder,
|
|
16259
|
+
graph,
|
|
15894
16260
|
blockingGraph,
|
|
15895
16261
|
executionLevels
|
|
15896
16262
|
};
|
|
@@ -16129,10 +16495,10 @@ async function deleteStackResource({ lock, state, ctx, stackName, logger, result
|
|
|
16129
16495
|
warnAfterMs,
|
|
16130
16496
|
timeoutMs,
|
|
16131
16497
|
onWarn: (elapsedMs) => {
|
|
16132
|
-
const
|
|
16133
|
-
renderer.updateTaskLabel(logicalId, `${baseLabel} [taking longer than expected, ${
|
|
16498
|
+
const elapsed = formatWarnElapsed(elapsedMs);
|
|
16499
|
+
renderer.updateTaskLabel(logicalId, `${baseLabel} [taking longer than expected, ${elapsed}+]`);
|
|
16134
16500
|
renderer.printAbove(() => {
|
|
16135
|
-
logger.warn(`${displaySafe(logicalId)} (${displaySafe(resource.resourceType)}) has been deleting for ${
|
|
16501
|
+
logger.warn(`${displaySafe(logicalId)} (${displaySafe(resource.resourceType)}) has been deleting for ${elapsed} — still waiting`);
|
|
16136
16502
|
});
|
|
16137
16503
|
},
|
|
16138
16504
|
onTimeout: (elapsedMs) => new ResourceTimeoutError(logicalId, resource.resourceType, stackRegion, elapsedMs, "DELETE", timeoutMs)
|
|
@@ -16384,7 +16750,7 @@ async function destroyStackUnderLock({ stackName, state, ctx, logger, result, re
|
|
|
16384
16750
|
logger.warn(safeMsg`Failed to strip the deleted journal entries (a re-run repeats their deletes): ${describeAwsFailure(stripError).detail}`);
|
|
16385
16751
|
}
|
|
16386
16752
|
}
|
|
16387
|
-
const { dagBuilder, blockingGraph, executionLevels } = buildDeleteGraph(state, logger);
|
|
16753
|
+
const { dagBuilder, graph, blockingGraph, executionLevels } = buildDeleteGraph(state, logger);
|
|
16388
16754
|
const blockedBy = /* @__PURE__ */ new Map();
|
|
16389
16755
|
const blockedIds = [];
|
|
16390
16756
|
const blockDependenciesOf = (logicalId) => {
|
|
@@ -16498,23 +16864,19 @@ async function destroyStackUnderLock({ stackName, state, ctx, logger, result, re
|
|
|
16498
16864
|
if (await deleteSupersededRow(entry, true)) retryLate.add(entry);
|
|
16499
16865
|
}
|
|
16500
16866
|
const slots = scheduleSupersededDeletes(state, executionLevels, retryLate);
|
|
16501
|
-
const
|
|
16502
|
-
|
|
16503
|
-
|
|
16504
|
-
|
|
16505
|
-
|
|
16506
|
-
|
|
16507
|
-
|
|
16508
|
-
|
|
16509
|
-
|
|
16510
|
-
|
|
16511
|
-
|
|
16512
|
-
|
|
16513
|
-
|
|
16514
|
-
const deletePromises = level.map((logicalId) => withPrintingSecrets(printingBagOf(logicalId), () => deleteStackResource(resourceFrame, logicalId, stackRegion)));
|
|
16515
|
-
await Promise.all(deletePromises);
|
|
16516
|
-
}
|
|
16517
|
-
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);
|
|
16518
16880
|
const unreadableSuperseded = Array.isArray(state.supersededResources) ? state.supersededResources.filter((row) => !isSupersededResourceRecord(row)).length : holdsSupersededResources(state) ? 1 : 0;
|
|
16519
16881
|
if (unreadableSuperseded > 0) {
|
|
16520
16882
|
result.skippedCount += unreadableSuperseded;
|
|
@@ -17100,7 +17462,7 @@ function refuseDestroyTargetsWithoutApp(targets, stateBackend, clients) {
|
|
|
17100
17462
|
async function callerAccountOf(clients) {
|
|
17101
17463
|
try {
|
|
17102
17464
|
const { GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
|
|
17103
|
-
return (await clients.sts.send(new GetCallerIdentityCommand({}))).Account;
|
|
17465
|
+
return (await withGuardReadRetry(() => clients.sts.send(new GetCallerIdentityCommand({})), "GetCallerIdentity")).Account;
|
|
17104
17466
|
} catch {
|
|
17105
17467
|
return;
|
|
17106
17468
|
}
|
|
@@ -17279,7 +17641,7 @@ async function destroyCommand(stackArgs, options) {
|
|
|
17279
17641
|
callerAccountUnreadable = true;
|
|
17280
17642
|
try {
|
|
17281
17643
|
const { GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
|
|
17282
|
-
callerAccount = (await awsClients.sts.send(new GetCallerIdentityCommand({}))).Account;
|
|
17644
|
+
callerAccount = (await withGuardReadRetry(() => awsClients.sts.send(new GetCallerIdentityCommand({})), "GetCallerIdentity")).Account;
|
|
17283
17645
|
callerAccountUnreadable = callerAccount === void 0;
|
|
17284
17646
|
} catch (err) {
|
|
17285
17647
|
logger.debug(safeMsg`Could not read the caller account: ${describeAwsFailure(err).detail}`);
|
|
@@ -38300,5 +38662,5 @@ function collectVerbFlags(program) {
|
|
|
38300
38662
|
return map;
|
|
38301
38663
|
}
|
|
38302
38664
|
|
|
38303
|
-
export {
|
|
38304
|
-
//# sourceMappingURL=program-
|
|
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 };
|
|
38666
|
+
//# sourceMappingURL=program-CQZs9Ljn.js.map
|