@cdkd/cli 0.358.6 → 0.359.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-XFcZ_IMI.js → ambient-client-defaults-BNqC0q-Z.js} +3 -3
- package/dist/{ambient-client-defaults-XFcZ_IMI.js.map → ambient-client-defaults-BNqC0q-Z.js.map} +1 -1
- package/dist/{asg-provider-BP8oMti2.js → asg-provider-BDCUGWZV.js} +6 -6
- package/dist/{asg-provider-BP8oMti2.js.map → asg-provider-BDCUGWZV.js.map} +1 -1
- package/dist/cli.js +3 -3
- package/dist/{custom-resource-runtime-QfoyaxPW.js → custom-resource-runtime-DMkX_oQo.js} +6 -6
- package/dist/{custom-resource-runtime-QfoyaxPW.js.map → custom-resource-runtime-DMkX_oQo.js.map} +1 -1
- package/dist/{db-associated-roles-5I6qQ0C6.js → db-associated-roles-Bx5ML-MI.js} +2 -2
- package/dist/{db-associated-roles-5I6qQ0C6.js.map → db-associated-roles-Bx5ML-MI.js.map} +1 -1
- package/dist/{delete-started-B3fWZ4t9.js → delete-started-V5NHQ1O-.js} +4 -4
- package/dist/{delete-started-B3fWZ4t9.js.map → delete-started-V5NHQ1O-.js.map} +1 -1
- package/dist/{deploy-engine-DwpkRhxS.js → deploy-engine-BjSv27_M.js} +2111 -906
- package/dist/deploy-engine-BjSv27_M.js.map +1 -0
- package/dist/{ec2-termination-protection-CEAH5-4N.js → ec2-termination-protection-hc3MeuqF.js} +11 -7
- package/dist/ec2-termination-protection-hc3MeuqF.js.map +1 -0
- package/dist/{ecr-uri-CsP8Bfa_.js → ecr-uri-D1ijxg7D.js} +2 -2
- package/dist/{ecr-uri-CsP8Bfa_.js.map → ecr-uri-D1ijxg7D.js.map} +1 -1
- package/dist/{expected-bucket-owner-Lk8hXI9d.js → expected-bucket-owner-CQimj8gv.js} +2 -2
- package/dist/{expected-bucket-owner-Lk8hXI9d.js.map → expected-bucket-owner-CQimj8gv.js.map} +1 -1
- package/dist/{iam-role-provider-B6iCxpQV.js → iam-role-provider-b46RdZD5.js} +117 -68
- package/dist/iam-role-provider-b46RdZD5.js.map +1 -0
- package/dist/{image-plan-D-54O-Nq.js → image-plan-DtFbiJj5.js} +8 -8
- package/dist/{image-plan-D-54O-Nq.js.map → image-plan-DtFbiJj5.js.map} +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/{logger-jcgg96uu.js → logger-CqKPJ_tV.js} +2 -2
- package/dist/{logger-jcgg96uu.js.map → logger-CqKPJ_tV.js.map} +1 -1
- package/dist/{neptune-provider-CpoLlf2R.js → neptune-provider-DiyWADaS.js} +7 -7
- package/dist/{neptune-provider-CpoLlf2R.js.map → neptune-provider-DiyWADaS.js.map} +1 -1
- package/dist/{program-DDysnPS0.js → program-Cdwgr3Yv.js} +882 -391
- package/dist/program-Cdwgr3Yv.js.map +1 -0
- package/dist/{provider-classes-CwIe3PGY.js → provider-classes-DhmwW7hI.js} +938 -514
- package/dist/provider-classes-DhmwW7hI.js.map +1 -0
- package/dist/{rds-provider-DJtzCaTQ.js → rds-provider-DpOZv_UG.js} +10 -10
- package/dist/{rds-provider-DJtzCaTQ.js.map → rds-provider-DpOZv_UG.js.map} +1 -1
- package/dist/{read-replica-eSaw4q1p.js → read-replica-Ct0oakPU.js} +3 -3
- package/dist/{read-replica-eSaw4q1p.js.map → read-replica-Ct0oakPU.js.map} +1 -1
- package/dist/{replacement-rules-DOyuWYSl.js → replacement-rules-CMnMy7rf.js} +3 -3
- package/dist/{replacement-rules-DOyuWYSl.js.map → replacement-rules-CMnMy7rf.js.map} +1 -1
- package/dist/{resource-deadline-Cd5Jfimc.js → resource-deadline-DlZTHrBj.js} +123 -122
- package/dist/resource-deadline-DlZTHrBj.js.map +1 -0
- package/dist/{restore-source-guard-YKb1WUF2.js → restore-source-guard-DIs6rqZm.js} +4 -4
- package/dist/{restore-source-guard-YKb1WUF2.js.map → restore-source-guard-DIs6rqZm.js.map} +1 -1
- package/dist/{run-cli-CyokhRcp.js → run-cli-BLZnjA32.js} +2 -2
- package/dist/{run-cli-CyokhRcp.js.map → run-cli-BLZnjA32.js.map} +1 -1
- package/dist/{diff-calculator-Drt5nkqk.js → settle-own-write-members-C1uPhq2z.js} +161 -16
- package/dist/settle-own-write-members-C1uPhq2z.js.map +1 -0
- package/dist/{version-DKW7jD3V.js → version-DyE_oClc.js} +2 -2
- package/dist/{version-DKW7jD3V.js.map → version-DyE_oClc.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-DwpkRhxS.js.map +0 -1
- package/dist/diff-calculator-Drt5nkqk.js.map +0 -1
- package/dist/ec2-termination-protection-CEAH5-4N.js.map +0 -1
- package/dist/iam-role-provider-B6iCxpQV.js.map +0 -1
- package/dist/program-DDysnPS0.js.map +0 -1
- package/dist/provider-classes-CwIe3PGY.js.map +0 -1
- package/dist/resource-deadline-Cd5Jfimc.js.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, E as cutMarker, F as stringifyJsonPayload, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, b as setPasteableVerbFlags, c as deployReplaceCommand, d as pasteableCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE, x as SAFE_MSG_ALTERED_CHAR, y as setPasteableRunFlags } from "./version-
|
|
2
|
-
import { $ as renderStacksNoLongerSelected, $t as deployOptions, A as followContainerLogs, At as namedEnvAwsRegion, B as resolveRuntimeCodeMountPath, Bt as regionNeedsReconciliation, C as waitForRieReady, Cn as STATE_FILE_SUFFIX, Ct as resolveContainerRegion, Dn as listAllStateKeys, Dt as warnAwsEmulatorStateSourceHint, E as SENSITIVE_ENV_KEYS, En as listAllLockKeys, 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 parseStateKey, Ot as workloadGetsEmulatorKeysOnly, P as pullImage, Pt as foldRegionOption, Q as renderNotInAppWarning, Qt as contextOptions, Rt as reconcileExportIndexRegion, S as invokeRie, Sn as LOCK_FILE_SUFFIX, St as realAwsException, T as DockerRunnerError, Tn as describeStateKey, 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 commonOptions, _ as probeHostGatewaySupport, _n as parseDuration, _t as localAwsEmulatorCredentials, a as materializeLayerFromArn, an as noLocalCustomResourcesOption, at as unmatchedPatterns, b as substituteImagePlaceholders, bn as cliArgParser, bt as prepareLocalLoopbackForwarder, cn as regionOption, ct as resolveCdkPathToLogicalIds, d as resolveAssetCodeDirectory, dn as stateOptions, dt as activateLocalAwsAndRoleArn, en as destroyOptions, et as renderUnmatchedPatternsWarning, f as architectureToPlatform, fn as useCdkBootstrapAssetsOption, ft as assertAwsEmulatorValue, g as HOST_GATEWAY_MIN_VERSION, gn as allowUnsupportedTypesOption, gt as localAwsEmulatorActive, h as layerAssetDirectory, hn as parseAssumeRoleToken, ht as keepEmulatorIssuedCredentials, i as resolveInlineCodeFilePath, in as noCfnFallbackOption, it as stacksNoLongerSelected, jt as recordEmulatorDefaultRegion, k as flushStdio, kt as emulatorDefaultRegion, l as resolveLambdaLayers, ln as skipFinalSnapshotOption, lt as stackForConstructPath, m as copyLayerTreeLastWins, mn as normalizeStartApiAssumeRole, mt as getActiveWorkloadAwsWiring$1, n as resolveTmpfsForLambda, nn as exclusivelyOption, nt as stackMatchesPattern, o as resolveLambdaTarget, on as parseContextOptions, ot as buildCdkPathIndex, p as buildContainerImage$1, pn as effectiveAssumeRoleArn, pt as attachLocalLoopbackForwarder, q as refuseStackNameRegionCollisions, qt as writeProfileCredentialsFile, r as resolveZipImagePlan, rn as guardStackRegionOptions, rt as stacksForDependency, s as extractEphemeralStorageMb, sn as parseStackRegion, st as readCdkPathOrUndefined, t as resolveLocalBuildPlan$1, tn as diffUpdatePolicyOptions, tt as selectTargetStack, u as assetPathDirs, un as stackOptions, ut as stackForPathFormTarget, v as resolveHostGatewayExtraHosts, vn as resourceTimeoutOptions, vt as mixedModeActive, w as CONTAINER_LOG_DRAIN_TIMEOUT_MS, wn as STATE_KEY_MAX_CODE_POINTS, wt as setContainerRegion, x as tryResolveImageFnJoin, xn as parsePositiveIntegerOption, xt as profileCredentialsForWorkload, y as derivePseudoParametersFromRegion$1, yn as validateResourceTimeouts, yt as mixedModeEmulatorOverride, z as streamLogs, zt as reconcileMarkerRegionWithLegacyDefault } from "./image-plan-
|
|
3
|
-
import {
|
|
1
|
+
import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, E as cutMarker, F as stringifyJsonPayload, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, b as setPasteableVerbFlags, c as deployReplaceCommand, d as pasteableCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE, x as SAFE_MSG_ALTERED_CHAR, y as setPasteableRunFlags } from "./version-DyE_oClc.js";
|
|
2
|
+
import { $ as renderStacksNoLongerSelected, $t as deployOptions, A as followContainerLogs, At as namedEnvAwsRegion, B as resolveRuntimeCodeMountPath, Bt as regionNeedsReconciliation, C as waitForRieReady, Cn as STATE_FILE_SUFFIX, Ct as resolveContainerRegion, Dn as listAllStateKeys, Dt as warnAwsEmulatorStateSourceHint, E as SENSITIVE_ENV_KEYS, En as listAllLockKeys, 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 parseStateKey, Ot as workloadGetsEmulatorKeysOnly, P as pullImage, Pt as foldRegionOption, Q as renderNotInAppWarning, Qt as contextOptions, Rt as reconcileExportIndexRegion, S as invokeRie, Sn as LOCK_FILE_SUFFIX, St as realAwsException, T as DockerRunnerError, Tn as describeStateKey, 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 commonOptions, _ as probeHostGatewaySupport, _n as parseDuration, _t as localAwsEmulatorCredentials, a as materializeLayerFromArn, an as noLocalCustomResourcesOption, at as unmatchedPatterns, b as substituteImagePlaceholders, bn as cliArgParser, bt as prepareLocalLoopbackForwarder, cn as regionOption, ct as resolveCdkPathToLogicalIds, d as resolveAssetCodeDirectory, dn as stateOptions, dt as activateLocalAwsAndRoleArn, en as destroyOptions, et as renderUnmatchedPatternsWarning, f as architectureToPlatform, fn as useCdkBootstrapAssetsOption, ft as assertAwsEmulatorValue, g as HOST_GATEWAY_MIN_VERSION, gn as allowUnsupportedTypesOption, gt as localAwsEmulatorActive, h as layerAssetDirectory, hn as parseAssumeRoleToken, ht as keepEmulatorIssuedCredentials, i as resolveInlineCodeFilePath, in as noCfnFallbackOption, it as stacksNoLongerSelected, jt as recordEmulatorDefaultRegion, k as flushStdio, kt as emulatorDefaultRegion, l as resolveLambdaLayers, ln as skipFinalSnapshotOption, lt as stackForConstructPath, m as copyLayerTreeLastWins, mn as normalizeStartApiAssumeRole, mt as getActiveWorkloadAwsWiring$1, n as resolveTmpfsForLambda, nn as exclusivelyOption, nt as stackMatchesPattern, o as resolveLambdaTarget, on as parseContextOptions, ot as buildCdkPathIndex, p as buildContainerImage$1, pn as effectiveAssumeRoleArn, pt as attachLocalLoopbackForwarder, q as refuseStackNameRegionCollisions, qt as writeProfileCredentialsFile, r as resolveZipImagePlan, rn as guardStackRegionOptions, rt as stacksForDependency, s as extractEphemeralStorageMb, sn as parseStackRegion, st as readCdkPathOrUndefined, t as resolveLocalBuildPlan$1, tn as diffUpdatePolicyOptions, tt as selectTargetStack, u as assetPathDirs, un as stackOptions, ut as stackForPathFormTarget, v as resolveHostGatewayExtraHosts, vn as resourceTimeoutOptions, vt as mixedModeActive, w as CONTAINER_LOG_DRAIN_TIMEOUT_MS, wn as STATE_KEY_MAX_CODE_POINTS, wt as setContainerRegion, x as tryResolveImageFnJoin, xn as parsePositiveIntegerOption, xt as profileCredentialsForWorkload, y as derivePseudoParametersFromRegion$1, yn as validateResourceTimeouts, yt as mixedModeEmulatorOverride, z as streamLogs, zt as reconcileMarkerRegionWithLegacyDefault } from "./image-plan-DtFbiJj5.js";
|
|
3
|
+
import { B as assertRegionMatch, Dt as readRecordedPrincipals, Ht as maskDeep, I as remedyLogicalId, It as resourceTypeShown, O as VALUE_NOT_SHOWN, Pt as logicalIdShown, R as DriftReadRefusedError, St as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, V as isMarkedNotGone, _n as withPasteableAwsProfile, _t as endCommandInterruptScope, an as buildLockContentionMessage, at as runDeleteAttempt, bn as producerCoordinateKey, cn as formatLockOperation, fn as CUSTOM_RESOURCE_RESPONSE_PREFIX, ft as isAwsCliLiteral, gn as setPasteableAwsProfile, gt as beginCommandInterruptScope, hn as setPasteableAwsCaBundle, ht as renderDisableCommand, i as withResourceDeadline, in as buildForceUnlockCommand, ln as formatLockOwner, on as forceQuitRecoveryClause, pn as DEFAULT_STATE_PREFIX, rn as UNREPRODUCIBLE_LOCK_CLAUSE, sn as formatLockExpiry, vn as injectiveKey, vt as interruptWatchListenerCount, xn as producerRecordKey, xt as IAM_PRINCIPAL_NAME, yt as isInterruptedWaitError, z as RESOURCE_NOT_FOUND } from "./resource-deadline-DlZTHrBj.js";
|
|
4
4
|
import { a as runWithStackAwsClients, i as resetAwsClients, l as s3ClientDefaults, o as setAwsClients, s as resolveS3ClientDefaults, t as AwsClients, u as setS3ClientDefaultsDebugLog } from "./aws-clients-DOkPjjAW.js";
|
|
5
|
-
import { $ as withStackScope, A as configStringRefusal, B as generateResourceName, E as coerceCfnBoolean, I as PATTERN_B_NAME_OPTIONS, L as PATTERN_B_NAME_PROPERTIES, N as requireConfigArray, O as configBooleanRefusal, P as requireConfigObject, Q as withSkipPrefix, R as PATTERN_B_RESOURCE_TYPES, S as explicitNamePropertyFor, X as isNameGeneration, a as reserveStdoutForPayload, i as releaseStdoutForPayload, m as verboseAwareText, n as getLogger, p as safeStringify, r as isStdoutReservedForPayload, s as runStackBuffered, u as describeAwsFailure, y as getLiveRenderer, z as derivesPatternBName } from "./logger-
|
|
6
|
-
import { A as stripControlChars, B as retryClassificationText, F as isAmbiguousOutcomeError, H as isMarkedNonRetryable, J as DynamicReferenceRegionAmbiguousError, Q as AccountIdUnavailableError, R as isRetryableTransientError, U as isThrottlingError, W as markNonRetryable, X as MalformedProducerRecordRefusalError, Y as IntrinsicResolutionRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, at as ProvisioningError, ct as SynthesisError, et as CdkdError, g as PartialFailureError, h as NestedStackChildDirectDestroyError, i as credentialFingerprint, j as stripForDisplay, k as escapeRegExp, l as withErrorHandling, n as ambientCredentialConfig, o as formatError, ot as ResourceTimeoutError, q as CrossAccountSecretRefusalError, r as clientDefaultsFor, rt as LocalInvokeBuildError$1, s as handleError, st as StateError, t as ambientClientDefaults, tt as DeployCancelledError, u as LocalStartServiceError, v as StackHasActiveImportsError, y as StackTerminationProtectionError, z as isTransientServerError } from "./ambient-client-defaults-
|
|
5
|
+
import { $ as withStackScope, 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, Q as withSkipPrefix, R as PATTERN_B_RESOURCE_TYPES, S as explicitNamePropertyFor, X as isNameGeneration, a as reserveStdoutForPayload, i as releaseStdoutForPayload, m as verboseAwareText, n as getLogger, p as safeStringify, r as isStdoutReservedForPayload, s as runStackBuffered, u as describeAwsFailure, y as getLiveRenderer, z as derivesPatternBName } from "./logger-CqKPJ_tV.js";
|
|
6
|
+
import { A as stripControlChars, B as retryClassificationText, F as isAmbiguousOutcomeError, H as isMarkedNonRetryable, J as DynamicReferenceRegionAmbiguousError, Q as AccountIdUnavailableError, R as isRetryableTransientError, U as isThrottlingError, V as THROTTLING_ERROR_NAMES, W as markNonRetryable, X as MalformedProducerRecordRefusalError, Y as IntrinsicResolutionRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, at as ProvisioningError, ct as SynthesisError, et as CdkdError, g as PartialFailureError, h as NestedStackChildDirectDestroyError, i as credentialFingerprint, j as stripForDisplay, k as escapeRegExp, l as withErrorHandling, n as ambientCredentialConfig, o as formatError, ot as ResourceTimeoutError, q as CrossAccountSecretRefusalError, r as clientDefaultsFor, rt as LocalInvokeBuildError$1, s as handleError, st as StateError, t as ambientClientDefaults, tt as DeployCancelledError, u as LocalStartServiceError, v as StackHasActiveImportsError, y as StackTerminationProtectionError, z as isTransientServerError } from "./ambient-client-defaults-BNqC0q-Z.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
|
|
9
|
-
import { $a as getReadOnlyPropertyPaths, $i as secretNamePrintingBag, $r as reachableDivergentParameters, $s as malformedScrubResourceEntriesRefusalMessage, $t as displacedPhysicalIdShown, A as recordedProtectionEvidence, Ac as refuseMalformedOutputs, Ai as isSupersededResourceRecord, Al as renderNestedTemplateTreeDefect, An as findDestructiveChanges, Ao as regionLessSecretName, Ar as replacementNeverSwapped, As as maskedPropertyFingerprintsOf, Ba as localCustomResourceCommand, Bc as refuseMalformedResourcesForExport, Bi as red, Bl as buildAssetRedirectMap, Bn as differingRemedy, Bo as cfnRefValueFromPhysicalId, Br as removeProtectionTypeList, Bs as malformedOrphanRecordsWarning, Bt as sameMove, C as pendingMovesOutOf, Ca as ProviderRegistry, Cc as repairMalformedOrphansForReadOnly, Cl as isSecretValuedAttribute, Cn as NOECHO_MAC_KEY_ALIAS, Co as AWS_CREDENTIAL_ENV_KEYS, Cr as seedsDeleteFirstGuard, Cu as describeFileReadFailure, D as findServiceTokenRefusals, Da as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, Dc as malformedOutputsRefusalMessage, Di as findNestedStackTypeChanges, Dl as findNestedTemplateTreeDefect, Dn as noEchoMacVerdict, Do as classifyRecordedSecretRegion, Dr as planFailedOps, Ds as getTopLevelKeysHoldingUnreadableCreateOnly, Du as resolveAssemblyPath, E as deferredServiceTokenWarning, Ea as wouldReturnToSdkProvider, Ec as malformedLocalOutputsWarning, Ei as withPreviousPolicies, En as noEchoMacParametersOf, Eo as envCredentialsAreAssumedRole, Er as isReplacementOrphan, Es as getSettledWriteOnlyPropertyPaths, Eu as renderAssemblyPathEscape, F as readProtection, Fa as withPrintingSecrets, Fc as malformedRenderedContainersWarning, Fi as withoutSuperseded, Fl as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Fn as rollbackOrphanIds, Fs as declaresNoEcho, Ft as readRefactorMarker, Ga as CloudControlProvider, Gc as withheldAccountClause, Gi as noEchoParameterNamesOf, Gn as propertiesChangedReason, Gr as retiredAfterRollback, Gs as refuseMalformedOrphansForOrphan, H as readStreamPolicy, Ha as setLocalCustomResourceRuntimeEnabled, Hc as repairMalformedResourcesForReadOnly, Hi as noEchoAttributeNamesOf, Hl as createLazyAssetModeContext, Hn as looselyEqual, Ho as refStateLookupFromResource, Hr as nameGenerationCarriedFrom, Hs as previewableOrphanRecords, Ht as macWriteOnlyKeys, Ia as NO_LOCAL_CUSTOM_RESOURCES_FLAG, Ic as malformedResourcesWarning, Ii as bold, In as withMovedTo, Io as coerceParameterTypedValue, Is as maskedPropertyFingerprint, It as readRefactorMarkerOnce, Ja as UNSPECIFIED_SKIP_REASON, Jc as displayLogicalId, Ji as completedReplayEntries, Jn as siblingOwnedRevertDesired, Jo as keepHeldTokenProvenance, Jr as withNameGenerationReached, Js as unreadableOrphanRecords, Kc as STATE_RESOURCES_MALFORMED, Ki as withAttemptedItemsMasked, Kl as loadPublishableAssetManifest, Kn as proposeRenames, Kr as retiredNameGenerationsAfter, Ks as repairMalformedOrphanRecordsForReadOnly, Lc as malformedStateRefusalMessage, Li as cyan, Ll as decodeListingKey, Ln as changedReferenceInDiff, Lo as isUnboundTemplateParameter, Ls as deployRefusesOrphanRowsReason, Lt as refactorMarkerMovesOf, M as PROTECTION_PROPERTY_BY_TYPE, Ma as readsNoEchoDeleteValues, Mc as repairMalformedOutputsForReadOnly, Mi as supersededHeldByOtherTypeWarning, Mn as findRefactorHints, Mr as computeImplicitDeleteEdges, Ms as parameterInputsFor, N as isProtectionValueActive, Na as isCustomResourceType$1, Nc as STATE_REGION_DIVERGED, Ni as supersededHolderOf, Nn as hintSidesOf, Nr as attemptUsesCompletedCreate, Ns as maskedInputProof, Nt as keptForRetainedRecord, O as serviceTokenBlockingReason, Oa as applyCustomResourceResponseExpiration, Oc as malformedOutputsWarning, Oi as deleteSupersededEntry, Ol as isAbsoluteAssetPath, On as noEchoValueMacsOf, Oo as classifyReplaySecretRegion, Or as recheckFailedPlan, Os as tryGetTopLevelWriteOnlyProperties, P as perType, Pc as refuseDivergentRecordRegionForDestroy, Pi as supersededResourcesOf, Pl as ssmResolvedValueType, Pn as movedToHint, Pr as readsRegeneratingSecret, Pt as recordRetainedForReadoption, Qc as findHandledUnwrittenCreateOnly, Qi as orphanRecordsPrintingBag, Qo as recordedReferenceRegions, Qr as namesAnyDeclaredParameter, Qs as malformedResourceEntriesWarning, Qt as displacedOpClause, Ra as customResourcesFailedWithoutApp, Rc as refuseMalformedResourcesForDeploy, Ri as gray, Rn as changedReferencePath, Ro as parameterTypeMayLoseSecretIdentity, Rs as isReadableOrphanRecord, Rt as refactorMarkerRefusalMessage, S as hasPendingMovesOut, Sa as CC_BROKEN_REASON, Sc as refuseMalformedOrphansForDestroy, Si as withStackRecords, Sl as withStackInstanceIdWithheld, Sn as crossStackReadsForPartialSave, So as sendableAssumeRoleCommand, Sr as planRollback, T as refusePendingMovesOut, Ta as isCustomResource, Tc as malformedExportSourceWarning, Ti as resolveReplacementOldType, Tn as noEchoMacBinding, To as callerEnvCredentials, Tr as isJournaledOrphan, Ua as withCustomResourceStack, Uc as JSON_LISTING_HOLE_VALUE, Ui as noEchoComparisonForTemplate, Un as mappingPairs, Uo as lacksRecordedRefArn, Ur as nameGenerationHighWaterOf, Us as refuseMalformedOrphanRecords, Ut as readsOnlyNoEchoParameters, Vc as refuseMalformedState, Vi as yellow, Vl as createAssetRedirectResolver, Vn as isPairableType, Vo as isStalePlaceholderArnAttribute, Vr as orphanNeedsIdentity, Vs as malformedOrphanRowsKeptWarning, Vt as updateRefactorMarker, Wc as accountArgs, Wi as noEchoExactEchoLeavesOf, Wn as parseMappingFile, Wo as lacksRecordedTableArn, Wr as nameScopeOf, Ws as refuseMalformedOrphanRecordsForDestroy, Wt as formatResourceLine, Xa as deleteLeftInPlace, Xc as hasReadableResources, Xi as maskEventTextWithBoundBags, Xl as AssetManifestLoader, Xo as recordedOutputReferenceRegions, Xr as inheritProducerRegions, Xs as malformedLocalResourceEntriesWarning, Xt as resolvePendingCloudControlRequests, Ya as deleteIndeterminateGuards, Yc as hasReadableOutputs, Yi as journaledOrphanPrintingBag, Yl as rewriteTemplateAssetReferences, Yn as stripSiblingOwnedParentMembers, Ys as isReadableResourceEntry, Yt as pendingRequestCount, Za as deleteSkipReason, Zc as findActionableSdkUnwired, Zi as namingSecretsWithRecordedNoEcho, Zl as getDockerImageBySourceHash, Zr as computeParameterTaint, Zs as malformedLocalResourcesWarning, Zt as NESTED_PENDING_PARENT_REASON, _ as conditionFingerprint, _c as UNREADABLE_ORPHANS_CONTAINER_ROW, _i as DEFAULT_RESOURCE_WARN_AFTER_MS, _l as applyCrossPrefixScan, _n as makeForeignHolderScan, _o as assertFlagRoleArn, _s as MULTI_REGION_RECREATE_BLOCKED_TYPES, _u as hasOwnKey, a as scanActiveConsumers, aa as extractDeploymentEventError, ac as refuseMalformedResourceEntriesForImportSave, ai as secretBearingStateKeyWarning, al as hasNoCloudControlHandlers, an as revertedNestedRowIds, ao as poisonRenderedSpellingsCollidingIn, ar as recordAfterRollbackUpdate, as as carriesDynamicReference, au as buildDenyExternalAccessPolicy, b as readRecordedConditionVerdicts, bc as malformedOrphansWarning, bi as destroyStackRecordsView, bl as isNotImplemented, bn as DeploymentEventsReader, bo as isIamRoleArn, br as withCreateTokenLedger, bs as renderStatefulReason, bu as ownValue, c as nestedSsmNameDeferredNote, ca as ccRoutedFinalSnapshotError, cc as unreadableResourceEntries, ci as exportNameNoEchoParameters, cl as S3StateBackend, cn as getCurrentNestedStackContext, cr as calculateResourceDrift, cu as getBootstrapMarkerKey, d as slashedSsmNameHealAdoptedNote, da as isFinalSnapshotError, di as noEchoParameterValueSeed, dl as readOnlyStateVersionOf, dn as dropFailedCommands, do as secretSegmentsOfState, dr as undeclaredEmptyObservedKeys, du as validateAssetBucketName, ea as secretNamePrintingBags, ec as refuseMalformedResourceAttributesForOrphan, ei as resourcesNamingDeclaredParameter, el as unwrittenCreateOnlyReplacement, en as dropSettledNestedJournals, eo as isWaitAbandonedError, er as canonicalizeIpProtocolValue, f as slashedSsmNameHealNote, fa as refusesFinalSnapshot, fc as refuseMalformedResourcePropertiesForDestroy, fi as collectDeclaredOutputNames, fl as hasReasonlessBaselineRefusal, fn as dropFailedHint, fo as withSecretPhysicalIdsMaskedInState, fr as verbatimEchoDriftKeys, fu as validateContainerRepoName, g as makeCanonicalizePropertiesFn, gc as repairMalformedResourcePropertiesForReadOnly, gi as DEFAULT_RESOURCE_TIMEOUT_MS, gl as CrossPrefixScanCache, gn as sameJournaledOrphans, go as applyRoleArnIfSet, gr as replacementCreateRoutesToCloudControl, gs as shownType, gu as defineOwnKey, h as inheritedProvenanceForChildDiff, ha as buildFinalSnapshotIdentifier, hc as refuseMalformedResourcePropertiesForOrphan, hi as bindingSkippedOutputs, hl as CrossPrefixReadError, hn as loadJournaledOrphans, ho as refuseUnreadableCdkCrossAccountRefs, hr as findUpdatePolicyReplacementRefusals, i as mergeNoChangeOutputs, ia as storedSecretNameNeedles, ic as refuseMalformedResourceEntriesForImport, ii as secretBearing, il as NO_CC_HANDLERS_REASON, io as isAlwaysLiveAttribute, ir as buildReadCurrentStateContext, is as isNamelessDynamicReferenceError, iu as ensureAssetStorage, j as recordedProtectionNote, ja as TemplateNoEchoReresolver, jc as refuseMalformedOutputsForDestroy, ji as supersededAfterRollback, jl as templateIdentity, jn as formatDestructiveChange, jr as IMPLICIT_DELETE_DEPENDENCIES, k as diffSecurity, ka as customResourceResponseExpirationWarning, ki as holdsSupersededResources, kl as listNestedTemplateRows, kn as constructPathOf$1, ko as producerRegionsFromState, kr as recordUnderIdIsNotOwn, ku as resolveBucketRegion, l as nestedSsmNameRowNote, la as ccRoutedInstanceTakesNoSnapshot, lc as malformedDriftResourcePropertiesWarning, li as exportNameSecretExposure, ll as splitImportedOps, ln as withNestedStackContext, lr as equalModuloMarkedMask, ls as INTRINSIC_KEYS, lu as parseBootstrapMarker, m as crossStackOutputProvenanceSource, ma as createPreDeleteFinalSnapshot, mc as refuseMalformedResourcePropertiesForExport, mi as isExportAliasCollision, ml as rebuildClientForBucketRegion, mn as journaledOrphanLines, mo as producerLookupOver, mr as updatePartialReason, ms as findReplacedReadersOfRecreateTargets, n as isSecretBearingReferenceString, na as secretNamedRecordNeedles, nc as refuseMalformedResourceEntriesForDeploy, ni as displayTextOrWithheld, nn as nestedChildStackName$1, no as IntrinsicFunctionResolver, nr as replayRollback, ns as isImpossibleEmptyStoredAttribute, o as inRunStackKey, oa as ATOMIC_FINAL_SNAPSHOT_TYPES, oc as refuseMalformedResourceEntriesForOrphan, oi as secretSafeKeyDisplay, ol as PROPERTY_COVERAGE_BY_TYPE, on as withNestedRevertRun, oo as stackIdTailOf, or as settleUnsettledPrevious, os as keepsSecretReferenceToken, ou as assertAssetBucketRegion, p as slashedSsmNameHealPendingNote, pa as unsupportedFinalSnapshotError, pc as refuseMalformedResourcePropertiesForDrift, pi as collectPublishedOutputNames, pl as hasUnverifiableParameterRefusal, pn as isHandledOrphan, po as resolveDynamicReferences, pr as updatePartialMessage, pu as BOOTSTRAP_MARKER_PREFIX, q as streamPolicyMatchesDeclared, qa as RollbackInlinePolicyWriters, qc as UNREADABLE_RESOURCES_MAP_ROW, qi as createReadOnlyAttributeHealerFactory, qn as referencedLogicalIds, qr as retiredNameGenerationsLeaving, qs as unpreviewableOrphanRecords, r as keptWholeReasonText, ra as stateSecretNameNeedles, rc as refuseMalformedResourceEntriesForDestroy, ri as exportAliasCollisionScrubWarning, rn as recordDisplacedSkips, ro as isSelectOutOfBounds, rr as DELETED_RESOURCE_REMEDY, rs as carriesFetchableDynamicReference, ru as AssetModeResolver, s as checkNestedSsmNames, sa as PRE_DELETE_SNAPSHOT_TYPES, sc as repairMalformedResourceEntriesForReadOnly, si as carriedExportAliasExposure, sl as TemplateParser, sn as collectNestedChildUnaddressed, sr as withUnprovenUnsettled, ss as withSharedDrainBudget, su as isCrossRegionRedirect, t as DeployEngine, tc as refuseMalformedResourceEntries, ti as WITHHELD_NAME_DISPLAY, tr as replayFailedOperations, ts as getAccountInfo, u as healSlashedSsmParameterNames, ua as effectiveDeletionPolicy, uc as malformedResourcePropertiesWarning, ui as isWholeDynamicReferenceValue, un as deleteJournaledOrphans, uo as secretPhysicalIdSegment, ur as equalModuloMask, uu as readBootstrapMarkerBody, v as conditionInputsFrom, vc as hasReadableOrphans, vi as maskingRetryLogger, vl as crossPrefixDeniedWarning, vn as makeSiblingClaimReader, vo as assertSendableRoleArn, vr as ledgerForStack, vs as isStatefulRecreateTargetForReplace, vu as hasPlainPrototype, w as pendingMovesRefusalMessage, wa as ccBrokenReason, wc as malformedExportNamesWarning, wi as snapshotSegmentSurvivors, wl as isSensitiveAttributeName, wn as createNoEchoValueMacs, wo as applyCallerIdentityCredentials, wr as demoteSupersededOrphans, wu as displayAssemblyPath, x as childTemplateLoader, xc as refuseMalformedOrphans, xl as stackInstanceIdOf, xn as DeploymentEventsStore, xo as parseIamRoleArn, y as parentSuppliedValues, yc as malformedOrphansRefusalMessage, yl as isAccessDenied, yn as planOrphanAdoption, yo as explicitRoleArnOrThrow, ys as isStatefulRecreateTargetSync, yu as nullPrototypeRecord, za as customResourcesRunWithoutApp, zc as refuseMalformedResourcesForDestroy, zi as green, zn as changedReferenceReason, zo as AWS_NO_VALUE, zr as segmentCleanupOptions, zs as malformedOrphanRecordsRefusalMessage, zt as refuseRefactorMarker } from "./deploy-engine-DwpkRhxS.js";
|
|
8
|
+
import { $ as CFN_TEMPLATE_URL_LIMIT, A as isMalformedEnvKey, B as loadCdkJson, C as redactedDockerCause, D as partitionSensitiveEnv, E as finchSecretArgvRefusal, F as abortInFlightMultipartUploads, G as resolveStateBucketWithDefault, H as resolveAutoAssetStorage, I as Synthesizer, J as resolveUpdatePolicy, K as resolveStateBucketWithDefaultAndSource, L as synthesisStatusMessage, M as getDockerCmd, N as runDockerForeground, O as warnFinchArgvExposure, P as runDockerStreaming, Q as CFN_TEMPLATE_BODY_LIMIT, R as getDefaultStateBucketName, S as redactedCause, T as dockerSpawnEnvWithSensitive, U as resolveCaptureObservedState, V as resolveApp, W as resolveSkipPrefix, X as stateBucketExistenceConfirmed, Y as resolveUseCdkBootstrapAssets, Z as warnDeprecatedNoPrefixCliFlag, _ as buildDockerImage, at as StageLoadError, b as describeDockerExecFailure, ct as legacyPlanAssetCount, dt as CdkToolkitBucketMissingError, et as MIGRATE_TMP_PREFIX, f as DagBuilder, ft as processStackMessages, g as WorkGraph, h as AssetPublisher, i as mergeDeclaredEntries, it as AssemblyReader, j as formatDockerLoginError, k as isDockerClientEnvKey, l as DiffCalculator, lt as predictedAutoCreatedAssetMode, m as isLockInfoExpired, n as declaredStringList, nt as uploadCfnTemplate, ot as bindLegacyStackAssetParameters, p as LockManager, pt as setChildProcessAwsEnv, q as resolveStateBucketWithSource, r as inlinePoliciesAreDeclared, rt as refuseFailedLookups, s as stringListIsDeclared, st as createLegacyAssetParameterBinder, t as declaredInlinePolicies, tt as findLargeInlineResources, ut as prepareLegacyStackAssets, v as resolveDockerContextDirectory, w as redactDockerArgvValues, x as describeDockerFailure, z as getLegacyStateBucketName } from "./settle-own-write-members-C1uPhq2z.js";
|
|
9
|
+
import { $a as ProviderRegistry, $c as refuseMalformedResourcePropertiesForDrift, $i as gray, $l as hasUnverifiableParameterRefusal, $n as parseMappingFile, $o as producerLookupOver, $t as formatResourceLine, $u as BOOTSTRAP_MARKER_PREFIX, A as recordedProtectionEvidence, Aa as buildFinalSnapshotIdentifier, Ac as refuseMalformedOrphanRecordsForDestroy, Ai as bindingSkippedOutputs, Al as accountArgs, An as DeploymentEventsStore, Ao as differingIdentityWarning, Ar as findUpdatePolicyReplacementRefusals, As as lacksRecordedTableArn, Bc as refuseMalformedResourceAttributesForOrphan, Bi as isSupersededResourceRecord, Bl as unwrittenCreateOnlyReplacement, Bn as formatDestructiveChange, Bo as IntrinsicFunctionResolver, Br as isJournaledOrphan, C as pendingMovesOutOf, Ca as ccRoutedFinalSnapshotError, Cc as deployRefusesOrphanRowsReason, Ci as exportNameNoEchoParameters, Cl as malformedStateRefusalMessage, Cn as journaledOrphanLines, Co as withCustomResourceStack, Cr as calculateResourceDrift, Cs as isUnboundTemplateParameter, Cu as decodeListingKey, D as findServiceTokenRefusals, Da as refusesFinalSnapshot, Dc as malformedOrphanRowsKeptWarning, Di as collectDeclaredOutputNames, Dl as refuseMalformedState, Dn as makeSiblingClaimReader, Dr as verbatimEchoDriftKeys, Ds as isStalePlaceholderArnAttribute, Du as createAssetRedirectResolver, E as deferredServiceTokenWarning, Ea as isFinalSnapshotError, Ec as malformedOrphanRecordsWarning, Ei as noEchoParameterValueSeed, El as refuseMalformedResourcesForExport, En as makeForeignHolderScan, Er as undeclaredEmptyObservedKeys, Es as cfnRefValueFromPhysicalId, Eu as buildAssetRedirectMap, F as readProtection, Fc as isReadableResourceEntry, Fi as destroyStackRecordsView, Fl as hasReadableOutputs, Fn as noEchoMacParametersOf, Fo as deleteSkipReason, Fr as withCreateTokenLedger, Fu as rewriteTemplateAssetReferences, Ga as memberReadFailure, Gc as refuseMalformedResourceEntriesForImportSave, Gi as withoutSuperseded, Gl as hasNoCloudControlHandlers, Gn as withMovedTo, Gr as replacementNeverSwapped, Gs as carriesDynamicReference, Gt as refactorMarkerMovesOf, Gu as buildDenyExternalAccessPolicy, H as readStreamPolicy, Ha as declaredPolicyDocument, Hc as refuseMalformedResourceEntriesForDeploy, Hi as supersededHeldByOtherTypeWarning, Hn as hintSidesOf, Ho as isAlwaysLiveAttribute, Hr as planFailedOps, Hs as isImpossibleEmptyStoredAttribute, Ht as recordRetainedForReadoption, Ic as malformedLocalResourceEntriesWarning, Il as hasReadableResources, In as noEchoMacVerdict, Is as recordedOutputReferenceRegions, Iu as AssetManifestLoader, Jc as unreadableResourceEntries, Ji as resolveReplacementOldType, Jl as S3StateBackend, Jn as changedReferenceReason, Jr as attemptUsesCompletedCreate, Jt as sameMove, Ju as getBootstrapMarkerKey, Ka as policyDocumentMatchesDeclared, Kc as refuseMalformedResourceEntriesForOrphan, Kl as PROPERTY_COVERAGE_BY_TYPE, Kn as changedReferenceInDiff, Kr as IMPLICIT_DELETE_DEPENDENCIES, Ks as keepsSecretReferenceToken, Kt as refactorMarkerRefusalMessage, Ku as assertAssetBucketRegion, Lc as malformedLocalResourcesWarning, Li as withStackRecords, Ll as findActionableSdkUnwired, Ln as noEchoValueMacsOf, Lo as getReadOnlyPropertyPaths, Lr as planRollback, Lu as getDockerImageBySourceHash, M as PROTECTION_PROPERTY_BY_TYPE, Mc as repairMalformedOrphanRecordsForReadOnly, Mi as DEFAULT_RESOURCE_WARN_AFTER_MS, Ml as STATE_RESOURCES_MALFORMED, Mn as NOECHO_MAC_KEY_ALIAS, Mo as UNSPECIFIED_SKIP_REASON, Mu as loadPublishableAssetManifest, N as isProtectionValueActive, Nc as unpreviewableOrphanRecords, Ni as maskingRetryLogger, Nl as UNREADABLE_RESOURCES_MAP_ROW, Nn as createNoEchoValueMacs, No as deleteIndeterminateGuards, Nr as ledgerForStack, O as serviceTokenBlockingReason, Oa as unsupportedFinalSnapshotError, Oc as previewableOrphanRecords, Oi as collectPublishedOutputNames, Ol as repairMalformedResourcesForReadOnly, On as planOrphanAdoption, Or as updatePartialMessage, Os as refStateLookupFromResource, Ou as createLazyAssetModeContext, P as perType, Pc as unreadableOrphanRecords, Pl as displayLogicalId, Pn as noEchoMacBinding, Po as deleteLeftInPlace, Ps as keepHeldTokenProvenance, Qa as CC_BROKEN_REASON, Qc as refuseMalformedResourcePropertiesForDestroy, Qi as cyan, Ql as hasReasonlessBaselineRefusal, Qn as mappingPairs, Qo as resolveDynamicReferences, Qu as validateContainerRepoName, Ra as LAMBDA_PERMISSION_STATEMENT_KEYS, Rc as malformedResourceEntriesWarning, Ri as deleteSupersededEntry, Rl as findHandledUnwrittenCreateOnly, Rn as constructPathOf$1, Ro as isWaitAbandonedError, Rr as seedsDeleteFirstGuard, Rs as recordedReferenceRegions, S as hasPendingMovesOut, Sa as PRE_DELETE_SNAPSHOT_TYPES, Sc as maskedPropertyFingerprint, Si as carriedExportAliasExposure, Sl as malformedResourcesWarning, Sn as isHandledOrphan, So as setLocalCustomResourceRuntimeEnabled, Sr as withUnprovenUnsettled, Ss as coerceParameterTypedValue, T as refusePendingMovesOut, Ta as effectiveDeletionPolicy, Tc as malformedOrphanRecordsRefusalMessage, Ti as isWholeDynamicReferenceValue, Tl as refuseMalformedResourcesForDestroy, Tn as sameJournaledOrphans, To as CloudControlProvider, Tr as equalModuloMask, Ts as AWS_NO_VALUE, Ua as efsPolicyMatchesDeclared, Uc as refuseMalformedResourceEntriesForDestroy, Ui as supersededHolderOf, Un as movedToHint, Uo as poisonRenderedSpellingsCollidingIn, Ur as recheckFailedPlan, Us as carriesFetchableDynamicReference, Ut as readRefactorMarker, Uu as AssetModeResolver, Va as declaredMemberDocument, Vc as refuseMalformedResourceEntries, Vi as supersededAfterRollback, Vn as findRefactorHints, Vo as isSelectOutOfBounds, Vr as isReplacementOrphan, Vs as getAccountInfo, Vt as keptForRetainedRecord, Wa as lambdaPermissionMatchesDeclared, Wc as refuseMalformedResourceEntriesForImport, Wi as supersededResourcesOf, Wl as NO_CC_HANDLERS_REASON, Wn as rollbackOrphanIds, Wo as stackIdTailOf, Wr as recordUnderIdIsNotOwn, Ws as isNamelessDynamicReferenceError, Wt as readRefactorMarkerOnce, Wu as ensureAssetStorage, Xc as malformedResourcePropertiesWarning, Xi as findNestedStackTypeChanges, Xn as isPairableType, Xo as secretSegmentsOfState, Xt as macWriteOnlyKeys, Xu as readBootstrapMarkerBody, Yc as malformedDriftResourcePropertiesWarning, Yi as withPreviousPolicies, Yl as splitImportedOps, Yn as differingRemedy, Yo as secretPhysicalIdSegment, Yr as readsRegeneratingSecret, Ys as INTRINSIC_KEYS, Yt as updateRefactorMarker, Yu as parseBootstrapMarker, Z as declaredTagsReadback, Zi as bold, Zl as readOnlyStateVersionOf, Zn as looselyEqual, Zo as withSecretPhysicalIdsMaskedInState, Zr as isRedactedRecordedValue, Zt as readsOnlyNoEchoParameters, Zu as validateAssetBucketName, _ as conditionFingerprint, _a as secretNamedRecordNeedles, _i as displayTextOrWithheld, _l as refuseMalformedOutputsForDestroy, _n as getCurrentNestedStackContext, _r as replayRollback, _u as templateIdentity, a as scanActiveConsumers, aa as noEchoExactEchoLeavesOf, ac as isStatefulRecreateTargetSync, ad as nullPrototypeRecord, ai as nameScopeOf, al as malformedOrphansRefusalMessage, an as resolvePendingCloudControlRequests, ar as recordedRuleIdOf, as as isIamRoleArn, au as isAccessDenied, b as readRecordedConditionVerdicts, ba as extractDeploymentEventError, bi as secretBearingStateKeyWarning, bl as refuseDivergentRecordRegionForDestroy, bn as dropFailedCommands, bo as localCustomResourceCommand, br as recordAfterRollbackUpdate, bu as ssmResolvedValueType, c as nestedSsmNameDeferredNote, ca as createReadOnlyAttributeHealerFactory, ci as retiredNameGenerationsLeaving, cl as refuseMalformedOrphansForDestroy, cn as displacedPhysicalIdShown, co as applyCustomResourceResponseExpiration, cs as AWS_CREDENTIAL_ENV_KEYS, cu as withStackInstanceIdWithheld, d as slashedSsmNameHealAdoptedNote, da as maskEventTextWithBoundBags, di as inheritProducerRegions, dl as malformedExportSourceWarning, dn as nestedChildStackName$1, do as TemplateNoEchoReresolver, ds as envCredentialsAreAssumedRole, ea as green, ec as findReplacedReadersOfRecreateTargets, ei as segmentCleanupOptions, el as refuseMalformedResourcePropertiesForExport, eo as ccBrokenReason, er as propertiesChangedReason, es as refuseUnreadableCdkCrossAccountRefs, eu as rebuildClientForBucketRegion, f as slashedSsmNameHealNote, fa as namingSecretsWithRecordedNoEcho, fc as getSettledWriteOnlyPropertyPaths, fd as renderAssemblyPathEscape, fi as computeParameterTaint, fl as malformedLocalOutputsWarning, fn as recordDisplacedSkips, fo as readsNoEchoDeleteValues, fr as cfnIngressPortValue, fs as classifyRecordedSecretRegion, g as makeCanonicalizePropertiesFn, gc as maskedPropertyFingerprintsOf, gi as WITHHELD_NAME_DISPLAY, gl as refuseMalformedOutputs, gn as collectNestedChildUnaddressed, go as NO_LOCAL_CUSTOM_RESOURCES_FLAG, gr as replayFailedOperations, gs as isUnexposedRecordedIdentity, gu as renderNestedTemplateTreeDefect, h as inheritedProvenanceForChildDiff, ha as secretNamePrintingBags, hd as resolveBucketRegion, hi as resourcesNamingDeclaredParameter, hn as withNestedRevertRun, ho as withPrintingSecrets, hr as canonicalizeIpProtocolValue, hs as regionLessSecretName, hu as listNestedTemplateRows, i as mergeNoChangeOutputs, ia as noEchoComparisonForTemplate, ic as isStatefulRecreateTargetForReplace, id as hasPlainPrototype, ii as nameGenerationHighWaterOf, il as hasReadableOrphans, in as pendingRequestCount, ir as stripSiblingOwnedParentMembers, is as explicitRoleArnOrThrow, iu as crossPrefixDeniedWarning, j as recordedProtectionNote, jc as refuseMalformedOrphansForOrphan, ji as DEFAULT_RESOURCE_TIMEOUT_MS, jl as withheldAccountClause, jn as crossStackReadsForPartialSave, jo as RollbackInlinePolicyWriters, jr as replacementCreateRoutesToCloudControl, k as diffSecurity, ka as createPreDeleteFinalSnapshot, kc as refuseMalformedOrphanRecords, ki as isExportAliasCollision, kl as JSON_LISTING_HOLE_VALUE, kn as DeploymentEventsReader, kr as updatePartialReason, ks as lacksRecordedRefArn, l as nestedSsmNameRowNote, la as completedReplayEntries, ld as describeFileReadFailure, li as withNameGenerationReached, ll as repairMalformedOrphansForReadOnly, ln as dropSettledNestedJournals, lo as customResourceResponseExpirationWarning, lr as siblingRecordedSgRuleIds, ls as applyCallerIdentityCredentials, lu as isSecretValuedAttribute, m as crossStackOutputProvenanceSource, ma as secretNamePrintingBag, mc as tryGetTopLevelWriteOnlyProperties, mi as reachableDivergentParameters, ml as malformedOutputsWarning, mn as revertedNestedRowIds, mr as sgProtocolKey, ms as producerRegionsFromState, mu as isAbsoluteAssetPath, n as isSecretBearingReferenceString, na as yellow, nc as shownType, nd as defineOwnKey, ni as orphanNeedsIdentity, nl as repairMalformedResourcePropertiesForReadOnly, no as wouldReturnToSdkProvider, nr as referencedLogicalIds, ns as assertFlagRoleArn, nu as CrossPrefixScanCache, o as inRunStackKey, oa as noEchoParameterNamesOf, oc as renderStatefulReason, od as ownValue, oi as retiredAfterRollback, ol as malformedOrphansWarning, on as NESTED_PENDING_PARENT_REASON, or as sgRuleOwnershipIdentity, os as parseIamRoleArn, ou as isNotImplemented, p as slashedSsmNameHealPendingNote, pa as orphanRecordsPrintingBag, pc as getTopLevelKeysHoldingUnreadableCreateOnly, pd as resolveAssemblyPath, pi as namesAnyDeclaredParameter, pl as malformedOutputsRefusalMessage, po as isCustomResourceType$1, pr as recordedSgRuleId, ps as classifyReplaySecretRegion, pu as findNestedTemplateTreeDefect, q as streamPolicyMatchesDeclared, qa as reReadUntilSettled, qc as repairMalformedResourceEntriesForReadOnly, qi as snapshotSegmentSurvivors, ql as TemplateParser, qn as changedReferencePath, qo as displayPhysicalId, qr as computeImplicitDeleteEdges, qs as withSharedDrainBudget, qt as refuseRefactorMarker, qu as isCrossRegionRedirect, r as keptWholeReasonText, ra as noEchoAttributeNamesOf, rc as MULTI_REGION_RECREATE_BLOCKED_TYPES, rd as hasOwnKey, ri as nameGenerationCarriedFrom, rl as UNREADABLE_ORPHANS_CONTAINER_ROW, rr as siblingOwnedRevertDesired, rs as assertSendableRoleArn, ru as applyCrossPrefixScan, s as checkNestedSsmNames, sa as withAttemptedItemsMasked, si as retiredNameGenerationsAfter, sl as refuseMalformedOrphans, sn as displacedOpClause, so as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, sr as sgSiblingDecidedById, ss as sendableAssumeRoleCommand, su as stackInstanceIdOf, t as DeployEngine, ta as red, ti as removeProtectionTypeList, tl as refuseMalformedResourcePropertiesForOrphan, to as isCustomResource, tr as proposeRenames, ts as applyRoleArnIfSet, tt as tagsMatchDeclared, tu as CrossPrefixReadError, u as healSlashedSsmParameterNames, ua as journaledOrphanPrintingBag, ud as displayAssemblyPath, ul as malformedExportNamesWarning, us as callerEnvCredentials, uu as isSensitiveAttributeName, v as conditionInputsFrom, va as stateSecretNameNeedles, vc as parameterInputsFor, vi as exportAliasCollisionScrubWarning, vl as repairMalformedOutputsForReadOnly, vn as withNestedStackContext, vo as customResourcesFailedWithoutApp, vr as DELETED_RESOURCE_REMEDY, w as pendingMovesRefusalMessage, wa as ccRoutedInstanceTakesNoSnapshot, wc as isReadableOrphanRecord, wi as exportNameSecretExposure, wl as refuseMalformedResourcesForDeploy, wn as loadJournaledOrphans, wr as equalModuloMarkedMask, ws as parameterTypeMayLoseSecretIdentity, x as childTemplateLoader, xa as ATOMIC_FINAL_SNAPSHOT_TYPES, xc as declaresNoEcho, xi as secretSafeKeyDisplay, xl as malformedRenderedContainersWarning, xn as dropFailedHint, xr as settleUnsettledPrevious, xu as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, y as parentSuppliedValues, ya as storedSecretNameNeedles, yc as maskedInputProof, yi as secretBearing, yl as STATE_REGION_DIVERGED, yn as deleteJournaledOrphans, yo as customResourcesRunWithoutApp, yr as buildReadCurrentStateContext, zc as malformedScrubResourceEntriesRefusalMessage, zi as holdsSupersededResources, zn as findDestructiveChanges, zr as demoteSupersededOrphans } from "./deploy-engine-BjSv27_M.js";
|
|
10
10
|
import { n as canonicalizeRegion, r as derivePartitionAndUrlSuffix, t as PARTITION_TABLE } from "./aws-partition-DA0r2sr-.js";
|
|
11
|
-
import {
|
|
12
|
-
import { t as expectedOwnerParam } from "./expected-bucket-owner-
|
|
13
|
-
import { Ct as isReadableBag, Et as shouldRetainResource, Ot as stackInstanceIdCarriedFrom, St as importableOutputs, Tt as orphansCarriedFrom, _t as acceptedCreateOnlyDropsOf, bt as hasReadableExportSet, gt as slowCcOperationTimeoutMs, vt as describeRegionValueKind, wt as orphansAfterRollback, xt as importableOutputKeys, yt as exportNamesCarriedFrom } from "./delete-started-
|
|
14
|
-
import { An as recordNoEchoAttributeValues, Bt as identityKeyFor, D as recordedNoEchoValuesOf, Fn as WHOLE_DYNAMIC_REFERENCE_PATTERN, Ft as keepTemplateLiteralLeaves, Ln as isSingleDynamicReferenceToken, Lt as spelledKeysOf, Mn as recordProvenPublicExpression, Mt as DYNAMIC_REFERENCE_TOKEN_SCAN, Nn as wholeStringLeavesOf, Nt as dynamicReferenceTokens, On as recordMaskOnlyValue, Ot as scrubResourceRecord, Pt as isUncertifiedBaselineMaskPosition, Rt as pathCrossesDottedKey, T as readsNoEchoSource, Tn as provenPublicValue, W as redactForState, Yt as inheritNestedStackParameterAssociations, _t as maskSecretsInText, at as literalSplitDelimitersOf, b as noEchoOutputsComparison, ct as recordLogOnlyParameterValue, dt as shareLogOnlyValues, et as carryLogOnlyValues, f as isMarkedCoordinate, ft as unionOfSecretBags, g as maskedLeafCoordinatesOf, gt as maskSecretsInError, h as maskWholeValue, it as hasMaskableValues, j as liveMatchesUnresolvedTokenFrame, jn as recordNoEchoParameterFreshValue, k as valueAtCoordinate, kn as recordMaskOnlyValuesIn, kt as withPhysicalNameCopies, ln as recordPhysicalNameCopy, m as maskReadbackAtCoordinates, mn as carriesSecretMask, mt as errorCauseChain, nt as createUnionSecretMasker, ot as logOnlyValueCount, p as maskAtCoordinates, pn as splitGetAttStringForm, pt as createSecretMasker, sn as physicalNameCopiesOf, st as printingCorpusOf, u as canonicalCoordinates, un as recordNestedStackParameterExpressions, ut as recordLogOnlyValue, v as noEchoCoordinatesOf, y as noEchoLeavesOf } from "./replacement-rules-
|
|
15
|
-
import { S as unsettledPropertiesOf, T as withoutUnsettledProperties, b as unsettledItemsOf, w as withUnsettledProperties, y as unsettledItemsField } from "./restore-source-guard-
|
|
16
|
-
import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-
|
|
11
|
+
import { C as prefetchCreateOnlyPropertyPaths, E as describeTypeWithThrottleRetry, J as parseFailureDebugDetail, K as describeJsonParseFailure, U as renderPhaseTimings, W as timePhase, X as utf8ByteLength, j as withRetry, l as setResolvedResourceTimeouts, w as templateResourceTypes, x as getCreateOnlyPropertyPaths, z as PhaseClock } from "./ec2-termination-protection-hc3MeuqF.js";
|
|
12
|
+
import { t as expectedOwnerParam } from "./expected-bucket-owner-CQimj8gv.js";
|
|
13
|
+
import { Ct as isReadableBag, Et as shouldRetainResource, Ot as stackInstanceIdCarriedFrom, St as importableOutputs, Tt as orphansCarriedFrom, _t as acceptedCreateOnlyDropsOf, bt as hasReadableExportSet, gt as slowCcOperationTimeoutMs, vt as describeRegionValueKind, wt as orphansAfterRollback, xt as importableOutputKeys, yt as exportNamesCarriedFrom } from "./delete-started-V5NHQ1O-.js";
|
|
14
|
+
import { An as recordNoEchoAttributeValues, Bt as identityKeyFor, D as recordedNoEchoValuesOf, Fn as WHOLE_DYNAMIC_REFERENCE_PATTERN, Ft as keepTemplateLiteralLeaves, Ln as isSingleDynamicReferenceToken, Lt as spelledKeysOf, Mn as recordProvenPublicExpression, Mt as DYNAMIC_REFERENCE_TOKEN_SCAN, Nn as wholeStringLeavesOf, Nt as dynamicReferenceTokens, On as recordMaskOnlyValue, Ot as scrubResourceRecord, Pt as isUncertifiedBaselineMaskPosition, Rt as pathCrossesDottedKey, T as readsNoEchoSource, Tn as provenPublicValue, W as redactForState, Yt as inheritNestedStackParameterAssociations, _t as maskSecretsInText, at as literalSplitDelimitersOf, b as noEchoOutputsComparison, ct as recordLogOnlyParameterValue, dt as shareLogOnlyValues, et as carryLogOnlyValues, f as isMarkedCoordinate, ft as unionOfSecretBags, g as maskedLeafCoordinatesOf, gt as maskSecretsInError, h as maskWholeValue, it as hasMaskableValues, j as liveMatchesUnresolvedTokenFrame, jn as recordNoEchoParameterFreshValue, k as valueAtCoordinate, kn as recordMaskOnlyValuesIn, kt as withPhysicalNameCopies, ln as recordPhysicalNameCopy, m as maskReadbackAtCoordinates, mn as carriesSecretMask, mt as errorCauseChain, nt as createUnionSecretMasker, ot as logOnlyValueCount, p as maskAtCoordinates, pn as splitGetAttStringForm, pt as createSecretMasker, sn as physicalNameCopiesOf, st as printingCorpusOf, u as canonicalCoordinates, un as recordNestedStackParameterExpressions, ut as recordLogOnlyValue, v as noEchoCoordinatesOf, y as noEchoLeavesOf } from "./replacement-rules-CMnMy7rf.js";
|
|
15
|
+
import { S as unsettledPropertiesOf, T as withoutUnsettledProperties, b as unsettledItemsOf, w as withUnsettledProperties, y as unsettledItemsField } from "./restore-source-guard-DIs6rqZm.js";
|
|
16
|
+
import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-D1ijxg7D.js";
|
|
17
17
|
import { t as cdkdCacheHome } from "./cache-home-BVYKj3de.js";
|
|
18
18
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
19
19
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetObjectCommand, HeadBucketCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutBucketVersioningCommand, PutObjectCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -604,7 +604,7 @@ async function configureStateBucket(args) {
|
|
|
604
604
|
}
|
|
605
605
|
|
|
606
606
|
// src/cli/commands/bootstrap-noecho-mac-key.ts
|
|
607
|
-
function errorName
|
|
607
|
+
function errorName(error) {
|
|
608
608
|
const raw = error?.name;
|
|
609
609
|
return typeof raw === "string" && /^[A-Za-z][A-Za-z0-9]{0,63}$/.test(raw) ? raw : "Error";
|
|
610
610
|
}
|
|
@@ -656,7 +656,7 @@ async function ensureNoEchoMacKey(args) {
|
|
|
656
656
|
return "skipped";
|
|
657
657
|
}
|
|
658
658
|
const failed = (step, error) => {
|
|
659
|
-
warn(`Could not set up the NoEcho value MAC key ${NOECHO_MAC_KEY_ALIAS} in ${region} (${errorName
|
|
659
|
+
warn(`Could not set up the NoEcho value MAC key ${NOECHO_MAC_KEY_ALIAS} in ${region} (${errorName(error)} from ${step}). Deploys keep working: a write-only property a NoEcho parameter feeds is re-sent on every deploy. Re-run ${proseQuoted(cdkdRemedy("cdkd bootstrap"))} with kms:CreateKey, kms:PutKeyPolicy, kms:CreateAlias and kms:DescribeKey to create it.`);
|
|
660
660
|
return "failed";
|
|
661
661
|
};
|
|
662
662
|
try {
|
|
@@ -668,7 +668,7 @@ async function ensureNoEchoMacKey(args) {
|
|
|
668
668
|
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"))}.`);
|
|
669
669
|
return "failed";
|
|
670
670
|
} catch (error) {
|
|
671
|
-
if (errorName
|
|
671
|
+
if (errorName(error) !== "NotFoundException") return failed("kms:DescribeKey", error);
|
|
672
672
|
}
|
|
673
673
|
let keyId;
|
|
674
674
|
try {
|
|
@@ -692,11 +692,11 @@ async function ensureNoEchoMacKey(args) {
|
|
|
692
692
|
TargetKeyId: keyId
|
|
693
693
|
}));
|
|
694
694
|
} catch (error) {
|
|
695
|
-
const name = errorName
|
|
695
|
+
const name = errorName(error);
|
|
696
696
|
await kms.send(new ScheduleKeyDeletionCommand({
|
|
697
697
|
KeyId: keyId,
|
|
698
698
|
PendingWindowInDays: 7
|
|
699
|
-
})).catch((retireError) => warn(`Could not schedule the deletion of the unused KMS key ${keyId} in ${region} (${errorName
|
|
699
|
+
})).catch((retireError) => warn(`Could not schedule the deletion of the unused KMS key ${keyId} in ${region} (${errorName(retireError)}); schedule it by hand: aws kms schedule-key-deletion --key-id ${keyId} --pending-window-in-days 7 --region ${region}`));
|
|
700
700
|
if (name !== "AlreadyExistsException") return failed("kms:CreateAlias", error);
|
|
701
701
|
try {
|
|
702
702
|
const won = (await kms.send(new DescribeKeyCommand({ KeyId: NOECHO_MAC_KEY_ALIAS }))).KeyMetadata;
|
|
@@ -1541,11 +1541,11 @@ function collectCrossStackRefs(node, onRef, unconditional) {
|
|
|
1541
1541
|
// src/provisioning/register-providers.ts
|
|
1542
1542
|
let providerClasses;
|
|
1543
1543
|
function loadProviderClasses() {
|
|
1544
|
-
providerClasses ??= import("./provider-classes-
|
|
1544
|
+
providerClasses ??= import("./provider-classes-DhmwW7hI.js");
|
|
1545
1545
|
return providerClasses;
|
|
1546
1546
|
}
|
|
1547
1547
|
function registerAllProviders(registry, classes) {
|
|
1548
|
-
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, CloudWatchAnomalyDetectorProvider, SecretsManagerSecretProvider, SSMParameterProvider, EventBridgeRuleProvider, EventBridgeBusProvider, EventBridgeArchiveProvider, EC2Provider, 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, ACMCertificateProvider } = classes;
|
|
1548
|
+
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, CloudWatchAnomalyDetectorProvider, SecretsManagerSecretProvider, SSMParameterProvider, EventBridgeRuleProvider, EventBridgeBusProvider, EventBridgeArchiveProvider, EC2Provider, 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;
|
|
1549
1549
|
registry.register("AWS::IAM::Role", new IAMRoleProvider());
|
|
1550
1550
|
registry.register("AWS::IAM::Policy", new IAMPolicyProvider());
|
|
1551
1551
|
registry.register("AWS::IAM::ManagedPolicy", new IAMManagedPolicyProvider());
|
|
@@ -1707,7 +1707,8 @@ function registerAllProviders(registry, classes) {
|
|
|
1707
1707
|
registry.register("AWS::S3Tables::Table", s3TablesProvider);
|
|
1708
1708
|
registry.register("AWS::Budgets::Budget", new BudgetsBudgetProvider());
|
|
1709
1709
|
registry.register("AWS::CloudFormation::Stack", new NestedStackProvider());
|
|
1710
|
-
registry.register("AWS::CloudFormation::WaitConditionHandle", new WaitConditionHandleProvider());
|
|
1710
|
+
registry.register("AWS::CloudFormation::WaitConditionHandle", new WaitConditionHandleProvider(registry.waitConditionSignals));
|
|
1711
|
+
registry.register("AWS::CloudFormation::WaitCondition", new WaitConditionProvider(registry.waitConditionSignals));
|
|
1711
1712
|
}
|
|
1712
1713
|
|
|
1713
1714
|
// src/cli/commands/registry-release.ts
|
|
@@ -9530,6 +9531,26 @@ function collectPrincipalForms(value) {
|
|
|
9530
9531
|
arns
|
|
9531
9532
|
};
|
|
9532
9533
|
}
|
|
9534
|
+
function holdsPrincipalForm(value, form) {
|
|
9535
|
+
if (typeof value !== "string" && collectPrincipalForms(value)[form].size > 0) return true;
|
|
9536
|
+
return embeddedJsonDocuments(value).some((document) => holdsPrincipalForm(document, form));
|
|
9537
|
+
}
|
|
9538
|
+
function embeddedJsonDocuments(value) {
|
|
9539
|
+
const out = [];
|
|
9540
|
+
const walk = (node) => {
|
|
9541
|
+
if (typeof node === "string") {
|
|
9542
|
+
if (!node.trimStart().startsWith("{")) return;
|
|
9543
|
+
try {
|
|
9544
|
+
out.push(JSON.parse(node));
|
|
9545
|
+
} catch {}
|
|
9546
|
+
return;
|
|
9547
|
+
}
|
|
9548
|
+
if (!node || typeof node !== "object") return;
|
|
9549
|
+
for (const member of Array.isArray(node) ? node : Object.values(node)) walk(member);
|
|
9550
|
+
};
|
|
9551
|
+
walk(value);
|
|
9552
|
+
return out;
|
|
9553
|
+
}
|
|
9533
9554
|
function rewritePrincipalUniqueIds(value, arnByUniqueId) {
|
|
9534
9555
|
if (Array.isArray(value)) return value.map((el) => rewritePrincipalUniqueIds(el, arnByUniqueId));
|
|
9535
9556
|
if (!value || typeof value !== "object") return value;
|
|
@@ -10210,292 +10231,6 @@ function canonicalizeIpProtocols(baseline, aws, resourceType) {
|
|
|
10210
10231
|
};
|
|
10211
10232
|
}
|
|
10212
10233
|
|
|
10213
|
-
// src/provisioning/policy-document-content.ts
|
|
10214
|
-
const MASK = "***";
|
|
10215
|
-
const PERMANENT_CDKD_CODES = /* @__PURE__ */ new Set(["ROLLBACK_SECRET_TOKEN_SCAN_MISMATCH"]);
|
|
10216
|
-
const MARKED_PERMANENT_CODE_PREFIXES = ["INTRINSIC_RESOLUTION_REFUSAL", "ROLLBACK_SECRET_REGION_AMBIGUOUS"];
|
|
10217
|
-
const NOT_FOUND_ERROR_NAMES = /* @__PURE__ */ new Set([
|
|
10218
|
-
"ResourceNotFoundException",
|
|
10219
|
-
"ParameterNotFound",
|
|
10220
|
-
"ParameterVersionNotFound"
|
|
10221
|
-
]);
|
|
10222
|
-
function holdsUnresolvedValue(document) {
|
|
10223
|
-
let root = document;
|
|
10224
|
-
if (typeof document === "string") try {
|
|
10225
|
-
root = JSON.parse(document);
|
|
10226
|
-
} catch {
|
|
10227
|
-
root = document;
|
|
10228
|
-
}
|
|
10229
|
-
const walk = (v) => {
|
|
10230
|
-
if (typeof v === "string") return v === MASK || v.includes("{{resolve:");
|
|
10231
|
-
if (Array.isArray(v)) return v.some(walk);
|
|
10232
|
-
if (v !== null && typeof v === "object") return Object.values(v).some(walk);
|
|
10233
|
-
return false;
|
|
10234
|
-
};
|
|
10235
|
-
return walk(root);
|
|
10236
|
-
}
|
|
10237
|
-
function isPermanentResolutionError(error) {
|
|
10238
|
-
let current = error;
|
|
10239
|
-
for (let depth = 0; depth < 5 && current != null; depth++) {
|
|
10240
|
-
const e = current;
|
|
10241
|
-
if (typeof e.name === "string" && NOT_FOUND_ERROR_NAMES.has(e.name)) return true;
|
|
10242
|
-
if (typeof e.code === "string") {
|
|
10243
|
-
if (PERMANENT_CDKD_CODES.has(e.code)) return true;
|
|
10244
|
-
const code = e.code;
|
|
10245
|
-
if (MARKED_PERMANENT_CODE_PREFIXES.some((p) => code.startsWith(p)) && isMarkedNonRetryable(current)) return true;
|
|
10246
|
-
}
|
|
10247
|
-
if (typeof e.message === "string" && e.message.startsWith("Dynamic reference: ")) return true;
|
|
10248
|
-
current = e.cause;
|
|
10249
|
-
}
|
|
10250
|
-
return false;
|
|
10251
|
-
}
|
|
10252
|
-
function errorName(error) {
|
|
10253
|
-
const name = error?.name;
|
|
10254
|
-
return typeof name === "string" && /^[\w.-]{1,128}$/.test(name) ? name : "error";
|
|
10255
|
-
}
|
|
10256
|
-
async function attemptedPolicyDocument(recorded, resolve) {
|
|
10257
|
-
let document = recorded;
|
|
10258
|
-
if (resolve) try {
|
|
10259
|
-
document = await resolve();
|
|
10260
|
-
} catch (error) {
|
|
10261
|
-
return isPermanentResolutionError(error) ? {
|
|
10262
|
-
kind: "unusable",
|
|
10263
|
-
why: "a secret it references does not exist or cannot be used"
|
|
10264
|
-
} : {
|
|
10265
|
-
kind: "retry",
|
|
10266
|
-
errorName: errorName(error)
|
|
10267
|
-
};
|
|
10268
|
-
}
|
|
10269
|
-
if (!(typeof document === "string" && document.length > 0 || document !== null && typeof document === "object")) return {
|
|
10270
|
-
kind: "unusable",
|
|
10271
|
-
why: "no policy document it attempted is recorded"
|
|
10272
|
-
};
|
|
10273
|
-
if (holdsUnresolvedValue(document)) return {
|
|
10274
|
-
kind: "unusable",
|
|
10275
|
-
why: "its policy document still holds a secret reference or masked value"
|
|
10276
|
-
};
|
|
10277
|
-
return {
|
|
10278
|
-
kind: "document",
|
|
10279
|
-
document
|
|
10280
|
-
};
|
|
10281
|
-
}
|
|
10282
|
-
const ACCOUNT_ID = /^\d{12}$/;
|
|
10283
|
-
const ACCOUNT_ROOT_ARN = /^arn:[a-z-]+:iam::(\d{12}):root$/;
|
|
10284
|
-
const LIST_KEYS = [
|
|
10285
|
-
"Action",
|
|
10286
|
-
"NotAction",
|
|
10287
|
-
"Resource",
|
|
10288
|
-
"NotResource"
|
|
10289
|
-
];
|
|
10290
|
-
const PRINCIPAL_KEYS = ["Principal", "NotPrincipal"];
|
|
10291
|
-
function unwrapSingle(value) {
|
|
10292
|
-
return Array.isArray(value) && value.length === 1 ? value[0] : value;
|
|
10293
|
-
}
|
|
10294
|
-
function accountKey(value) {
|
|
10295
|
-
if (typeof value !== "string") return value;
|
|
10296
|
-
if (ACCOUNT_ID.test(value)) return `account:${value}`;
|
|
10297
|
-
const m = ACCOUNT_ROOT_ARN.exec(value);
|
|
10298
|
-
return m ? `account:${m[1]}` : value;
|
|
10299
|
-
}
|
|
10300
|
-
const ANYONE = "anyone:*";
|
|
10301
|
-
function normalizePrincipal(principal) {
|
|
10302
|
-
if (principal === "*") return ANYONE;
|
|
10303
|
-
if (principal === null || typeof principal !== "object" || Array.isArray(principal)) return principal;
|
|
10304
|
-
const keys = Object.keys(principal);
|
|
10305
|
-
if (keys.length === 1 && keys[0] === "AWS" && unwrapSingle(principal["AWS"]) === "*") return ANYONE;
|
|
10306
|
-
const out = {};
|
|
10307
|
-
for (const [key, raw] of Object.entries(principal)) out[key] = unwrapSingle(key === "AWS" ? Array.isArray(raw) ? raw.map(accountKey) : accountKey(raw) : raw);
|
|
10308
|
-
return out;
|
|
10309
|
-
}
|
|
10310
|
-
function normalizeStatement(statement) {
|
|
10311
|
-
if (statement === null || typeof statement !== "object" || Array.isArray(statement)) return statement;
|
|
10312
|
-
const out = { ...statement };
|
|
10313
|
-
for (const key of LIST_KEYS) if (Object.prototype.hasOwnProperty.call(out, key)) out[key] = unwrapSingle(out[key]);
|
|
10314
|
-
for (const key of PRINCIPAL_KEYS) if (Object.prototype.hasOwnProperty.call(out, key)) out[key] = normalizePrincipal(out[key]);
|
|
10315
|
-
return out;
|
|
10316
|
-
}
|
|
10317
|
-
function canonicalJson(value) {
|
|
10318
|
-
const sortKeys = (v) => {
|
|
10319
|
-
if (Array.isArray(v)) return v.map(sortKeys);
|
|
10320
|
-
if (v !== null && typeof v === "object") {
|
|
10321
|
-
const out = Object.create(null);
|
|
10322
|
-
for (const key of Object.keys(v).sort()) out[key] = sortKeys(v[key]);
|
|
10323
|
-
return out;
|
|
10324
|
-
}
|
|
10325
|
-
return v;
|
|
10326
|
-
};
|
|
10327
|
-
return JSON.stringify(sortKeys(value));
|
|
10328
|
-
}
|
|
10329
|
-
function policyContentKey(document) {
|
|
10330
|
-
let value = document;
|
|
10331
|
-
if (typeof document === "string") try {
|
|
10332
|
-
value = JSON.parse(document);
|
|
10333
|
-
} catch {
|
|
10334
|
-
return `raw:${document}`;
|
|
10335
|
-
}
|
|
10336
|
-
if (value !== null && typeof value === "object" && !Array.isArray(value)) {
|
|
10337
|
-
const doc = { ...value };
|
|
10338
|
-
if (Object.prototype.hasOwnProperty.call(doc, "Statement")) doc["Statement"] = (Array.isArray(doc["Statement"]) ? doc["Statement"] : [doc["Statement"]]).map(normalizeStatement);
|
|
10339
|
-
value = doc;
|
|
10340
|
-
}
|
|
10341
|
-
return canonicalJson(value);
|
|
10342
|
-
}
|
|
10343
|
-
|
|
10344
|
-
// src/provisioning/settle-after-own-write.ts
|
|
10345
|
-
const OWN_WRITE_REREAD_DELAYS_MS = [
|
|
10346
|
-
500,
|
|
10347
|
-
1e3,
|
|
10348
|
-
2e3
|
|
10349
|
-
];
|
|
10350
|
-
async function reReadUntilSettled(read, settled, delaysMs) {
|
|
10351
|
-
let answer = await read();
|
|
10352
|
-
for (const delayMs of delaysMs) {
|
|
10353
|
-
if (settled(answer)) return {
|
|
10354
|
-
answer,
|
|
10355
|
-
settled: true
|
|
10356
|
-
};
|
|
10357
|
-
await new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
10358
|
-
answer = await read();
|
|
10359
|
-
}
|
|
10360
|
-
return {
|
|
10361
|
-
answer,
|
|
10362
|
-
settled: settled(answer)
|
|
10363
|
-
};
|
|
10364
|
-
}
|
|
10365
|
-
function memberReadFailure(err) {
|
|
10366
|
-
return isThrottlingError(err) || isTransientServerError(err) || isAmbiguousOutcomeError(err) ? "failed" : "refused";
|
|
10367
|
-
}
|
|
10368
|
-
async function settleDeclaredMember(first, read, matches, declared, delaysMs, unsettled) {
|
|
10369
|
-
const settled = (answer) => typeof answer === "object" && matches(answer.value);
|
|
10370
|
-
if (first === "refused" || settled(first)) return first;
|
|
10371
|
-
let newest = first;
|
|
10372
|
-
for (const delayMs of delaysMs) {
|
|
10373
|
-
await new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
10374
|
-
let answer;
|
|
10375
|
-
try {
|
|
10376
|
-
answer = await read();
|
|
10377
|
-
} catch (err) {
|
|
10378
|
-
answer = memberReadFailure(err);
|
|
10379
|
-
}
|
|
10380
|
-
if (answer === "refused") break;
|
|
10381
|
-
if (answer !== "failed") newest = answer;
|
|
10382
|
-
if (settled(newest)) return newest;
|
|
10383
|
-
}
|
|
10384
|
-
unsettled();
|
|
10385
|
-
return newest === "absent" ? { value: declared } : newest;
|
|
10386
|
-
}
|
|
10387
|
-
function warnUnsettledMember(logger, logicalId, resourceType, memberKey) {
|
|
10388
|
-
logger.warn(safeMsg`${resourceType} ${logicalId}: the read right after the write never showed the declared ${memberKey}, so its drift baseline may not match the live resource; run ${proseQuoted(cdkdRemedy("cdkd state refresh-observed"))} on the stack to re-capture it`);
|
|
10389
|
-
}
|
|
10390
|
-
function declaredMemberDocument(value) {
|
|
10391
|
-
if (typeof value === "string") {
|
|
10392
|
-
if (value === "") return void 0;
|
|
10393
|
-
try {
|
|
10394
|
-
return JSON.parse(value);
|
|
10395
|
-
} catch {
|
|
10396
|
-
return value;
|
|
10397
|
-
}
|
|
10398
|
-
}
|
|
10399
|
-
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
|
|
10400
|
-
}
|
|
10401
|
-
const KMS_DEFAULT_KEY_POLICY_ID = "key-default-1";
|
|
10402
|
-
const EFS_FILE_SYSTEM_ARN = /^arn:[a-z-]+:elasticfilesystem:[a-z0-9-]+:\d{12}:file-system\/fs-[0-9a-f]+$/;
|
|
10403
|
-
function efsPolicyMatchesDeclared(answer, declared, fileSystemId) {
|
|
10404
|
-
return policyDocumentMatchesDeclared(withoutAddedResource(answer, declared, fileSystemId), declared);
|
|
10405
|
-
}
|
|
10406
|
-
function withoutAddedResource(answer, declared, fileSystemId) {
|
|
10407
|
-
const parse = (doc) => {
|
|
10408
|
-
if (typeof doc !== "string") return doc;
|
|
10409
|
-
try {
|
|
10410
|
-
return JSON.parse(doc);
|
|
10411
|
-
} catch {
|
|
10412
|
-
return doc;
|
|
10413
|
-
}
|
|
10414
|
-
};
|
|
10415
|
-
const read = parse(answer);
|
|
10416
|
-
const want = parse(declared);
|
|
10417
|
-
const statements = (doc) => {
|
|
10418
|
-
if (typeof doc !== "object" || doc === null || Array.isArray(doc)) return void 0;
|
|
10419
|
-
const s = doc["Statement"];
|
|
10420
|
-
return s === void 0 ? void 0 : Array.isArray(s) ? s : [s];
|
|
10421
|
-
};
|
|
10422
|
-
const readStatements = statements(read);
|
|
10423
|
-
const wantStatements = statements(want);
|
|
10424
|
-
if (readStatements === void 0 || wantStatements === void 0) return answer;
|
|
10425
|
-
return {
|
|
10426
|
-
...read,
|
|
10427
|
-
Statement: readStatements.map((entry, index) => {
|
|
10428
|
-
const wanted = wantStatements[index];
|
|
10429
|
-
if (typeof entry !== "object" || entry === null || typeof wanted !== "object" || wanted === null || Object.prototype.hasOwnProperty.call(wanted, "Resource")) return entry;
|
|
10430
|
-
const resource = entry["Resource"];
|
|
10431
|
-
if (typeof resource !== "string" || !EFS_FILE_SYSTEM_ARN.test(resource) || fileSystemId !== void 0 && !resource.endsWith(`:file-system/${fileSystemId}`)) return entry;
|
|
10432
|
-
const { Resource: _added, ...rest } = entry;
|
|
10433
|
-
return rest;
|
|
10434
|
-
})
|
|
10435
|
-
};
|
|
10436
|
-
}
|
|
10437
|
-
function declaredPolicyDocument(properties) {
|
|
10438
|
-
if (typeof properties !== "object" || properties === null || Array.isArray(properties)) return;
|
|
10439
|
-
const doc = properties["PolicyDocument"];
|
|
10440
|
-
if (typeof doc === "string") return doc === "" ? void 0 : doc;
|
|
10441
|
-
return typeof doc === "object" && doc !== null && !Array.isArray(doc) ? doc : void 0;
|
|
10442
|
-
}
|
|
10443
|
-
function policyDocumentMatchesDeclared(answer, declared) {
|
|
10444
|
-
return answer !== void 0 && policyContentKey(foldConditionValues(answer)) === policyContentKey(foldConditionValues(declared));
|
|
10445
|
-
}
|
|
10446
|
-
function foldConditionValues(document) {
|
|
10447
|
-
let doc = document;
|
|
10448
|
-
if (typeof doc === "string") try {
|
|
10449
|
-
doc = JSON.parse(doc);
|
|
10450
|
-
} catch {
|
|
10451
|
-
return document;
|
|
10452
|
-
}
|
|
10453
|
-
if (typeof doc !== "object" || doc === null || Array.isArray(doc)) return doc;
|
|
10454
|
-
const statement = doc["Statement"];
|
|
10455
|
-
if (statement === void 0) return doc;
|
|
10456
|
-
const statements = Array.isArray(statement) ? statement : [statement];
|
|
10457
|
-
return {
|
|
10458
|
-
...doc,
|
|
10459
|
-
Statement: statements.map((entry) => {
|
|
10460
|
-
if (typeof entry !== "object" || entry === null || Array.isArray(entry)) return entry;
|
|
10461
|
-
const condition = entry["Condition"];
|
|
10462
|
-
if (typeof condition !== "object" || condition === null || Array.isArray(condition)) return entry;
|
|
10463
|
-
const folded = {};
|
|
10464
|
-
for (const [operator, block] of Object.entries(condition)) {
|
|
10465
|
-
if (typeof block !== "object" || block === null || Array.isArray(block)) {
|
|
10466
|
-
folded[operator] = block;
|
|
10467
|
-
continue;
|
|
10468
|
-
}
|
|
10469
|
-
const values = {};
|
|
10470
|
-
for (const [key, value] of Object.entries(block)) values[key] = Array.isArray(value) && value.length === 1 ? value[0] : value;
|
|
10471
|
-
folded[operator] = values;
|
|
10472
|
-
}
|
|
10473
|
-
return {
|
|
10474
|
-
...entry,
|
|
10475
|
-
Condition: folded
|
|
10476
|
-
};
|
|
10477
|
-
})
|
|
10478
|
-
};
|
|
10479
|
-
}
|
|
10480
|
-
const SNS_DEFAULT_POLICY_ID = "__default_policy_ID";
|
|
10481
|
-
const LAMBDA_PERMISSION_STATEMENT_KEYS = [
|
|
10482
|
-
"Action",
|
|
10483
|
-
"Principal",
|
|
10484
|
-
"SourceArn",
|
|
10485
|
-
"SourceAccount",
|
|
10486
|
-
"PrincipalOrgID",
|
|
10487
|
-
"InvokedViaFunctionUrl"
|
|
10488
|
-
];
|
|
10489
|
-
function lambdaPermissionMatchesDeclared(read, declared) {
|
|
10490
|
-
return LAMBDA_PERMISSION_STATEMENT_KEYS.every((key) => {
|
|
10491
|
-
if (key === "InvokedViaFunctionUrl") return read[key] === true === (coerceCfnBoolean(declared[key]) === true);
|
|
10492
|
-
const want = declared[key];
|
|
10493
|
-
const got = read[key];
|
|
10494
|
-
if (want === void 0 || want === null || want === "") return got === void 0;
|
|
10495
|
-
return key === "Principal" ? accountKey(got) === accountKey(want) : got === want;
|
|
10496
|
-
});
|
|
10497
|
-
}
|
|
10498
|
-
|
|
10499
10234
|
// src/provisioning/providers/s3-bucket/shared.ts
|
|
10500
10235
|
function manualBucketDeletionClause(bucketName, maskSecrets, journaled) {
|
|
10501
10236
|
const command = renderDisableCommand({
|
|
@@ -11132,6 +10867,86 @@ function withoutKeys$1(bag, keys) {
|
|
|
11132
10867
|
return out;
|
|
11133
10868
|
}
|
|
11134
10869
|
|
|
10870
|
+
// src/provisioning/sg-own-write-rules.ts
|
|
10871
|
+
function sgSettleRuleKey(rule, direction) {
|
|
10872
|
+
const present = (value) => value === void 0 || value === null || value === "" ? null : value;
|
|
10873
|
+
const peer = direction === "egress" ? rule["DestinationSecurityGroupId"] : rule["SourceSecurityGroupId"];
|
|
10874
|
+
if (direction === "ingress" && present(rule["SourceSecurityGroupName"]) !== null && present(peer) === null) return;
|
|
10875
|
+
const protocol = sgProtocolKey(rule["IpProtocol"]);
|
|
10876
|
+
const allTraffic = protocol === "-1";
|
|
10877
|
+
const port = (value) => allTraffic ? null : cfnIngressPortValue(value);
|
|
10878
|
+
return JSON.stringify({
|
|
10879
|
+
p: protocol,
|
|
10880
|
+
f: port(rule["FromPort"]),
|
|
10881
|
+
t: port(rule["ToPort"]),
|
|
10882
|
+
c4: present(rule["CidrIp"]),
|
|
10883
|
+
c6: present(rule["CidrIpv6"]),
|
|
10884
|
+
peer: present(peer),
|
|
10885
|
+
pl: present(direction === "egress" ? rule["DestinationPrefixListId"] : rule["SourcePrefixListId"]),
|
|
10886
|
+
d: present(rule["Description"])
|
|
10887
|
+
});
|
|
10888
|
+
}
|
|
10889
|
+
function declaredSgRulesRead(value, declared, direction) {
|
|
10890
|
+
if (!Array.isArray(value)) return false;
|
|
10891
|
+
const have = value.map((rule) => typeof rule === "object" && rule !== null ? sgSettleRuleKey(rule, direction) : void 0);
|
|
10892
|
+
for (const rule of declared) {
|
|
10893
|
+
if (typeof rule !== "object" || rule === null) continue;
|
|
10894
|
+
const key = sgSettleRuleKey(rule, direction);
|
|
10895
|
+
if (key === void 0) continue;
|
|
10896
|
+
const index = have.indexOf(key);
|
|
10897
|
+
if (index < 0) return false;
|
|
10898
|
+
have.splice(index, 1);
|
|
10899
|
+
}
|
|
10900
|
+
return true;
|
|
10901
|
+
}
|
|
10902
|
+
function sgRulesAreDeclared(live, declared, direction) {
|
|
10903
|
+
if (!Array.isArray(live) || !Array.isArray(declared)) return false;
|
|
10904
|
+
const keys = (rules) => {
|
|
10905
|
+
const out = /* @__PURE__ */ new Set();
|
|
10906
|
+
for (const rule of rules) {
|
|
10907
|
+
const key = typeof rule === "object" && rule !== null ? sgSettleRuleKey(rule, direction) : void 0;
|
|
10908
|
+
if (key === void 0) return void 0;
|
|
10909
|
+
out.add(key);
|
|
10910
|
+
}
|
|
10911
|
+
return out;
|
|
10912
|
+
};
|
|
10913
|
+
const have = keys(live);
|
|
10914
|
+
const want = keys(declared);
|
|
10915
|
+
return have !== void 0 && want !== void 0 && have.size === want.size && [...want].every((key) => have.has(key));
|
|
10916
|
+
}
|
|
10917
|
+
function sgRuleReadbackShape(rule, direction) {
|
|
10918
|
+
if (rule["IpProtocol"] === void 0 || rule["IpProtocol"] === null || rule["IpProtocol"] === "") return;
|
|
10919
|
+
if (sgSettleRuleKey(rule, direction) === void 0) return void 0;
|
|
10920
|
+
const out = {};
|
|
10921
|
+
for (const [key, value] of Object.entries(rule)) {
|
|
10922
|
+
if (value === void 0 || value === null || value === "") continue;
|
|
10923
|
+
out[key] = value;
|
|
10924
|
+
}
|
|
10925
|
+
const protocol = sgProtocolKey(rule["IpProtocol"]);
|
|
10926
|
+
out["IpProtocol"] = protocol;
|
|
10927
|
+
if (protocol === "-1") {
|
|
10928
|
+
delete out["FromPort"];
|
|
10929
|
+
delete out["ToPort"];
|
|
10930
|
+
} else for (const key of ["FromPort", "ToPort"]) if (out[key] !== void 0) out[key] = cfnIngressPortValue(out[key]);
|
|
10931
|
+
return out;
|
|
10932
|
+
}
|
|
10933
|
+
function mergeDeclaredSgRules(read, declared, direction) {
|
|
10934
|
+
const keyOf = (rule) => typeof rule === "object" && rule !== null ? sgSettleRuleKey(rule, direction) : void 0;
|
|
10935
|
+
return mergeDeclaredEntries(read, declared, (entry, want) => {
|
|
10936
|
+
const key = keyOf(want);
|
|
10937
|
+
return key !== void 0 && keyOf(entry) === key;
|
|
10938
|
+
}, (want) => typeof want === "object" && want !== null ? sgRuleReadbackShape(want, direction) : void 0);
|
|
10939
|
+
}
|
|
10940
|
+
|
|
10941
|
+
// src/provisioning/providers/iam-policy/agreeing-copies.ts
|
|
10942
|
+
const readsWithAgreeingCopies = /* @__PURE__ */ new WeakSet();
|
|
10943
|
+
function markCopiesAgreed(read) {
|
|
10944
|
+
readsWithAgreeingCopies.add(read);
|
|
10945
|
+
}
|
|
10946
|
+
function readHadAgreeingCopies(read) {
|
|
10947
|
+
return readsWithAgreeingCopies.has(read);
|
|
10948
|
+
}
|
|
10949
|
+
|
|
11135
10950
|
// src/cli/commands/drift/baseline-keys.ts
|
|
11136
10951
|
const UNDECLARED_UNCOMPARED_KEYS = {
|
|
11137
10952
|
"AWS::S3::Bucket": ["NotificationConfiguration"],
|
|
@@ -11163,8 +10978,14 @@ function undeclaredUncomparedDriftKeys(resourceType, properties) {
|
|
|
11163
10978
|
}
|
|
11164
10979
|
function preFixBaselineUncomparedDriftKeys(resourceType, observed, properties, aws) {
|
|
11165
10980
|
if (observed === void 0) return [];
|
|
10981
|
+
return preFixBaselineKeys(resourceType, observed, properties, aws).filter((key) => !(holdsPrincipalForm({ [key]: observed[key] }, "uniqueIds") && holdsPrincipalForm({ [key]: aws[key] }, "arns")));
|
|
10982
|
+
}
|
|
10983
|
+
function preFixBaselineKeys(resourceType, observed, properties, aws) {
|
|
11166
10984
|
if (typeof properties !== "object" || properties === null || Array.isArray(properties)) return [];
|
|
11167
|
-
if (resourceType === "AWS::DynamoDB::Table")
|
|
10985
|
+
if (resourceType === "AWS::DynamoDB::Table") {
|
|
10986
|
+
const bag = properties;
|
|
10987
|
+
return [...staleTablePolicyBaseline(observed, bag, aws) ? ["ResourcePolicy"] : [], ...tagsHeal.liveIsDeclared(bag, aws) ? [tagsHeal.key] : []];
|
|
10988
|
+
}
|
|
11168
10989
|
if (resourceType === "AWS::SQS::QueuePolicy" || resourceType === "AWS::SNS::TopicPolicy") {
|
|
11169
10990
|
const declared = declaredPolicyDocument(properties);
|
|
11170
10991
|
return declared !== void 0 && policyDocumentMatchesDeclared(aws["PolicyDocument"], declared) && !policyDocumentMatchesDeclared(observed["PolicyDocument"], declared) ? ["PolicyDocument"] : [];
|
|
@@ -11173,23 +10994,53 @@ function preFixBaselineUncomparedDriftKeys(resourceType, observed, properties, a
|
|
|
11173
10994
|
const declared = properties;
|
|
11174
10995
|
return lambdaPermissionMatchesDeclared(aws, declared) && !lambdaPermissionMatchesDeclared(observed, declared) ? [...LAMBDA_PERMISSION_STATEMENT_KEYS] : [];
|
|
11175
10996
|
}
|
|
11176
|
-
const
|
|
11177
|
-
if (
|
|
10997
|
+
const members = OWN_WRITE_MEMBERS.get(resourceType);
|
|
10998
|
+
if (members !== void 0) return members.filter((member) => member.liveIsDeclared(properties, aws)).map((member) => member.key);
|
|
11178
10999
|
if (resourceType !== "AWS::Lambda::EventSourceMapping") return [];
|
|
11179
11000
|
const declared = hasOwnKey(properties, "Enabled") ? coerceCfnBoolean(properties["Enabled"]) : void 0;
|
|
11180
11001
|
const recorded = hasOwnKey(observed, "Enabled") ? coerceCfnBoolean(observed["Enabled"]) : void 0;
|
|
11181
11002
|
const live = hasOwnKey(aws, "Enabled") ? aws["Enabled"] : void 0;
|
|
11182
11003
|
return recorded === false && declared !== false && live === true ? ["Enabled"] : [];
|
|
11183
11004
|
}
|
|
11005
|
+
const documentHeal = (key) => ({
|
|
11006
|
+
key,
|
|
11007
|
+
liveIsDeclared: (properties, aws) => {
|
|
11008
|
+
const declared = declaredMemberDocument(properties[key]);
|
|
11009
|
+
return declared !== void 0 && policyDocumentMatchesDeclared(aws[key], declared);
|
|
11010
|
+
}
|
|
11011
|
+
});
|
|
11012
|
+
const stringListHeal = (key) => ({
|
|
11013
|
+
key,
|
|
11014
|
+
liveIsDeclared: (properties, aws) => {
|
|
11015
|
+
const declared = declaredStringList(properties[key]);
|
|
11016
|
+
return declared !== void 0 && stringListIsDeclared(aws[key], declared);
|
|
11017
|
+
}
|
|
11018
|
+
});
|
|
11019
|
+
const boundaryHeal = {
|
|
11020
|
+
key: "PermissionsBoundary",
|
|
11021
|
+
liveIsDeclared: (properties, aws) => typeof properties["PermissionsBoundary"] === "string" && properties["PermissionsBoundary"] !== "" && aws["PermissionsBoundary"] === properties["PermissionsBoundary"]
|
|
11022
|
+
};
|
|
11023
|
+
const inlinePoliciesHeal = {
|
|
11024
|
+
key: "Policies",
|
|
11025
|
+
liveIsDeclared: (properties, aws) => {
|
|
11026
|
+
const declared = declaredInlinePolicies(properties["Policies"]);
|
|
11027
|
+
return declared !== void 0 && inlinePoliciesAreDeclared(aws["Policies"], declared);
|
|
11028
|
+
}
|
|
11029
|
+
};
|
|
11030
|
+
const sgRulesHeal = (key, direction) => ({
|
|
11031
|
+
key,
|
|
11032
|
+
liveIsDeclared: (properties, aws) => sgRulesAreDeclared(aws[key], properties[key], direction)
|
|
11033
|
+
});
|
|
11034
|
+
const tagsHeal = {
|
|
11035
|
+
key: "Tags",
|
|
11036
|
+
liveIsDeclared: (properties, aws) => {
|
|
11037
|
+
const declared = declaredTagsReadback(properties["Tags"]);
|
|
11038
|
+
return declared !== void 0 && tagsMatchDeclared(aws["Tags"], declared);
|
|
11039
|
+
}
|
|
11040
|
+
};
|
|
11184
11041
|
const OWN_WRITE_MEMBERS = new Map(Object.entries({
|
|
11185
|
-
"AWS::KMS::Key":
|
|
11186
|
-
|
|
11187
|
-
liveIsDeclared: (properties, aws) => {
|
|
11188
|
-
const declared = declaredMemberDocument(properties["KeyPolicy"]);
|
|
11189
|
-
return declared !== void 0 && policyDocumentMatchesDeclared(aws["KeyPolicy"], declared);
|
|
11190
|
-
}
|
|
11191
|
-
},
|
|
11192
|
-
"AWS::Logs::DeliveryDestination": {
|
|
11042
|
+
"AWS::KMS::Key": [documentHeal("KeyPolicy")],
|
|
11043
|
+
"AWS::Logs::DeliveryDestination": [{
|
|
11193
11044
|
key: "DeliveryDestinationPolicy",
|
|
11194
11045
|
liveIsDeclared: (properties, aws) => {
|
|
11195
11046
|
const inner = (block) => {
|
|
@@ -11200,31 +11051,25 @@ const OWN_WRITE_MEMBERS = new Map(Object.entries({
|
|
|
11200
11051
|
if (declared === void 0) return properties["DeliveryDestinationPolicy"] === void 0 && aws["DeliveryDestinationPolicy"] === void 0;
|
|
11201
11052
|
return policyDocumentMatchesDeclared(inner(aws["DeliveryDestinationPolicy"]), declared);
|
|
11202
11053
|
}
|
|
11203
|
-
},
|
|
11204
|
-
"AWS::Logs::LogGroup": {
|
|
11054
|
+
}],
|
|
11055
|
+
"AWS::Logs::LogGroup": [{
|
|
11205
11056
|
key: "DataProtectionPolicy",
|
|
11206
11057
|
liveIsDeclared: (properties, aws) => {
|
|
11207
11058
|
const declared = declaredMemberDocument(properties["DataProtectionPolicy"]);
|
|
11208
11059
|
if (declared === void 0) return (properties["DataProtectionPolicy"] === void 0 || properties["DataProtectionPolicy"] === "") && aws["DataProtectionPolicy"] === "";
|
|
11209
11060
|
return policyDocumentMatchesDeclared(aws["DataProtectionPolicy"], declared);
|
|
11210
11061
|
}
|
|
11211
|
-
},
|
|
11212
|
-
"AWS::ApiGateway::RestApi":
|
|
11213
|
-
|
|
11214
|
-
liveIsDeclared: (properties, aws) => {
|
|
11215
|
-
const declared = declaredMemberDocument(properties["Policy"]);
|
|
11216
|
-
return declared !== void 0 && policyDocumentMatchesDeclared(aws["Policy"], declared);
|
|
11217
|
-
}
|
|
11218
|
-
},
|
|
11219
|
-
"AWS::EFS::FileSystem": {
|
|
11062
|
+
}],
|
|
11063
|
+
"AWS::ApiGateway::RestApi": [documentHeal("Policy")],
|
|
11064
|
+
"AWS::EFS::FileSystem": [{
|
|
11220
11065
|
key: "FileSystemPolicy",
|
|
11221
11066
|
liveIsDeclared: (properties, aws) => {
|
|
11222
11067
|
const declared = declaredMemberDocument(properties["FileSystemPolicy"]);
|
|
11223
11068
|
if (declared === void 0) return properties["FileSystemPolicy"] === void 0 && aws["FileSystemPolicy"] === void 0;
|
|
11224
11069
|
return efsPolicyMatchesDeclared(aws["FileSystemPolicy"], declared);
|
|
11225
11070
|
}
|
|
11226
|
-
},
|
|
11227
|
-
"AWS::S3::Bucket": {
|
|
11071
|
+
}],
|
|
11072
|
+
"AWS::S3::Bucket": [{
|
|
11228
11073
|
key: "LifecycleConfiguration",
|
|
11229
11074
|
liveIsDeclared: (properties, aws) => {
|
|
11230
11075
|
const declared = declaredLifecycle(properties);
|
|
@@ -11233,11 +11078,54 @@ const OWN_WRITE_MEMBERS = new Map(Object.entries({
|
|
|
11233
11078
|
const liveBag = live;
|
|
11234
11079
|
return declared.kind === "absent" ? lifecycleReadIsAbsent(liveBag) : lifecycleMatchesDeclared(liveBag, declared.expected);
|
|
11235
11080
|
}
|
|
11236
|
-
},
|
|
11237
|
-
"AWS::
|
|
11081
|
+
}],
|
|
11082
|
+
"AWS::SecretsManager::Secret": [tagsHeal],
|
|
11083
|
+
"AWS::CodeBuild::Project": [{
|
|
11238
11084
|
key: "Visibility",
|
|
11239
11085
|
liveIsDeclared: (properties, aws) => typeof properties["Visibility"] === "string" && properties["Visibility"] !== "" && aws["Visibility"] === properties["Visibility"]
|
|
11240
|
-
}
|
|
11086
|
+
}],
|
|
11087
|
+
"AWS::IAM::Role": [
|
|
11088
|
+
documentHeal("AssumeRolePolicyDocument"),
|
|
11089
|
+
boundaryHeal,
|
|
11090
|
+
stringListHeal("ManagedPolicyArns"),
|
|
11091
|
+
inlinePoliciesHeal
|
|
11092
|
+
],
|
|
11093
|
+
"AWS::IAM::User": [
|
|
11094
|
+
boundaryHeal,
|
|
11095
|
+
stringListHeal("ManagedPolicyArns"),
|
|
11096
|
+
stringListHeal("Groups"),
|
|
11097
|
+
inlinePoliciesHeal
|
|
11098
|
+
],
|
|
11099
|
+
"AWS::IAM::Group": [stringListHeal("ManagedPolicyArns"), inlinePoliciesHeal],
|
|
11100
|
+
"AWS::IAM::ManagedPolicy": [
|
|
11101
|
+
documentHeal("PolicyDocument"),
|
|
11102
|
+
stringListHeal("Roles"),
|
|
11103
|
+
stringListHeal("Users"),
|
|
11104
|
+
stringListHeal("Groups")
|
|
11105
|
+
],
|
|
11106
|
+
"AWS::IAM::InstanceProfile": [stringListHeal("Roles")],
|
|
11107
|
+
"AWS::IAM::Policy": [
|
|
11108
|
+
{
|
|
11109
|
+
key: "PolicyDocument",
|
|
11110
|
+
liveIsDeclared: (properties, aws) => readHadAgreeingCopies(aws) && documentHeal("PolicyDocument").liveIsDeclared(properties, aws)
|
|
11111
|
+
},
|
|
11112
|
+
{
|
|
11113
|
+
key: "PolicyName",
|
|
11114
|
+
liveIsDeclared: (properties, aws) => typeof properties["PolicyName"] === "string" && properties["PolicyName"] !== "" && aws["PolicyName"] === properties["PolicyName"]
|
|
11115
|
+
},
|
|
11116
|
+
stringListHeal("Roles"),
|
|
11117
|
+
stringListHeal("Users"),
|
|
11118
|
+
stringListHeal("Groups")
|
|
11119
|
+
],
|
|
11120
|
+
"AWS::S3::BucketPolicy": [{
|
|
11121
|
+
key: "PolicyDocument",
|
|
11122
|
+
liveIsDeclared: (properties, aws) => {
|
|
11123
|
+
const declared = declaredPolicyDocument(properties);
|
|
11124
|
+
return declared !== void 0 && policyDocumentMatchesDeclared(aws["PolicyDocument"], declared);
|
|
11125
|
+
}
|
|
11126
|
+
}],
|
|
11127
|
+
"AWS::Events::EventBus": [documentHeal("Policy")],
|
|
11128
|
+
"AWS::EC2::SecurityGroup": [sgRulesHeal("SecurityGroupIngress", "ingress"), sgRulesHeal("SecurityGroupEgress", "egress")]
|
|
11241
11129
|
}));
|
|
11242
11130
|
function staleTablePolicyBaseline(observed, properties, aws) {
|
|
11243
11131
|
const recorded = readStreamPolicy(observed);
|
|
@@ -11899,9 +11787,9 @@ function corroboratedLeafCount(send, live, wildcardLeaf = isMaskLeaf) {
|
|
|
11899
11787
|
}
|
|
11900
11788
|
return total;
|
|
11901
11789
|
}
|
|
11902
|
-
if (isPlainRecord(send)) {
|
|
11790
|
+
if (isPlainRecord$2(send)) {
|
|
11903
11791
|
if (!hasPlainPrototype(send)) return void 0;
|
|
11904
|
-
if (!isPlainRecord(live) || !hasPlainPrototype(live)) return void 0;
|
|
11792
|
+
if (!isPlainRecord$2(live) || !hasPlainPrototype(live)) return void 0;
|
|
11905
11793
|
const keys = Object.keys(send);
|
|
11906
11794
|
if (keys.length !== Object.keys(live).length) return void 0;
|
|
11907
11795
|
let total = 0;
|
|
@@ -12021,8 +11909,8 @@ function preserveLiveValuesAtMaskedLeaves(send, awsProperties, secrets, corrobor
|
|
|
12021
11909
|
if (carriesSecretMask(value)) unpreservablePaths.push(path);
|
|
12022
11910
|
return value;
|
|
12023
11911
|
}
|
|
12024
|
-
const liveObject = isPlainRecord(live) ? live : void 0;
|
|
12025
|
-
const corrObject = isPlainRecord(corr) ? corr : void 0;
|
|
11912
|
+
const liveObject = isPlainRecord$2(live) ? live : void 0;
|
|
11913
|
+
const corrObject = isPlainRecord$2(corr) ? corr : void 0;
|
|
12026
11914
|
const out = Object.create(null);
|
|
12027
11915
|
for (const [k, v] of Object.entries(value)) out[k] = walk(v, corrObject === void 0 ? void 0 : ownValue(corrObject, k), liveObject === void 0 ? void 0 : ownValue(liveObject, k), path === "" ? k : `${path}.${k}`);
|
|
12028
11916
|
return out;
|
|
@@ -12045,7 +11933,7 @@ function isTagListKey(key) {
|
|
|
12045
11933
|
return key === "Tags" || key.endsWith("Tags");
|
|
12046
11934
|
}
|
|
12047
11935
|
function isCfnTagList(value) {
|
|
12048
|
-
return Array.isArray(value) && value.length > 0 && value.every((t) => isPlainRecord(t) && typeof t.Key === "string");
|
|
11936
|
+
return Array.isArray(value) && value.length > 0 && value.every((t) => isPlainRecord$2(t) && typeof t.Key === "string");
|
|
12049
11937
|
}
|
|
12050
11938
|
function tagKeys(tags) {
|
|
12051
11939
|
return tags.map((t) => t["Key"]);
|
|
@@ -12112,8 +12000,8 @@ function collectMissingPaths(awsValue, desiredValue, path, out, isPreservedKey)
|
|
|
12112
12000
|
}
|
|
12113
12001
|
return;
|
|
12114
12002
|
}
|
|
12115
|
-
if (!isPlainRecord(awsValue)) return;
|
|
12116
|
-
if (!isPlainRecord(desiredValue)) {
|
|
12003
|
+
if (!isPlainRecord$2(awsValue)) return;
|
|
12004
|
+
if (!isPlainRecord$2(desiredValue)) {
|
|
12117
12005
|
if (desiredValue === void 0) out.add(path);
|
|
12118
12006
|
return;
|
|
12119
12007
|
}
|
|
@@ -12129,7 +12017,7 @@ function collectMissingPaths(awsValue, desiredValue, path, out, isPreservedKey)
|
|
|
12129
12017
|
function isKeyedList(value) {
|
|
12130
12018
|
return Array.isArray(value) && value.length > 0 && value.every((e) => typeof e === "object" && e !== null && typeof e.Key === "string");
|
|
12131
12019
|
}
|
|
12132
|
-
function isPlainRecord(value) {
|
|
12020
|
+
function isPlainRecord$2(value) {
|
|
12133
12021
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
12134
12022
|
}
|
|
12135
12023
|
function mergeUntemplatedValue(awsValue, desiredValue) {
|
|
@@ -12151,7 +12039,7 @@ function mergeUntemplatedValue(awsValue, desiredValue) {
|
|
|
12151
12039
|
}
|
|
12152
12040
|
return merged;
|
|
12153
12041
|
}
|
|
12154
|
-
if (!isPlainRecord(awsValue) || !isPlainRecord(desiredValue)) return desiredValue;
|
|
12042
|
+
if (!isPlainRecord$2(awsValue) || !isPlainRecord$2(desiredValue)) return desiredValue;
|
|
12155
12043
|
if (!hasPlainPrototype(awsValue) || !hasPlainPrototype(desiredValue)) return desiredValue;
|
|
12156
12044
|
const merged = Object.create(null);
|
|
12157
12045
|
for (const [key, value] of Object.entries(awsValue)) merged[key] = hasOwnKey(desiredValue, key) ? mergeUntemplatedValue(value, desiredValue[key]) : value;
|
|
@@ -12171,7 +12059,7 @@ function preserveLiveValuesAtUnresolvedTokens(send, awsProperties, unresolvedTok
|
|
|
12171
12059
|
}
|
|
12172
12060
|
if (value !== null && typeof value === "object") {
|
|
12173
12061
|
if (!hasPlainPrototype(value)) return value;
|
|
12174
|
-
const liveObject = isPlainRecord(live) ? live : void 0;
|
|
12062
|
+
const liveObject = isPlainRecord$2(live) ? live : void 0;
|
|
12175
12063
|
const out = Object.create(null);
|
|
12176
12064
|
for (const [k, v] of Object.entries(value)) out[k] = walk(v, liveObject === void 0 ? void 0 : ownValue(liveObject, k));
|
|
12177
12065
|
return out;
|
|
@@ -12225,7 +12113,7 @@ function buildRevertNewProperties(drifts, desiredProperties, awsProperties, opti
|
|
|
12225
12113
|
return result;
|
|
12226
12114
|
}
|
|
12227
12115
|
function driftAbsentMeansDefaultKeys(provider, resourceType, properties) {
|
|
12228
|
-
if (provider.getDriftAbsentMeansDefaultKeys === void 0 || !isPlainRecord(properties)) return [];
|
|
12116
|
+
if (provider.getDriftAbsentMeansDefaultKeys === void 0 || !isPlainRecord$2(properties)) return [];
|
|
12229
12117
|
const keys = provider.getDriftAbsentMeansDefaultKeys(resourceType, properties);
|
|
12230
12118
|
const dotted = keys.filter((key) => key.includes("."));
|
|
12231
12119
|
if (dotted.length === 0) return keys;
|
|
@@ -12664,7 +12552,7 @@ async function runDriftForStack(stackName, region, stateBackend, providerRegistr
|
|
|
12664
12552
|
|
|
12665
12553
|
// src/cli/commands/drift/revert-write-only.ts
|
|
12666
12554
|
function revertWriteOnlyResendNames(resourceType, properties, writeOnlyNames) {
|
|
12667
|
-
if (!writeOnlyNames || writeOnlyNames.size === 0 || !isPlainRecord(properties)) return [];
|
|
12555
|
+
if (!writeOnlyNames || writeOnlyNames.size === 0 || !isPlainRecord$2(properties)) return [];
|
|
12668
12556
|
const unreadableCreateOnly = getTopLevelKeysHoldingUnreadableCreateOnly(resourceType, properties);
|
|
12669
12557
|
const names = [];
|
|
12670
12558
|
for (const name of writeOnlyNames) {
|
|
@@ -12679,7 +12567,7 @@ function revertWriteOnlyResendNames(resourceType, properties, writeOnlyNames) {
|
|
|
12679
12567
|
function withDeclaredWriteOnlyValues(send, resolvedProperties, names, paths) {
|
|
12680
12568
|
const skipped = [];
|
|
12681
12569
|
const wholesale = [];
|
|
12682
|
-
if (names.length === 0 || !isPlainRecord(resolvedProperties)) return {
|
|
12570
|
+
if (names.length === 0 || !isPlainRecord$2(resolvedProperties)) return {
|
|
12683
12571
|
properties: send,
|
|
12684
12572
|
skipped,
|
|
12685
12573
|
wholesale
|
|
@@ -12752,11 +12640,11 @@ function graftAt(send, declared, path, writeOnly) {
|
|
|
12752
12640
|
ok
|
|
12753
12641
|
};
|
|
12754
12642
|
}
|
|
12755
|
-
if (!isPlainRecord(declared) || !hasOwnKey(declared, segment)) return {
|
|
12643
|
+
if (!isPlainRecord$2(declared) || !hasOwnKey(declared, segment)) return {
|
|
12756
12644
|
value: send,
|
|
12757
12645
|
ok: true
|
|
12758
12646
|
};
|
|
12759
|
-
if (!isPlainRecord(send)) return {
|
|
12647
|
+
if (!isPlainRecord$2(send)) return {
|
|
12760
12648
|
value: send,
|
|
12761
12649
|
ok: false
|
|
12762
12650
|
};
|
|
@@ -12787,7 +12675,7 @@ function withoutPaths(value, paths) {
|
|
|
12787
12675
|
const inner = paths.filter((p) => p[0] === "*").map((p) => p.slice(1));
|
|
12788
12676
|
return value.map((item) => withoutPaths(item, inner));
|
|
12789
12677
|
}
|
|
12790
|
-
if (!isPlainRecord(value)) return value;
|
|
12678
|
+
if (!isPlainRecord$2(value)) return value;
|
|
12791
12679
|
const out = {};
|
|
12792
12680
|
for (const [key, child] of Object.entries(value)) {
|
|
12793
12681
|
const inner = paths.filter((p) => p[0] === key).map((p) => p.slice(1));
|
|
@@ -12797,8 +12685,8 @@ function withoutPaths(value, paths) {
|
|
|
12797
12685
|
return out;
|
|
12798
12686
|
}
|
|
12799
12687
|
function covers(template, actual) {
|
|
12800
|
-
if (isPlainRecord(template)) {
|
|
12801
|
-
if (!isPlainRecord(actual)) return false;
|
|
12688
|
+
if (isPlainRecord$2(template)) {
|
|
12689
|
+
if (!isPlainRecord$2(actual)) return false;
|
|
12802
12690
|
return Object.entries(template).every(([key, child]) => hasOwnKey(actual, key) && covers(child, actual[key]));
|
|
12803
12691
|
}
|
|
12804
12692
|
if (Array.isArray(template)) return Array.isArray(actual) && template.length === actual.length && template.every((child, index) => covers(child, actual[index]));
|
|
@@ -12812,6 +12700,528 @@ function carriesIntrinsicObject(value) {
|
|
|
12812
12700
|
return Object.values(value).some(carriesIntrinsicObject);
|
|
12813
12701
|
}
|
|
12814
12702
|
|
|
12703
|
+
// src/provisioning/providers/ec2/sg-support.ts
|
|
12704
|
+
const SG_INGRESS_IP_PROTOCOL_DEFAULT = "-1";
|
|
12705
|
+
const SG_INGRESS_IP_PROTOCOL_PATH = "AWS::EC2::SecurityGroupIngress IpProtocol";
|
|
12706
|
+
const SG_READBACK_RETRY_DELAY_MS = 1e3;
|
|
12707
|
+
const securityGroupReadbackDelays = {};
|
|
12708
|
+
const SG_RULE_PAGE_SIZE$1 = 1e3;
|
|
12709
|
+
function narrowIngressIpProtocol(properties, onUnusable) {
|
|
12710
|
+
const declared = properties["IpProtocol"];
|
|
12711
|
+
const ipProtocol = requireConfigString(declared, SG_INGRESS_IP_PROTOCOL_DEFAULT, SG_INGRESS_IP_PROTOCOL_PATH, {
|
|
12712
|
+
coerceNumber: true,
|
|
12713
|
+
...onUnusable && { onUnusable }
|
|
12714
|
+
});
|
|
12715
|
+
if (declared === void 0 || declared === ipProtocol) return {
|
|
12716
|
+
ipProtocol,
|
|
12717
|
+
narrowed: properties
|
|
12718
|
+
};
|
|
12719
|
+
return {
|
|
12720
|
+
ipProtocol,
|
|
12721
|
+
narrowed: {
|
|
12722
|
+
...properties,
|
|
12723
|
+
IpProtocol: ipProtocol
|
|
12724
|
+
}
|
|
12725
|
+
};
|
|
12726
|
+
}
|
|
12727
|
+
function canonicalizeSgRuleProtocol(rule) {
|
|
12728
|
+
if (!("IpProtocol" in rule)) return rule;
|
|
12729
|
+
const next = canonicalizeIpProtocolValue(rule["IpProtocol"]);
|
|
12730
|
+
if (next === rule["IpProtocol"]) return rule;
|
|
12731
|
+
return {
|
|
12732
|
+
...rule,
|
|
12733
|
+
IpProtocol: next
|
|
12734
|
+
};
|
|
12735
|
+
}
|
|
12736
|
+
function canonicalizeSgInlineRuleProtocols(properties) {
|
|
12737
|
+
let out = properties;
|
|
12738
|
+
for (const key of ["SecurityGroupIngress", "SecurityGroupEgress"]) {
|
|
12739
|
+
const list = out[key];
|
|
12740
|
+
if (!Array.isArray(list)) continue;
|
|
12741
|
+
let changed = false;
|
|
12742
|
+
const mapped = list.map((el) => {
|
|
12743
|
+
if (el === null || typeof el !== "object" || Array.isArray(el)) return el;
|
|
12744
|
+
const next = canonicalizeSgRuleProtocol(el);
|
|
12745
|
+
if (next !== el) changed = true;
|
|
12746
|
+
return next;
|
|
12747
|
+
});
|
|
12748
|
+
if (changed) out = {
|
|
12749
|
+
...out,
|
|
12750
|
+
[key]: mapped
|
|
12751
|
+
};
|
|
12752
|
+
}
|
|
12753
|
+
return out;
|
|
12754
|
+
}
|
|
12755
|
+
function flattenIpPermissions(perms, direction) {
|
|
12756
|
+
const out = [];
|
|
12757
|
+
for (const p of perms) {
|
|
12758
|
+
const base = {};
|
|
12759
|
+
if (p.IpProtocol !== void 0) base["IpProtocol"] = p.IpProtocol;
|
|
12760
|
+
if (p.FromPort !== void 0) base["FromPort"] = p.FromPort;
|
|
12761
|
+
if (p.ToPort !== void 0) base["ToPort"] = p.ToPort;
|
|
12762
|
+
for (const ip of p.IpRanges ?? []) {
|
|
12763
|
+
const rule = { ...base };
|
|
12764
|
+
if (ip.CidrIp !== void 0) rule["CidrIp"] = ip.CidrIp;
|
|
12765
|
+
if (ip.Description !== void 0) rule["Description"] = ip.Description;
|
|
12766
|
+
out.push(rule);
|
|
12767
|
+
}
|
|
12768
|
+
for (const ipv6 of p.Ipv6Ranges ?? []) {
|
|
12769
|
+
const rule = { ...base };
|
|
12770
|
+
if (ipv6.CidrIpv6 !== void 0) rule["CidrIpv6"] = ipv6.CidrIpv6;
|
|
12771
|
+
if (ipv6.Description !== void 0) rule["Description"] = ipv6.Description;
|
|
12772
|
+
out.push(rule);
|
|
12773
|
+
}
|
|
12774
|
+
for (const grp of p.UserIdGroupPairs ?? []) {
|
|
12775
|
+
const rule = { ...base };
|
|
12776
|
+
if (direction === "ingress") {
|
|
12777
|
+
if (grp.GroupId !== void 0) rule["SourceSecurityGroupId"] = grp.GroupId;
|
|
12778
|
+
if (grp.UserId !== void 0) rule["SourceSecurityGroupOwnerId"] = grp.UserId;
|
|
12779
|
+
} else if (grp.GroupId !== void 0) rule["DestinationSecurityGroupId"] = grp.GroupId;
|
|
12780
|
+
if (grp.Description !== void 0) rule["Description"] = grp.Description;
|
|
12781
|
+
out.push(rule);
|
|
12782
|
+
}
|
|
12783
|
+
for (const pl of p.PrefixListIds ?? []) {
|
|
12784
|
+
const rule = { ...base };
|
|
12785
|
+
if (direction === "ingress") {
|
|
12786
|
+
if (pl.PrefixListId !== void 0) rule["SourcePrefixListId"] = pl.PrefixListId;
|
|
12787
|
+
} else if (pl.PrefixListId !== void 0) rule["DestinationPrefixListId"] = pl.PrefixListId;
|
|
12788
|
+
if (pl.Description !== void 0) rule["Description"] = pl.Description;
|
|
12789
|
+
out.push(rule);
|
|
12790
|
+
}
|
|
12791
|
+
if ((p.IpRanges?.length ?? 0) === 0 && (p.Ipv6Ranges?.length ?? 0) === 0 && (p.UserIdGroupPairs?.length ?? 0) === 0 && (p.PrefixListIds?.length ?? 0) === 0) out.push({ ...base });
|
|
12792
|
+
}
|
|
12793
|
+
return out;
|
|
12794
|
+
}
|
|
12795
|
+
function ingressRuleIdentity(groupId, properties) {
|
|
12796
|
+
const source = (key) => properties[key] ?? null;
|
|
12797
|
+
return JSON.stringify({
|
|
12798
|
+
g: groupId ?? null,
|
|
12799
|
+
p: sgProtocolKey(properties["IpProtocol"]),
|
|
12800
|
+
f: cfnIngressPortValue(properties["FromPort"]),
|
|
12801
|
+
t: cfnIngressPortValue(properties["ToPort"]),
|
|
12802
|
+
c4: source("CidrIp"),
|
|
12803
|
+
c6: source("CidrIpv6"),
|
|
12804
|
+
sg: source("SourceSecurityGroupId"),
|
|
12805
|
+
sgName: source("SourceSecurityGroupName"),
|
|
12806
|
+
sgOwner: source("SourceSecurityGroupOwnerId"),
|
|
12807
|
+
pl: source("SourcePrefixListId")
|
|
12808
|
+
});
|
|
12809
|
+
}
|
|
12810
|
+
const INGRESS_IDENTITY_KEYS$1 = [
|
|
12811
|
+
"IpProtocol",
|
|
12812
|
+
"FromPort",
|
|
12813
|
+
"ToPort",
|
|
12814
|
+
"CidrIp",
|
|
12815
|
+
"CidrIpv6",
|
|
12816
|
+
"SourceSecurityGroupId",
|
|
12817
|
+
"SourceSecurityGroupName",
|
|
12818
|
+
"SourceSecurityGroupOwnerId",
|
|
12819
|
+
"SourcePrefixListId"
|
|
12820
|
+
];
|
|
12821
|
+
function comparableIngressIdentity(group, rule) {
|
|
12822
|
+
if (!isPlainRecord$1(rule) || typeof group !== "string" || group === "" || isRedactedRecordedValue(group) || !INGRESS_IDENTITY_KEYS$1.every((key) => !isRedactedRecordedValue(rule[key])) || !Number.isFinite(cfnIngressPortValue(rule["FromPort"])) || !Number.isFinite(cfnIngressPortValue(rule["ToPort"]))) return;
|
|
12823
|
+
return ingressRuleIdentity(group, rule);
|
|
12824
|
+
}
|
|
12825
|
+
function survivingRecordOfRuleId(records, selfLogicalId, ruleId) {
|
|
12826
|
+
for (const [lid, record] of records ?? []) {
|
|
12827
|
+
if (lid === selfLogicalId || record.resourceType !== "AWS::EC2::SecurityGroupIngress") continue;
|
|
12828
|
+
if (recordedSgRuleId(record.attributes) === ruleId) return lid;
|
|
12829
|
+
}
|
|
12830
|
+
}
|
|
12831
|
+
function stackIngressRuleHolder(records, selfLogicalId, groupId, rule, idCheck) {
|
|
12832
|
+
if (records === void 0) return void 0;
|
|
12833
|
+
const wanted = comparableIngressIdentity(groupId, rule);
|
|
12834
|
+
if (wanted === void 0) return void 0;
|
|
12835
|
+
for (const [lid, record] of records) {
|
|
12836
|
+
if (lid === selfLogicalId) continue;
|
|
12837
|
+
const props = record.properties;
|
|
12838
|
+
if (record.resourceType === "AWS::EC2::SecurityGroupIngress") {
|
|
12839
|
+
if (!isPlainRecord$1(props) || comparableIngressIdentity(props["GroupId"], props) !== wanted) continue;
|
|
12840
|
+
const ruleId = recordedSgRuleId(record.attributes);
|
|
12841
|
+
if (ruleId !== void 0 && idCheck !== void 0) {
|
|
12842
|
+
if ("live" in idCheck && ruleId !== idCheck.live) continue;
|
|
12843
|
+
if ("own" in idCheck && idCheck.own !== void 0 && ruleId !== idCheck.own) continue;
|
|
12844
|
+
}
|
|
12845
|
+
return lid;
|
|
12846
|
+
}
|
|
12847
|
+
if (record.resourceType === "AWS::EC2::SecurityGroup" && record.physicalId === groupId) {
|
|
12848
|
+
const inline = isPlainRecord$1(props) ? props["SecurityGroupIngress"] : void 0;
|
|
12849
|
+
if (Array.isArray(inline) && inline.some((entry) => comparableIngressIdentity(groupId, entry) === wanted)) return lid;
|
|
12850
|
+
}
|
|
12851
|
+
}
|
|
12852
|
+
}
|
|
12853
|
+
function tagListsMatch(live, declared) {
|
|
12854
|
+
const pairs = (list) => list.every((entry) => isPlainRecord$1(entry) && typeof entry["Key"] === "string") ? list.map((entry) => {
|
|
12855
|
+
const tag = entry;
|
|
12856
|
+
return JSON.stringify([tag["Key"], tag["Value"] ?? ""]);
|
|
12857
|
+
}).sort() : void 0;
|
|
12858
|
+
const a = pairs(live);
|
|
12859
|
+
const b = pairs(declared);
|
|
12860
|
+
return a !== void 0 && b !== void 0 && JSON.stringify(a) === JSON.stringify(b);
|
|
12861
|
+
}
|
|
12862
|
+
function isPlainRecord$1(value) {
|
|
12863
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
12864
|
+
}
|
|
12865
|
+
function descriptionKey(value) {
|
|
12866
|
+
return typeof value === "string" ? value : "";
|
|
12867
|
+
}
|
|
12868
|
+
const NEVER_CONNECTED_SOCKET_CODES = /* @__PURE__ */ new Set([
|
|
12869
|
+
"ECONNREFUSED",
|
|
12870
|
+
"ENOTFOUND",
|
|
12871
|
+
"EHOSTUNREACH",
|
|
12872
|
+
"ENETUNREACH",
|
|
12873
|
+
"EAI_AGAIN"
|
|
12874
|
+
]);
|
|
12875
|
+
const RESENDABLE_SOCKET_CODES = /* @__PURE__ */ new Set([
|
|
12876
|
+
"ECONNRESET",
|
|
12877
|
+
"EPIPE",
|
|
12878
|
+
"ETIMEDOUT",
|
|
12879
|
+
"EADDRNOTAVAIL"
|
|
12880
|
+
]);
|
|
12881
|
+
function errorCode(error) {
|
|
12882
|
+
return error?.code;
|
|
12883
|
+
}
|
|
12884
|
+
function isConnectTimeout(error) {
|
|
12885
|
+
const e = error;
|
|
12886
|
+
return e?.name === "TimeoutError" && e.code === void 0 && typeof e.message === "string" && e.message.includes("did not establish a connection");
|
|
12887
|
+
}
|
|
12888
|
+
function neverReachedAws(error) {
|
|
12889
|
+
if (isConnectTimeout(error)) return true;
|
|
12890
|
+
const code = errorCode(error);
|
|
12891
|
+
if (typeof code === "string" && NEVER_CONNECTED_SOCKET_CODES.has(code)) return true;
|
|
12892
|
+
return error?.name === "CredentialsProviderError";
|
|
12893
|
+
}
|
|
12894
|
+
function isResendableSocketFailure(error) {
|
|
12895
|
+
if (isConnectTimeout(error)) return false;
|
|
12896
|
+
const code = errorCode(error);
|
|
12897
|
+
if (typeof code === "string" && RESENDABLE_SOCKET_CODES.has(code)) return true;
|
|
12898
|
+
return error?.name === "TimeoutError";
|
|
12899
|
+
}
|
|
12900
|
+
function authorizeDefinitelyNotApplied(error) {
|
|
12901
|
+
if (neverReachedAws(error)) return true;
|
|
12902
|
+
const e = error;
|
|
12903
|
+
if (typeof e?.name === "string" && THROTTLING_ERROR_NAMES.has(e.name)) return true;
|
|
12904
|
+
if (e?.$retryable?.throttling === true) return true;
|
|
12905
|
+
const status = e?.$metadata?.httpStatusCode;
|
|
12906
|
+
return typeof status === "number" && status >= 400 && status < 500;
|
|
12907
|
+
}
|
|
12908
|
+
function singleSecurityGroupRuleId(rules) {
|
|
12909
|
+
const ids = (rules ?? []).map((rule) => rule.SecurityGroupRuleId).filter((id) => typeof id === "string" && id.trim() !== "");
|
|
12910
|
+
return ids.length === 1 ? ids[0] : void 0;
|
|
12911
|
+
}
|
|
12912
|
+
function securityGroupRuleMatchesCfnIngress(rule, properties) {
|
|
12913
|
+
if (sgProtocolKey(rule.IpProtocol) !== sgProtocolKey(properties["IpProtocol"])) return false;
|
|
12914
|
+
if ((rule.FromPort ?? -1) !== cfnIngressPortValue(properties["FromPort"])) return false;
|
|
12915
|
+
if ((rule.ToPort ?? -1) !== cfnIngressPortValue(properties["ToPort"])) return false;
|
|
12916
|
+
const sources = [
|
|
12917
|
+
[properties["CidrIp"], rule.CidrIpv4],
|
|
12918
|
+
[properties["CidrIpv6"], rule.CidrIpv6],
|
|
12919
|
+
[properties["SourceSecurityGroupId"], rule.ReferencedGroupInfo?.GroupId],
|
|
12920
|
+
[properties["SourcePrefixListId"], rule.PrefixListId]
|
|
12921
|
+
];
|
|
12922
|
+
for (const [declared, actual] of sources) if (declared !== void 0 && declared !== null && declared !== actual) return false;
|
|
12923
|
+
return true;
|
|
12924
|
+
}
|
|
12925
|
+
function sgRuleKey(rule, direction) {
|
|
12926
|
+
const peerKey = direction === "egress" ? rule["DestinationSecurityGroupId"] : rule["SourceSecurityGroupId"];
|
|
12927
|
+
const prefixKey = direction === "egress" ? rule["DestinationPrefixListId"] : rule["SourcePrefixListId"];
|
|
12928
|
+
const peerOwner = direction === "ingress" ? rule["SourceSecurityGroupOwnerId"] : void 0;
|
|
12929
|
+
return JSON.stringify({
|
|
12930
|
+
p: sgProtocolKey(rule["IpProtocol"]),
|
|
12931
|
+
f: rule["FromPort"] ?? null,
|
|
12932
|
+
t: rule["ToPort"] ?? null,
|
|
12933
|
+
c4: rule["CidrIp"] ?? null,
|
|
12934
|
+
c6: rule["CidrIpv6"] ?? null,
|
|
12935
|
+
peer: peerKey ?? null,
|
|
12936
|
+
peerOwner: peerOwner ?? null,
|
|
12937
|
+
pl: prefixKey ?? null,
|
|
12938
|
+
d: rule["Description"] ?? null
|
|
12939
|
+
});
|
|
12940
|
+
}
|
|
12941
|
+
function reconcileSgRules(awsRules, stateRules, direction) {
|
|
12942
|
+
if (!stateRules || stateRules.length === 0) return awsRules;
|
|
12943
|
+
const remaining = [...awsRules];
|
|
12944
|
+
const reordered = [];
|
|
12945
|
+
for (const sr of stateRules) {
|
|
12946
|
+
const key = sgRuleKey(sr, direction);
|
|
12947
|
+
const idx = remaining.findIndex((ar) => sgRuleKey(ar, direction) === key);
|
|
12948
|
+
if (idx >= 0) reordered.push(remaining.splice(idx, 1)[0]);
|
|
12949
|
+
}
|
|
12950
|
+
return [...reordered, ...remaining];
|
|
12951
|
+
}
|
|
12952
|
+
function isDefaultEgressRule(rule) {
|
|
12953
|
+
if (rule["IpProtocol"] !== "-1") return false;
|
|
12954
|
+
if (rule["CidrIp"] !== "0.0.0.0/0") return false;
|
|
12955
|
+
if (rule["CidrIpv6"] !== void 0) return false;
|
|
12956
|
+
if (rule["DestinationSecurityGroupId"] !== void 0) return false;
|
|
12957
|
+
if (rule["DestinationPrefixListId"] !== void 0) return false;
|
|
12958
|
+
if (rule["Description"] !== void 0) return false;
|
|
12959
|
+
if (rule["FromPort"] !== void 0 && rule["FromPort"] !== -1) return false;
|
|
12960
|
+
if (rule["ToPort"] !== void 0 && rule["ToPort"] !== -1) return false;
|
|
12961
|
+
return true;
|
|
12962
|
+
}
|
|
12963
|
+
|
|
12964
|
+
// src/provisioning/providers/ec2/sg-rule-by-id.ts
|
|
12965
|
+
function isPlainRecord(value) {
|
|
12966
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
12967
|
+
}
|
|
12968
|
+
const LIST_KEY = {
|
|
12969
|
+
ingress: "SecurityGroupIngress",
|
|
12970
|
+
egress: "SecurityGroupEgress"
|
|
12971
|
+
};
|
|
12972
|
+
const DENIED = /* @__PURE__ */ new Set([
|
|
12973
|
+
"UnauthorizedOperation",
|
|
12974
|
+
"AccessDenied",
|
|
12975
|
+
"AccessDeniedException"
|
|
12976
|
+
]);
|
|
12977
|
+
function sgRulesReadFailure(err) {
|
|
12978
|
+
const name = err?.name;
|
|
12979
|
+
const summary = describeAwsFailure(err).summary;
|
|
12980
|
+
return typeof name === "string" && DENIED.has(name) ? `${summary}; this read needs ec2:DescribeSecurityGroupRules` : summary;
|
|
12981
|
+
}
|
|
12982
|
+
function cfnSgRuleOfDescribed(rule) {
|
|
12983
|
+
const egress = rule.IsEgress === true;
|
|
12984
|
+
const out = {};
|
|
12985
|
+
if (rule.IpProtocol !== void 0) out["IpProtocol"] = rule.IpProtocol;
|
|
12986
|
+
if (rule.IpProtocol !== "-1") {
|
|
12987
|
+
if (rule.FromPort !== void 0) out["FromPort"] = rule.FromPort;
|
|
12988
|
+
if (rule.ToPort !== void 0) out["ToPort"] = rule.ToPort;
|
|
12989
|
+
}
|
|
12990
|
+
if (rule.CidrIpv4 !== void 0) out["CidrIp"] = rule.CidrIpv4;
|
|
12991
|
+
if (rule.CidrIpv6 !== void 0) out["CidrIpv6"] = rule.CidrIpv6;
|
|
12992
|
+
const peer = rule.ReferencedGroupInfo;
|
|
12993
|
+
if (peer?.GroupId !== void 0) {
|
|
12994
|
+
out[egress ? "DestinationSecurityGroupId" : "SourceSecurityGroupId"] = peer.GroupId;
|
|
12995
|
+
if (!egress && peer.UserId !== void 0) out["SourceSecurityGroupOwnerId"] = peer.UserId;
|
|
12996
|
+
}
|
|
12997
|
+
if (rule.PrefixListId !== void 0) out[egress ? "DestinationPrefixListId" : "SourcePrefixListId"] = rule.PrefixListId;
|
|
12998
|
+
if (rule.Description !== void 0) out["Description"] = rule.Description;
|
|
12999
|
+
return out;
|
|
13000
|
+
}
|
|
13001
|
+
async function siblingIdOwnedSgRules(provider, groupId, properties, context) {
|
|
13002
|
+
if (context?.afterOwnWrite === true) return void 0;
|
|
13003
|
+
const records = Object.entries(context?.siblings ?? {});
|
|
13004
|
+
const byId = /* @__PURE__ */ new Map();
|
|
13005
|
+
for (const [lid, sibling] of records) {
|
|
13006
|
+
const props = sibling.properties;
|
|
13007
|
+
if (!isPlainRecord(props) || props["GroupId"] !== groupId) continue;
|
|
13008
|
+
if (!sgSiblingDecidedById(lid, sibling, records, properties)) continue;
|
|
13009
|
+
const id = recordedRuleIdOf(sibling);
|
|
13010
|
+
if (id !== void 0) byId.set(id, lid);
|
|
13011
|
+
}
|
|
13012
|
+
if (byId.size === 0) return void 0;
|
|
13013
|
+
let rules;
|
|
13014
|
+
let failure = "more pages than cdkd reads";
|
|
13015
|
+
try {
|
|
13016
|
+
rules = await provider.listGroupRules(groupId);
|
|
13017
|
+
} catch (err) {
|
|
13018
|
+
failure = sgRulesReadFailure(err);
|
|
13019
|
+
}
|
|
13020
|
+
if (rules === void 0) {
|
|
13021
|
+
provider.logger.warn(safeMsg`readCurrentState: the rules of ${groupId} could not be read with their ids (${failure}), so its standalone rules are matched by protocol, ports and peer`);
|
|
13022
|
+
return;
|
|
13023
|
+
}
|
|
13024
|
+
const out = {
|
|
13025
|
+
owned: {
|
|
13026
|
+
ingress: /* @__PURE__ */ new Set(),
|
|
13027
|
+
egress: /* @__PURE__ */ new Set()
|
|
13028
|
+
},
|
|
13029
|
+
decided: /* @__PURE__ */ new Set()
|
|
13030
|
+
};
|
|
13031
|
+
for (const rule of rules) {
|
|
13032
|
+
const id = rule.SecurityGroupRuleId;
|
|
13033
|
+
const lid = id === void 0 ? void 0 : byId.get(id);
|
|
13034
|
+
if (rule.GroupId !== groupId || lid === void 0) continue;
|
|
13035
|
+
const direction = rule.IsEgress === true ? "egress" : "ingress";
|
|
13036
|
+
if ((context?.siblings?.[lid])?.resourceType !== (direction === "egress" ? "AWS::EC2::SecurityGroupEgress" : "AWS::EC2::SecurityGroupIngress")) continue;
|
|
13037
|
+
const identity = sgRuleOwnershipIdentity(cfnSgRuleOfDescribed(rule), direction);
|
|
13038
|
+
if (identity === void 0) continue;
|
|
13039
|
+
out.owned[direction].add(identity);
|
|
13040
|
+
out.decided.add(lid);
|
|
13041
|
+
}
|
|
13042
|
+
for (const direction of ["ingress", "egress"]) {
|
|
13043
|
+
const inline = properties?.[LIST_KEY[direction]];
|
|
13044
|
+
if (!Array.isArray(inline)) continue;
|
|
13045
|
+
for (const entry of inline) {
|
|
13046
|
+
const identity = sgRuleOwnershipIdentity(entry, direction);
|
|
13047
|
+
if (identity !== void 0) out.owned[direction].delete(identity);
|
|
13048
|
+
}
|
|
13049
|
+
}
|
|
13050
|
+
return out;
|
|
13051
|
+
}
|
|
13052
|
+
function sgRevokesHeldBySiblings(rules, groupId, toRevoke, direction, siblingIds) {
|
|
13053
|
+
const heldIdentities = /* @__PURE__ */ new Map();
|
|
13054
|
+
for (const rule of rules) {
|
|
13055
|
+
const id = rule.SecurityGroupRuleId;
|
|
13056
|
+
if (id === void 0 || !siblingIds.has(id) || rule.GroupId !== groupId) continue;
|
|
13057
|
+
if (rule.IsEgress === true !== (direction === "egress")) continue;
|
|
13058
|
+
const identity = sgRuleOwnershipIdentity(cfnSgRuleOfDescribed(rule), direction);
|
|
13059
|
+
if (identity !== void 0) heldIdentities.set(identity, id);
|
|
13060
|
+
}
|
|
13061
|
+
const held = /* @__PURE__ */ new Map();
|
|
13062
|
+
for (const rule of toRevoke) {
|
|
13063
|
+
const identity = sgRuleOwnershipIdentity(rule, direction);
|
|
13064
|
+
if (identity === void 0) held.set(rule, "a rule it would revoke cannot be compared with its standalone rules");
|
|
13065
|
+
else {
|
|
13066
|
+
const id = heldIdentities.get(identity);
|
|
13067
|
+
if (id !== void 0) held.set(rule, `a rule it would revoke is ${id}, a standalone rule's`);
|
|
13068
|
+
}
|
|
13069
|
+
}
|
|
13070
|
+
return held;
|
|
13071
|
+
}
|
|
13072
|
+
function cidrKey(value) {
|
|
13073
|
+
if (typeof value !== "string") return value;
|
|
13074
|
+
const [address, prefix, ...rest] = value.trim().split("/");
|
|
13075
|
+
if (address === void 0 || prefix === void 0 || rest.length > 0) return value;
|
|
13076
|
+
const length = Number(prefix);
|
|
13077
|
+
if (!Number.isInteger(length)) return value;
|
|
13078
|
+
const octets = address.split(".");
|
|
13079
|
+
if (octets.length === 4 && length >= 0 && length <= 32) {
|
|
13080
|
+
const parts = octets.map(Number);
|
|
13081
|
+
if (parts.some((p) => !Number.isInteger(p) || p < 0 || p > 255)) return value;
|
|
13082
|
+
const n = parts.reduce((acc, p) => acc * 256 + p, 0);
|
|
13083
|
+
const network = length === 0 ? 0 : n - n % 2 ** (32 - length);
|
|
13084
|
+
return `${[
|
|
13085
|
+
24,
|
|
13086
|
+
16,
|
|
13087
|
+
8,
|
|
13088
|
+
0
|
|
13089
|
+
].map((shift) => Math.floor(network / 2 ** shift) % 256).join(".")}/${length}`;
|
|
13090
|
+
}
|
|
13091
|
+
try {
|
|
13092
|
+
return `${new URL(`http://[${address}]`).hostname}/${length}`;
|
|
13093
|
+
} catch {
|
|
13094
|
+
return value;
|
|
13095
|
+
}
|
|
13096
|
+
}
|
|
13097
|
+
const INGRESS_IDENTITY_KEYS = [
|
|
13098
|
+
"IpProtocol",
|
|
13099
|
+
"FromPort",
|
|
13100
|
+
"ToPort",
|
|
13101
|
+
"CidrIp",
|
|
13102
|
+
"CidrIpv6",
|
|
13103
|
+
"SourceSecurityGroupId",
|
|
13104
|
+
"SourceSecurityGroupName",
|
|
13105
|
+
"SourceSecurityGroupOwnerId",
|
|
13106
|
+
"SourcePrefixListId"
|
|
13107
|
+
];
|
|
13108
|
+
function describedRuleMatchesRecord(rule, properties) {
|
|
13109
|
+
if (sgProtocolKey(rule.IpProtocol) !== sgProtocolKey(properties["IpProtocol"])) return false;
|
|
13110
|
+
if ((rule.FromPort ?? -1) !== cfnIngressPortValue(properties["FromPort"])) return false;
|
|
13111
|
+
if ((rule.ToPort ?? -1) !== cfnIngressPortValue(properties["ToPort"])) return false;
|
|
13112
|
+
if ([
|
|
13113
|
+
[cidrKey(properties["CidrIp"] ?? void 0), cidrKey(rule.CidrIpv4)],
|
|
13114
|
+
[cidrKey(properties["CidrIpv6"] ?? void 0), cidrKey(rule.CidrIpv6)],
|
|
13115
|
+
[properties["SourceSecurityGroupId"] ?? void 0, rule.ReferencedGroupInfo?.GroupId],
|
|
13116
|
+
[properties["SourcePrefixListId"] ?? void 0, rule.PrefixListId]
|
|
13117
|
+
].some(([declared, live]) => declared !== live)) return false;
|
|
13118
|
+
const owner = properties["SourceSecurityGroupOwnerId"];
|
|
13119
|
+
return owner == null || owner === rule.ReferencedGroupInfo?.UserId;
|
|
13120
|
+
}
|
|
13121
|
+
async function readSgIngressById(provider, groupId, properties, context) {
|
|
13122
|
+
if (context?.afterOwnWrite === true) return "fallback";
|
|
13123
|
+
const recordedId = recordedSgRuleId(context?.attributes);
|
|
13124
|
+
if (recordedId === void 0) return "fallback";
|
|
13125
|
+
const records = Object.entries(context?.siblings ?? {});
|
|
13126
|
+
const groupRecord = records.find(([, r]) => r.resourceType === "AWS::EC2::SecurityGroup" && r.physicalId === groupId)?.[1];
|
|
13127
|
+
const self = {
|
|
13128
|
+
resourceType: "AWS::EC2::SecurityGroupIngress",
|
|
13129
|
+
properties: {
|
|
13130
|
+
...properties,
|
|
13131
|
+
GroupId: groupId
|
|
13132
|
+
},
|
|
13133
|
+
attributes: context?.attributes
|
|
13134
|
+
};
|
|
13135
|
+
if (!sgSiblingDecidedById(void 0, self, records, groupRecord?.properties)) return "fallback";
|
|
13136
|
+
const rules = await provider.listGroupRules(groupId);
|
|
13137
|
+
if (rules === void 0) return "fallback";
|
|
13138
|
+
const rule = rules.find((r) => r.SecurityGroupRuleId === recordedId);
|
|
13139
|
+
if (rule === void 0) return "fallback";
|
|
13140
|
+
if (rule.GroupId !== groupId || rule.IsEgress === true) return "gone";
|
|
13141
|
+
const live = cfnSgRuleOfDescribed(rule);
|
|
13142
|
+
if (properties["SourceSecurityGroupOwnerId"] == null) delete live["SourceSecurityGroupOwnerId"];
|
|
13143
|
+
if (describedRuleMatchesRecord(rule, properties)) {
|
|
13144
|
+
for (const key of INGRESS_IDENTITY_KEYS) if (properties[key] != null) live[key] = properties[key];
|
|
13145
|
+
return live;
|
|
13146
|
+
}
|
|
13147
|
+
if (sgProtocolKey(rule.IpProtocol) === sgProtocolKey(properties["IpProtocol"])) {
|
|
13148
|
+
if (properties["IpProtocol"] != null) live["IpProtocol"] = properties["IpProtocol"];
|
|
13149
|
+
}
|
|
13150
|
+
for (const key of ["FromPort", "ToPort"]) {
|
|
13151
|
+
const declared = properties[key];
|
|
13152
|
+
if (declared != null && cfnIngressPortValue(declared) === cfnIngressPortValue(live[key])) live[key] = declared;
|
|
13153
|
+
}
|
|
13154
|
+
return live;
|
|
13155
|
+
}
|
|
13156
|
+
|
|
13157
|
+
// src/provisioning/providers/ec2/sg-revert-guard.ts
|
|
13158
|
+
function sgRuleDiffKey(rule, direction) {
|
|
13159
|
+
const peerKey = direction === "egress" ? rule["DestinationSecurityGroupId"] : rule["SourceSecurityGroupId"];
|
|
13160
|
+
const prefixKey = direction === "egress" ? rule["DestinationPrefixListId"] : rule["SourcePrefixListId"];
|
|
13161
|
+
const peerOwner = direction === "ingress" ? rule["SourceSecurityGroupOwnerId"] : void 0;
|
|
13162
|
+
const peerName = direction === "ingress" ? rule["SourceSecurityGroupName"] : void 0;
|
|
13163
|
+
return JSON.stringify({
|
|
13164
|
+
p: sgProtocolKey(rule["IpProtocol"]),
|
|
13165
|
+
f: rule["FromPort"] ?? null,
|
|
13166
|
+
t: rule["ToPort"] ?? null,
|
|
13167
|
+
c4: rule["CidrIp"] ?? null,
|
|
13168
|
+
c6: rule["CidrIpv6"] ?? null,
|
|
13169
|
+
peer: peerKey ?? null,
|
|
13170
|
+
peerName: peerKey ? null : peerName ?? null,
|
|
13171
|
+
peerOwner: peerOwner ?? null,
|
|
13172
|
+
pl: prefixKey ?? null
|
|
13173
|
+
});
|
|
13174
|
+
}
|
|
13175
|
+
function sgRulesToRevoke(previous, next, direction) {
|
|
13176
|
+
const nextKeys = new Set(next.map((rule) => sgRuleDiffKey(rule, direction)));
|
|
13177
|
+
const seen = /* @__PURE__ */ new Set();
|
|
13178
|
+
return previous.filter((rule) => {
|
|
13179
|
+
const key = sgRuleDiffKey(rule, direction);
|
|
13180
|
+
if (nextKeys.has(key) || seen.has(key)) return false;
|
|
13181
|
+
seen.add(key);
|
|
13182
|
+
return true;
|
|
13183
|
+
});
|
|
13184
|
+
}
|
|
13185
|
+
async function refuseRevertRevokingSiblingRules(listRules, logicalId, groupId, resourceType, properties, previousProperties, siblingIds) {
|
|
13186
|
+
const list = (bag, key) => Array.isArray(bag[key]) ? bag[key] : [];
|
|
13187
|
+
const toRevoke = {
|
|
13188
|
+
ingress: sgRulesToRevoke(list(previousProperties, "SecurityGroupIngress"), list(properties, "SecurityGroupIngress"), "ingress"),
|
|
13189
|
+
egress: sgRulesToRevoke(list(previousProperties, "SecurityGroupEgress"), list(properties, "SecurityGroupEgress"), "egress")
|
|
13190
|
+
};
|
|
13191
|
+
if (toRevoke.ingress.length === 0 && toRevoke.egress.length === 0) return;
|
|
13192
|
+
let rules;
|
|
13193
|
+
let failure = "more pages than cdkd reads";
|
|
13194
|
+
try {
|
|
13195
|
+
rules = await listRules(groupId);
|
|
13196
|
+
} catch (err) {
|
|
13197
|
+
failure = sgRulesReadFailure(err);
|
|
13198
|
+
}
|
|
13199
|
+
if (rules === void 0) throw new ResourceUpdateNotSupportedError(resourceType, logicalId, `its rules could not be read with their ids (${failure}), so cdkd cannot tell whether a rule the revert would revoke is a standalone rule's of this stack. Nothing was changed`);
|
|
13200
|
+
const reasons = /* @__PURE__ */ new Set();
|
|
13201
|
+
for (const direction of ["ingress", "egress"]) for (const reason of sgRevokesHeldBySiblings(rules, groupId, toRevoke[direction], direction, siblingIds).values()) reasons.add(reason);
|
|
13202
|
+
if (reasons.size > 0) throw new ResourceUpdateNotSupportedError(resourceType, logicalId, `${[...reasons].join("; ")}, and a group's revert never revokes a standalone rule of its stack. Nothing was changed; the standalone rule's own drift is reported on its resource`);
|
|
13203
|
+
}
|
|
13204
|
+
function refuseCcGroupRevertChangingRules(logicalId, groupId, resourceType, properties, previousProperties, records, groupName) {
|
|
13205
|
+
const named = (value) => typeof value === "string" && value !== "" && !isRedactedRecordedValue(value);
|
|
13206
|
+
let hasSibling = false;
|
|
13207
|
+
for (const [, record] of records) {
|
|
13208
|
+
if (typeof record !== "object" || record === null) continue;
|
|
13209
|
+
if (record.resourceType !== "AWS::EC2::SecurityGroupIngress" && record.resourceType !== "AWS::EC2::SecurityGroupEgress") continue;
|
|
13210
|
+
const props = record.properties;
|
|
13211
|
+
const id = typeof props === "object" && props !== null ? props["GroupId"] : void 0;
|
|
13212
|
+
const name = typeof props === "object" && props !== null ? props["GroupName"] : void 0;
|
|
13213
|
+
if (id === groupId || named(groupName) && name === groupName || !named(id) && !named(name)) {
|
|
13214
|
+
hasSibling = true;
|
|
13215
|
+
break;
|
|
13216
|
+
}
|
|
13217
|
+
}
|
|
13218
|
+
if (!hasSibling) return;
|
|
13219
|
+
const list = (bag, key) => JSON.stringify(Array.isArray(bag[key]) ? bag[key] : []);
|
|
13220
|
+
const changed = ["SecurityGroupIngress", "SecurityGroupEgress"].filter((key) => list(properties, key) !== list(previousProperties, key));
|
|
13221
|
+
if (changed.length === 0) return;
|
|
13222
|
+
throw new ResourceUpdateNotSupportedError(resourceType, logicalId, `its ${changed.join(" and ")} would change, and a security group provisioned through Cloud Control replaces the whole list, which would drop the rules this stack's standalone rule resources own. Nothing was changed; revert it by redeploying the stack`);
|
|
13223
|
+
}
|
|
13224
|
+
|
|
12815
13225
|
// src/cli/commands/drift/revert-apply.ts
|
|
12816
13226
|
async function applyRevertUpdate(args) {
|
|
12817
13227
|
const { logger, tally, report, narrowedByLogicalId, settledByRevert, outcome, stateResource, provider, secrets, revertBaseline, newProperties } = args;
|
|
@@ -12827,10 +13237,12 @@ async function applyRevertUpdate(args) {
|
|
|
12827
13237
|
previous: outcome.awsProperties,
|
|
12828
13238
|
desired: newProperties
|
|
12829
13239
|
});
|
|
13240
|
+
if (outcome.resourceType === "AWS::EC2::SecurityGroup" && stateResource.provisionedBy === "cc-api") refuseCcGroupRevertChangingRules(outcome.logicalId, stateResource.physicalId, outcome.resourceType, newProperties, revertPrevious, Object.entries(report.state.resources ?? {}).filter(([lid]) => lid !== outcome.logicalId), revertPrevious["GroupName"] ?? stateResource.properties?.["GroupName"]);
|
|
12830
13241
|
const updateResult = await withRetry(() => provider.update(outcome.logicalId, stateResource.physicalId, outcome.resourceType, newProperties, revertPrevious, {
|
|
12831
13242
|
desiredFromAwsReadback: true,
|
|
12832
13243
|
declaredEmptyProperties: declaredEmptyProperties(stateResource.properties),
|
|
12833
13244
|
declaredTrueProperties: declaredTrueProperties(stateResource.properties),
|
|
13245
|
+
...outcome.resourceType === "AWS::EC2::SecurityGroup" && { siblingSgRuleIds: new Set(siblingRecordedSgRuleIds(stateResource.physicalId, Object.entries(report.state.resources ?? {}).filter(([lid]) => lid !== outcome.logicalId)).keys()) },
|
|
12834
13246
|
maskSecrets: createSecretMasker(secrets),
|
|
12835
13247
|
expectedRegion: report.region,
|
|
12836
13248
|
recordedAttributes: stateResource.attributes,
|
|
@@ -12896,7 +13308,7 @@ function recordReturnedIdentity(args, updateResult, verdict) {
|
|
|
12896
13308
|
try {
|
|
12897
13309
|
if (updateResult !== void 0) {
|
|
12898
13310
|
const noEchoDeclared = recordNoEchoAttributeValues(updateResult, secrets, newProperties);
|
|
12899
|
-
const next = recordAfterRollbackUpdate(stateResource, updateResult);
|
|
13311
|
+
const next = recordAfterRollbackUpdate(stateResource, updateResult, (key) => logger.warn(differingIdentityWarning(outcome.logicalId, outcome.resourceType, key)));
|
|
12900
13312
|
const keptAttributes = next.attributes === void 0 ? void 0 : keepRecordedAttributesOverMask(redactForState(next.attributes, {
|
|
12901
13313
|
provenance: "value-scan",
|
|
12902
13314
|
secrets
|
|
@@ -13461,6 +13873,7 @@ function resolveTargetRefs(stacks, stateRefs, options) {
|
|
|
13461
13873
|
function createIamPrincipalUniqueIdResolver(awsClients) {
|
|
13462
13874
|
const cache = /* @__PURE__ */ new Map();
|
|
13463
13875
|
let warnedOnDenied = false;
|
|
13876
|
+
let warnedOnOtherEntity = false;
|
|
13464
13877
|
return async (arn) => {
|
|
13465
13878
|
if (cache.has(arn)) return cache.get(arn);
|
|
13466
13879
|
let uniqueId;
|
|
@@ -13478,7 +13891,13 @@ function createIamPrincipalUniqueIdResolver(awsClients) {
|
|
|
13478
13891
|
entityId = user?.UserId;
|
|
13479
13892
|
}
|
|
13480
13893
|
if (entityArn !== void 0 && entityArn.toLowerCase() === arn.toLowerCase()) uniqueId = entityId;
|
|
13481
|
-
else
|
|
13894
|
+
else {
|
|
13895
|
+
if (!warnedOnOtherEntity) {
|
|
13896
|
+
warnedOnOtherEntity = true;
|
|
13897
|
+
getLogger().warn("A resource policy principal ARN names another account or IAM path, so its unique id (AROA…/AIDA…) cannot be matched to it; a difference between the two spellings may be reported as drift. If the principal is the intended one, drift with --accept records the ARN form and clears " + safeMsg`it${verboseAwareText("; re-run with --verbose to see which principal", " (the principal is named in the debug output)")}.`);
|
|
13898
|
+
}
|
|
13899
|
+
getLogger().debug(`Principal ${displayIdent(arn, { maxCodePoints: 613 })} resolved to ${entityArn === void 0 ? "no entity" : displayIdent(entityArn, { maxCodePoints: 613 })} — same name in this account or under another IAM path; leaving the policy principal comparison untouched.`);
|
|
13900
|
+
}
|
|
13482
13901
|
} catch (error) {
|
|
13483
13902
|
const message = describeAwsFailure(error).detail;
|
|
13484
13903
|
const name = error instanceof Error ? error.name : "";
|
|
@@ -14615,6 +15034,8 @@ async function destroyStackUnderLock({ stackName, state, ctx, logger, result, re
|
|
|
14615
15034
|
...ctx.stackDestroy === true && { stackDestroy: true },
|
|
14616
15035
|
maskSecrets: createUnionSecretMasker([bag]),
|
|
14617
15036
|
stop: () => lock.interrupted,
|
|
15037
|
+
holderProvider: () => destroyProviderRegistry.getProvider(resourceType),
|
|
15038
|
+
warn: (m) => logger.warn(safeMsg` ⚠ ${logicalId}'s superseded ${resourceType}: ${m}`),
|
|
14618
15039
|
preDeleteSnapshot: {
|
|
14619
15040
|
clients: destroyAwsClients ?? ctx.baseAwsClients,
|
|
14620
15041
|
logger: maskedSnapshotLogger(logger, createUnionSecretMasker([bag]))
|
|
@@ -14632,6 +15053,12 @@ async function destroyStackUnderLock({ stackName, state, ctx, logger, result, re
|
|
|
14632
15053
|
logger.info(safeMsg` ✓ Deleted ${logicalId}'s superseded ${resourceType}`);
|
|
14633
15054
|
return false;
|
|
14634
15055
|
}
|
|
15056
|
+
if (outcome.kind === "gone" || outcome.kind === "notOurs") {
|
|
15057
|
+
drop();
|
|
15058
|
+
if (outcome.kind === "gone") logger.info(safeMsg` ✓ ${logicalId}'s superseded ${resourceType} is already gone`);
|
|
15059
|
+
else logger.warn(safeMsg` ⚠ ${logicalId}'s superseded ${resourceType} (${physicalId}) was not deleted: ${outcome.cause}. The replaced resource is gone, and cdkd no longer tracks it in state.`);
|
|
15060
|
+
return false;
|
|
15061
|
+
}
|
|
14635
15062
|
const replacement = outcome.kind === "failed" ? outcome.replacement : void 0;
|
|
14636
15063
|
if (replacement !== void 0) remainingSuperseded = (remainingSuperseded ?? []).map((row) => row === entry ? replacement : row);
|
|
14637
15064
|
if (early) {
|
|
@@ -19944,6 +20371,10 @@ var AttributeFetcher = class {
|
|
|
19944
20371
|
ok: false,
|
|
19945
20372
|
reason: UNREADABLE_ORPHAN_RECORD_REASON
|
|
19946
20373
|
};
|
|
20374
|
+
if (isUnexposedRecordedIdentity(orphan.resourceType, attribute)) return {
|
|
20375
|
+
ok: false,
|
|
20376
|
+
reason: `CloudFormation does not expose ${displaySafe(attribute, { asciiOnly: true })} as an attribute of ${displaySafe(orphan.resourceType, { asciiOnly: true })}; cdkd records it for its own identity checks only`
|
|
20377
|
+
};
|
|
19947
20378
|
const recorded = servableRecordedAttribute(orphan, attribute);
|
|
19948
20379
|
let provider;
|
|
19949
20380
|
try {
|
|
@@ -22961,7 +23392,7 @@ async function eventsCommand(stackName, options) {
|
|
|
22961
23392
|
const events = await reader.readRunEvents(stackName, targetRegion, options.run);
|
|
22962
23393
|
if (events === null) throw new CdkdError(`No deployment-event stream found for run ${displayIdent(options.run)} of stack ${displayStackName(stackName)} in region ${displayIdent(targetRegion)}.`, "EVENTS_RUN_NOT_FOUND");
|
|
22963
23394
|
if (asJson) {
|
|
22964
|
-
process.stdout.write(`${stringifyJsonPayload(events)}\n`);
|
|
23395
|
+
process.stdout.write(`${stringifyJsonPayload(events.map(withDisplayedPhysicalId))}\n`);
|
|
22965
23396
|
return;
|
|
22966
23397
|
}
|
|
22967
23398
|
printRunEvents(stackName, targetRegion, options.run, events);
|
|
@@ -23054,6 +23485,14 @@ async function eventsPruneCommand(stackName, options) {
|
|
|
23054
23485
|
async function confirmPrompt$1(prompt) {
|
|
23055
23486
|
return confirmOrRefuse(prompt, { refusal: "The cdkd events prune confirmation prompt cannot run in a non-interactive environment. Pass -y / --yes to confirm the prune, or run the command from a real terminal. Nothing has been deleted." });
|
|
23056
23487
|
}
|
|
23488
|
+
function withDisplayedPhysicalId(event) {
|
|
23489
|
+
if (typeof event.physicalId !== "string") return event;
|
|
23490
|
+
const shown = displayPhysicalId(event.resourceType, event.physicalId);
|
|
23491
|
+
return shown === event.physicalId ? event : {
|
|
23492
|
+
...event,
|
|
23493
|
+
physicalId: shown
|
|
23494
|
+
};
|
|
23495
|
+
}
|
|
23057
23496
|
function printRunList(stackName, region, runs) {
|
|
23058
23497
|
const logger = getLogger();
|
|
23059
23498
|
logger.info(`${bold("Deployment runs for")} ${cyan(plainOrDescribed(stackName, "stack name"))} ` + gray(`(${plainOrDescribed(region, "region")})`));
|
|
@@ -26528,44 +26967,96 @@ function indexGrandchildTemplatePaths(childTemplate, childTemplatePath) {
|
|
|
26528
26967
|
return result;
|
|
26529
26968
|
}
|
|
26530
26969
|
|
|
26970
|
+
// src/cli/commands/import/sibling-refs.ts
|
|
26971
|
+
function refTargets(value, out) {
|
|
26972
|
+
if (Array.isArray(value)) {
|
|
26973
|
+
for (const v of value) refTargets(v, out);
|
|
26974
|
+
return;
|
|
26975
|
+
}
|
|
26976
|
+
if (typeof value !== "object" || value === null) return;
|
|
26977
|
+
const obj = value;
|
|
26978
|
+
const keys = Object.keys(obj);
|
|
26979
|
+
if (keys.length === 1 && keys[0] === "Ref" && typeof obj["Ref"] === "string") {
|
|
26980
|
+
out.add(obj["Ref"]);
|
|
26981
|
+
return;
|
|
26982
|
+
}
|
|
26983
|
+
for (const v of Object.values(obj)) refTargets(v, out);
|
|
26984
|
+
}
|
|
26985
|
+
function inRefOrder(resources) {
|
|
26986
|
+
const byId = new Map(resources.map((r) => [r.logicalId, r]));
|
|
26987
|
+
const ordered = [];
|
|
26988
|
+
const state = /* @__PURE__ */ new Map();
|
|
26989
|
+
const visit = (entry) => {
|
|
26990
|
+
if (state.has(entry.logicalId)) return;
|
|
26991
|
+
state.set(entry.logicalId, "visiting");
|
|
26992
|
+
const targets = /* @__PURE__ */ new Set();
|
|
26993
|
+
refTargets(entry.resource.Properties, targets);
|
|
26994
|
+
for (const id of targets) {
|
|
26995
|
+
const target = byId.get(id);
|
|
26996
|
+
if (target && id !== entry.logicalId) visit(target);
|
|
26997
|
+
}
|
|
26998
|
+
state.set(entry.logicalId, "done");
|
|
26999
|
+
ordered.push(entry);
|
|
27000
|
+
};
|
|
27001
|
+
for (const entry of resources) visit(entry);
|
|
27002
|
+
return ordered;
|
|
27003
|
+
}
|
|
27004
|
+
function adoptedRefValue(row) {
|
|
27005
|
+
if (row.outcome !== "imported" || typeof row.physicalId !== "string" || !row.physicalId) return;
|
|
27006
|
+
const attributes = row.attributes ?? {};
|
|
27007
|
+
const fromAttributes = (keys) => {
|
|
27008
|
+
for (const key of keys) {
|
|
27009
|
+
const value = attributes[key];
|
|
27010
|
+
if (typeof value === "string" && value !== "") return value;
|
|
27011
|
+
}
|
|
27012
|
+
};
|
|
27013
|
+
try {
|
|
27014
|
+
const value = cfnRefValueFromPhysicalId(row.resourceType, row.physicalId, fromAttributes);
|
|
27015
|
+
return value === "" ? void 0 : value;
|
|
27016
|
+
} catch {
|
|
27017
|
+
return;
|
|
27018
|
+
}
|
|
27019
|
+
}
|
|
27020
|
+
async function dispatchInRefOrder(resources, overrides, importRow) {
|
|
27021
|
+
const refValues = new Map(overrides);
|
|
27022
|
+
const rows = [];
|
|
27023
|
+
for (const entry of inRefOrder(resources)) {
|
|
27024
|
+
const row = await importRow(entry, refValues);
|
|
27025
|
+
rows.push(row);
|
|
27026
|
+
const refValue = overrides.has(entry.logicalId) ? void 0 : adoptedRefValue(row);
|
|
27027
|
+
if (refValue !== void 0) refValues.set(entry.logicalId, refValue);
|
|
27028
|
+
}
|
|
27029
|
+
const templateIndex = new Map(resources.map(({ logicalId }, i) => [logicalId, i]));
|
|
27030
|
+
return rows.sort((a, b) => (templateIndex.get(a.logicalId) ?? 0) - (templateIndex.get(b.logicalId) ?? 0));
|
|
27031
|
+
}
|
|
27032
|
+
|
|
26531
27033
|
// src/cli/commands/import/locked-import.ts
|
|
26532
27034
|
async function runLockedImport(ctx) {
|
|
26533
27035
|
const { options, logger, stateBucket, lockRecovery, stateBackend, lockManager, stackInfo, targetRegion, regionClients, providerRegistry, assetRedirect, stateTemplate, overrides, migrationCfnStackName, template, templateParser, resources, templateLogicalIds, accountIdForNestedSynth, selectiveMode, existingState, existingEtag, migrationPending, owner } = ctx;
|
|
26534
27036
|
let { migrationTree } = ctx;
|
|
26535
|
-
const collectRows = async () => {
|
|
26536
|
-
|
|
26537
|
-
|
|
26538
|
-
|
|
26539
|
-
|
|
26540
|
-
|
|
26541
|
-
|
|
26542
|
-
|
|
26543
|
-
|
|
26544
|
-
|
|
26545
|
-
|
|
26546
|
-
|
|
26547
|
-
|
|
26548
|
-
|
|
26549
|
-
|
|
26550
|
-
|
|
26551
|
-
|
|
26552
|
-
|
|
26553
|
-
|
|
26554
|
-
|
|
26555
|
-
|
|
26556
|
-
|
|
26557
|
-
|
|
26558
|
-
resource,
|
|
26559
|
-
stackName: stackInfo.stackName,
|
|
26560
|
-
region: targetRegion,
|
|
26561
|
-
providerRegistry,
|
|
26562
|
-
override: overrides.get(logicalId),
|
|
26563
|
-
overrides
|
|
26564
|
-
});
|
|
26565
|
-
collected.push(outcome);
|
|
26566
|
-
}
|
|
26567
|
-
return collected;
|
|
26568
|
-
};
|
|
27037
|
+
const collectRows = () => dispatchInRefOrder(resources, overrides, async ({ logicalId, resource }, refValues) => {
|
|
27038
|
+
if (selectiveMode && !overrides.has(logicalId)) return {
|
|
27039
|
+
logicalId,
|
|
27040
|
+
resourceType: resource.Type,
|
|
27041
|
+
outcome: "skipped-out-of-scope",
|
|
27042
|
+
reason: "not in --resource / --resource-mapping (use --auto to include)"
|
|
27043
|
+
};
|
|
27044
|
+
if (resource.Type === "AWS::CloudFormation::Stack" && migrationTree && migrationTree.nested.has(logicalId) && accountIdForNestedSynth) return {
|
|
27045
|
+
logicalId,
|
|
27046
|
+
resourceType: resource.Type,
|
|
27047
|
+
outcome: "imported",
|
|
27048
|
+
physicalId: synthesizeNestedStackArn(targetRegion, accountIdForNestedSynth, stackInfo.stackName, logicalId)
|
|
27049
|
+
};
|
|
27050
|
+
return importOne({
|
|
27051
|
+
logicalId,
|
|
27052
|
+
resource,
|
|
27053
|
+
stackName: stackInfo.stackName,
|
|
27054
|
+
region: targetRegion,
|
|
27055
|
+
providerRegistry,
|
|
27056
|
+
override: overrides.get(logicalId),
|
|
27057
|
+
overrides: refValues
|
|
27058
|
+
});
|
|
27059
|
+
});
|
|
26569
27060
|
let rows = await collectRows();
|
|
26570
27061
|
printSummary(rows);
|
|
26571
27062
|
if (options.recordResourceMapping) writeRecordedMapping(options.recordResourceMapping, rows);
|
|
@@ -35742,5 +36233,5 @@ function collectVerbFlags(program) {
|
|
|
35742
36233
|
return map;
|
|
35743
36234
|
}
|
|
35744
36235
|
|
|
35745
|
-
export {
|
|
35746
|
-
//# sourceMappingURL=program-
|
|
36236
|
+
export { effectiveInventoryItem as $, tagListsMatch as A, LIFECYCLE_DEFAULT_STATUS as B, reconcileSgRules as C, singleSecurityGroupRuleId as D, sgRuleKey as E, clearLifecycleWritesOf as F, canonicalizeItemList as G, LIFECYCLE_RULE_PATH as H, lifecycleSettleTarget as I, lifecycleUsesFilterForm as J, effectiveLifecycleConfiguration as K, recordLifecycleWrite as L, declaredSgRulesRead as M, mergeDeclaredSgRules as N, stackIngressRuleHolder as O, LIFECYCLE_BASELINE_REREAD_DELAYS_MS as P, effectiveIntelligentTieringItem as Q, settleLifecycleRead as R, narrowIngressIpProtocol as S, securityGroupRuleMatchesCfnIngress as T, LIFECYCLE_TAG_FILTERS_PATH as U, LIFECYCLE_FILTER_PATH as V, canonicalizeBlock as W, EVENTBRIDGE_CONFIG_PATH as X, parseCfnTimestamp as Y, effectiveAnalyticsItem as Z, flattenIpPermissions as _, resolveSecretDerivedPrincipals as a, declaresBucketObjectLock as at, isDefaultEgressRule as b, buildProgram, readSgIngressById as c, isPlainObject as ct, SG_RULE_PAGE_SIZE$1 as d, shownLifecycleRuleId as dt, effectiveNotificationConfiguration as et, authorizeDefinitelyNotApplied as f, descriptionKey as g, comparableIngressIdentity as h, isResolvableSecretPrincipalList as i, configItemId as it, markCopiesAgreed as j, survivingRecordOfRuleId as k, siblingIdOwnedSgRules as l, manualBucketDeletionClause as lt, canonicalizeSgRuleProtocol as m, runDestroyForStack as n, caughtErrorName as nt, refuseRevertRevokingSiblingRules as o, declaresNestedObjectLock as ot, canonicalizeSgInlineRuleProtocols as p, lifecycleRuleScope as q, holdsUnprovenSecretPrincipalToken as r, coerceCfnNumber as rt, sgRuleDiffKey as s, describeValue as st, canonicalizeIpv4Cidr as t, eventBridgeEnabledOf as tt, SG_READBACK_RETRY_DELAY_MS as u, mergeLegacySingular as ut, ingressRuleIdentity as v, securityGroupReadbackDelays as w, isResendableSocketFailure as x, isConnectTimeout as y, takeLifecycleWrite as z };
|
|
36237
|
+
//# sourceMappingURL=program-Cdwgr3Yv.js.map
|