@cdkd/cli 0.366.1 → 0.366.3
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-CvOlhm1d.js → ambient-client-defaults-D4Iv5q9T.js} +7 -4
- package/dist/{ambient-client-defaults-CvOlhm1d.js.map → ambient-client-defaults-D4Iv5q9T.js.map} +1 -1
- package/dist/{asg-provider-CBS6w9nU.js → asg-provider-C6ZZEfBX.js} +6 -6
- package/dist/{asg-provider-CBS6w9nU.js.map → asg-provider-C6ZZEfBX.js.map} +1 -1
- package/dist/cli.js +3 -3
- package/dist/{custom-resource-runtime-nKBSJ8xg.js → custom-resource-runtime-BcjqJN8N.js} +6 -6
- package/dist/{custom-resource-runtime-nKBSJ8xg.js.map → custom-resource-runtime-BcjqJN8N.js.map} +1 -1
- package/dist/{db-associated-roles-B1qNCxK9.js → db-associated-roles-DllYmRoV.js} +2 -2
- package/dist/{db-associated-roles-B1qNCxK9.js.map → db-associated-roles-DllYmRoV.js.map} +1 -1
- package/dist/{delete-started-BdH7k4V-.js → delete-started-B1_1Gx-5.js} +6 -6
- package/dist/{delete-started-BdH7k4V-.js.map → delete-started-B1_1Gx-5.js.map} +1 -1
- package/dist/{deploy-engine-BrbeNr1n.js → deploy-engine-Dtsub41u.js} +980 -413
- package/dist/deploy-engine-Dtsub41u.js.map +1 -0
- package/dist/{ec2-termination-protection-C-QH13lG.js → ec2-termination-protection-NjsX1wkX.js} +6 -6
- package/dist/{ec2-termination-protection-C-QH13lG.js.map → ec2-termination-protection-NjsX1wkX.js.map} +1 -1
- package/dist/{ecr-uri-7-3D0mhp.js → ecr-uri-oZsRnk-M.js} +2 -2
- package/dist/{ecr-uri-7-3D0mhp.js.map → ecr-uri-oZsRnk-M.js.map} +1 -1
- package/dist/{expected-bucket-owner-C9e1dPk6.js → expected-bucket-owner-DyUXGJMw.js} +2 -2
- package/dist/{expected-bucket-owner-C9e1dPk6.js.map → expected-bucket-owner-DyUXGJMw.js.map} +1 -1
- package/dist/{iam-role-provider-ChwJY8pn.js → iam-role-provider-D_1oapA-.js} +77 -18
- package/dist/{iam-role-provider-ChwJY8pn.js.map → iam-role-provider-D_1oapA-.js.map} +1 -1
- package/dist/{image-plan-B1aW8zVe.js → image-plan-BEvmQV_l.js} +9 -9
- package/dist/{image-plan-B1aW8zVe.js.map → image-plan-BEvmQV_l.js.map} +1 -1
- package/dist/index.js +5 -5
- package/dist/{logger-0WCzMnXc.js → logger-Dr5FQ5uQ.js} +2 -2
- package/dist/{logger-0WCzMnXc.js.map → logger-Dr5FQ5uQ.js.map} +1 -1
- package/dist/{neptune-provider-BEkpYrGj.js → neptune-provider-C0m4IHD7.js} +7 -7
- package/dist/{neptune-provider-BEkpYrGj.js.map → neptune-provider-C0m4IHD7.js.map} +1 -1
- package/dist/{program-73k0SoOP.js → program-DwAbyuS-.js} +1158 -1124
- package/dist/program-DwAbyuS-.js.map +1 -0
- package/dist/{provider-classes-COU3GAT5.js → provider-classes-Dc0pZOL3.js} +605 -484
- package/dist/provider-classes-Dc0pZOL3.js.map +1 -0
- package/dist/{rds-provider-D_ypFjdI.js → rds-provider-BH_C1IUh.js} +10 -10
- package/dist/{rds-provider-D_ypFjdI.js.map → rds-provider-BH_C1IUh.js.map} +1 -1
- package/dist/{read-replica-D012SPdT.js → read-replica-D8tp4_Dg.js} +3 -3
- package/dist/{read-replica-D012SPdT.js.map → read-replica-D8tp4_Dg.js.map} +1 -1
- package/dist/{replacement-rules-S9fm3-4G.js → replacement-rules-Cn95yn6B.js} +3 -3
- package/dist/{replacement-rules-S9fm3-4G.js.map → replacement-rules-Cn95yn6B.js.map} +1 -1
- package/dist/{resource-deadline-BiWaN52w.js → resource-deadline-Bbcb2bjo.js} +4 -4
- package/dist/{resource-deadline-BiWaN52w.js.map → resource-deadline-Bbcb2bjo.js.map} +1 -1
- package/dist/{restore-source-guard-BeTKRtrT.js → restore-source-guard-DA9TSeTJ.js} +4 -4
- package/dist/{restore-source-guard-BeTKRtrT.js.map → restore-source-guard-DA9TSeTJ.js.map} +1 -1
- package/dist/{run-cli-CF35Yn-t.js → run-cli-BU8F9JJg.js} +2 -2
- package/dist/{run-cli-CF35Yn-t.js.map → run-cli-BU8F9JJg.js.map} +1 -1
- package/dist/{settle-own-write-members-B4QcneiO.js → settle-own-write-members-D-eXBnXf.js} +12 -15
- package/dist/{settle-own-write-members-B4QcneiO.js.map → settle-own-write-members-D-eXBnXf.js.map} +1 -1
- package/dist/{version-Df9DK8jT.js → version-DS_Jdkik.js} +2 -2
- package/dist/{version-Df9DK8jT.js.map → version-DS_Jdkik.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-BrbeNr1n.js.map +0 -1
- package/dist/program-73k0SoOP.js.map +0 -1
- package/dist/provider-classes-COU3GAT5.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 { A as assertRegionMatch, At as readRecordedPrincipals, Cn as producerCoordinateKey, Ct as IAM_PRINCIPAL_NAME, Gt as maskDeep, Lt as logicalIdShown, N as VALUE_NOT_SHOWN, O as DriftReadRefusedError, U as isMarkedNotGone, V as remedyLogicalId, _n as WAIT_CONDITION_SIGNAL_PREFIX, _t as renderDisableCommand, bn as withPasteableAwsProfile, bt as interruptWatchListenerCount, cn as buildLockContentionMessage, dn as formatLockOperation, fn as formatLockOwner, gn as DEFAULT_STATE_PREFIX, hn as CUSTOM_RESOURCE_RESPONSE_PREFIX, i as withResourceDeadline, k as RESOURCE_NOT_FOUND, ln as forceQuitRecoveryClause, mt as isAwsCliLiteral, on as UNREPRODUCIBLE_LOCK_CLAUSE, sn as buildForceUnlockCommand, st as runDeleteAttempt, un as formatLockExpiry, vn as setPasteableAwsCaBundle, vt as beginCommandInterruptScope, wn as producerRecordKey, wt as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, xn as injectiveKey, xt as isInterruptedWaitError, yn as setPasteableAwsProfile, yt as endCommandInterruptScope, zt as resourceTypeShown } from "./resource-deadline-
|
|
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-DS_Jdkik.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-BEvmQV_l.js";
|
|
3
|
+
import { A as assertRegionMatch, At as readRecordedPrincipals, Cn as producerCoordinateKey, Ct as IAM_PRINCIPAL_NAME, Gt as maskDeep, Lt as logicalIdShown, N as VALUE_NOT_SHOWN, O as DriftReadRefusedError, U as isMarkedNotGone, V as remedyLogicalId, _n as WAIT_CONDITION_SIGNAL_PREFIX, _t as renderDisableCommand, bn as withPasteableAwsProfile, bt as interruptWatchListenerCount, cn as buildLockContentionMessage, dn as formatLockOperation, fn as formatLockOwner, gn as DEFAULT_STATE_PREFIX, hn as CUSTOM_RESOURCE_RESPONSE_PREFIX, i as withResourceDeadline, k as RESOURCE_NOT_FOUND, ln as forceQuitRecoveryClause, mt as isAwsCliLiteral, on as UNREPRODUCIBLE_LOCK_CLAUSE, sn as buildForceUnlockCommand, st as runDeleteAttempt, un as formatLockExpiry, vn as setPasteableAwsCaBundle, vt as beginCommandInterruptScope, wn as producerRecordKey, wt as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, xn as injectiveKey, xt as isInterruptedWaitError, yn as setPasteableAwsProfile, yt as endCommandInterruptScope, zt as resourceTypeShown } from "./resource-deadline-Bbcb2bjo.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, 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-
|
|
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-
|
|
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, f as isAwsAuthoredFailure, i as releaseStdoutForPayload, m as verboseAwareText, n as getLogger, p as safeStringify, r as isStdoutReservedForPayload, s as runStackBuffered, u as describeAwsFailure, y as getLiveRenderer, z as derivesPatternBName } from "./logger-Dr5FQ5uQ.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-D4Iv5q9T.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 MIGRATE_TMP_PREFIX, A as formatDockerLoginError, B as resolveApp, C as redactDockerArgvValues, D as warnFinchArgvExposure, E as partitionSensitiveEnv, F as Synthesizer, G as resolveStateBucketWithDefaultAndSource, H as resolveCaptureObservedState, I as synthesisStatusMessage, J as resolveUseCdkBootstrapAssets, K as resolveStateBucketWithSource, L as getDefaultStateBucketName, M as runDockerForeground, N as runDockerStreaming, O as isDockerClientEnvKey, P as abortInFlightMultipartUploads, Q as CFN_TEMPLATE_URL_LIMIT, R as getLegacyStateBucketName, S as redactedDockerCause, T as finchSecretArgvRefusal, U as resolveSkipPrefix, V as resolveAutoAssetStorage, W as resolveStateBucketWithDefault, X as warnDeprecatedNoPrefixCliFlag, Y as stateBucketExistenceConfirmed, Z as CFN_TEMPLATE_BODY_LIMIT, _ as resolveDockerContextDirectory, at as bindLegacyStackAssetParameters, b as describeDockerFailure, ct as predictedAutoCreatedAssetMode, d as DagBuilder, dt as processStackMessages, et as findLargeInlineResources, f as LockManager, ft as setChildProcessAwsEnv, g as buildDockerImage, h as WorkGraph, i as mergeDeclaredEntries, it as StageLoadError, j as getDockerCmd, k as isMalformedEnvKey, l as DiffCalculator, lt as prepareLegacyStackAssets, m as AssetPublisher, n as declaredStringList, nt as refuseFailedLookups, ot as createLegacyAssetParameterBinder, p as isLockInfoExpired, q as resolveUpdatePolicy, r as inlinePoliciesAreDeclared, rt as AssemblyReader, s as stringListIsDeclared, st as legacyPlanAssetCount, t as declaredInlinePolicies, tt as uploadCfnTemplate, u as LEGACY_HANDLE_HEAL_REASON, ut as CdkToolkitBucketMissingError, w as dockerSpawnEnvWithSensitive, x as redactedCause, y as describeDockerExecFailure, z as loadCdkJson } from "./settle-own-write-members-
|
|
9
|
-
import { $a as policyDocumentMatchesDeclared, $c as refuseMalformedResourceEntriesForOrphan, $i as gray, $l as PROPERTY_COVERAGE_BY_TYPE, $n as parseMappingFile, $o as applyRoleArnIfSet, $t as removeSignalReceiverNamed, A as recordedProtectionEvidence, Aa as createPreDeleteFinalSnapshot, Ac as deployRefusesOrphanRowsReason, Ai as collectDeclaredOutputNames, Al as malformedStateRefusalMessage, An as DeploymentEventsStore, Ao as setLocalCustomResourceRuntimeEnabled, Ar as undeclaredEmptyObservedKeys, Au as templateIdentity, Bc as unpreviewableOrphanRecords, Bi as supersededAfterRollback, Bl as UNREADABLE_RESOURCES_MAP_ROW, Bn as formatDestructiveChange, Br as planRollback, Bs as getAccountInfo, Bu as createAssetRedirectResolver, C as pendingMovesOutOf, Ca as PRE_DELETE_SNAPSHOT_TYPES, Cc as maskedPropertyFingerprintsOf, Cd as displayAssemblyPath, Ci as secretBearingStateKeyWarning, Cl as refuseMalformedOutputs, Cn as journaledOrphanLines, Co as withPrintingSecrets, Cr as buildReadCurrentStateContext, Cs as AWS_NO_VALUE, Cu as isSensitiveAttributeName, D as findServiceTokenRefusals, Da as isFinalSnapshotError, Di as exportNameSecretExposure, Dl as refuseDivergentRecordRegionForDestroy, Dn as makeSiblingClaimReader, Do as customResourcesRunWithoutApp, Dr as calculateResourceDrift, Ds as lacksRecordedRefArn, Du as isAbsoluteAssetPath, E as deferredServiceTokenWarning, Ea as effectiveDeletionPolicy, Ec as maskedInputProof, Ed as resolveAssemblyPath, Ei as exportNameNoEchoParameters, El as STATE_REGION_DIVERGED, En as makeForeignHolderScan, Eo as customResourcesFailedWithoutApp, Er as withUnprovenUnsettled, Es as refStateLookupFromResource, Eu as findNestedTemplateTreeDefect, F as readProtection, Fc as previewableOrphanRecords, Fi as DEFAULT_RESOURCE_WARN_AFTER_MS, Fl as repairMalformedResourcesForReadOnly, Fn as noEchoMacParametersOf, Fo as RollbackInlinePolicyWriters, Ga as LAMBDA_PERMISSION_STATEMENT_KEYS, Gc as malformedResourceEntriesWarning, Gi as withoutSuperseded, Gl as findHandledUnwrittenCreateOnly, Gn as withMovedTo, Go as isSelectOutOfBounds, Gr as planFailedOps, Gs as keepsSecretReferenceToken, Gt as readRefactorMarkerOnce, Gu as loadPublishableAssetManifest, H as readStreamPolicy, Hc as isReadableResourceEntry, Hi as supersededHeldByOtherTypeWarning, Hl as hasReadableOutputs, Hn as hintSidesOf, Ho as isWaitAbandonedError, Hr as demoteSupersededOrphans, Hs as carriesFetchableDynamicReference, Ht as keptForRetainedRecord, Ic as refuseMalformedOrphanRecords, Ii as maskingRetryLogger, Il as JSON_LISTING_HOLE_VALUE, In as noEchoMacVerdict, Io as UNSPECIFIED_SKIP_REASON, Ir as ledgerForStack, Is as recordedReferenceRegions, Iu as decodeListingKey, Ja as declaredMemberDocument, Jc as refuseMalformedResourceEntries, Ji as resolveReplacementOldType, Jn as changedReferenceReason, Jo as stackIdTailOf, Jr as replacementNeverSwapped, Js as INTRINSIC_KEYS, Jt as refuseRefactorMarker, Ju as rewriteTemplateAssetReferences, Kc as malformedScrubResourceEntriesRefusalMessage, Kn as changedReferenceInDiff, Ko as isAlwaysLiveAttribute, Kr as recheckFailedPlan, Ks as withSharedDrainBudget, Kt as refactorMarkerMovesOf, Lc as refuseMalformedOrphanRecordsForDestroy, Li as deleteSupersededEntry, Ll as accountArgs, Ln as noEchoValueMacsOf, Lo as deleteIndeterminateGuards, M as PROTECTION_PROPERTY_BY_TYPE, Mc as malformedOrphanRecordsRefusalMessage, Mi as isExportAliasCollision, Ml as refuseMalformedResourcesForDestroy, Mn as NOECHO_MAC_KEY_ALIAS, Mr as updatePartialReason, Ms as keepHeldTokenProvenance, N as isProtectionValueActive, Nc as malformedOrphanRecordsWarning, Ni as bindingSkippedOutputs, Nl as refuseMalformedResourcesForExport, Nn as createNoEchoValueMacs, No as CloudControlProvider, Nr as findUpdatePolicyReplacementRefusals, Nu as ssmResolvedValueType, O as serviceTokenBlockingReason, Oa as refusesFinalSnapshot, Oc as declaresNoEcho, Od as resolveBucketRegion, Oi as isWholeDynamicReferenceValue, Ol as malformedRenderedContainersWarning, On as planOrphanAdoption, Oo as localCustomResourceCommand, Or as equalModuloMarkedMask, Os as lacksRecordedTableArn, Ou as listNestedTemplateRows, P as perType, Pc as malformedOrphanRowsKeptWarning, Pi as DEFAULT_RESOURCE_TIMEOUT_MS, Pl as refuseMalformedState, Pn as noEchoMacBinding, Pr as replacementCreateRoutesToCloudControl, Ps as recordedOutputReferenceRegions, Pu as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Qa as memberReadFailure, Qc as refuseMalformedResourceEntriesForImportSave, Qi as cyan, Ql as hasNoCloudControlHandlers, Qn as mappingPairs, Qo as refuseUnreadableCdkCrossAccountRefs, Qr as readsRegeneratingSecret, Qt as isReceiver, Rc as refuseMalformedOrphansForOrphan, Ri as holdsSupersededResources, Rl as withheldAccountClause, Rn as constructPathOf$1, Ro as deleteLeftInPlace, Rr as withCreateTokenLedger, S as hasPendingMovesOut, Sa as ATOMIC_FINAL_SNAPSHOT_TYPES, Sd as describeFileReadFailure, Si as secretBearing, Sn as isHandledOrphan, Sr as earlyDeletedOld, Ss as parameterTypeMayLoseSecretIdentity, Su as isSecretValuedAttribute, T as refusePendingMovesOut, Ta as ccRoutedInstanceTakesNoSnapshot, Tc as parameterInputsFor, Td as renderAssemblyPathEscape, Ti as carriedExportAliasExposure, Tl as repairMalformedOutputsForReadOnly, Tn as sameJournaledOrphans, Tr as settleUnsettledPrevious, Ts as isStalePlaceholderArnAttribute, Ua as withStackRecords, Uc as malformedLocalResourceEntriesWarning, Ui as supersededHolderOf, Ul as hasReadableResources, Un as movedToHint, Ur as isJournaledOrphan, Us as isNamelessDynamicReferenceError, Ut as recordRetainedForReadoption, Va as revertStackRecordsView, Vc as unreadableOrphanRecords, Vi as supersededDependentsFirst, Vl as displayLogicalId, Vn as findRefactorHints, Vo as getReadOnlyPropertyPaths, Vr as seedsDeleteFirstGuard, Vs as isImpossibleEmptyStoredAttribute, Vu as createLazyAssetModeContext, Wc as malformedLocalResourcesWarning, Wi as supersededResourcesOf, Wl as findActionableSdkUnwired, Wn as rollbackOrphanIds, Wo as IntrinsicFunctionResolver, Wr as isReplacementOrphan, Ws as carriesDynamicReference, Wt as readRefactorMarker, Xa as efsPolicyMatchesDeclared, Xc as refuseMalformedResourceEntriesForDestroy, Xi as findNestedStackTypeChanges, Xn as isPairableType, Xo as resolveDynamicReferences, Xr as computeImplicitDeleteEdges, Xt as updateRefactorMarker, Xu as getDockerImageBySourceHash, Ya as declaredPolicyDocument, Yc as refuseMalformedResourceEntriesForDeploy, Yi as withPreviousPolicies, Yn as differingRemedy, Yr as IMPLICIT_DELETE_DEPENDENCIES, Yt as sameMove, Yu as AssetManifestLoader, Z as declaredTagsReadback, Za as lambdaPermissionMatchesDeclared, Zc as refuseMalformedResourceEntriesForImport, Zi as bold, Zl as NO_CC_HANDLERS_REASON, Zn as looselyEqual, Zo as producerLookupOver, Zr as attemptUsesCompletedCreate, Zt as deleteSignalReceiver, _ as conditionFingerprint, _a as secretNamedRecordNeedles, _c as secretSegmentsOfState, _d as hasPlainPrototype, _i as reachableDivergentParameters, _l as malformedExportNamesWarning, _n as getCurrentNestedStackContext, _o as customResourceResponseExpirationWarning, _r as replayFailedOperations, _u as crossPrefixDeniedWarning, a as scanActiveConsumers, aa as noEchoExactEchoLeavesOf, ac as isStatefulRecreateTargetForReplace, ad as assertAssetBucketRegion, ai as orphanNeedsIdentity, al as refuseMalformedResourcePropertiesForDestroy, an as resolvePendingCloudControlRequests, ar as undeclaredGrantSiblingMembers, as as sendableAssumeRoleCommand, b as readRecordedConditionVerdicts, ba as storedSecretNameNeedles, bc as getTopLevelKeysHoldingUnreadableCreateOnly, bi as displayTextOrWithheld, bl as malformedOutputsRefusalMessage, bn as dropFailedCommands, bo as readsNoEchoDeleteValues, br as PLANNED_EARLY_DELETE_CONSEQUENCE, bs as coerceParameterTypedValue, bu as stackInstanceIdOf, c as nestedSsmNameDeferredNote, ca as createReadOnlyAttributeHealerFactory, cd as parseBootstrapMarker, ci as nameScopeOf, cl as refuseMalformedResourcePropertiesForOrphan, cn as displacedPhysicalIdShown, co as ccBrokenReason, cr as sgSiblingDecidedById, cs as callerEnvCredentials, cu as splitImportedOps, d as slashedSsmNameHealAdoptedNote, da as maskEventTextWithBoundBags, dd as validateContainerRepoName, di as retiredNameGenerationsLeaving, dl as hasReadableOrphans, dn as nestedChildStackName$1, do as WaitConditionSignalStore, ds as classifyReplaySecretRegion, du as hasReasonlessBaselineRefusal, ea as green, ei as isRedactedRecordedValue, el as repairMalformedResourceEntriesForReadOnly, en as macWriteOnlyKeys, eo as reReadUntilSettled, er as propertiesChangedReason, es as assertFlagRoleArn, f as slashedSsmNameHealNote, fa as namingSecretsWithRecordedNoEcho, fd as BOOTSTRAP_MARKER_PREFIX, fi as withNameGenerationReached, fl as malformedOrphansRefusalMessage, fn as recordDisplacedSkips, fo as classifyHandleUrl, fs as producerRegionsFromState, fu as hasUnverifiableParameterRefusal, g as makeCanonicalizePropertiesFn, gc as secretPhysicalIdSegment, gd as hasOwnKey, gi as namesAnyDeclaredParameter, gl as repairMalformedOrphansForReadOnly, gn as collectNestedChildUnaddressed, go as applyCustomResourceResponseExpiration, gr as canonicalizeIpProtocolValue, gu as applyCrossPrefixScan, h as inheritedProvenanceForChildDiff, ha as secretNamePrintingBags, hd as defineOwnKey, hi as computeParameterTaint, hl as refuseMalformedOrphansForDestroy, hn as withNestedRevertRun, ho as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, hr as sgProtocolKey, hu as CrossPrefixScanCache, i as mergeNoChangeOutputs, ia as noEchoComparisonForTemplate, ic as MULTI_REGION_RECREATE_BLOCKED_TYPES, id as buildDenyExternalAccessPolicy, ii as removeProtectionTypeList, in as pendingRequestCount, ir as stripSiblingOwnedParentMembers, is as parseIamRoleArn, j as recordedProtectionNote, ja as buildFinalSnapshotIdentifier, jc as isReadableOrphanRecord, ji as collectPublishedOutputNames, jl as refuseMalformedResourcesForDeploy, jn as crossStackReadsForPartialSave, jo as withCustomResourceStack, jr as updatePartialMessage, k as diffSecurity, ka as unsupportedFinalSnapshotError, kc as maskedPropertyFingerprint, ki as noEchoParameterValueSeed, kl as malformedResourcesWarning, kn as DeploymentEventsReader, kr as equalModuloMask, ku as renderNestedTemplateTreeDefect, l as nestedSsmNameRowNote, la as completedReplayEntries, ld as readBootstrapMarkerBody, li as retiredAfterRollback, ll as repairMalformedResourcePropertiesForReadOnly, ln as dropSettledNestedJournals, lo as isCustomResource, ls as envCredentialsAreAssumedRole, m as crossStackOutputProvenanceSource, ma as secretNamePrintingBag, mc as displayPhysicalId, mi as inheritProducerRegions, ml as refuseMalformedOrphans, mn as revertedNestedRowIds, mo as isSignalKey, mr as recordedSgRuleId, ms as isUnexposedRecordedIdentity, mu as CrossPrefixReadError, n as isSecretBearingReferenceString, na as yellow, nd as AssetModeResolver, nl as malformedDriftResourcePropertiesWarning, nr as referencedLogicalIds, ns as explicitRoleArnOrThrow, o as inRunStackKey, oa as noEchoParameterNamesOf, oc as isStatefulRecreateTargetSync, od as isCrossRegionRedirect, oi as nameGenerationCarriedFrom, ol as refuseMalformedResourcePropertiesForDrift, on as NESTED_PENDING_PARENT_REASON, oo as CC_BROKEN_REASON, or as recordedRuleIdOf, os as AWS_CREDENTIAL_ENV_KEYS, ou as TemplateParser, p as slashedSsmNameHealPendingNote, pa as orphanRecordsPrintingBag, pl as malformedOrphansWarning, pr as cfnIngressPortValue, ps as regionLessSecretName, pu as rebuildClientForBucketRegion, q as streamPolicyMatchesDeclared, qc as refuseMalformedResourceAttributesForOrphan, qi as snapshotSegmentSurvivors, ql as unwrittenCreateOnlyReplacement, qn as changedReferencePath, qo as poisonRenderedSpellingsCollidingIn, qr as recordUnderIdIsNotOwn, qt as refactorMarkerRefusalMessage, r as keptWholeReasonText, ra as noEchoAttributeNamesOf, rc as shownType, rd as ensureAssetStorage, ri as segmentCleanupOptions, rl as malformedResourcePropertiesWarning, rn as formatResourceLine, ro as verbatimEchoDriftKeys, rr as siblingOwnedRevertDesired, rs as isIamRoleArn, s as checkNestedSsmNames, sa as withAttemptedItemsMasked, sc as renderStatefulReason, sd as getBootstrapMarkerKey, si as nameGenerationHighWaterOf, sl as refuseMalformedResourcePropertiesForExport, sn as displacedOpClause, so as ProviderRegistry, sr as sgRuleOwnershipIdentity, ss as applyCallerIdentityCredentials, su as S3StateBackend, t as DeployEngine, ta as red, tc as findReplacedReadersOfRecreateTargets, tl as unreadableResourceEntries, tn as readsOnlyNoEchoParameters, tr as proposeRenames, ts as assertSendableRoleArn, tt as tagsMatchDeclared, tu as providerReplacementOldDeleted, u as healSlashedSsmParameterNames, ua as journaledOrphanPrintingBag, ud as validateAssetBucketName, ui as retiredNameGenerationsAfter, ul as UNREADABLE_ORPHANS_CONTAINER_ROW, uo as wouldReturnToSdkProvider, ur as siblingRecordedSgRuleIds, us as classifyRecordedSecretRegion, uu as readOnlyStateVersionOf, v as conditionInputsFrom, va as stackSecretNamesMasker, vc as withSecretPhysicalIdsMaskedInState, vd as nullPrototypeRecord, vi as resourcesNamingDeclaredParameter, vl as malformedExportSourceWarning, vn as withNestedStackContext, vr as replayRollback, vu as isAccessDenied, w as pendingMovesRefusalMessage, wa as ccRoutedFinalSnapshotError, wi as secretSafeKeyDisplay, wl as refuseMalformedOutputsForDestroy, wn as loadJournaledOrphans, wo as NO_LOCAL_CUSTOM_RESOURCES_FLAG, wr as recordAfterRollbackUpdate, ws as cfnRefValueFromPhysicalId, x as childTemplateLoader, xa as extractDeploymentEventError, xc as tryGetTopLevelWriteOnlyProperties, xi as exportAliasCollisionScrubWarning, xl as malformedOutputsWarning, xn as dropFailedHint, xo as isCustomResourceType$1, xr as earlyDeleteWhen, xs as isUnboundTemplateParameter, xu as withStackInstanceIdWithheld, y as parentSuppliedValues, ya as stateSecretNameNeedles, yc as getSettledWriteOnlyPropertyPaths, yd as ownValue, yi as WITHHELD_NAME_DISPLAY, yl as malformedLocalOutputsWarning, yn as deleteJournaledOrphans, yo as TemplateNoEchoReresolver, yr as DELETED_RESOURCE_REMEDY, yu as isNotImplemented, za as destroyStackRecordsView, zc as repairMalformedOrphanRecordsForReadOnly, zi as isSupersededResourceRecord, zl as STATE_RESOURCES_MALFORMED, zn as findDestructiveChanges, zo as deleteSkipReason, zs as withoutVersionAttestation, zu as buildAssetRedirectMap } from "./deploy-engine-BrbeNr1n.js";
|
|
8
|
+
import { $ as MIGRATE_TMP_PREFIX, A as formatDockerLoginError, B as resolveApp, C as redactDockerArgvValues, D as warnFinchArgvExposure, E as partitionSensitiveEnv, F as Synthesizer, G as resolveStateBucketWithDefaultAndSource, H as resolveCaptureObservedState, I as synthesisStatusMessage, J as resolveUseCdkBootstrapAssets, K as resolveStateBucketWithSource, L as getDefaultStateBucketName, M as runDockerForeground, N as runDockerStreaming, O as isDockerClientEnvKey, P as abortInFlightMultipartUploads, Q as CFN_TEMPLATE_URL_LIMIT, R as getLegacyStateBucketName, S as redactedDockerCause, T as finchSecretArgvRefusal, U as resolveSkipPrefix, V as resolveAutoAssetStorage, W as resolveStateBucketWithDefault, X as warnDeprecatedNoPrefixCliFlag, Y as stateBucketExistenceConfirmed, Z as CFN_TEMPLATE_BODY_LIMIT, _ as resolveDockerContextDirectory, at as bindLegacyStackAssetParameters, b as describeDockerFailure, ct as predictedAutoCreatedAssetMode, d as DagBuilder, dt as processStackMessages, et as findLargeInlineResources, f as LockManager, ft as setChildProcessAwsEnv, g as buildDockerImage, h as WorkGraph, i as mergeDeclaredEntries, it as StageLoadError, j as getDockerCmd, k as isMalformedEnvKey, l as DiffCalculator, lt as prepareLegacyStackAssets, m as AssetPublisher, n as declaredStringList, nt as refuseFailedLookups, ot as createLegacyAssetParameterBinder, p as isLockInfoExpired, q as resolveUpdatePolicy, r as inlinePoliciesAreDeclared, rt as AssemblyReader, s as stringListIsDeclared, st as legacyPlanAssetCount, t as declaredInlinePolicies, tt as uploadCfnTemplate, u as LEGACY_HANDLE_HEAL_REASON, ut as CdkToolkitBucketMissingError, w as dockerSpawnEnvWithSensitive, x as redactedCause, y as describeDockerExecFailure, z as loadCdkJson } from "./settle-own-write-members-D-eXBnXf.js";
|
|
9
|
+
import { $a as stateSecretNameNeedles, $c as tryGetTopLevelWriteOnlyProperties, $i as WITHHELD_NAME_DISPLAY, $l as malformedOutputsWarning, $n as journaledOrphanLines, $o as TemplateNoEchoReresolver, $r as PLANNED_EARLY_DELETE_CONSEQUENCE, $u as withStackInstanceIdWithheld, A as recordedProtectionEvidence, Aa as findNestedStackTypeChanges, Ai as attemptUsesCompletedCreate, Al as refuseMalformedResourceEntriesForImportSave, An as macWriteOnlyKeys, Ao as efsPolicyMatchesDeclared, Ar as propertiesChangedReason, As as resolveDynamicReferences, Au as hasNoCloudControlHandlers, Ba as noEchoParameterNamesOf, Bc as isStatefulRecreateTargetSync, Bd as parseBootstrapMarker, Bi as nameGenerationCarriedFrom, Bl as refuseMalformedResourcePropertiesForOrphan, Bo as CC_BROKEN_REASON, Br as siblingRecordedSgRuleIds, Bs as AWS_CREDENTIAL_ENV_KEYS, Bu as splitImportedOps, C as slashedSsmNameHealPendingNote, Ca as supersededHolderOf, Cc as isNamelessDynamicReferenceError, Cd as loadPublishableAssetManifest, Ci as isReplacementOrphan, Cl as malformedResourceEntriesWarning, Cn as refactorMarkerRefusalMessage, Co as withStackRecords, Cr as changedReferencePath, Cu as findHandledUnwrittenCreateOnly, D as findServiceTokenRefusals, Da as snapshotSegmentSurvivors, Dd as AssetManifestLoader, Di as replacementNeverSwapped, Dl as refuseMalformedResourceEntriesForDeploy, Dn as deleteSignalReceiver, Dr as looselyEqual, Ds as poisonRenderedSpellingsCollidingIn, E as deferredServiceTokenWarning, Ec as withSharedDrainBudget, Ed as rewriteTemplateAssetReferences, Ei as recordUnderIdIsNotOwn, El as refuseMalformedResourceEntries, En as updateRefactorMarker, Er as isPairableType, Es as isAlwaysLiveAttribute, F as readProtection, Fa as red, Fc as findReplacedReadersOfRecreateTargets, Fd as ensureAssetStorage, Fl as malformedResourcePropertiesWarning, Fn as resolvePendingCloudControlRequests, Fr as undeclaredGrantSiblingMembers, Fs as assertSendableRoleArn, Ga as maskEventTextWithBoundBags, Gi as retiredNameGenerationsLeaving, Gl as malformedOrphansWarning, Gn as withNestedRevertRun, Go as WaitConditionSignalStore, Gr as sgCidrKey, Gs as classifyReplaySecretRegion, Gu as rebuildClientForBucketRegion, H as readStreamPolicy, Ha as createReadOnlyAttributeHealerFactory, Hd as validateAssetBucketName, Hi as nameScopeOf, Hl as UNREADABLE_ORPHANS_CONTAINER_ROW, Hn as recordDisplacedSkips, Ho as ccBrokenReason, Hs as callerEnvCredentials, Hu as readOnlyStateVersionOf, Ia as yellow, Id as buildDenyExternalAccessPolicy, Ii as segmentCleanupOptions, In as NESTED_PENDING_PARENT_REASON, Ir as recordedRuleIdOf, Is as explicitRoleArnOrThrow, Ja as secretNamePrintingBag, Jc as secretPhysicalIdSegment, Jd as hasOwnKey, Ji as inheritProducerRegions, Jl as repairMalformedOrphansForReadOnly, Jn as withNestedStackContext, Jo as isSignalKey, Jr as canonicalizeIpv4Cidr, Js as isUnexposedRecordedIdentity, Ju as applyCrossPrefixScan, Ka as namingSecretsWithRecordedNoEcho, Kc as displayPhysicalId, Ki as withNameGenerationReached, Kl as refuseMalformedOrphans, Kn as collectNestedChildUnaddressed, Ko as classifyHandleUrl, Kr as sgProtocolKey, Ks as producerRegionsFromState, Ku as CrossPrefixReadError, La as noEchoAttributeNamesOf, Lc as shownType, Ld as assertAssetBucketRegion, Li as removeProtectionTypeList, Ll as refuseMalformedResourcePropertiesForDestroy, Ln as displacedOpClause, Lo as verbatimEchoDriftKeys, Lr as sgRuleOwnershipIdentity, Ls as isIamRoleArn, M as PROTECTION_PROPERTY_BY_TYPE, Ma as cyan, Ml as repairMalformedResourceEntriesForReadOnly, Mo as memberReadFailure, Mr as referencedLogicalIds, Ms as refuseUnreadableCdkCrossAccountRefs, Mt as tagsMatchDeclared, N as isProtectionValueActive, Na as gray, Ni as isRedactedRecordedValue, Nl as unreadableResourceEntries, Nn as formatResourceLine, No as policyDocumentMatchesDeclared, Nr as siblingOwnedRevertDesired, Ns as applyRoleArnIfSet, Nu as providerReplacementOldDeleted, O as serviceTokenBlockingReason, Oa as resolveReplacementOldType, Oc as INTRINSIC_KEYS, Od as getDockerImageBySourceHash, Oi as IMPLICIT_DELETE_DEPENDENCIES, Ol as refuseMalformedResourceEntriesForDestroy, On as isReceiver, Oo as declaredMemberDocument, Or as mappingPairs, Os as stackIdTailOf, Ot as declaredTagsReadback, P as perType, Pa as green, Pd as AssetModeResolver, Pl as malformedDriftResourcePropertiesWarning, Pn as pendingRequestCount, Po as reReadUntilSettled, Pr as stripSiblingOwnedParentMembers, Ps as assertFlagRoleArn, Qa as stackSecretNamesMasker, Qc as getTopLevelKeysHoldingUnreadableCreateOnly, Qi as resourcesNamingDeclaredParameter, Ql as malformedOutputsRefusalMessage, Qn as isHandledOrphan, Qr as DELETED_RESOURCE_REMEDY, Qu as stackInstanceIdOf, Ra as noEchoComparisonForTemplate, Rc as MULTI_REGION_RECREATE_BLOCKED_TYPES, Rd as isCrossRegionRedirect, Ri as removeProtectionTypes, Rl as refuseMalformedResourcePropertiesForDrift, Rn as displacedPhysicalIdShown, Rr as sgSiblingDecidedById, Rs as parseIamRoleArn, Ru as TemplateParser, S as slashedSsmNameHealNote, Sa as supersededHeldByOtherTypeWarning, Sc as carriesFetchableDynamicReference, Si as isJournaledOrphan, Sl as malformedLocalResourcesWarning, Sn as refactorMarkerMovesOf, Sr as changedReferenceInDiff, Ss as isWaitAbandonedError, Su as findActionableSdkUnwired, T as inRunStackKey, Ta as withoutSuperseded, Tc as keepsSecretReferenceToken, Ti as recheckFailedPlan, Tl as refuseMalformedResourceAttributesForOrphan, Tn as sameMove, To as LAMBDA_PERMISSION_STATEMENT_KEYS, Tr as differingRemedy, Ts as isSelectOutOfBounds, Tu as unwrittenCreateOnlyReplacement, Ua as completedReplayEntries, Ud as validateContainerRepoName, Ui as retiredAfterRollback, Ul as hasReadableOrphans, Uo as isCustomResource, Ur as cfnIngressPortValue, Us as envCredentialsAreAssumedRole, Uu as hasReasonlessBaselineRefusal, Va as withAttemptedItemsMasked, Vc as renderStatefulReason, Vd as readBootstrapMarkerBody, Vi as nameGenerationHighWaterOf, Vl as repairMalformedResourcePropertiesForReadOnly, Vn as nestedChildStackName$1, Vo as ProviderRegistry, Vs as applyCallerIdentityCredentials, Wa as journaledOrphanPrintingBag, Wd as BOOTSTRAP_MARKER_PREFIX, Wi as retiredNameGenerationsAfter, Wl as malformedOrphansRefusalMessage, Wn as revertedNestedRowIds, Wo as wouldReturnToSdkProvider, Wr as recordedSgRuleId, Ws as classifyRecordedSecretRegion, Wu as hasUnverifiableParameterRefusal, Xc as withSecretPhysicalIdsMaskedInState, Xd as nullPrototypeRecord, Xi as namesAnyDeclaredParameter, Xl as malformedExportSourceWarning, Xn as dropFailedCommands, Xo as applyCustomResourceResponseExpiration, Xr as replayFailedOperations, Xu as isAccessDenied, Ya as secretNamePrintingBags, Yc as secretSegmentsOfState, Yd as hasPlainPrototype, Yi as computeParameterTaint, Yl as malformedExportNamesWarning, Yn as deleteJournaledOrphans, Yo as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, Yr as canonicalizeIpProtocolValue, Yu as crossPrefixDeniedWarning, Za as secretNamedRecordNeedles, Zc as getSettledWriteOnlyPropertyPaths, Zd as ownValue, Zi as reachableDivergentParameters, Zl as malformedLocalOutputsWarning, Zn as dropFailedHint, Zo as customResourceResponseExpirationWarning, Zr as replayRollback, Zu as isNotImplemented, _ as pendingMovesOutOf, _a as deleteSupersededEntry, _d as buildAssetRedirectMap, _i as withCreateTokenLedger, _l as repairMalformedOrphanRecordsForReadOnly, _r as findRefactorHints, _s as deleteIndeterminateGuards, _u as STATE_RESOURCES_MALFORMED, a as checkNestedSsmNames, aa as carriedExportAliasExposure, ac as isStalePlaceholderArnAttribute, ad as isAbsoluteAssetPath, ai as withUnprovenUnsettled, ao as ccRoutedInstanceTakesNoSnapshot, ar as DeploymentEventsReader, au as refuseDivergentRecordRegionForDestroy, b as healSlashedSsmParameterNames, ba as supersededAfterRollback, bc as getAccountInfo, bi as seedsDeleteFirstGuard, bl as isReadableResourceEntry, bn as readRefactorMarker, br as rollbackOrphanIds, bu as hasReadableOutputs, c as crossStackOutputProvenanceSource, ca as isWholeDynamicReferenceValue, cc as lacksRecordedTableArn, cd as templateIdentity, ci as equalModuloMask, cl as deployRefusesOrphanRowsReason, co as refusesFinalSnapshot, cr as NOECHO_MAC_KEY_ALIAS, cs as localCustomResourceCommand, cu as malformedStateRefusalMessage, d as conditionFingerprint, da as collectPublishedOutputNames, dd as ssmResolvedValueType, di as updatePartialReason, dl as malformedOrphanRecordsWarning, do as buildFinalSnapshotIdentifier, dr as noEchoMacParametersOf, ds as withCustomResourceStack, du as refuseMalformedResourcesForExport, ea as displayTextOrWithheld, ec as coerceParameterTypedValue, ed as isSecretValuedAttribute, ef as describeFileReadFailure, ei as earlyDeleteWhen, eo as storedSecretNameNeedles, er as loadJournaledOrphans, es as readsNoEchoDeleteValues, f as conditionInputsFrom, fa as isExportAliasCollision, fc as keepHeldTokenProvenance, fd as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, fi as findUpdatePolicyReplacementRefusals, fl as malformedOrphanRowsKeptWarning, fr as noEchoMacVerdict, fu as refuseMalformedState, g as hasPendingMovesOut, ga as maskingRetryLogger, gc as recordedReferenceRegions, gl as refuseMalformedOrphansForOrphan, gr as formatDestructiveChange, gs as UNSPECIFIED_SKIP_REASON, gu as withheldAccountClause, h as childTemplateLoader, ha as DEFAULT_RESOURCE_WARN_AFTER_MS, hi as ledgerForStack, hl as refuseMalformedOrphanRecordsForDestroy, hr as findDestructiveChanges, hs as RollbackInlinePolicyWriters, hu as accountArgs, i as mergeNoChangeOutputs, ia as secretSafeKeyDisplay, ic as cfnRefValueFromPhysicalId, id as findNestedTemplateTreeDefect, if as resolveAssemblyPath, ii as settleUnsettledPrevious, il as maskedInputProof, io as ccRoutedFinalSnapshotError, ir as planOrphanAdoption, is as NO_LOCAL_CUSTOM_RESOURCES_FLAG, iu as STATE_REGION_DIVERGED, j as recordedProtectionNote, ja as bold, ji as readsRegeneratingSecret, jl as refuseMalformedResourceEntriesForOrphan, jn as readsOnlyNoEchoParameters, jo as lambdaPermissionMatchesDeclared, jr as proposeRenames, js as producerLookupOver, ju as PROPERTY_COVERAGE_BY_TYPE, k as diffSecurity, ka as withPreviousPolicies, ki as computeImplicitDeleteEdges, kl as refuseMalformedResourceEntriesForImport, kn as removeSignalReceiverNamed, ko as declaredPolicyDocument, kr as parseMappingFile, ku as NO_CC_HANDLERS_REASON, l as inheritedProvenanceForChildDiff, la as noEchoParameterValueSeed, li as undeclaredEmptyObservedKeys, ll as isReadableOrphanRecord, lo as unsupportedFinalSnapshotError, lr as createNoEchoValueMacs, lu as refuseMalformedResourcesForDeploy, m as readRecordedConditionVerdicts, ma as DEFAULT_RESOURCE_TIMEOUT_MS, mc as recordedOutputReferenceRegions, md as decodeListingKey, ml as refuseMalformedOrphanRecords, mr as constructPathOf$1, mu as JSON_LISTING_HOLE_VALUE, n as isSecretBearingReferenceString, na as secretBearing, nc as parameterTypeMayLoseSecretIdentity, ni as buildReadCurrentStateContext, no as ATOMIC_FINAL_SNAPSHOT_TYPES, nr as makeForeignHolderScan, nu as refuseMalformedOutputsForDestroy, o as nestedSsmNameDeferredNote, oa as exportNameNoEchoParameters, oc as refStateLookupFromResource, od as listNestedTemplateRows, of as resolveBucketRegion, oi as calculateResourceDrift, ol as declaresNoEcho, oo as effectiveDeletionPolicy, or as DeploymentEventsStore, os as customResourcesFailedWithoutApp, ou as malformedRenderedContainersWarning, p as parentSuppliedValues, pa as bindingSkippedOutputs, pi as replacementCreateRoutesToCloudControl, pl as previewableOrphanRecords, pr as noEchoValueMacsOf, ps as CloudControlProvider, pu as repairMalformedResourcesForReadOnly, q as streamPolicyMatchesDeclared, qa as orphanRecordsPrintingBag, qd as defineOwnKey, ql as refuseMalformedOrphansForDestroy, qn as getCurrentNestedStackContext, qs as regionLessSecretName, qu as CrossPrefixScanCache, r as keptWholeReasonText, ra as secretBearingStateKeyWarning, rc as AWS_NO_VALUE, rf as renderAssemblyPathEscape, ri as recordAfterRollbackUpdate, rl as parameterInputsFor, ro as PRE_DELETE_SNAPSHOT_TYPES, rr as makeSiblingClaimReader, rs as withPrintingSecrets, ru as repairMalformedOutputsForReadOnly, s as nestedSsmNameRowNote, sa as exportNameSecretExposure, sc as lacksRecordedRefArn, sd as renderNestedTemplateTreeDefect, si as equalModuloMarkedMask, sl as maskedPropertyFingerprint, so as isFinalSnapshotError, sr as crossStackReadsForPartialSave, ss as customResourcesRunWithoutApp, su as malformedResourcesWarning, t as DeployEngine, ta as exportAliasCollisionScrubWarning, tc as isUnboundTemplateParameter, td as isSensitiveAttributeName, tf as displayAssemblyPath, ti as earlyDeletedOld, tl as maskedPropertyFingerprintsOf, to as extractDeploymentEventError, tr as sameJournaledOrphans, ts as isCustomResourceType$1, tu as refuseMalformedOutputs, u as makeCanonicalizePropertiesFn, ua as collectDeclaredOutputNames, ui as updatePartialMessage, ul as malformedOrphanRecordsRefusalMessage, uo as createPreDeleteFinalSnapshot, ur as noEchoMacBinding, us as setLocalCustomResourceRuntimeEnabled, uu as refuseMalformedResourcesForDestroy, v as pendingMovesRefusalMessage, va as holdsSupersededResources, vd as createAssetRedirectResolver, vl as unpreviewableOrphanRecords, vn as keptForRetainedRecord, vr as hintSidesOf, vs as deleteLeftInPlace, vu as UNREADABLE_RESOURCES_MAP_ROW, w as scanActiveConsumers, wa as supersededResourcesOf, wc as carriesDynamicReference, wi as planFailedOps, wl as malformedScrubResourceEntriesRefusalMessage, wn as refuseRefactorMarker, wr as changedReferenceReason, ws as IntrinsicFunctionResolver, x as slashedSsmNameHealAdoptedNote, xa as supersededDependentsFirst, xc as isImpossibleEmptyStoredAttribute, xi as demoteSupersededOrphans, xl as malformedLocalResourceEntriesWarning, xn as readRefactorMarkerOnce, xo as revertStackRecordsView, xr as withMovedTo, xs as getReadOnlyPropertyPaths, xu as hasReadableResources, y as refusePendingMovesOut, ya as isSupersededResourceRecord, yc as withoutVersionAttestation, yd as createLazyAssetModeContext, yi as planRollback, yl as unreadableOrphanRecords, yn as recordRetainedForReadoption, yo as destroyStackRecordsView, yr as movedToHint, ys as deleteSkipReason, yu as displayLogicalId, za as noEchoExactEchoLeavesOf, zc as isStatefulRecreateTargetForReplace, zd as getBootstrapMarkerKey, zi as orphanNeedsIdentity, zl as refuseMalformedResourcePropertiesForExport, zn as dropSettledNestedJournals, zs as sendableAssumeRoleCommand, zu as S3StateBackend } from "./deploy-engine-Dtsub41u.js";
|
|
10
10
|
import { n as canonicalizeRegion, r as derivePartitionAndUrlSuffix, t as PARTITION_TABLE } from "./aws-partition-DA0r2sr-.js";
|
|
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-
|
|
12
|
-
import { t as expectedOwnerParam } from "./expected-bucket-owner-
|
|
13
|
-
import { Bt as describeRegionValueKind, Gt as isReadableBag, Ht as hasReadableExportSet, Jt as shouldRetainResource, Kt as orphansAfterRollback, Tt as differingIdentityWarning, Ut as importableOutputKeys, Vt as exportNamesCarriedFrom, Wt as importableOutputs, Xt as stackInstanceIdCarriedFrom, kt as slowCcOperationTimeoutMs, qt as orphansCarriedFrom, zt as acceptedCreateOnlyDropsOf } 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-NjsX1wkX.js";
|
|
12
|
+
import { t as expectedOwnerParam } from "./expected-bucket-owner-DyUXGJMw.js";
|
|
13
|
+
import { Bt as describeRegionValueKind, Gt as isReadableBag, Ht as hasReadableExportSet, Jt as shouldRetainResource, Kt as orphansAfterRollback, Tt as differingIdentityWarning, Ut as importableOutputKeys, Vt as exportNamesCarriedFrom, Wt as importableOutputs, Xt as stackInstanceIdCarriedFrom, kt as slowCcOperationTimeoutMs, qt as orphansCarriedFrom, zt as acceptedCreateOnlyDropsOf } from "./delete-started-B1_1Gx-5.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-Cn95yn6B.js";
|
|
15
|
+
import { S as unsettledPropertiesOf, T as withoutUnsettledProperties, b as unsettledItemsOf, w as withUnsettledProperties, y as unsettledItemsField } from "./restore-source-guard-DA9TSeTJ.js";
|
|
16
|
+
import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-oZsRnk-M.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";
|
|
@@ -1541,7 +1541,7 @@ 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-Dc0pZOL3.js");
|
|
1545
1545
|
return providerClasses;
|
|
1546
1546
|
}
|
|
1547
1547
|
function registerAllProviders(registry, classes) {
|
|
@@ -9951,789 +9951,259 @@ const ALWAYS_STRIPPED_FIELDS = /* @__PURE__ */ new Set([
|
|
|
9951
9951
|
function stripCcApiAwsManagedFields(resourceType, awsProps) {
|
|
9952
9952
|
return stripWalk(awsProps);
|
|
9953
9953
|
}
|
|
9954
|
-
|
|
9954
|
+
const FREE_FORM_MAP_PARENTS = /* @__PURE__ */ new Set([
|
|
9955
|
+
"Variables",
|
|
9956
|
+
"Parameters",
|
|
9957
|
+
"DefaultArguments",
|
|
9958
|
+
"DockerLabels",
|
|
9959
|
+
"Labels",
|
|
9960
|
+
"Tags",
|
|
9961
|
+
"UserPoolTags",
|
|
9962
|
+
"BackupPlanTags",
|
|
9963
|
+
"BackupVaultTags",
|
|
9964
|
+
"RecoveryPointTags",
|
|
9965
|
+
"TieringConfigurationTags",
|
|
9966
|
+
"TestAliasTags"
|
|
9967
|
+
]);
|
|
9968
|
+
function stripWalk(value, freeForm = false) {
|
|
9955
9969
|
if (value === null || value === void 0) return value;
|
|
9956
|
-
if (Array.isArray(value)) return value.map(stripWalk);
|
|
9970
|
+
if (Array.isArray(value)) return value.map((element) => stripWalk(element, freeForm));
|
|
9957
9971
|
if (typeof value === "object") {
|
|
9958
9972
|
if (!hasPlainPrototype(value)) return value;
|
|
9959
9973
|
const out = nullPrototypeRecord();
|
|
9960
9974
|
for (const [key, child] of Object.entries(value)) {
|
|
9961
|
-
if (ALWAYS_STRIPPED_FIELDS.has(key)) continue;
|
|
9962
|
-
out[key] = stripWalk(child);
|
|
9975
|
+
if (!freeForm && ALWAYS_STRIPPED_FIELDS.has(key)) continue;
|
|
9976
|
+
out[key] = stripWalk(child, freeForm || FREE_FORM_MAP_PARENTS.has(key));
|
|
9963
9977
|
}
|
|
9964
9978
|
return out;
|
|
9965
9979
|
}
|
|
9966
9980
|
return value;
|
|
9967
9981
|
}
|
|
9968
9982
|
|
|
9969
|
-
// src/
|
|
9970
|
-
function
|
|
9971
|
-
|
|
9972
|
-
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
}
|
|
9976
|
-
const
|
|
9977
|
-
|
|
9978
|
-
if (value === "") return false;
|
|
9979
|
-
if (secrets.has(value)) return true;
|
|
9980
|
-
for (const plaintext of secrets.keys()) if (plaintext.length >= MIN_SECRET_NEEDLE_LENGTH && value.includes(plaintext)) return true;
|
|
9981
|
-
return false;
|
|
9982
|
-
}
|
|
9983
|
-
function survivingDynamicReferences(value) {
|
|
9984
|
-
return dynamicReferenceTokens(value);
|
|
9983
|
+
// src/provisioning/providers/s3-bucket/shared.ts
|
|
9984
|
+
function manualBucketDeletionClause(bucketName, maskSecrets, journaled) {
|
|
9985
|
+
const command = renderDisableCommand({
|
|
9986
|
+
before: "aws s3api delete-bucket --bucket",
|
|
9987
|
+
identifier: bucketName,
|
|
9988
|
+
maskSecrets
|
|
9989
|
+
});
|
|
9990
|
+
const lead = journaled ? `Outside a rollback's re-create, the failed deploy's rollback journal records the bucket for ${proseQuoted(cdkdRemedy("cdkd rollback", "--revert-failed"), "`")}; otherwise delete it yourself before the next deploy` : "Manual deletion may be required before the next deploy";
|
|
9991
|
+
return command ? `${lead}: ${command}` : `${lead}, via the console: the bucket name cannot be reproduced safely on a command line, so any command shown here could act on a different bucket or run part of the name as shell.`;
|
|
9985
9992
|
}
|
|
9986
|
-
function
|
|
9987
|
-
if (
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
if (Array.isArray(value)) {
|
|
9992
|
-
value.forEach((item, i) => collectDynamicReferencePaths(item, into, path === "" ? String(i) : `${path}.${i}`));
|
|
9993
|
-
return;
|
|
9994
|
-
}
|
|
9995
|
-
if (value !== null && typeof value === "object") for (const [k, v] of Object.entries(value)) collectDynamicReferencePaths(v, into, path === "" ? k : `${path}.${k}`);
|
|
9993
|
+
function configItemId(item) {
|
|
9994
|
+
if (!isPlainObject(item)) return void 0;
|
|
9995
|
+
const id = item["Id"];
|
|
9996
|
+
if (typeof id === "string") return id;
|
|
9997
|
+
if (typeof id === "number" && Number.isFinite(id)) return String(id);
|
|
9996
9998
|
}
|
|
9997
|
-
function
|
|
9998
|
-
|
|
9999
|
-
if (value === "***") into.add(path);
|
|
10000
|
-
return;
|
|
10001
|
-
}
|
|
10002
|
-
if (Array.isArray(value)) {
|
|
10003
|
-
value.forEach((item, i) => collectSecretMaskPaths(item, into, path === "" ? String(i) : `${path}.${i}`));
|
|
10004
|
-
return;
|
|
10005
|
-
}
|
|
10006
|
-
if (value !== null && typeof value === "object") for (const [k, v] of Object.entries(value)) collectSecretMaskPaths(v, into, path === "" ? k : `${path}.${k}`);
|
|
9999
|
+
function declaresBucketObjectLock(properties) {
|
|
10000
|
+
return properties["ObjectLockEnabled"] === true || properties["ObjectLockEnabled"] === "true";
|
|
10007
10001
|
}
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
pinned = /* @__PURE__ */ new Map();
|
|
10011
|
-
stackRegion;
|
|
10012
|
-
constructor(stackRegion) {
|
|
10013
|
-
this.stackRegion = stackRegion;
|
|
10014
|
-
this.primary = new IntrinsicFunctionResolver(stackRegion);
|
|
10015
|
-
}
|
|
10016
|
-
forRegion(region) {
|
|
10017
|
-
const target = canonicalizeRegion(region);
|
|
10018
|
-
if (target === canonicalizeRegion(this.stackRegion)) return this.primary;
|
|
10019
|
-
const cached = this.pinned.get(target);
|
|
10020
|
-
if (cached) return cached;
|
|
10021
|
-
const scoped = new IntrinsicFunctionResolver(target);
|
|
10022
|
-
this.pinned.set(target, scoped);
|
|
10023
|
-
return scoped;
|
|
10024
|
-
}
|
|
10025
|
-
forRecordedRegion(region) {
|
|
10026
|
-
return this.primary.resolverForRecordedRegion(region);
|
|
10027
|
-
}
|
|
10028
|
-
};
|
|
10029
|
-
var DriftSecretRefusalError = class DriftSecretRefusalError extends CdkdError {
|
|
10030
|
-
driftSecretRefusal = true;
|
|
10031
|
-
constructor(message, code) {
|
|
10032
|
-
super(message, code);
|
|
10033
|
-
this.name = "DriftSecretRefusalError";
|
|
10034
|
-
Object.setPrototypeOf(this, DriftSecretRefusalError.prototype);
|
|
10035
|
-
}
|
|
10036
|
-
};
|
|
10037
|
-
function isDriftSecretRefusal(err) {
|
|
10038
|
-
return err instanceof DriftSecretRefusalError || err instanceof IntrinsicResolutionRefusalError;
|
|
10002
|
+
function declaresNestedObjectLock(properties) {
|
|
10003
|
+
return properties["ObjectLockConfiguration"]?.["ObjectLockEnabled"] === "Enabled";
|
|
10039
10004
|
}
|
|
10040
|
-
function
|
|
10041
|
-
const
|
|
10042
|
-
return
|
|
10005
|
+
function caughtErrorName(error) {
|
|
10006
|
+
const name = error?.name;
|
|
10007
|
+
return typeof name === "string" && name !== "" ? name : "unknown error";
|
|
10043
10008
|
}
|
|
10044
|
-
function
|
|
10045
|
-
|
|
10046
|
-
for (const token of dynamicReferenceTokens(leaf)) {
|
|
10047
|
-
if (recordedRegions?.has(token) === true) continue;
|
|
10048
|
-
const name = classifyReplaySecretRegion(token, consumerRegion, evidence.regions).kind === "local" ? regionLessSecretName(token) : void 0;
|
|
10049
|
-
if (name === void 0) continue;
|
|
10050
|
-
const where = propertyPath === "" ? "" : ` property '${propertyPath}'`;
|
|
10051
|
-
throw new DriftSecretRefusalError(`${logicalId}${where}: the secret reference '${name}' carries no region of its own, and this is a nested stack whose parent stacks' cross-region reads could not be established, so a parent may have resolved it in another region than '${consumerRegion}'. A secret of the same name in two regions is two independent values, so cdkd would compare against — and with --revert WRITE — the WRONG secret. Refusing instead. Make the parent stacks' state readable (or repair a record whose parent link disagrees with its key), or spell the reference as a full ARN, then re-run ${proseQuoted(cdkdRemedy("cdkd drift"))}.`, "DRIFT_SECRET_REGION_UNKNOWN");
|
|
10052
|
-
}
|
|
10009
|
+
function isPlainObject(value) {
|
|
10010
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
10053
10011
|
}
|
|
10054
|
-
function
|
|
10055
|
-
|
|
10012
|
+
function describeValue(value, maskSecrets = (text) => text) {
|
|
10013
|
+
if (value === null) return "null";
|
|
10014
|
+
if (Array.isArray(value)) return "an array";
|
|
10015
|
+
if (typeof value === "string") return `a string ${displaySafe(JSON.stringify(maskDeep(value, maskSecrets)))}`;
|
|
10016
|
+
if (isPlainObject(value)) return `an object with keys [${Object.keys(value).map((key) => displaySafe(maskSecrets(key))).join(", ")}]`;
|
|
10017
|
+
return `a ${typeof value} (${maskSecrets(String(value))})`;
|
|
10056
10018
|
}
|
|
10057
|
-
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
own = producerRegionsFromState(state);
|
|
10063
|
-
} catch {
|
|
10064
|
-
noteUnreadableAncestor(stackName, region, "its cross-stack read records are malformed");
|
|
10065
|
-
return {
|
|
10066
|
-
regions: [],
|
|
10067
|
-
complete: false
|
|
10068
|
-
};
|
|
10069
|
-
}
|
|
10070
|
-
const cut = stackName.lastIndexOf("~");
|
|
10071
|
-
const keyParent = cut >= 0 ? stackName.slice(0, cut) : void 0;
|
|
10072
|
-
const recordParent = state.parentStack;
|
|
10073
|
-
if (keyParent === void 0 && recordParent === void 0) return {
|
|
10074
|
-
regions: own,
|
|
10075
|
-
complete: true
|
|
10076
|
-
};
|
|
10077
|
-
if (keyParent === "" || recordParent !== void 0 && typeof recordParent !== "string" || state.parentRegion !== void 0 && typeof state.parentRegion !== "string" || keyParent !== void 0 && typeof recordParent === "string" && recordParent !== keyParent) {
|
|
10078
|
-
noteUnreadableAncestor(stackName, region, "its key and its parent link disagree, or the link is malformed");
|
|
10079
|
-
return inheritProducerRegions(own, void 0);
|
|
10080
|
-
}
|
|
10081
|
-
const parentName = keyParent ?? recordParent;
|
|
10082
|
-
if (depth >= MAX_ANCESTOR_DEPTH) {
|
|
10083
|
-
noteUnreadableAncestor(stackName, region, `the nesting is deeper than ${MAX_ANCESTOR_DEPTH} levels`);
|
|
10084
|
-
return inheritProducerRegions(own, void 0);
|
|
10085
|
-
}
|
|
10086
|
-
const parentRegion = typeof state.parentRegion === "string" ? state.parentRegion : region;
|
|
10087
|
-
let parent;
|
|
10088
|
-
try {
|
|
10089
|
-
parent = await stateBackend.getState(parentName, parentRegion, { readOnly: true });
|
|
10090
|
-
} catch (error) {
|
|
10091
|
-
noteUnreadableAncestor(parentName, parentRegion, `it could not be read (${describeAwsFailure(error).detail})`);
|
|
10092
|
-
return inheritProducerRegions(own, void 0);
|
|
10093
|
-
}
|
|
10094
|
-
if (!parent || parent.divergentBodyRegion !== void 0 || typeof parent.state !== "object" || parent.state === null) {
|
|
10095
|
-
noteUnreadableAncestor(parentName, parentRegion, "it has no usable state record");
|
|
10096
|
-
return inheritProducerRegions(own, void 0);
|
|
10097
|
-
}
|
|
10098
|
-
const inherited = await driftProducerRegionEvidence(parent.state, parentName, parentRegion, stateBackend, depth + 1);
|
|
10099
|
-
return inheritProducerRegions(own, inherited);
|
|
10019
|
+
function coerceCfnNumber(value) {
|
|
10020
|
+
if (typeof value !== "number" && typeof value !== "string") return void 0;
|
|
10021
|
+
if (value === "") return void 0;
|
|
10022
|
+
const n = Number(value);
|
|
10023
|
+
return Number.isFinite(n) ? n : void 0;
|
|
10100
10024
|
}
|
|
10101
|
-
|
|
10102
|
-
const
|
|
10103
|
-
|
|
10104
|
-
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10108
|
-
const at = leaf.indexOf(token, cursor);
|
|
10109
|
-
if (at < 0) throw new DriftSecretRefusalError(`${logicalId}${propertyPath === "" ? "" : ` property '${propertyPath}'`}: could not locate a scanned dynamic reference in the value it was scanned from. Refusing rather than resolving it in '${consumerRegion}', which would be the wrong region for a reference that names another one. This is an internal invariant failure — please report it with the resource type and property path.`, "DRIFT_SECRET_TOKEN_SCAN_MISMATCH");
|
|
10110
|
-
out += leaf.slice(cursor, at);
|
|
10111
|
-
const resolver = verdict.kind === "named-region" ? resolvers.forRegion(verdict.region) : verdict.kind === "recorded-region" ? resolvers.forRecordedRegion(verdict.region) : resolvers.primary;
|
|
10112
|
-
out += await resolveDynamicReferences(resolver, token, ctx);
|
|
10113
|
-
cursor = at + token.length;
|
|
10025
|
+
function mergeLegacySingular(plural, singular, onCollision) {
|
|
10026
|
+
const out = (Array.isArray(plural) ? plural : []).filter(isPlainObject);
|
|
10027
|
+
if (!isPlainObject(singular)) return out;
|
|
10028
|
+
const sc = singular["StorageClass"];
|
|
10029
|
+
if (typeof sc === "string" && out.some((e) => e["StorageClass"] === sc)) {
|
|
10030
|
+
onCollision(sc);
|
|
10031
|
+
return out;
|
|
10114
10032
|
}
|
|
10115
|
-
return out
|
|
10033
|
+
return [...out, singular];
|
|
10116
10034
|
}
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
const { secretPaths, onUnresolved, producerRegions, logicalId, consumerRegion } = options;
|
|
10120
|
-
const recordedRegions = recordedReferenceRegions(options.record);
|
|
10121
|
-
const ctx = {
|
|
10122
|
-
template: { Resources: {} },
|
|
10123
|
-
resources: {},
|
|
10124
|
-
recordedSecretValues: secrets
|
|
10125
|
-
};
|
|
10126
|
-
const walk = async (v, path) => {
|
|
10127
|
-
if (typeof v === "string") {
|
|
10128
|
-
if (!v.includes("{{resolve:")) return v;
|
|
10129
|
-
refuseUnprovenDriftSecret(v, path, logicalId, consumerRegion, producerRegions, recordedRegions);
|
|
10130
|
-
const resolved = await resolveDriftLeafByRegion(v, path, logicalId, consumerRegion, producerRegions.regions, resolvers, ctx, recordedRegions);
|
|
10131
|
-
const survivors = survivingDynamicReferences(resolved).filter((t) => v.includes(t));
|
|
10132
|
-
if (survivors.length > 0) onUnresolved?.(survivors, path);
|
|
10133
|
-
if (carriesRecordedSecret(resolved, secrets)) secretPaths?.add(path);
|
|
10134
|
-
return resolved;
|
|
10135
|
-
}
|
|
10136
|
-
if (Array.isArray(v)) {
|
|
10137
|
-
const out = new Array(v.length);
|
|
10138
|
-
for (let i = 0; i < v.length; i++) out[i] = await walk(v[i], path === "" ? String(i) : `${path}.${i}`);
|
|
10139
|
-
return out;
|
|
10140
|
-
}
|
|
10141
|
-
if (v !== null && typeof v === "object") {
|
|
10142
|
-
const out = Object.create(null);
|
|
10143
|
-
for (const [k, val] of Object.entries(v)) out[k] = await walk(val, path === "" ? k : `${path}.${k}`);
|
|
10144
|
-
return out;
|
|
10145
|
-
}
|
|
10146
|
-
return v;
|
|
10147
|
-
};
|
|
10148
|
-
return await walk(props, "");
|
|
10035
|
+
function shownLifecycleRuleId(id) {
|
|
10036
|
+
return id === void 0 || id === null || id === "" ? "(no Id)" : displayIdent(id);
|
|
10149
10037
|
}
|
|
10150
10038
|
|
|
10151
|
-
// src/
|
|
10152
|
-
function
|
|
10153
|
-
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
flag: "--template",
|
|
10161
|
-
hole: "file"
|
|
10162
|
-
}
|
|
10163
|
-
]).command} records a baseline on your assertion that AWS holds no secret the template does not spell as a dynamic reference.`;
|
|
10039
|
+
// src/provisioning/providers/s3-bucket/effective-items.ts
|
|
10040
|
+
function effectiveS3BucketDestination(declared, sentFormat) {
|
|
10041
|
+
if (!isPlainObject(declared)) return declared;
|
|
10042
|
+
if (!declared["BucketArn"]) return declared;
|
|
10043
|
+
const out = { BucketArn: declared["BucketArn"] };
|
|
10044
|
+
if (declared["BucketAccountId"] !== void 0) out["BucketAccountId"] = declared["BucketAccountId"];
|
|
10045
|
+
out["Format"] = sentFormat ?? declaredOrDefault(declared, "Format", "CSV");
|
|
10046
|
+
if (declared["Prefix"] !== void 0) out["Prefix"] = declared["Prefix"];
|
|
10047
|
+
return sameScalarRecord(out, declared) ? declared : out;
|
|
10164
10048
|
}
|
|
10165
|
-
function
|
|
10166
|
-
|
|
10167
|
-
if (hasReasonlessBaselineRefusal(record)) return "This refusal was recorded without a reason this cdkd recognizes: a deploy that actually CHANGES this resource restores a baseline unless the resource reads a template parameter, and then only a deploy that replaces the resource, or a re-import while a CloudFormation stack can prove the parameter's deployed value, does. " + acceptRefusedRemedy();
|
|
10049
|
+
function declaredOrDefault(container, key, fallback) {
|
|
10050
|
+
return key in container ? container[key] : fallback;
|
|
10168
10051
|
}
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10052
|
+
const INVENTORY_DESTINATION_DEFAULT_FORMAT = "CSV";
|
|
10053
|
+
const INVENTORY_DEFAULT_ENABLED = true;
|
|
10054
|
+
const INVENTORY_DEFAULT_INCLUDED_OBJECT_VERSIONS = "All";
|
|
10055
|
+
const ANALYTICS_DEFAULT_OUTPUT_SCHEMA_VERSION = "V_1";
|
|
10056
|
+
function sameScalarRecord(a, b) {
|
|
10057
|
+
const aKeys = Object.keys(a);
|
|
10058
|
+
if (aKeys.length !== Object.keys(b).length) return false;
|
|
10059
|
+
return aKeys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && Object.is(a[k], b[k]));
|
|
10175
10060
|
}
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10181
|
-
|
|
10182
|
-
|
|
10183
|
-
|
|
10184
|
-
if (match[1] !== "") segments.push(match[1]);
|
|
10185
|
-
for (const index of match[2].matchAll(/\[(\d+)\]/g)) segments.push(Number(index[1]));
|
|
10061
|
+
const INVENTORY_DEFAULT_SCHEDULE_FREQUENCY = "Weekly";
|
|
10062
|
+
function effectiveInventoryItem(item, sent) {
|
|
10063
|
+
const patch = {};
|
|
10064
|
+
const declaredEnabled = item["Enabled"];
|
|
10065
|
+
if (declaredEnabled === void 0) patch["Enabled"] = true;
|
|
10066
|
+
else {
|
|
10067
|
+
const coercedEnabled = coerceCfnBoolean(declaredEnabled);
|
|
10068
|
+
if (coercedEnabled !== void 0 && !Object.is(declaredEnabled, coercedEnabled)) patch["Enabled"] = coercedEnabled;
|
|
10186
10069
|
}
|
|
10187
|
-
|
|
10188
|
-
|
|
10189
|
-
|
|
10190
|
-
const
|
|
10191
|
-
|
|
10192
|
-
|
|
10193
|
-
|
|
10194
|
-
|
|
10195
|
-
|
|
10196
|
-
|
|
10197
|
-
const isWithinMarked = (coordinate) => marked.some((leaf) => leaf.length <= coordinate.length && leaf.every((segment, i) => String(segment) === String(coordinate[i])));
|
|
10198
|
-
const kept = [];
|
|
10199
|
-
const noEchoParameterPaths = [];
|
|
10200
|
-
for (const change of changes) {
|
|
10201
|
-
const coordinate = change.path.split(".");
|
|
10202
|
-
if (marked.some((leaf) => {
|
|
10203
|
-
const n = Math.min(leaf.length, coordinate.length);
|
|
10204
|
-
for (let i = 0; i < n; i++) if (leaf[i] !== coordinate[i]) return false;
|
|
10205
|
-
return true;
|
|
10206
|
-
}) && carriesSecretMask(change.stateValue) && !pathCrossesDottedKey(properties, change.path) && !pathCrossesDottedKey(baseline, change.path) && equalModuloMarkedMask(change.stateValue, change.awsValue, "***", coordinate, isMarked, isWithinMarked)) {
|
|
10207
|
-
noEchoParameterPaths.push(change.path);
|
|
10208
|
-
continue;
|
|
10209
|
-
}
|
|
10210
|
-
kept.push(change);
|
|
10070
|
+
if (item["IncludedObjectVersions"] === void 0) patch["IncludedObjectVersions"] = "All";
|
|
10071
|
+
const declaredSchedule = item["Schedule"];
|
|
10072
|
+
const declaresScheduleFrequency = item["ScheduleFrequency"] !== void 0;
|
|
10073
|
+
const scheduleFrequencyUsable = declaresScheduleFrequency && configStringRefusal(item, "ScheduleFrequency", "Weekly", "AWS::S3::Bucket InventoryConfigurations[]") === void 0;
|
|
10074
|
+
const scheduleContainerUsable = configStringRefusal(declaredSchedule, "Frequency", INVENTORY_DEFAULT_SCHEDULE_FREQUENCY, "AWS::S3::Bucket InventoryConfigurations[].Schedule") === void 0;
|
|
10075
|
+
const canFoldSchedule = sent?.frequency !== void 0 || scheduleFrequencyUsable || !declaresScheduleFrequency && scheduleContainerUsable;
|
|
10076
|
+
if (canFoldSchedule) {
|
|
10077
|
+
const declaredFrequency = declaresScheduleFrequency ? item["ScheduleFrequency"] : isPlainObject(declaredSchedule) && declaredSchedule["Frequency"] !== void 0 ? declaredSchedule["Frequency"] : INVENTORY_DEFAULT_SCHEDULE_FREQUENCY;
|
|
10078
|
+
const frequency = sent?.frequency ?? declaredFrequency;
|
|
10079
|
+
if (!Object.is(item["ScheduleFrequency"], frequency)) patch["ScheduleFrequency"] = frequency;
|
|
10211
10080
|
}
|
|
10212
|
-
|
|
10213
|
-
|
|
10214
|
-
|
|
10081
|
+
const destination = effectiveS3BucketDestination(item["Destination"], sent?.format);
|
|
10082
|
+
if (destination !== item["Destination"]) patch["Destination"] = destination;
|
|
10083
|
+
const dropsSchedule = declaredSchedule !== void 0 && canFoldSchedule;
|
|
10084
|
+
if (!dropsSchedule && Object.keys(patch).length === 0) return item;
|
|
10085
|
+
const out = {
|
|
10086
|
+
...item,
|
|
10087
|
+
...patch
|
|
10215
10088
|
};
|
|
10089
|
+
if (dropsSchedule) delete out["Schedule"];
|
|
10090
|
+
return out;
|
|
10216
10091
|
}
|
|
10217
|
-
function
|
|
10218
|
-
const
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
|
|
10092
|
+
function effectiveAnalyticsItem(item, sent) {
|
|
10093
|
+
const storageClassAnalysis = item["StorageClassAnalysis"];
|
|
10094
|
+
if (!isPlainObject(storageClassAnalysis)) return item;
|
|
10095
|
+
const dataExport = storageClassAnalysis["DataExport"];
|
|
10096
|
+
if (!isPlainObject(dataExport)) return item;
|
|
10097
|
+
const patch = {};
|
|
10098
|
+
const outputSchemaVersion = sent?.outputSchemaVersion ?? declaredOrDefault(dataExport, "OutputSchemaVersion", "V_1");
|
|
10099
|
+
if (!Object.is(dataExport["OutputSchemaVersion"], outputSchemaVersion)) patch["OutputSchemaVersion"] = outputSchemaVersion;
|
|
10100
|
+
const destination = effectiveS3BucketDestination(dataExport["Destination"], sent?.format);
|
|
10101
|
+
if (destination !== dataExport["Destination"]) patch["Destination"] = destination;
|
|
10102
|
+
if (Object.keys(patch).length === 0) return item;
|
|
10103
|
+
return {
|
|
10104
|
+
...item,
|
|
10105
|
+
StorageClassAnalysis: {
|
|
10106
|
+
...storageClassAnalysis,
|
|
10107
|
+
DataExport: {
|
|
10108
|
+
...dataExport,
|
|
10109
|
+
...patch
|
|
10110
|
+
}
|
|
10224
10111
|
}
|
|
10225
|
-
|
|
10226
|
-
|
|
10112
|
+
};
|
|
10113
|
+
}
|
|
10114
|
+
const INTELLIGENT_TIERING_DEFAULT_STATUS = "Enabled";
|
|
10115
|
+
function effectiveIntelligentTieringItem(item) {
|
|
10116
|
+
if (item["Status"] !== void 0) return item;
|
|
10227
10117
|
return {
|
|
10228
|
-
|
|
10229
|
-
|
|
10118
|
+
...item,
|
|
10119
|
+
Status: INTELLIGENT_TIERING_DEFAULT_STATUS
|
|
10230
10120
|
};
|
|
10231
10121
|
}
|
|
10232
|
-
function
|
|
10233
|
-
|
|
10234
|
-
for (const
|
|
10235
|
-
|
|
10122
|
+
function foldToleratedAliases(bag, aliases) {
|
|
10123
|
+
let out;
|
|
10124
|
+
for (const [emitted, tolerated] of aliases) {
|
|
10125
|
+
if (bag[tolerated] === void 0) continue;
|
|
10126
|
+
out ??= { ...bag };
|
|
10127
|
+
out[emitted] = bag[emitted] ?? bag[tolerated];
|
|
10128
|
+
delete out[tolerated];
|
|
10129
|
+
}
|
|
10130
|
+
return out ?? bag;
|
|
10236
10131
|
}
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
return "***";
|
|
10132
|
+
const TRANSITION_DATE_KEY = "TransitionDate";
|
|
10133
|
+
const TRANSITION_ALIASES = [["TransitionInDays", "Days"], ["TransitionDate", "Date"]];
|
|
10134
|
+
const EVENTBRIDGE_CONFIG_PATH = "AWS::S3::Bucket NotificationConfiguration.EventBridgeConfiguration";
|
|
10135
|
+
const EVENTBRIDGE_CONFIG_KEY = "EventBridgeConfiguration";
|
|
10136
|
+
const EVENTBRIDGE_DEFAULT_ENABLED = true;
|
|
10137
|
+
function eventBridgeEnabledOf(eb) {
|
|
10138
|
+
const declared = isPlainObject(eb) ? eb["EventBridgeEnabled"] : void 0;
|
|
10139
|
+
return coerceCfnBoolean(declared) ?? true;
|
|
10246
10140
|
}
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10141
|
+
const NOTIFICATION_LIST_KEYS = [
|
|
10142
|
+
"TopicConfigurations",
|
|
10143
|
+
"QueueConfigurations",
|
|
10144
|
+
"LambdaConfigurations"
|
|
10145
|
+
];
|
|
10146
|
+
function dropEmptyNotificationFamilies(config) {
|
|
10147
|
+
let out;
|
|
10148
|
+
for (const listKey of NOTIFICATION_LIST_KEYS) {
|
|
10149
|
+
const list = config[listKey];
|
|
10150
|
+
if (!Array.isArray(list) || list.length > 0) continue;
|
|
10151
|
+
out ??= { ...config };
|
|
10152
|
+
delete out[listKey];
|
|
10153
|
+
}
|
|
10154
|
+
return out ?? config;
|
|
10253
10155
|
}
|
|
10254
|
-
function
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
for (const change of changes) {
|
|
10262
|
-
const maskedPath = maskSecretsInText(change.path, secrets);
|
|
10263
|
-
const positionIsSecret = isSecretBearingPath(change.path, secretPaths) || isSecretBearingPath(change.path, maskPaths);
|
|
10264
|
-
const nameCarriesSecret = maskedPath !== change.path;
|
|
10265
|
-
const stateValueIsMask = carriesSecretMask(change.stateValue);
|
|
10266
|
-
const secretBearing = positionIsSecret || nameCarriesSecret || stateValueIsMask;
|
|
10267
|
-
if (secretPaths.has(change.path) && change.awsValue === void 0) continue;
|
|
10268
|
-
const stateValue = redactDriftValue(change.stateValue, secrets, secretBearing);
|
|
10269
|
-
const awsValue = redactDriftValue(change.awsValue, secrets, secretBearing);
|
|
10270
|
-
if (maskedPath !== change.path || secretBearing && awsValue === "***" || secretBearing && change.awsValue === void 0) maskedPaths.add(maskedPath);
|
|
10271
|
-
redacted.push({
|
|
10272
|
-
path: maskedPath,
|
|
10273
|
-
stateValue,
|
|
10274
|
-
awsValue
|
|
10275
|
-
});
|
|
10156
|
+
function foldNotificationEvents(item) {
|
|
10157
|
+
const events = item["Events"];
|
|
10158
|
+
if (events === void 0) return item;
|
|
10159
|
+
const out = { ...item };
|
|
10160
|
+
if (item["Event"] === void 0) {
|
|
10161
|
+
if (!Array.isArray(events) || events.length !== 1) return item;
|
|
10162
|
+
out["Event"] = events[0];
|
|
10276
10163
|
}
|
|
10164
|
+
delete out["Events"];
|
|
10165
|
+
return out;
|
|
10166
|
+
}
|
|
10167
|
+
function effectiveNotificationConfiguration(config) {
|
|
10168
|
+
if (!isPlainObject(config)) return config;
|
|
10169
|
+
let out = config;
|
|
10170
|
+
for (const listKey of NOTIFICATION_LIST_KEYS) out = canonicalizeItemList(out, listKey, foldNotificationEvents);
|
|
10171
|
+
out = dropEmptyNotificationFamilies(out);
|
|
10172
|
+
return foldEventBridgeConfiguration(out);
|
|
10173
|
+
}
|
|
10174
|
+
function foldEventBridgeConfiguration(config) {
|
|
10175
|
+
const eb = config[EVENTBRIDGE_CONFIG_KEY];
|
|
10176
|
+
if (eb === void 0) return config;
|
|
10177
|
+
if (eb !== null && configBooleanRefusal(eb, "EventBridgeEnabled", "AWS::S3::Bucket NotificationConfiguration.EventBridgeConfiguration")) return config;
|
|
10178
|
+
const enabled = eb === null ? false : eventBridgeEnabledOf(eb);
|
|
10179
|
+
const declared = isPlainObject(eb) ? eb["EventBridgeEnabled"] : void 0;
|
|
10180
|
+
if (isPlainObject(eb) && Object.keys(eb).length === 1 && Object.is(declared, enabled)) return config;
|
|
10277
10181
|
return {
|
|
10278
|
-
|
|
10279
|
-
|
|
10182
|
+
...config,
|
|
10183
|
+
[EVENTBRIDGE_CONFIG_KEY]: { EventBridgeEnabled: enabled }
|
|
10280
10184
|
};
|
|
10281
10185
|
}
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
|
|
10285
|
-
|
|
10286
|
-
|
|
10287
|
-
}
|
|
10288
|
-
if (marked.length === 0) return baseline;
|
|
10289
|
-
const recorded = record.properties ?? {};
|
|
10290
|
-
const listPathOf = (coordinate) => {
|
|
10291
|
-
const list = coordinate.findIndex((segment) => typeof segment === "number");
|
|
10292
|
-
return list < 0 ? void 0 : coordinate.slice(0, list);
|
|
10293
|
-
};
|
|
10294
|
-
const replaced = marked.filter((coordinate) => {
|
|
10295
|
-
const path = listPathOf(coordinate);
|
|
10296
|
-
if (path === void 0) return false;
|
|
10297
|
-
const underList = marked.filter((other) => other.length > path.length && path.every((segment, i) => segment === other[i]));
|
|
10298
|
-
return JSON.stringify(valueAtCoordinate(maskAtCoordinates(baseline, underList), path)) !== JSON.stringify(valueAtCoordinate(maskAtCoordinates(recorded, underList), path));
|
|
10299
|
-
});
|
|
10300
|
-
const byIndex = maskAtCoordinates(baseline, marked.filter((coordinate) => !replaced.includes(coordinate)));
|
|
10301
|
-
if (replaced.length === 0) return byIndex;
|
|
10302
|
-
return maskReadbackAtCoordinates(byIndex, recorded, replaced);
|
|
10186
|
+
|
|
10187
|
+
// src/utils/cfn-timestamp.ts
|
|
10188
|
+
const OFFSETLESS_DATE_TIME = /^\d{4}-\d{2}-\d{2}[Tt ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/;
|
|
10189
|
+
function parseCfnTimestamp(value) {
|
|
10190
|
+
return new Date(OFFSETLESS_DATE_TIME.test(value) ? `${value}Z` : value);
|
|
10303
10191
|
}
|
|
10304
10192
|
|
|
10305
|
-
// src/
|
|
10306
|
-
|
|
10307
|
-
|
|
10193
|
+
// src/provisioning/providers/s3-bucket/lifecycle-fold.ts
|
|
10194
|
+
const LIFECYCLE_RULE_PATH = "AWS::S3::Bucket LifecycleConfiguration.Rules[]";
|
|
10195
|
+
const LIFECYCLE_FILTER_PATH = `${LIFECYCLE_RULE_PATH}.Filter`;
|
|
10196
|
+
const LIFECYCLE_TAG_FILTERS_PATH = `${LIFECYCLE_RULE_PATH}.TagFilters`;
|
|
10197
|
+
const LIFECYCLE_DEFAULT_STATUS = "Enabled";
|
|
10198
|
+
const LIFECYCLE_STATUS_KEY = "Status";
|
|
10199
|
+
function lifecycleRuleScope(rule) {
|
|
10200
|
+
const filter = rule["Filter"];
|
|
10308
10201
|
return {
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
unreadableMap: "the record's whole 'resources' map is not a JSON object, so no resource in it could be read or compared (repair or re-import the record)",
|
|
10315
|
-
baselineRefused: "a `cdkd import` run refused to capture its observed baseline, so the only baseline available is the recorded properties that refusal already found untrustworthy" + (refusedRemedy === void 0 ? " (deploy a change to this resource to restore one)" : `. ${refusedRemedy}`),
|
|
10316
|
-
noEchoParameter: `its state holds a NoEcho parameter's value only as the redaction mask${noEchoPathsClause(record)}, so that value was not compared — every other property was (permanent by design; a deploy compares it with AWS)`,
|
|
10317
|
-
uncertifiedBaseline: "its recorded baseline holds the redaction mask at a position cdkd could not pair with the secret reference there, so that position was not compared — every other property was (deploy a change to this resource to re-capture the baseline)"
|
|
10318
|
-
}[cause];
|
|
10319
|
-
}
|
|
10320
|
-
const DRIFT_READ_FAILURE_BREAKER_THRESHOLD = 5;
|
|
10321
|
-
const DRIFT_READ_PATH_LABELS = {
|
|
10322
|
-
provider: "through cdkd's own (SDK) resource providers",
|
|
10323
|
-
ccApi: "through the Cloud Control API"
|
|
10324
|
-
};
|
|
10325
|
-
const NO_READ_HANDLER_NAMES = /* @__PURE__ */ new Set(["UnsupportedActionException", "TypeNotFoundException"]);
|
|
10326
|
-
const NO_READ_HANDLER_MESSAGE = /does not support READ action/i;
|
|
10327
|
-
function isNoReadHandlerError(err) {
|
|
10328
|
-
try {
|
|
10329
|
-
let current = err;
|
|
10330
|
-
for (let depth = 0; depth < 10 && current !== null && current !== void 0; depth += 1) {
|
|
10331
|
-
const candidate = current;
|
|
10332
|
-
if (typeof candidate.name === "string" && NO_READ_HANDLER_NAMES.has(candidate.name)) return true;
|
|
10333
|
-
if (typeof candidate.message === "string" && NO_READ_HANDLER_MESSAGE.test(candidate.message)) return true;
|
|
10334
|
-
current = candidate.cause;
|
|
10335
|
-
}
|
|
10336
|
-
} catch {
|
|
10337
|
-
return false;
|
|
10338
|
-
}
|
|
10339
|
-
return false;
|
|
10340
|
-
}
|
|
10341
|
-
|
|
10342
|
-
// src/analyzer/drift-protocol-normalize.ts
|
|
10343
|
-
const IP_PROTOCOL_PATHS = /* @__PURE__ */ new Map([
|
|
10344
|
-
["AWS::EC2::SecurityGroupIngress", ["IpProtocol"]],
|
|
10345
|
-
["AWS::EC2::SecurityGroupEgress", ["IpProtocol"]],
|
|
10346
|
-
["AWS::EC2::SecurityGroup", ["SecurityGroupIngress[].IpProtocol", "SecurityGroupEgress[].IpProtocol"]]
|
|
10347
|
-
]);
|
|
10348
|
-
function rewriteAtPath(properties, path) {
|
|
10349
|
-
if (properties === null || typeof properties !== "object" || Array.isArray(properties)) return properties;
|
|
10350
|
-
const bag = properties;
|
|
10351
|
-
const arrayMarker = path.indexOf("[].");
|
|
10352
|
-
if (arrayMarker === -1) {
|
|
10353
|
-
if (!(path in bag)) return properties;
|
|
10354
|
-
const next = canonicalizeIpProtocolValue(bag[path]);
|
|
10355
|
-
if (next === bag[path]) return properties;
|
|
10356
|
-
return {
|
|
10357
|
-
...bag,
|
|
10358
|
-
[path]: next
|
|
10359
|
-
};
|
|
10360
|
-
}
|
|
10361
|
-
const arrayKey = path.slice(0, arrayMarker);
|
|
10362
|
-
const elementKey = path.slice(arrayMarker + 3);
|
|
10363
|
-
const list = bag[arrayKey];
|
|
10364
|
-
if (!Array.isArray(list)) return properties;
|
|
10365
|
-
let changed = false;
|
|
10366
|
-
const mapped = list.map((element) => {
|
|
10367
|
-
if (element === null || typeof element !== "object" || Array.isArray(element)) return element;
|
|
10368
|
-
const rule = element;
|
|
10369
|
-
if (!(elementKey in rule)) return element;
|
|
10370
|
-
const next = canonicalizeIpProtocolValue(rule[elementKey]);
|
|
10371
|
-
if (next === rule[elementKey]) return element;
|
|
10372
|
-
changed = true;
|
|
10373
|
-
return {
|
|
10374
|
-
...rule,
|
|
10375
|
-
[elementKey]: next
|
|
10376
|
-
};
|
|
10377
|
-
});
|
|
10378
|
-
if (!changed) return properties;
|
|
10379
|
-
return {
|
|
10380
|
-
...bag,
|
|
10381
|
-
[arrayKey]: mapped
|
|
10382
|
-
};
|
|
10383
|
-
}
|
|
10384
|
-
function canonicalizeIpProtocols(baseline, aws, resourceType) {
|
|
10385
|
-
const paths = IP_PROTOCOL_PATHS.get(resourceType);
|
|
10386
|
-
if (paths === void 0) return {
|
|
10387
|
-
baseline,
|
|
10388
|
-
aws
|
|
10389
|
-
};
|
|
10390
|
-
let nextBaseline = baseline;
|
|
10391
|
-
let nextAws = aws;
|
|
10392
|
-
for (const path of paths) {
|
|
10393
|
-
nextBaseline = rewriteAtPath(nextBaseline, path);
|
|
10394
|
-
nextAws = rewriteAtPath(nextAws, path);
|
|
10395
|
-
}
|
|
10396
|
-
return {
|
|
10397
|
-
baseline: nextBaseline,
|
|
10398
|
-
aws: nextAws
|
|
10399
|
-
};
|
|
10400
|
-
}
|
|
10401
|
-
|
|
10402
|
-
// src/analyzer/drift-undeclared-grants.ts
|
|
10403
|
-
const UNDECLARED_GRANT_KEYS = {
|
|
10404
|
-
"AWS::IAM::Role": [
|
|
10405
|
-
"ManagedPolicyArns",
|
|
10406
|
-
"PermissionsBoundary",
|
|
10407
|
-
"Policies"
|
|
10408
|
-
],
|
|
10409
|
-
"AWS::IAM::User": [
|
|
10410
|
-
"Groups",
|
|
10411
|
-
"ManagedPolicyArns",
|
|
10412
|
-
"PermissionsBoundary",
|
|
10413
|
-
"Policies"
|
|
10414
|
-
],
|
|
10415
|
-
"AWS::IAM::Group": ["ManagedPolicyArns", "Policies"]
|
|
10416
|
-
};
|
|
10417
|
-
const BOUNDARY_KEY = "PermissionsBoundary";
|
|
10418
|
-
const NONE = [];
|
|
10419
|
-
function isPlainRecord$3(value) {
|
|
10420
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
10421
|
-
}
|
|
10422
|
-
function undeclaredGrantDriftKeys(resourceType, properties) {
|
|
10423
|
-
if (!hasOwnKey(UNDECLARED_GRANT_KEYS, resourceType)) return NONE;
|
|
10424
|
-
if (!isPlainRecord$3(properties)) return NONE;
|
|
10425
|
-
return UNDECLARED_GRANT_KEYS[resourceType].filter((key) => !hasOwnKey(properties, key));
|
|
10426
|
-
}
|
|
10427
|
-
function isUndeclaredGrantScalarKey(key) {
|
|
10428
|
-
return key === BOUNDARY_KEY;
|
|
10429
|
-
}
|
|
10430
|
-
function grantMemberIdentity(key, member) {
|
|
10431
|
-
if (key === "Policies") {
|
|
10432
|
-
const name = isPlainRecord$3(member) ? member["PolicyName"] : void 0;
|
|
10433
|
-
return typeof name === "string" ? name : void 0;
|
|
10434
|
-
}
|
|
10435
|
-
if (typeof member !== "string") return void 0;
|
|
10436
|
-
return key === "Groups" ? member.toLowerCase() : member;
|
|
10437
|
-
}
|
|
10438
|
-
function isNoBoundary(value) {
|
|
10439
|
-
return value === void 0 || value === null || value === "";
|
|
10440
|
-
}
|
|
10441
|
-
function withUndeclaredGrantBaseline(baseline, aws, keys, siblingRecorded = {}) {
|
|
10442
|
-
let out = baseline;
|
|
10443
|
-
const set = (key, value) => {
|
|
10444
|
-
if (out === baseline) out = { ...baseline };
|
|
10445
|
-
defineOwnKey(out, key, value);
|
|
10446
|
-
};
|
|
10447
|
-
for (const key of keys) {
|
|
10448
|
-
if (!hasOwnKey(aws, key)) continue;
|
|
10449
|
-
if (isUndeclaredGrantScalarKey(key)) {
|
|
10450
|
-
if (!hasOwnKey(baseline, key)) set(key, "");
|
|
10451
|
-
continue;
|
|
10452
|
-
}
|
|
10453
|
-
const live = aws[key];
|
|
10454
|
-
if (!Array.isArray(live)) continue;
|
|
10455
|
-
const recorded = hasOwnKey(baseline, key) ? baseline[key] : [];
|
|
10456
|
-
if (!Array.isArray(recorded)) continue;
|
|
10457
|
-
const byId = /* @__PURE__ */ new Map();
|
|
10458
|
-
for (const member of [...siblingRecorded[key] ?? [], ...recorded]) {
|
|
10459
|
-
const id = grantMemberIdentity(key, member);
|
|
10460
|
-
if (id !== void 0 && !byId.has(id)) byId.set(id, member);
|
|
10461
|
-
}
|
|
10462
|
-
const projected = [];
|
|
10463
|
-
for (const member of live) {
|
|
10464
|
-
const id = grantMemberIdentity(key, member);
|
|
10465
|
-
if (id === void 0 || !byId.has(id)) continue;
|
|
10466
|
-
projected.push(typeof member === "string" ? member : byId.get(id));
|
|
10467
|
-
byId.delete(id);
|
|
10468
|
-
}
|
|
10469
|
-
if (!(hasOwnKey(baseline, key) && projected.length === recorded.length && projected.every((m, i) => m === recorded[i]))) set(key, projected);
|
|
10470
|
-
}
|
|
10471
|
-
return out;
|
|
10472
|
-
}
|
|
10473
|
-
function undeclaredGrantIgnorePaths(baseline, aws, keys) {
|
|
10474
|
-
return keys.filter((key) => {
|
|
10475
|
-
if (hasOwnKey(aws, key)) return false;
|
|
10476
|
-
if (isUndeclaredGrantScalarKey(key)) return !hasOwnKey(baseline, key) || isNoBoundary(baseline[key]);
|
|
10477
|
-
return true;
|
|
10478
|
-
});
|
|
10479
|
-
}
|
|
10480
|
-
function withoutUndeclaredNoBoundary(desired, keys) {
|
|
10481
|
-
const absent = keys.filter((key) => isUndeclaredGrantScalarKey(key) && isNoBoundary(desired[key]));
|
|
10482
|
-
if (absent.length === 0) return {
|
|
10483
|
-
desired,
|
|
10484
|
-
absent
|
|
10485
|
-
};
|
|
10486
|
-
const out = { ...desired };
|
|
10487
|
-
for (const key of absent) delete out[key];
|
|
10488
|
-
return {
|
|
10489
|
-
desired: out,
|
|
10490
|
-
absent
|
|
10491
|
-
};
|
|
10492
|
-
}
|
|
10493
|
-
function removedGrantMembers(key, awsValue, stateValue) {
|
|
10494
|
-
if (isUndeclaredGrantScalarKey(key)) return !isNoBoundary(awsValue) && isNoBoundary(stateValue) ? [{
|
|
10495
|
-
key,
|
|
10496
|
-
member: awsValue
|
|
10497
|
-
}] : [];
|
|
10498
|
-
if (!Array.isArray(awsValue)) return [];
|
|
10499
|
-
const kept = new Set((Array.isArray(stateValue) ? stateValue : []).map((m) => grantMemberIdentity(key, m)));
|
|
10500
|
-
const out = [];
|
|
10501
|
-
for (const m of awsValue) {
|
|
10502
|
-
const id = grantMemberIdentity(key, m);
|
|
10503
|
-
if (id !== void 0 && kept.has(id)) continue;
|
|
10504
|
-
const name = key === "Policies" && isPlainRecord$3(m) ? m["PolicyName"] : void 0;
|
|
10505
|
-
out.push({
|
|
10506
|
-
key,
|
|
10507
|
-
member: typeof name === "string" ? name : m
|
|
10508
|
-
});
|
|
10509
|
-
}
|
|
10510
|
-
return out;
|
|
10511
|
-
}
|
|
10512
|
-
|
|
10513
|
-
// src/provisioning/providers/s3-bucket/shared.ts
|
|
10514
|
-
function manualBucketDeletionClause(bucketName, maskSecrets, journaled) {
|
|
10515
|
-
const command = renderDisableCommand({
|
|
10516
|
-
before: "aws s3api delete-bucket --bucket",
|
|
10517
|
-
identifier: bucketName,
|
|
10518
|
-
maskSecrets
|
|
10519
|
-
});
|
|
10520
|
-
const lead = journaled ? `Outside a rollback's re-create, the failed deploy's rollback journal records the bucket for ${proseQuoted(cdkdRemedy("cdkd rollback", "--revert-failed"), "`")}; otherwise delete it yourself before the next deploy` : "Manual deletion may be required before the next deploy";
|
|
10521
|
-
return command ? `${lead}: ${command}` : `${lead}, via the console: the bucket name cannot be reproduced safely on a command line, so any command shown here could act on a different bucket or run part of the name as shell.`;
|
|
10522
|
-
}
|
|
10523
|
-
function configItemId(item) {
|
|
10524
|
-
if (!isPlainObject(item)) return void 0;
|
|
10525
|
-
const id = item["Id"];
|
|
10526
|
-
if (typeof id === "string") return id;
|
|
10527
|
-
if (typeof id === "number" && Number.isFinite(id)) return String(id);
|
|
10528
|
-
}
|
|
10529
|
-
function declaresBucketObjectLock(properties) {
|
|
10530
|
-
return properties["ObjectLockEnabled"] === true || properties["ObjectLockEnabled"] === "true";
|
|
10531
|
-
}
|
|
10532
|
-
function declaresNestedObjectLock(properties) {
|
|
10533
|
-
return properties["ObjectLockConfiguration"]?.["ObjectLockEnabled"] === "Enabled";
|
|
10534
|
-
}
|
|
10535
|
-
function caughtErrorName(error) {
|
|
10536
|
-
const name = error?.name;
|
|
10537
|
-
return typeof name === "string" && name !== "" ? name : "unknown error";
|
|
10538
|
-
}
|
|
10539
|
-
function isPlainObject(value) {
|
|
10540
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
10541
|
-
}
|
|
10542
|
-
function describeValue(value, maskSecrets = (text) => text) {
|
|
10543
|
-
if (value === null) return "null";
|
|
10544
|
-
if (Array.isArray(value)) return "an array";
|
|
10545
|
-
if (typeof value === "string") return `a string ${displaySafe(JSON.stringify(maskDeep(value, maskSecrets)))}`;
|
|
10546
|
-
if (isPlainObject(value)) return `an object with keys [${Object.keys(value).map((key) => displaySafe(maskSecrets(key))).join(", ")}]`;
|
|
10547
|
-
return `a ${typeof value} (${maskSecrets(String(value))})`;
|
|
10548
|
-
}
|
|
10549
|
-
function coerceCfnNumber(value) {
|
|
10550
|
-
if (typeof value !== "number" && typeof value !== "string") return void 0;
|
|
10551
|
-
if (value === "") return void 0;
|
|
10552
|
-
const n = Number(value);
|
|
10553
|
-
return Number.isFinite(n) ? n : void 0;
|
|
10554
|
-
}
|
|
10555
|
-
function mergeLegacySingular(plural, singular, onCollision) {
|
|
10556
|
-
const out = (Array.isArray(plural) ? plural : []).filter(isPlainObject);
|
|
10557
|
-
if (!isPlainObject(singular)) return out;
|
|
10558
|
-
const sc = singular["StorageClass"];
|
|
10559
|
-
if (typeof sc === "string" && out.some((e) => e["StorageClass"] === sc)) {
|
|
10560
|
-
onCollision(sc);
|
|
10561
|
-
return out;
|
|
10562
|
-
}
|
|
10563
|
-
return [...out, singular];
|
|
10564
|
-
}
|
|
10565
|
-
function shownLifecycleRuleId(id) {
|
|
10566
|
-
return id === void 0 || id === null || id === "" ? "(no Id)" : displayIdent(id);
|
|
10567
|
-
}
|
|
10568
|
-
|
|
10569
|
-
// src/provisioning/providers/s3-bucket/effective-items.ts
|
|
10570
|
-
function effectiveS3BucketDestination(declared, sentFormat) {
|
|
10571
|
-
if (!isPlainObject(declared)) return declared;
|
|
10572
|
-
if (!declared["BucketArn"]) return declared;
|
|
10573
|
-
const out = { BucketArn: declared["BucketArn"] };
|
|
10574
|
-
if (declared["BucketAccountId"] !== void 0) out["BucketAccountId"] = declared["BucketAccountId"];
|
|
10575
|
-
out["Format"] = sentFormat ?? declaredOrDefault(declared, "Format", "CSV");
|
|
10576
|
-
if (declared["Prefix"] !== void 0) out["Prefix"] = declared["Prefix"];
|
|
10577
|
-
return sameScalarRecord(out, declared) ? declared : out;
|
|
10578
|
-
}
|
|
10579
|
-
function declaredOrDefault(container, key, fallback) {
|
|
10580
|
-
return key in container ? container[key] : fallback;
|
|
10581
|
-
}
|
|
10582
|
-
const INVENTORY_DESTINATION_DEFAULT_FORMAT = "CSV";
|
|
10583
|
-
const INVENTORY_DEFAULT_ENABLED = true;
|
|
10584
|
-
const INVENTORY_DEFAULT_INCLUDED_OBJECT_VERSIONS = "All";
|
|
10585
|
-
const ANALYTICS_DEFAULT_OUTPUT_SCHEMA_VERSION = "V_1";
|
|
10586
|
-
function sameScalarRecord(a, b) {
|
|
10587
|
-
const aKeys = Object.keys(a);
|
|
10588
|
-
if (aKeys.length !== Object.keys(b).length) return false;
|
|
10589
|
-
return aKeys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && Object.is(a[k], b[k]));
|
|
10590
|
-
}
|
|
10591
|
-
const INVENTORY_DEFAULT_SCHEDULE_FREQUENCY = "Weekly";
|
|
10592
|
-
function effectiveInventoryItem(item, sent) {
|
|
10593
|
-
const patch = {};
|
|
10594
|
-
const declaredEnabled = item["Enabled"];
|
|
10595
|
-
if (declaredEnabled === void 0) patch["Enabled"] = true;
|
|
10596
|
-
else {
|
|
10597
|
-
const coercedEnabled = coerceCfnBoolean(declaredEnabled);
|
|
10598
|
-
if (coercedEnabled !== void 0 && !Object.is(declaredEnabled, coercedEnabled)) patch["Enabled"] = coercedEnabled;
|
|
10599
|
-
}
|
|
10600
|
-
if (item["IncludedObjectVersions"] === void 0) patch["IncludedObjectVersions"] = "All";
|
|
10601
|
-
const declaredSchedule = item["Schedule"];
|
|
10602
|
-
const declaresScheduleFrequency = item["ScheduleFrequency"] !== void 0;
|
|
10603
|
-
const scheduleFrequencyUsable = declaresScheduleFrequency && configStringRefusal(item, "ScheduleFrequency", "Weekly", "AWS::S3::Bucket InventoryConfigurations[]") === void 0;
|
|
10604
|
-
const scheduleContainerUsable = configStringRefusal(declaredSchedule, "Frequency", INVENTORY_DEFAULT_SCHEDULE_FREQUENCY, "AWS::S3::Bucket InventoryConfigurations[].Schedule") === void 0;
|
|
10605
|
-
const canFoldSchedule = sent?.frequency !== void 0 || scheduleFrequencyUsable || !declaresScheduleFrequency && scheduleContainerUsable;
|
|
10606
|
-
if (canFoldSchedule) {
|
|
10607
|
-
const declaredFrequency = declaresScheduleFrequency ? item["ScheduleFrequency"] : isPlainObject(declaredSchedule) && declaredSchedule["Frequency"] !== void 0 ? declaredSchedule["Frequency"] : INVENTORY_DEFAULT_SCHEDULE_FREQUENCY;
|
|
10608
|
-
const frequency = sent?.frequency ?? declaredFrequency;
|
|
10609
|
-
if (!Object.is(item["ScheduleFrequency"], frequency)) patch["ScheduleFrequency"] = frequency;
|
|
10610
|
-
}
|
|
10611
|
-
const destination = effectiveS3BucketDestination(item["Destination"], sent?.format);
|
|
10612
|
-
if (destination !== item["Destination"]) patch["Destination"] = destination;
|
|
10613
|
-
const dropsSchedule = declaredSchedule !== void 0 && canFoldSchedule;
|
|
10614
|
-
if (!dropsSchedule && Object.keys(patch).length === 0) return item;
|
|
10615
|
-
const out = {
|
|
10616
|
-
...item,
|
|
10617
|
-
...patch
|
|
10618
|
-
};
|
|
10619
|
-
if (dropsSchedule) delete out["Schedule"];
|
|
10620
|
-
return out;
|
|
10621
|
-
}
|
|
10622
|
-
function effectiveAnalyticsItem(item, sent) {
|
|
10623
|
-
const storageClassAnalysis = item["StorageClassAnalysis"];
|
|
10624
|
-
if (!isPlainObject(storageClassAnalysis)) return item;
|
|
10625
|
-
const dataExport = storageClassAnalysis["DataExport"];
|
|
10626
|
-
if (!isPlainObject(dataExport)) return item;
|
|
10627
|
-
const patch = {};
|
|
10628
|
-
const outputSchemaVersion = sent?.outputSchemaVersion ?? declaredOrDefault(dataExport, "OutputSchemaVersion", "V_1");
|
|
10629
|
-
if (!Object.is(dataExport["OutputSchemaVersion"], outputSchemaVersion)) patch["OutputSchemaVersion"] = outputSchemaVersion;
|
|
10630
|
-
const destination = effectiveS3BucketDestination(dataExport["Destination"], sent?.format);
|
|
10631
|
-
if (destination !== dataExport["Destination"]) patch["Destination"] = destination;
|
|
10632
|
-
if (Object.keys(patch).length === 0) return item;
|
|
10633
|
-
return {
|
|
10634
|
-
...item,
|
|
10635
|
-
StorageClassAnalysis: {
|
|
10636
|
-
...storageClassAnalysis,
|
|
10637
|
-
DataExport: {
|
|
10638
|
-
...dataExport,
|
|
10639
|
-
...patch
|
|
10640
|
-
}
|
|
10641
|
-
}
|
|
10642
|
-
};
|
|
10643
|
-
}
|
|
10644
|
-
const INTELLIGENT_TIERING_DEFAULT_STATUS = "Enabled";
|
|
10645
|
-
function effectiveIntelligentTieringItem(item) {
|
|
10646
|
-
if (item["Status"] !== void 0) return item;
|
|
10647
|
-
return {
|
|
10648
|
-
...item,
|
|
10649
|
-
Status: INTELLIGENT_TIERING_DEFAULT_STATUS
|
|
10650
|
-
};
|
|
10651
|
-
}
|
|
10652
|
-
function foldToleratedAliases(bag, aliases) {
|
|
10653
|
-
let out;
|
|
10654
|
-
for (const [emitted, tolerated] of aliases) {
|
|
10655
|
-
if (bag[tolerated] === void 0) continue;
|
|
10656
|
-
out ??= { ...bag };
|
|
10657
|
-
out[emitted] = bag[emitted] ?? bag[tolerated];
|
|
10658
|
-
delete out[tolerated];
|
|
10659
|
-
}
|
|
10660
|
-
return out ?? bag;
|
|
10661
|
-
}
|
|
10662
|
-
const TRANSITION_DATE_KEY = "TransitionDate";
|
|
10663
|
-
const TRANSITION_ALIASES = [["TransitionInDays", "Days"], ["TransitionDate", "Date"]];
|
|
10664
|
-
const EVENTBRIDGE_CONFIG_PATH = "AWS::S3::Bucket NotificationConfiguration.EventBridgeConfiguration";
|
|
10665
|
-
const EVENTBRIDGE_CONFIG_KEY = "EventBridgeConfiguration";
|
|
10666
|
-
const EVENTBRIDGE_DEFAULT_ENABLED = true;
|
|
10667
|
-
function eventBridgeEnabledOf(eb) {
|
|
10668
|
-
const declared = isPlainObject(eb) ? eb["EventBridgeEnabled"] : void 0;
|
|
10669
|
-
return coerceCfnBoolean(declared) ?? true;
|
|
10670
|
-
}
|
|
10671
|
-
const NOTIFICATION_LIST_KEYS = [
|
|
10672
|
-
"TopicConfigurations",
|
|
10673
|
-
"QueueConfigurations",
|
|
10674
|
-
"LambdaConfigurations"
|
|
10675
|
-
];
|
|
10676
|
-
function dropEmptyNotificationFamilies(config) {
|
|
10677
|
-
let out;
|
|
10678
|
-
for (const listKey of NOTIFICATION_LIST_KEYS) {
|
|
10679
|
-
const list = config[listKey];
|
|
10680
|
-
if (!Array.isArray(list) || list.length > 0) continue;
|
|
10681
|
-
out ??= { ...config };
|
|
10682
|
-
delete out[listKey];
|
|
10683
|
-
}
|
|
10684
|
-
return out ?? config;
|
|
10685
|
-
}
|
|
10686
|
-
function foldNotificationEvents(item) {
|
|
10687
|
-
const events = item["Events"];
|
|
10688
|
-
if (events === void 0) return item;
|
|
10689
|
-
const out = { ...item };
|
|
10690
|
-
if (item["Event"] === void 0) {
|
|
10691
|
-
if (!Array.isArray(events) || events.length !== 1) return item;
|
|
10692
|
-
out["Event"] = events[0];
|
|
10693
|
-
}
|
|
10694
|
-
delete out["Events"];
|
|
10695
|
-
return out;
|
|
10696
|
-
}
|
|
10697
|
-
function effectiveNotificationConfiguration(config) {
|
|
10698
|
-
if (!isPlainObject(config)) return config;
|
|
10699
|
-
let out = config;
|
|
10700
|
-
for (const listKey of NOTIFICATION_LIST_KEYS) out = canonicalizeItemList(out, listKey, foldNotificationEvents);
|
|
10701
|
-
out = dropEmptyNotificationFamilies(out);
|
|
10702
|
-
return foldEventBridgeConfiguration(out);
|
|
10703
|
-
}
|
|
10704
|
-
function foldEventBridgeConfiguration(config) {
|
|
10705
|
-
const eb = config[EVENTBRIDGE_CONFIG_KEY];
|
|
10706
|
-
if (eb === void 0) return config;
|
|
10707
|
-
if (eb !== null && configBooleanRefusal(eb, "EventBridgeEnabled", "AWS::S3::Bucket NotificationConfiguration.EventBridgeConfiguration")) return config;
|
|
10708
|
-
const enabled = eb === null ? false : eventBridgeEnabledOf(eb);
|
|
10709
|
-
const declared = isPlainObject(eb) ? eb["EventBridgeEnabled"] : void 0;
|
|
10710
|
-
if (isPlainObject(eb) && Object.keys(eb).length === 1 && Object.is(declared, enabled)) return config;
|
|
10711
|
-
return {
|
|
10712
|
-
...config,
|
|
10713
|
-
[EVENTBRIDGE_CONFIG_KEY]: { EventBridgeEnabled: enabled }
|
|
10714
|
-
};
|
|
10715
|
-
}
|
|
10716
|
-
|
|
10717
|
-
// src/utils/cfn-timestamp.ts
|
|
10718
|
-
const OFFSETLESS_DATE_TIME = /^\d{4}-\d{2}-\d{2}[Tt ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/;
|
|
10719
|
-
function parseCfnTimestamp(value) {
|
|
10720
|
-
return new Date(OFFSETLESS_DATE_TIME.test(value) ? `${value}Z` : value);
|
|
10721
|
-
}
|
|
10722
|
-
|
|
10723
|
-
// src/provisioning/providers/s3-bucket/lifecycle-fold.ts
|
|
10724
|
-
const LIFECYCLE_RULE_PATH = "AWS::S3::Bucket LifecycleConfiguration.Rules[]";
|
|
10725
|
-
const LIFECYCLE_FILTER_PATH = `${LIFECYCLE_RULE_PATH}.Filter`;
|
|
10726
|
-
const LIFECYCLE_TAG_FILTERS_PATH = `${LIFECYCLE_RULE_PATH}.TagFilters`;
|
|
10727
|
-
const LIFECYCLE_DEFAULT_STATUS = "Enabled";
|
|
10728
|
-
const LIFECYCLE_STATUS_KEY = "Status";
|
|
10729
|
-
function lifecycleRuleScope(rule) {
|
|
10730
|
-
const filter = rule["Filter"];
|
|
10731
|
-
return {
|
|
10732
|
-
prefix: filter?.["Prefix"] ?? rule["Prefix"],
|
|
10733
|
-
tagFilters: filter?.["TagFilters"] ?? rule["TagFilters"],
|
|
10734
|
-
sizeGt: filter?.["ObjectSizeGreaterThan"] ?? rule["ObjectSizeGreaterThan"],
|
|
10735
|
-
sizeLt: filter?.["ObjectSizeLessThan"] ?? rule["ObjectSizeLessThan"]
|
|
10736
|
-
};
|
|
10202
|
+
prefix: filter?.["Prefix"] ?? rule["Prefix"],
|
|
10203
|
+
tagFilters: filter?.["TagFilters"] ?? rule["TagFilters"],
|
|
10204
|
+
sizeGt: filter?.["ObjectSizeGreaterThan"] ?? rule["ObjectSizeGreaterThan"],
|
|
10205
|
+
sizeLt: filter?.["ObjectSizeLessThan"] ?? rule["ObjectSizeLessThan"]
|
|
10206
|
+
};
|
|
10737
10207
|
}
|
|
10738
10208
|
function lifecycleRuleIsPlainPrefixOnly(rule) {
|
|
10739
10209
|
if (rule["Filter"] != null) return false;
|
|
@@ -11158,8 +10628,8 @@ function sgSettleRuleKey(rule, direction) {
|
|
|
11158
10628
|
p: protocol,
|
|
11159
10629
|
f: port(rule["FromPort"]),
|
|
11160
10630
|
t: port(rule["ToPort"]),
|
|
11161
|
-
c4: present(rule["CidrIp"]),
|
|
11162
|
-
c6: present(rule["CidrIpv6"]),
|
|
10631
|
+
c4: sgCidrKey(present(rule["CidrIp"])),
|
|
10632
|
+
c6: sgCidrKey(present(rule["CidrIpv6"])),
|
|
11163
10633
|
peer: present(peer),
|
|
11164
10634
|
pl: present(direction === "egress" ? rule["DestinationPrefixListId"] : rule["SourcePrefixListId"]),
|
|
11165
10635
|
d: present(rule["Description"])
|
|
@@ -11199,341 +10669,905 @@ function sgRemovedNotDeclared(removed, declared, direction) {
|
|
|
11199
10669
|
return !(parsed.peer !== null && namedPeerPorts.has(protocolAndPorts(key) ?? ""));
|
|
11200
10670
|
}));
|
|
11201
10671
|
}
|
|
11202
|
-
function protocolAndPorts(key) {
|
|
10672
|
+
function protocolAndPorts(key) {
|
|
10673
|
+
try {
|
|
10674
|
+
const { p, f, t } = JSON.parse(key);
|
|
10675
|
+
return JSON.stringify([
|
|
10676
|
+
p,
|
|
10677
|
+
f,
|
|
10678
|
+
t
|
|
10679
|
+
]);
|
|
10680
|
+
} catch {
|
|
10681
|
+
return;
|
|
10682
|
+
}
|
|
10683
|
+
}
|
|
10684
|
+
function sgRuleIsRemoved(rule, gone, direction) {
|
|
10685
|
+
if (gone.size === 0 || typeof rule !== "object" || rule === null) return false;
|
|
10686
|
+
const key = sgRemovalRuleKey(rule, direction);
|
|
10687
|
+
return key !== void 0 && gone.has(key);
|
|
10688
|
+
}
|
|
10689
|
+
function declaredSgRulesRead(value, declared, direction) {
|
|
10690
|
+
if (!Array.isArray(value)) return false;
|
|
10691
|
+
const have = value.map((rule) => typeof rule === "object" && rule !== null ? sgSettleRuleKey(rule, direction) : void 0);
|
|
10692
|
+
for (const rule of declared) {
|
|
10693
|
+
if (typeof rule !== "object" || rule === null) continue;
|
|
10694
|
+
const key = sgSettleRuleKey(rule, direction);
|
|
10695
|
+
if (key === void 0) continue;
|
|
10696
|
+
const index = have.indexOf(key);
|
|
10697
|
+
if (index < 0) return false;
|
|
10698
|
+
have.splice(index, 1);
|
|
10699
|
+
}
|
|
10700
|
+
return true;
|
|
10701
|
+
}
|
|
10702
|
+
function sgRulesAreDeclared(live, declared, direction) {
|
|
10703
|
+
if (!Array.isArray(live) || !Array.isArray(declared)) return false;
|
|
10704
|
+
const keys = (rules) => {
|
|
10705
|
+
const out = /* @__PURE__ */ new Set();
|
|
10706
|
+
for (const rule of rules) {
|
|
10707
|
+
const key = typeof rule === "object" && rule !== null ? sgSettleRuleKey(rule, direction) : void 0;
|
|
10708
|
+
if (key === void 0) return void 0;
|
|
10709
|
+
out.add(key);
|
|
10710
|
+
}
|
|
10711
|
+
return out;
|
|
10712
|
+
};
|
|
10713
|
+
const have = keys(live);
|
|
10714
|
+
const want = keys(declared);
|
|
10715
|
+
return have !== void 0 && want !== void 0 && have.size === want.size && [...want].every((key) => have.has(key));
|
|
10716
|
+
}
|
|
10717
|
+
function sgRuleReadbackShape(rule, direction) {
|
|
10718
|
+
if (rule["IpProtocol"] === void 0 || rule["IpProtocol"] === null || rule["IpProtocol"] === "") return;
|
|
10719
|
+
if (sgSettleRuleKey(rule, direction) === void 0) return void 0;
|
|
10720
|
+
const out = {};
|
|
10721
|
+
for (const [key, value] of Object.entries(rule)) {
|
|
10722
|
+
if (value === void 0 || value === null || value === "") continue;
|
|
10723
|
+
out[key] = value;
|
|
10724
|
+
}
|
|
10725
|
+
const protocol = sgProtocolKey(rule["IpProtocol"]);
|
|
10726
|
+
out["IpProtocol"] = protocol;
|
|
10727
|
+
if (protocol === "-1") {
|
|
10728
|
+
delete out["FromPort"];
|
|
10729
|
+
delete out["ToPort"];
|
|
10730
|
+
} else for (const key of ["FromPort", "ToPort"]) if (out[key] !== void 0) out[key] = cfnIngressPortValue(out[key]);
|
|
10731
|
+
return out;
|
|
10732
|
+
}
|
|
10733
|
+
function mergeDeclaredSgRules(read, declared, direction) {
|
|
10734
|
+
const keyOf = (rule) => typeof rule === "object" && rule !== null ? sgSettleRuleKey(rule, direction) : void 0;
|
|
10735
|
+
return mergeDeclaredEntries(read, declared, (entry, want) => {
|
|
10736
|
+
const key = keyOf(want);
|
|
10737
|
+
return key !== void 0 && keyOf(entry) === key;
|
|
10738
|
+
}, (want) => typeof want === "object" && want !== null ? sgRuleReadbackShape(want, direction) : void 0);
|
|
10739
|
+
}
|
|
10740
|
+
function sgRuleListMember(key, direction, declared, revoked, reorder, read) {
|
|
10741
|
+
const gone = sgRemovedNotDeclared(revoked, declared, direction);
|
|
10742
|
+
return {
|
|
10743
|
+
key,
|
|
10744
|
+
declared,
|
|
10745
|
+
matches: (value) => declaredSgRulesRead(value, declared, direction) && !value.some((rule) => sgRuleIsRemoved(rule, gone, direction)),
|
|
10746
|
+
whenUnsettled: (newest) => reorder(mergeDeclaredSgRules(newest, declared, direction).filter((rule) => !sgRuleIsRemoved(rule, gone, direction))),
|
|
10747
|
+
read
|
|
10748
|
+
};
|
|
10749
|
+
}
|
|
10750
|
+
|
|
10751
|
+
// src/provisioning/providers/iam-policy/agreeing-copies.ts
|
|
10752
|
+
const readsWithAgreeingCopies = /* @__PURE__ */ new WeakSet();
|
|
10753
|
+
function markCopiesAgreed(read) {
|
|
10754
|
+
readsWithAgreeingCopies.add(read);
|
|
10755
|
+
}
|
|
10756
|
+
function readHadAgreeingCopies(read) {
|
|
10757
|
+
return readsWithAgreeingCopies.has(read);
|
|
10758
|
+
}
|
|
10759
|
+
|
|
10760
|
+
// src/cli/commands/drift/baseline-keys.ts
|
|
10761
|
+
const UNDECLARED_UNCOMPARED_KEYS = {
|
|
10762
|
+
"AWS::S3::Bucket": ["NotificationConfiguration"],
|
|
10763
|
+
"AWS::Events::EventBus": ["Policy"],
|
|
10764
|
+
"AWS::IAM::ManagedPolicy": [
|
|
10765
|
+
"Groups",
|
|
10766
|
+
"Roles",
|
|
10767
|
+
"Users"
|
|
10768
|
+
],
|
|
10769
|
+
"AWS::EC2::Instance": ["BlockDeviceMappings"]
|
|
10770
|
+
};
|
|
10771
|
+
const UNDECLARED_EMPTY_COMPARED_KEYS = {
|
|
10772
|
+
"AWS::BedrockAgentCore::Runtime": [
|
|
10773
|
+
"FilesystemConfigurations",
|
|
10774
|
+
"HooksConfiguration",
|
|
10775
|
+
"RequestHeaderConfiguration",
|
|
10776
|
+
"ResourceConfigurations"
|
|
10777
|
+
],
|
|
10778
|
+
"AWS::CodeCommit::Repository": ["Triggers"],
|
|
10779
|
+
"AWS::IAM::User": ["LoginProfile"]
|
|
10780
|
+
};
|
|
10781
|
+
function undeclaredEmptyComparedDriftKeys(resourceType) {
|
|
10782
|
+
return hasOwnKey(UNDECLARED_EMPTY_COMPARED_KEYS, resourceType) ? UNDECLARED_EMPTY_COMPARED_KEYS[resourceType] : [];
|
|
10783
|
+
}
|
|
10784
|
+
function undeclaredUncomparedDriftKeys(resourceType, properties) {
|
|
10785
|
+
const keys = hasOwnKey(UNDECLARED_UNCOMPARED_KEYS, resourceType) ? UNDECLARED_UNCOMPARED_KEYS[resourceType] : [];
|
|
10786
|
+
if (keys.length === 0) return [];
|
|
10787
|
+
if (typeof properties !== "object" || properties === null || Array.isArray(properties)) return [];
|
|
10788
|
+
return keys.filter((key) => !hasOwnKey(properties, key));
|
|
10789
|
+
}
|
|
10790
|
+
function preFixBaselineUncomparedDriftKeys(resourceType, observed, properties, aws) {
|
|
10791
|
+
if (observed === void 0) return [];
|
|
10792
|
+
return preFixBaselineKeys(resourceType, observed, properties, aws).filter((key) => !(holdsPrincipalForm({ [key]: observed[key] }, "uniqueIds") && holdsPrincipalForm({ [key]: aws[key] }, "arns")));
|
|
10793
|
+
}
|
|
10794
|
+
function preFixBaselineKeys(resourceType, observed, properties, aws) {
|
|
10795
|
+
if (typeof properties !== "object" || properties === null || Array.isArray(properties)) return [];
|
|
10796
|
+
if (resourceType === "AWS::DynamoDB::Table") {
|
|
10797
|
+
const bag = properties;
|
|
10798
|
+
return [...staleTablePolicyBaseline(observed, bag, aws) ? ["ResourcePolicy"] : [], ...tagsHeal.liveIsDeclared(bag, aws) ? [tagsHeal.key] : []];
|
|
10799
|
+
}
|
|
10800
|
+
if (resourceType === "AWS::SQS::QueuePolicy" || resourceType === "AWS::SNS::TopicPolicy") {
|
|
10801
|
+
const declared = declaredPolicyDocument(properties);
|
|
10802
|
+
return declared !== void 0 && policyDocumentMatchesDeclared(aws["PolicyDocument"], declared) && !policyDocumentMatchesDeclared(observed["PolicyDocument"], declared) ? ["PolicyDocument"] : [];
|
|
10803
|
+
}
|
|
10804
|
+
if (resourceType === "AWS::Lambda::Permission") {
|
|
10805
|
+
const declared = properties;
|
|
10806
|
+
return lambdaPermissionMatchesDeclared(aws, declared) && !lambdaPermissionMatchesDeclared(observed, declared) ? [...LAMBDA_PERMISSION_STATEMENT_KEYS] : [];
|
|
10807
|
+
}
|
|
10808
|
+
const members = OWN_WRITE_MEMBERS.get(resourceType);
|
|
10809
|
+
if (members !== void 0) return members.filter((member) => member.liveIsDeclared(properties, aws)).map((member) => member.key);
|
|
10810
|
+
if (resourceType !== "AWS::Lambda::EventSourceMapping") return [];
|
|
10811
|
+
const declared = hasOwnKey(properties, "Enabled") ? coerceCfnBoolean(properties["Enabled"]) : void 0;
|
|
10812
|
+
const recorded = hasOwnKey(observed, "Enabled") ? coerceCfnBoolean(observed["Enabled"]) : void 0;
|
|
10813
|
+
const live = hasOwnKey(aws, "Enabled") ? aws["Enabled"] : void 0;
|
|
10814
|
+
return recorded === false && declared !== false && live === true ? ["Enabled"] : [];
|
|
10815
|
+
}
|
|
10816
|
+
const documentHeal = (key) => ({
|
|
10817
|
+
key,
|
|
10818
|
+
liveIsDeclared: (properties, aws) => {
|
|
10819
|
+
const declared = declaredMemberDocument(properties[key]);
|
|
10820
|
+
return declared !== void 0 && policyDocumentMatchesDeclared(aws[key], declared);
|
|
10821
|
+
}
|
|
10822
|
+
});
|
|
10823
|
+
const stringListHeal = (key) => ({
|
|
10824
|
+
key,
|
|
10825
|
+
liveIsDeclared: (properties, aws) => {
|
|
10826
|
+
const declared = declaredStringList(properties[key]);
|
|
10827
|
+
return declared !== void 0 && stringListIsDeclared(aws[key], declared);
|
|
10828
|
+
}
|
|
10829
|
+
});
|
|
10830
|
+
const boundaryHeal = {
|
|
10831
|
+
key: "PermissionsBoundary",
|
|
10832
|
+
liveIsDeclared: (properties, aws) => typeof properties["PermissionsBoundary"] === "string" && properties["PermissionsBoundary"] !== "" && aws["PermissionsBoundary"] === properties["PermissionsBoundary"]
|
|
10833
|
+
};
|
|
10834
|
+
const inlinePoliciesHeal = {
|
|
10835
|
+
key: "Policies",
|
|
10836
|
+
liveIsDeclared: (properties, aws) => {
|
|
10837
|
+
const declared = declaredInlinePolicies(properties["Policies"]);
|
|
10838
|
+
return declared !== void 0 && inlinePoliciesAreDeclared(aws["Policies"], declared);
|
|
10839
|
+
}
|
|
10840
|
+
};
|
|
10841
|
+
const sgRulesHeal = (key, direction) => ({
|
|
10842
|
+
key,
|
|
10843
|
+
liveIsDeclared: (properties, aws) => sgRulesAreDeclared(aws[key], properties[key], direction)
|
|
10844
|
+
});
|
|
10845
|
+
const tagsHeal = {
|
|
10846
|
+
key: "Tags",
|
|
10847
|
+
liveIsDeclared: (properties, aws) => {
|
|
10848
|
+
const declared = declaredTagsReadback(properties["Tags"]);
|
|
10849
|
+
return declared !== void 0 && tagsMatchDeclared(aws["Tags"], declared);
|
|
10850
|
+
}
|
|
10851
|
+
};
|
|
10852
|
+
const OWN_WRITE_MEMBERS = new Map(Object.entries({
|
|
10853
|
+
"AWS::KMS::Key": [documentHeal("KeyPolicy")],
|
|
10854
|
+
"AWS::Logs::DeliveryDestination": [{
|
|
10855
|
+
key: "DeliveryDestinationPolicy",
|
|
10856
|
+
liveIsDeclared: (properties, aws) => {
|
|
10857
|
+
const inner = (block) => {
|
|
10858
|
+
const document = typeof block === "object" && block !== null && !Array.isArray(block) ? block["DeliveryDestinationPolicy"] : void 0;
|
|
10859
|
+
return typeof document === "object" && document !== null && !Array.isArray(document) ? document : void 0;
|
|
10860
|
+
};
|
|
10861
|
+
const declared = inner(properties["DeliveryDestinationPolicy"]);
|
|
10862
|
+
if (declared === void 0) return properties["DeliveryDestinationPolicy"] === void 0 && aws["DeliveryDestinationPolicy"] === void 0;
|
|
10863
|
+
return policyDocumentMatchesDeclared(inner(aws["DeliveryDestinationPolicy"]), declared);
|
|
10864
|
+
}
|
|
10865
|
+
}],
|
|
10866
|
+
"AWS::Logs::LogGroup": [{
|
|
10867
|
+
key: "DataProtectionPolicy",
|
|
10868
|
+
liveIsDeclared: (properties, aws) => {
|
|
10869
|
+
const declared = declaredMemberDocument(properties["DataProtectionPolicy"]);
|
|
10870
|
+
if (declared === void 0) return (properties["DataProtectionPolicy"] === void 0 || properties["DataProtectionPolicy"] === "") && aws["DataProtectionPolicy"] === "";
|
|
10871
|
+
return policyDocumentMatchesDeclared(aws["DataProtectionPolicy"], declared);
|
|
10872
|
+
}
|
|
10873
|
+
}],
|
|
10874
|
+
"AWS::ApiGateway::RestApi": [documentHeal("Policy")],
|
|
10875
|
+
"AWS::EFS::FileSystem": [{
|
|
10876
|
+
key: "FileSystemPolicy",
|
|
10877
|
+
liveIsDeclared: (properties, aws) => {
|
|
10878
|
+
const declared = declaredMemberDocument(properties["FileSystemPolicy"]);
|
|
10879
|
+
if (declared === void 0) return properties["FileSystemPolicy"] === void 0 && aws["FileSystemPolicy"] === void 0;
|
|
10880
|
+
return efsPolicyMatchesDeclared(aws["FileSystemPolicy"], declared);
|
|
10881
|
+
}
|
|
10882
|
+
}],
|
|
10883
|
+
"AWS::S3::Bucket": [{
|
|
10884
|
+
key: "LifecycleConfiguration",
|
|
10885
|
+
liveIsDeclared: (properties, aws) => {
|
|
10886
|
+
const declared = declaredLifecycle(properties);
|
|
10887
|
+
const live = aws["LifecycleConfiguration"];
|
|
10888
|
+
if (declared === void 0 || typeof live !== "object" || live === null) return false;
|
|
10889
|
+
const liveBag = live;
|
|
10890
|
+
return declared.kind === "absent" ? lifecycleReadIsAbsent(liveBag) : lifecycleMatchesDeclared(liveBag, declared.expected);
|
|
10891
|
+
}
|
|
10892
|
+
}],
|
|
10893
|
+
"AWS::SecretsManager::Secret": [tagsHeal],
|
|
10894
|
+
"AWS::CodeBuild::Project": [{
|
|
10895
|
+
key: "Visibility",
|
|
10896
|
+
liveIsDeclared: (properties, aws) => typeof properties["Visibility"] === "string" && properties["Visibility"] !== "" && aws["Visibility"] === properties["Visibility"]
|
|
10897
|
+
}],
|
|
10898
|
+
"AWS::IAM::Role": [
|
|
10899
|
+
documentHeal("AssumeRolePolicyDocument"),
|
|
10900
|
+
boundaryHeal,
|
|
10901
|
+
stringListHeal("ManagedPolicyArns"),
|
|
10902
|
+
inlinePoliciesHeal
|
|
10903
|
+
],
|
|
10904
|
+
"AWS::IAM::User": [
|
|
10905
|
+
boundaryHeal,
|
|
10906
|
+
stringListHeal("ManagedPolicyArns"),
|
|
10907
|
+
stringListHeal("Groups"),
|
|
10908
|
+
inlinePoliciesHeal
|
|
10909
|
+
],
|
|
10910
|
+
"AWS::IAM::Group": [stringListHeal("ManagedPolicyArns"), inlinePoliciesHeal],
|
|
10911
|
+
"AWS::IAM::ManagedPolicy": [
|
|
10912
|
+
documentHeal("PolicyDocument"),
|
|
10913
|
+
stringListHeal("Roles"),
|
|
10914
|
+
stringListHeal("Users"),
|
|
10915
|
+
stringListHeal("Groups")
|
|
10916
|
+
],
|
|
10917
|
+
"AWS::IAM::InstanceProfile": [stringListHeal("Roles")],
|
|
10918
|
+
"AWS::IAM::Policy": [
|
|
10919
|
+
{
|
|
10920
|
+
key: "PolicyDocument",
|
|
10921
|
+
liveIsDeclared: (properties, aws) => readHadAgreeingCopies(aws) && documentHeal("PolicyDocument").liveIsDeclared(properties, aws)
|
|
10922
|
+
},
|
|
10923
|
+
{
|
|
10924
|
+
key: "PolicyName",
|
|
10925
|
+
liveIsDeclared: (properties, aws) => typeof properties["PolicyName"] === "string" && properties["PolicyName"] !== "" && aws["PolicyName"] === properties["PolicyName"]
|
|
10926
|
+
},
|
|
10927
|
+
stringListHeal("Roles"),
|
|
10928
|
+
stringListHeal("Users"),
|
|
10929
|
+
stringListHeal("Groups")
|
|
10930
|
+
],
|
|
10931
|
+
"AWS::S3::BucketPolicy": [{
|
|
10932
|
+
key: "PolicyDocument",
|
|
10933
|
+
liveIsDeclared: (properties, aws) => {
|
|
10934
|
+
const declared = declaredPolicyDocument(properties);
|
|
10935
|
+
return declared !== void 0 && policyDocumentMatchesDeclared(aws["PolicyDocument"], declared);
|
|
10936
|
+
}
|
|
10937
|
+
}],
|
|
10938
|
+
"AWS::Events::EventBus": [documentHeal("Policy")],
|
|
10939
|
+
"AWS::EC2::SecurityGroup": [sgRulesHeal("SecurityGroupIngress", "ingress"), sgRulesHeal("SecurityGroupEgress", "egress")]
|
|
10940
|
+
}));
|
|
10941
|
+
function staleTablePolicyBaseline(observed, properties, aws) {
|
|
10942
|
+
const recorded = readStreamPolicy(observed);
|
|
10943
|
+
const declared = readStreamPolicy(properties);
|
|
10944
|
+
const live = readStreamPolicy(aws);
|
|
10945
|
+
if (recorded.kind === "usable" && declared.kind === "absent" && live.kind === "absent") return true;
|
|
10946
|
+
return declared.kind === "usable" && live.kind === "usable" && streamPolicyMatchesDeclared(live.document, properties);
|
|
10947
|
+
}
|
|
10948
|
+
function readOnlyUncomparedDriftPaths(readOnlyPaths, properties) {
|
|
10949
|
+
if (!readOnlyPaths || readOnlyPaths.length === 0) return [];
|
|
10950
|
+
const declared = (path) => {
|
|
10951
|
+
let node = properties;
|
|
10952
|
+
for (const segment of path.split(".")) {
|
|
10953
|
+
if (typeof node !== "object" || node === null || Array.isArray(node)) return false;
|
|
10954
|
+
if (!hasOwnKey(node, segment)) return false;
|
|
10955
|
+
node = node[segment];
|
|
10956
|
+
}
|
|
10957
|
+
return true;
|
|
10958
|
+
};
|
|
10959
|
+
return readOnlyPaths.filter((path) => !declared(path));
|
|
10960
|
+
}
|
|
10961
|
+
function writeOnlyDriftPaths(resourceType) {
|
|
10962
|
+
let entry = writeOnlyDriftPathsCache.get(resourceType);
|
|
10963
|
+
if (entry === void 0) {
|
|
10964
|
+
entry = lookUpWriteOnlyDriftPaths(resourceType);
|
|
10965
|
+
writeOnlyDriftPathsCache.set(resourceType, entry);
|
|
10966
|
+
}
|
|
10967
|
+
return entry;
|
|
10968
|
+
}
|
|
10969
|
+
const writeOnlyDriftPathsCache = /* @__PURE__ */ new Map();
|
|
10970
|
+
async function lookUpWriteOnlyDriftPaths(resourceType) {
|
|
10971
|
+
try {
|
|
10972
|
+
if (await tryGetTopLevelWriteOnlyProperties(resourceType) === void 0) return void 0;
|
|
10973
|
+
const paths = [];
|
|
10974
|
+
for (const segments of getSettledWriteOnlyPropertyPaths(resourceType)) if (segments.length > 0 && segments.every((segment) => segment !== "" && segment !== "*" && !segment.includes(".") && !segment.endsWith("[]"))) paths.push(segments.join("."));
|
|
10975
|
+
return paths;
|
|
10976
|
+
} catch {
|
|
10977
|
+
return;
|
|
10978
|
+
}
|
|
10979
|
+
}
|
|
10980
|
+
const DERIVED_ECHO_MEMBERS = { "AWS::SecretsManager::RotationSchedule": [{
|
|
10981
|
+
parent: "RotationRules",
|
|
10982
|
+
source: "ScheduleExpression",
|
|
10983
|
+
echo: "AutomaticallyAfterDays"
|
|
10984
|
+
}] };
|
|
10985
|
+
function stripDerivedEchoMembers(resourceType, bag) {
|
|
10986
|
+
const rules = DERIVED_ECHO_MEMBERS[resourceType];
|
|
10987
|
+
if (!rules) return bag;
|
|
10988
|
+
let out = bag;
|
|
10989
|
+
for (const { parent, source, echo } of rules) {
|
|
10990
|
+
const node = hasOwnKey(out, parent) ? out[parent] : void 0;
|
|
10991
|
+
if (typeof node !== "object" || node === null || Array.isArray(node)) continue;
|
|
10992
|
+
const members = node;
|
|
10993
|
+
if (!hasOwnKey(members, echo) || !hasOwnKey(members, source)) continue;
|
|
10994
|
+
if (members[source] === void 0 || members[source] === null) continue;
|
|
10995
|
+
const { [echo]: _echo, ...rest } = members;
|
|
10996
|
+
out = {
|
|
10997
|
+
...out,
|
|
10998
|
+
[parent]: rest
|
|
10999
|
+
};
|
|
11000
|
+
}
|
|
11001
|
+
return out;
|
|
11002
|
+
}
|
|
11003
|
+
function otherPhysicalIds(resources, logicalId) {
|
|
11004
|
+
const ids = [];
|
|
11005
|
+
for (const [id, record] of Object.entries(resources ?? {})) if (id !== logicalId && typeof record?.physicalId === "string") ids.push(record.physicalId);
|
|
11006
|
+
return ids;
|
|
11007
|
+
}
|
|
11008
|
+
function declaredEmptyProperties(properties) {
|
|
11009
|
+
const out = /* @__PURE__ */ new Set();
|
|
11010
|
+
if (typeof properties !== "object" || properties === null || Array.isArray(properties)) return out;
|
|
11011
|
+
const isEmpty = (v) => Array.isArray(v) && v.length === 0 || typeof v === "object" && v !== null && !Array.isArray(v) && Object.keys(v).length === 0;
|
|
11012
|
+
for (const [key, value] of Object.entries(properties)) if (typeof value === "string") {
|
|
11013
|
+
if (value.trim() === "") {
|
|
11014
|
+
out.add(key);
|
|
11015
|
+
continue;
|
|
11016
|
+
}
|
|
11017
|
+
try {
|
|
11018
|
+
if (isEmpty(JSON.parse(value))) out.add(key);
|
|
11019
|
+
} catch {}
|
|
11020
|
+
} else if (isEmpty(value)) out.add(key);
|
|
11021
|
+
return out;
|
|
11022
|
+
}
|
|
11023
|
+
function declaredTrueProperties(properties) {
|
|
11024
|
+
const out = /* @__PURE__ */ new Set();
|
|
11025
|
+
if (typeof properties !== "object" || properties === null || Array.isArray(properties)) return out;
|
|
11026
|
+
for (const [key, value] of Object.entries(properties)) if (value === true || value === "true") out.add(key);
|
|
11027
|
+
return out;
|
|
11028
|
+
}
|
|
11029
|
+
|
|
11030
|
+
// src/cli/commands/drift/secret-resolution.ts
|
|
11031
|
+
function containsDynamicReference$1(value) {
|
|
11032
|
+
if (typeof value === "string") return value.includes("{{resolve:");
|
|
11033
|
+
if (Array.isArray(value)) return value.some(containsDynamicReference$1);
|
|
11034
|
+
if (value !== null && typeof value === "object") return Object.values(value).some(containsDynamicReference$1);
|
|
11035
|
+
return false;
|
|
11036
|
+
}
|
|
11037
|
+
const MIN_SECRET_NEEDLE_LENGTH = 4;
|
|
11038
|
+
function carriesRecordedSecret(value, secrets) {
|
|
11039
|
+
if (value === "") return false;
|
|
11040
|
+
if (secrets.has(value)) return true;
|
|
11041
|
+
for (const plaintext of secrets.keys()) if (plaintext.length >= MIN_SECRET_NEEDLE_LENGTH && value.includes(plaintext)) return true;
|
|
11042
|
+
return false;
|
|
11043
|
+
}
|
|
11044
|
+
function survivingDynamicReferences(value) {
|
|
11045
|
+
return dynamicReferenceTokens(value);
|
|
11046
|
+
}
|
|
11047
|
+
function collectDynamicReferencePaths(value, into, path = "") {
|
|
11048
|
+
if (typeof value === "string") {
|
|
11049
|
+
if (value.includes("{{resolve:")) into.add(path);
|
|
11050
|
+
return;
|
|
11051
|
+
}
|
|
11052
|
+
if (Array.isArray(value)) {
|
|
11053
|
+
value.forEach((item, i) => collectDynamicReferencePaths(item, into, path === "" ? String(i) : `${path}.${i}`));
|
|
11054
|
+
return;
|
|
11055
|
+
}
|
|
11056
|
+
if (value !== null && typeof value === "object") for (const [k, v] of Object.entries(value)) collectDynamicReferencePaths(v, into, path === "" ? k : `${path}.${k}`);
|
|
11057
|
+
}
|
|
11058
|
+
function collectSecretMaskPaths(value, into, path = "") {
|
|
11059
|
+
if (typeof value === "string") {
|
|
11060
|
+
if (value === "***") into.add(path);
|
|
11061
|
+
return;
|
|
11062
|
+
}
|
|
11063
|
+
if (Array.isArray(value)) {
|
|
11064
|
+
value.forEach((item, i) => collectSecretMaskPaths(item, into, path === "" ? String(i) : `${path}.${i}`));
|
|
11065
|
+
return;
|
|
11066
|
+
}
|
|
11067
|
+
if (value !== null && typeof value === "object") for (const [k, v] of Object.entries(value)) collectSecretMaskPaths(v, into, path === "" ? k : `${path}.${k}`);
|
|
11068
|
+
}
|
|
11069
|
+
var DriftSecretResolvers = class {
|
|
11070
|
+
primary;
|
|
11071
|
+
pinned = /* @__PURE__ */ new Map();
|
|
11072
|
+
stackRegion;
|
|
11073
|
+
constructor(stackRegion) {
|
|
11074
|
+
this.stackRegion = stackRegion;
|
|
11075
|
+
this.primary = new IntrinsicFunctionResolver(stackRegion);
|
|
11076
|
+
}
|
|
11077
|
+
forRegion(region) {
|
|
11078
|
+
const target = canonicalizeRegion(region);
|
|
11079
|
+
if (target === canonicalizeRegion(this.stackRegion)) return this.primary;
|
|
11080
|
+
const cached = this.pinned.get(target);
|
|
11081
|
+
if (cached) return cached;
|
|
11082
|
+
const scoped = new IntrinsicFunctionResolver(target);
|
|
11083
|
+
this.pinned.set(target, scoped);
|
|
11084
|
+
return scoped;
|
|
11085
|
+
}
|
|
11086
|
+
forRecordedRegion(region) {
|
|
11087
|
+
return this.primary.resolverForRecordedRegion(region);
|
|
11088
|
+
}
|
|
11089
|
+
};
|
|
11090
|
+
var DriftSecretRefusalError = class DriftSecretRefusalError extends CdkdError {
|
|
11091
|
+
driftSecretRefusal = true;
|
|
11092
|
+
constructor(message, code) {
|
|
11093
|
+
super(message, code);
|
|
11094
|
+
this.name = "DriftSecretRefusalError";
|
|
11095
|
+
Object.setPrototypeOf(this, DriftSecretRefusalError.prototype);
|
|
11096
|
+
}
|
|
11097
|
+
};
|
|
11098
|
+
function isDriftSecretRefusal(err) {
|
|
11099
|
+
return err instanceof DriftSecretRefusalError || err instanceof IntrinsicResolutionRefusalError;
|
|
11100
|
+
}
|
|
11101
|
+
function regionAmbiguousDriftSecretError(logicalId, propertyPath, secretName, foreignProducerRegions, consumerRegion) {
|
|
11102
|
+
const where = propertyPath === "" ? "" : ` property '${propertyPath}'`;
|
|
11103
|
+
return new DriftSecretRefusalError(`${logicalId}${where}: the secret reference '${secretName}' carries no region of its own, and this stack read across a region boundary (producer region(s) on record: ${foreignProducerRegions.join(", ")}), so it may have been resolved in one of those rather than in '${consumerRegion}'. A secret of the same name in two regions is two independent values, so cdkd would compare against — and with --revert WRITE — the WRONG secret. Refusing instead. Spell the reference as a full ARN, which names its region and is resolved there, then re-run ${proseQuoted(cdkdRemedy("cdkd drift"))}.`, "DRIFT_SECRET_REGION_AMBIGUOUS");
|
|
11104
|
+
}
|
|
11105
|
+
function refuseUnprovenDriftSecret(leaf, propertyPath, logicalId, consumerRegion, evidence, recordedRegions) {
|
|
11106
|
+
if (evidence.complete) return;
|
|
11107
|
+
for (const token of dynamicReferenceTokens(leaf)) {
|
|
11108
|
+
if (recordedRegions?.has(token) === true) continue;
|
|
11109
|
+
const name = classifyReplaySecretRegion(token, consumerRegion, evidence.regions).kind === "local" ? regionLessSecretName(token) : void 0;
|
|
11110
|
+
if (name === void 0) continue;
|
|
11111
|
+
const where = propertyPath === "" ? "" : ` property '${propertyPath}'`;
|
|
11112
|
+
throw new DriftSecretRefusalError(`${logicalId}${where}: the secret reference '${name}' carries no region of its own, and this is a nested stack whose parent stacks' cross-region reads could not be established, so a parent may have resolved it in another region than '${consumerRegion}'. A secret of the same name in two regions is two independent values, so cdkd would compare against — and with --revert WRITE — the WRONG secret. Refusing instead. Make the parent stacks' state readable (or repair a record whose parent link disagrees with its key), or spell the reference as a full ARN, then re-run ${proseQuoted(cdkdRemedy("cdkd drift"))}.`, "DRIFT_SECRET_REGION_UNKNOWN");
|
|
11113
|
+
}
|
|
11114
|
+
}
|
|
11115
|
+
function noteUnreadableAncestor(stackName, region, why) {
|
|
11116
|
+
getLogger().debug(safeMsg`Producer regions above a nested stack are incomplete: ${displayIdent(stackName)} (${region}): ${why}`);
|
|
11117
|
+
}
|
|
11118
|
+
const MAX_ANCESTOR_DEPTH = 32;
|
|
11119
|
+
async function driftProducerRegionEvidence(state, stackName, region, stateBackend, depth = 0) {
|
|
11120
|
+
let own;
|
|
11121
|
+
if (depth === 0) own = producerRegionsFromState(state);
|
|
11122
|
+
else try {
|
|
11123
|
+
own = producerRegionsFromState(state);
|
|
11124
|
+
} catch {
|
|
11125
|
+
noteUnreadableAncestor(stackName, region, "its cross-stack read records are malformed");
|
|
11126
|
+
return {
|
|
11127
|
+
regions: [],
|
|
11128
|
+
complete: false
|
|
11129
|
+
};
|
|
11130
|
+
}
|
|
11131
|
+
const cut = stackName.lastIndexOf("~");
|
|
11132
|
+
const keyParent = cut >= 0 ? stackName.slice(0, cut) : void 0;
|
|
11133
|
+
const recordParent = state.parentStack;
|
|
11134
|
+
if (keyParent === void 0 && recordParent === void 0) return {
|
|
11135
|
+
regions: own,
|
|
11136
|
+
complete: true
|
|
11137
|
+
};
|
|
11138
|
+
if (keyParent === "" || recordParent !== void 0 && typeof recordParent !== "string" || state.parentRegion !== void 0 && typeof state.parentRegion !== "string" || keyParent !== void 0 && typeof recordParent === "string" && recordParent !== keyParent) {
|
|
11139
|
+
noteUnreadableAncestor(stackName, region, "its key and its parent link disagree, or the link is malformed");
|
|
11140
|
+
return inheritProducerRegions(own, void 0);
|
|
11141
|
+
}
|
|
11142
|
+
const parentName = keyParent ?? recordParent;
|
|
11143
|
+
if (depth >= MAX_ANCESTOR_DEPTH) {
|
|
11144
|
+
noteUnreadableAncestor(stackName, region, `the nesting is deeper than ${MAX_ANCESTOR_DEPTH} levels`);
|
|
11145
|
+
return inheritProducerRegions(own, void 0);
|
|
11146
|
+
}
|
|
11147
|
+
const parentRegion = typeof state.parentRegion === "string" ? state.parentRegion : region;
|
|
11148
|
+
let parent;
|
|
11149
|
+
try {
|
|
11150
|
+
parent = await stateBackend.getState(parentName, parentRegion, { readOnly: true });
|
|
11151
|
+
} catch (error) {
|
|
11152
|
+
noteUnreadableAncestor(parentName, parentRegion, `it could not be read (${describeAwsFailure(error).detail})`);
|
|
11153
|
+
return inheritProducerRegions(own, void 0);
|
|
11154
|
+
}
|
|
11155
|
+
if (!parent || parent.divergentBodyRegion !== void 0 || typeof parent.state !== "object" || parent.state === null) {
|
|
11156
|
+
noteUnreadableAncestor(parentName, parentRegion, "it has no usable state record");
|
|
11157
|
+
return inheritProducerRegions(own, void 0);
|
|
11158
|
+
}
|
|
11159
|
+
const inherited = await driftProducerRegionEvidence(parent.state, parentName, parentRegion, stateBackend, depth + 1);
|
|
11160
|
+
return inheritProducerRegions(own, inherited);
|
|
11161
|
+
}
|
|
11162
|
+
async function resolveDriftLeafByRegion(leaf, propertyPath, logicalId, consumerRegion, producerRegions, resolvers, ctx, recordedRegions) {
|
|
11163
|
+
const verdicts = dynamicReferenceTokens(leaf).map((token) => [token, classifyRecordedSecretRegion(token, consumerRegion, producerRegions, recordedRegions)]);
|
|
11164
|
+
for (const [, verdict] of verdicts) if (verdict.kind === "ambiguous") throw regionAmbiguousDriftSecretError(logicalId, propertyPath, verdict.secretName, verdict.foreignProducerRegions, consumerRegion);
|
|
11165
|
+
if (!verdicts.some(([, verdict]) => verdict.kind === "named-region" || verdict.kind === "recorded-region")) return await resolveDynamicReferences(resolvers.primary, leaf, ctx);
|
|
11166
|
+
let out = "";
|
|
11167
|
+
let cursor = 0;
|
|
11168
|
+
for (const [token, verdict] of verdicts) {
|
|
11169
|
+
const at = leaf.indexOf(token, cursor);
|
|
11170
|
+
if (at < 0) throw new DriftSecretRefusalError(`${logicalId}${propertyPath === "" ? "" : ` property '${propertyPath}'`}: could not locate a scanned dynamic reference in the value it was scanned from. Refusing rather than resolving it in '${consumerRegion}', which would be the wrong region for a reference that names another one. This is an internal invariant failure — please report it with the resource type and property path.`, "DRIFT_SECRET_TOKEN_SCAN_MISMATCH");
|
|
11171
|
+
out += leaf.slice(cursor, at);
|
|
11172
|
+
const resolver = verdict.kind === "named-region" ? resolvers.forRegion(verdict.region) : verdict.kind === "recorded-region" ? resolvers.forRecordedRegion(verdict.region) : resolvers.primary;
|
|
11173
|
+
out += await resolveDynamicReferences(resolver, token, ctx);
|
|
11174
|
+
cursor = at + token.length;
|
|
11175
|
+
}
|
|
11176
|
+
return out + leaf.slice(cursor);
|
|
11177
|
+
}
|
|
11178
|
+
async function resolveStateSecretExpressions(props, resolvers, secrets, options) {
|
|
11179
|
+
if (!containsDynamicReference$1(props)) return props;
|
|
11180
|
+
const { secretPaths, onUnresolved, producerRegions, logicalId, consumerRegion } = options;
|
|
11181
|
+
const recordedRegions = recordedReferenceRegions(options.record);
|
|
11182
|
+
const ctx = {
|
|
11183
|
+
template: { Resources: {} },
|
|
11184
|
+
resources: {},
|
|
11185
|
+
recordedSecretValues: secrets
|
|
11186
|
+
};
|
|
11187
|
+
const walk = async (v, path) => {
|
|
11188
|
+
if (typeof v === "string") {
|
|
11189
|
+
if (!v.includes("{{resolve:")) return v;
|
|
11190
|
+
refuseUnprovenDriftSecret(v, path, logicalId, consumerRegion, producerRegions, recordedRegions);
|
|
11191
|
+
const resolved = await resolveDriftLeafByRegion(v, path, logicalId, consumerRegion, producerRegions.regions, resolvers, ctx, recordedRegions);
|
|
11192
|
+
const survivors = survivingDynamicReferences(resolved).filter((t) => v.includes(t));
|
|
11193
|
+
if (survivors.length > 0) onUnresolved?.(survivors, path);
|
|
11194
|
+
if (carriesRecordedSecret(resolved, secrets)) secretPaths?.add(path);
|
|
11195
|
+
return resolved;
|
|
11196
|
+
}
|
|
11197
|
+
if (Array.isArray(v)) {
|
|
11198
|
+
const out = new Array(v.length);
|
|
11199
|
+
for (let i = 0; i < v.length; i++) out[i] = await walk(v[i], path === "" ? String(i) : `${path}.${i}`);
|
|
11200
|
+
return out;
|
|
11201
|
+
}
|
|
11202
|
+
if (v !== null && typeof v === "object") {
|
|
11203
|
+
const out = Object.create(null);
|
|
11204
|
+
for (const [k, val] of Object.entries(v)) out[k] = await walk(val, path === "" ? k : `${path}.${k}`);
|
|
11205
|
+
return out;
|
|
11206
|
+
}
|
|
11207
|
+
return v;
|
|
11208
|
+
};
|
|
11209
|
+
return await walk(props, "");
|
|
11210
|
+
}
|
|
11211
|
+
|
|
11212
|
+
// src/cli/commands/refused-baseline-remedy.ts
|
|
11213
|
+
function acceptRefusedRemedy() {
|
|
11214
|
+
return `Once the deployed template no longer reads a parameter at this resource, ${pasteableCommand("cdkd state refresh-observed", [
|
|
11215
|
+
{ hole: "stack" },
|
|
11216
|
+
{
|
|
11217
|
+
flag: "--accept-refused",
|
|
11218
|
+
hole: "logicalId"
|
|
11219
|
+
},
|
|
11220
|
+
{
|
|
11221
|
+
flag: "--template",
|
|
11222
|
+
hole: "file"
|
|
11223
|
+
}
|
|
11224
|
+
]).command} records a baseline on your assertion that AWS holds no secret the template does not spell as a dynamic reference.`;
|
|
11225
|
+
}
|
|
11226
|
+
function refusedBaselineRemedy(record) {
|
|
11227
|
+
if (hasUnverifiableParameterRefusal(record)) return "Deploying a change does NOT clear this refusal: the resource reads a template parameter whose deployed value cdkd could not prove, so only a deploy that replaces the resource, or a re-import while a CloudFormation stack can prove that value, restores a baseline. " + acceptRefusedRemedy();
|
|
11228
|
+
if (hasReasonlessBaselineRefusal(record)) return "This refusal was recorded without a reason this cdkd recognizes: a deploy that actually CHANGES this resource restores a baseline unless the resource reads a template parameter, and then only a deploy that replaces the resource, or a re-import while a CloudFormation stack can prove the parameter's deployed value, does. " + acceptRefusedRemedy();
|
|
11229
|
+
}
|
|
11230
|
+
|
|
11231
|
+
// src/cli/commands/drift/redaction.ts
|
|
11232
|
+
function noEchoPathsClause(record) {
|
|
11233
|
+
const marked = record === void 0 ? void 0 : noEchoLeavesOf(record);
|
|
11234
|
+
if (marked === void 0 || marked.length === 0) return "";
|
|
11235
|
+
return ` at ${marked.map((coordinate) => coordinate.map((segment, i) => typeof segment === "number" ? `[${segment}]` : i === 0 ? segment : `.${segment}`).join("")).map((path) => displaySafe(path)).join(", ")}`;
|
|
11236
|
+
}
|
|
11237
|
+
function revertPathSegments(path) {
|
|
11238
|
+
const segments = [];
|
|
11239
|
+
for (const part of path.split(".")) {
|
|
11240
|
+
const match = /^([^[]*)((?:\[\d+\])*)$/.exec(part);
|
|
11241
|
+
if (match === null) {
|
|
11242
|
+
segments.push(part);
|
|
11243
|
+
continue;
|
|
11244
|
+
}
|
|
11245
|
+
if (match[1] !== "") segments.push(match[1]);
|
|
11246
|
+
for (const index of match[2].matchAll(/\[(\d+)\]/g)) segments.push(Number(index[1]));
|
|
11247
|
+
}
|
|
11248
|
+
return segments;
|
|
11249
|
+
}
|
|
11250
|
+
function partitionNoEchoParameterChanges(changes, record, baseline) {
|
|
11251
|
+
const marked = noEchoLeavesOf(record);
|
|
11252
|
+
if (marked === void 0 || marked.length === 0) return {
|
|
11253
|
+
kept: changes,
|
|
11254
|
+
noEchoParameterPaths: []
|
|
11255
|
+
};
|
|
11256
|
+
const properties = record.properties ?? {};
|
|
11257
|
+
const isMarked = (coordinate) => isMarkedCoordinate(coordinate, marked) || marked.some((leaf) => leaf.length > coordinate.length && coordinate.every((segment, i) => String(segment) === String(leaf[i])));
|
|
11258
|
+
const isWithinMarked = (coordinate) => marked.some((leaf) => leaf.length <= coordinate.length && leaf.every((segment, i) => String(segment) === String(coordinate[i])));
|
|
11259
|
+
const kept = [];
|
|
11260
|
+
const noEchoParameterPaths = [];
|
|
11261
|
+
for (const change of changes) {
|
|
11262
|
+
const coordinate = change.path.split(".");
|
|
11263
|
+
if (marked.some((leaf) => {
|
|
11264
|
+
const n = Math.min(leaf.length, coordinate.length);
|
|
11265
|
+
for (let i = 0; i < n; i++) if (leaf[i] !== coordinate[i]) return false;
|
|
11266
|
+
return true;
|
|
11267
|
+
}) && carriesSecretMask(change.stateValue) && !pathCrossesDottedKey(properties, change.path) && !pathCrossesDottedKey(baseline, change.path) && equalModuloMarkedMask(change.stateValue, change.awsValue, "***", coordinate, isMarked, isWithinMarked)) {
|
|
11268
|
+
noEchoParameterPaths.push(change.path);
|
|
11269
|
+
continue;
|
|
11270
|
+
}
|
|
11271
|
+
kept.push(change);
|
|
11272
|
+
}
|
|
11273
|
+
return {
|
|
11274
|
+
kept,
|
|
11275
|
+
noEchoParameterPaths
|
|
11276
|
+
};
|
|
11277
|
+
}
|
|
11278
|
+
function partitionUncertifiedBaselineChanges(changes, properties, baseline) {
|
|
11279
|
+
const kept = [];
|
|
11280
|
+
const uncertifiedPaths = [];
|
|
11281
|
+
for (const change of changes) {
|
|
11282
|
+
if (carriesSecretMask(change.stateValue) && isUncertifiedBaselineMaskPosition(properties, change.path) && !pathCrossesDottedKey(baseline, change.path) && equalModuloMask(change.stateValue, change.awsValue, "***")) {
|
|
11283
|
+
uncertifiedPaths.push(change.path);
|
|
11284
|
+
continue;
|
|
11285
|
+
}
|
|
11286
|
+
kept.push(change);
|
|
11287
|
+
}
|
|
11288
|
+
return {
|
|
11289
|
+
kept,
|
|
11290
|
+
uncertifiedPaths
|
|
11291
|
+
};
|
|
11292
|
+
}
|
|
11293
|
+
function isSecretBearingPath(path, secretPaths) {
|
|
11294
|
+
if (secretPaths.size === 0) return false;
|
|
11295
|
+
for (const secretPath of secretPaths) if (secretPath === path || secretPath.startsWith(`${path}.`) || path.startsWith(`${secretPath}.`)) return true;
|
|
11296
|
+
return false;
|
|
11297
|
+
}
|
|
11298
|
+
function redactDriftValue(value, secrets, secretBearing) {
|
|
11299
|
+
const redacted = redactForState(value, {
|
|
11300
|
+
provenance: "value-scan",
|
|
11301
|
+
secrets
|
|
11302
|
+
});
|
|
11303
|
+
if (!secretBearing) return redacted;
|
|
11304
|
+
if (redacted === void 0 || redacted === null) return redacted;
|
|
11305
|
+
if (typeof redacted === "string" && isSingleDynamicReferenceToken(redacted)) return redacted;
|
|
11306
|
+
return "***";
|
|
11307
|
+
}
|
|
11308
|
+
function acceptRefusalReason(change, maskedPaths) {
|
|
11309
|
+
if (!maskedPaths.has(change.path)) return void 0;
|
|
11310
|
+
if (change.path.includes("***")) return "its property NAME came back carrying a secret value, so cdkd cannot name the key to write — and no redaction pass can clear it either, since they all walk values and never keys. ROTATE the secret; that is the only remedy";
|
|
11311
|
+
if (change.awsValue === void 0) return "AWS no longer reports it, and accepting an absence DELETES the key — which at or above a secret dynamic reference would erase the reference out of cdkd state. Use --revert to push it back, or re-deploy";
|
|
11312
|
+
if (change.stateValue === "***") return "the value that belongs at this position is unknown to cdkd — the baseline holds only the redaction mask, so accepting would write AWS-held plaintext over a deliberate redaction. Where cdkd wrote that mask because it could not pair the readback with a secret reference, a deploy that CHANGES this resource re-captures the baseline, and a deploy that changes nothing replaces the mask only when the resource still reads back as its baseline records, the resource's own secret reference resolves to the value AWS holds there, and nothing in the resource's recorded properties is masked. Where the mask stands for a NoEcho custom-resource value or for the Fn::Base64 encoding of a secret value, cdkd never records the value, so no deploy replaces the mask";
|
|
11313
|
+
return "it carries a secret dynamic reference and the value AWS currently holds is not the one the reference resolves to";
|
|
11314
|
+
}
|
|
11315
|
+
function redactDriftChanges(changes, secrets, secretPaths, maskPaths) {
|
|
11316
|
+
if (!hasMaskableValues(secrets) && secretPaths.size === 0 && maskPaths.size === 0 && !changes.some((change) => carriesSecretMask(change.stateValue))) return {
|
|
11317
|
+
changes,
|
|
11318
|
+
maskedPaths: /* @__PURE__ */ new Set()
|
|
11319
|
+
};
|
|
11320
|
+
const maskedPaths = /* @__PURE__ */ new Set();
|
|
11321
|
+
const redacted = [];
|
|
11322
|
+
for (const change of changes) {
|
|
11323
|
+
const maskedPath = maskSecretsInText(change.path, secrets);
|
|
11324
|
+
const positionIsSecret = isSecretBearingPath(change.path, secretPaths) || isSecretBearingPath(change.path, maskPaths);
|
|
11325
|
+
const nameCarriesSecret = maskedPath !== change.path;
|
|
11326
|
+
const stateValueIsMask = carriesSecretMask(change.stateValue);
|
|
11327
|
+
const secretBearing = positionIsSecret || nameCarriesSecret || stateValueIsMask;
|
|
11328
|
+
if (secretPaths.has(change.path) && change.awsValue === void 0) continue;
|
|
11329
|
+
const stateValue = redactDriftValue(change.stateValue, secrets, secretBearing);
|
|
11330
|
+
const awsValue = redactDriftValue(change.awsValue, secrets, secretBearing);
|
|
11331
|
+
if (maskedPath !== change.path || secretBearing && awsValue === "***" || secretBearing && change.awsValue === void 0) maskedPaths.add(maskedPath);
|
|
11332
|
+
redacted.push({
|
|
11333
|
+
path: maskedPath,
|
|
11334
|
+
stateValue,
|
|
11335
|
+
awsValue
|
|
11336
|
+
});
|
|
11337
|
+
}
|
|
11338
|
+
return {
|
|
11339
|
+
changes: redacted,
|
|
11340
|
+
maskedPaths
|
|
11341
|
+
};
|
|
11342
|
+
}
|
|
11343
|
+
function maskMarkedNoEchoBaseline(baseline, record, observed) {
|
|
11344
|
+
const marked = noEchoLeavesOf(record) ?? [];
|
|
11345
|
+
if (observed) {
|
|
11346
|
+
const coordinates = [...marked, ...maskedLeafCoordinatesOf(record.properties ?? {})];
|
|
11347
|
+
return coordinates.length === 0 ? baseline : maskReadbackAtCoordinates(baseline, record.properties ?? {}, coordinates);
|
|
11348
|
+
}
|
|
11349
|
+
if (marked.length === 0) return baseline;
|
|
11350
|
+
const recorded = record.properties ?? {};
|
|
11351
|
+
const listPathOf = (coordinate) => {
|
|
11352
|
+
const list = coordinate.findIndex((segment) => typeof segment === "number");
|
|
11353
|
+
return list < 0 ? void 0 : coordinate.slice(0, list);
|
|
11354
|
+
};
|
|
11355
|
+
const replaced = marked.filter((coordinate) => {
|
|
11356
|
+
const path = listPathOf(coordinate);
|
|
11357
|
+
if (path === void 0) return false;
|
|
11358
|
+
const underList = marked.filter((other) => other.length > path.length && path.every((segment, i) => segment === other[i]));
|
|
11359
|
+
return JSON.stringify(valueAtCoordinate(maskAtCoordinates(baseline, underList), path)) !== JSON.stringify(valueAtCoordinate(maskAtCoordinates(recorded, underList), path));
|
|
11360
|
+
});
|
|
11361
|
+
const byIndex = maskAtCoordinates(baseline, marked.filter((coordinate) => !replaced.includes(coordinate)));
|
|
11362
|
+
if (replaced.length === 0) return byIndex;
|
|
11363
|
+
return maskReadbackAtCoordinates(byIndex, recorded, replaced);
|
|
11364
|
+
}
|
|
11365
|
+
|
|
11366
|
+
// src/cli/commands/drift/read-failure.ts
|
|
11367
|
+
function notComparedReason(cause, record) {
|
|
11368
|
+
const refusedRemedy = cause === "baselineRefused" ? refusedBaselineRemedy(record) : void 0;
|
|
11369
|
+
return {
|
|
11370
|
+
refused: "cdkd refused to resolve a dynamic reference its state records (spell the reference as a full ARN, which names its region)",
|
|
11371
|
+
unresolvedToken: "its state records a `{{resolve:...}}` spelling cdkd resolves for nobody (permanent; a re-run cannot clear it)",
|
|
11372
|
+
readFailed: "the read or comparison threw, so NONE of its properties were compared",
|
|
11373
|
+
readAborted: `cdkd never read it: ${5} reads in a row earlier in this stack, the same way it would have been read, failed — expired credentials, a revoked role, a permission all of them need, or a burst of throttling — so cdkd stopped reading that way (fix the cause, or re-run if it was throttling)`,
|
|
11374
|
+
unreadableRecord: "its state record is not readable as a resource — not an object, carrying no resource type, or holding a 'properties' map that is not an object — so there was nothing to compare (repair or re-import the record)",
|
|
11375
|
+
unreadableMap: "the record's whole 'resources' map is not a JSON object, so no resource in it could be read or compared (repair or re-import the record)",
|
|
11376
|
+
baselineRefused: "a `cdkd import` run refused to capture its observed baseline, so the only baseline available is the recorded properties that refusal already found untrustworthy" + (refusedRemedy === void 0 ? " (deploy a change to this resource to restore one)" : `. ${refusedRemedy}`),
|
|
11377
|
+
noEchoParameter: `its state holds a NoEcho parameter's value only as the redaction mask${noEchoPathsClause(record)}, so that value was not compared — every other property was (permanent by design; a deploy compares it with AWS)`,
|
|
11378
|
+
uncertifiedBaseline: "its recorded baseline holds the redaction mask at a position cdkd could not pair with the secret reference there, so that position was not compared — every other property was (deploy a change to this resource to re-capture the baseline)"
|
|
11379
|
+
}[cause];
|
|
11380
|
+
}
|
|
11381
|
+
const DRIFT_READ_FAILURE_BREAKER_THRESHOLD = 5;
|
|
11382
|
+
const DRIFT_READ_PATH_LABELS = {
|
|
11383
|
+
provider: "through cdkd's own (SDK) resource providers",
|
|
11384
|
+
ccApi: "through the Cloud Control API"
|
|
11385
|
+
};
|
|
11386
|
+
const NO_READ_HANDLER_NAMES = /* @__PURE__ */ new Set(["UnsupportedActionException", "TypeNotFoundException"]);
|
|
11387
|
+
const NO_READ_HANDLER_MESSAGE = /does not support READ action/i;
|
|
11388
|
+
function isNoReadHandlerError(err) {
|
|
11203
11389
|
try {
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
|
|
11209
|
-
|
|
11390
|
+
let current = err;
|
|
11391
|
+
for (let depth = 0; depth < 10 && current !== null && current !== void 0; depth += 1) {
|
|
11392
|
+
const candidate = current;
|
|
11393
|
+
if (typeof candidate.name === "string" && NO_READ_HANDLER_NAMES.has(candidate.name)) return true;
|
|
11394
|
+
if (typeof candidate.message === "string" && NO_READ_HANDLER_MESSAGE.test(candidate.message)) return true;
|
|
11395
|
+
current = candidate.cause;
|
|
11396
|
+
}
|
|
11210
11397
|
} catch {
|
|
11211
|
-
return;
|
|
11398
|
+
return false;
|
|
11212
11399
|
}
|
|
11400
|
+
return false;
|
|
11213
11401
|
}
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
|
|
11402
|
+
|
|
11403
|
+
// src/analyzer/drift-protocol-normalize.ts
|
|
11404
|
+
const IP_PROTOCOL_PATHS = /* @__PURE__ */ new Map([
|
|
11405
|
+
["AWS::EC2::SecurityGroupIngress", ["IpProtocol"]],
|
|
11406
|
+
["AWS::EC2::SecurityGroupEgress", ["IpProtocol"]],
|
|
11407
|
+
["AWS::EC2::SecurityGroup", ["SecurityGroupIngress[].IpProtocol", "SecurityGroupEgress[].IpProtocol"]]
|
|
11408
|
+
]);
|
|
11409
|
+
function rewriteAtPath(properties, path) {
|
|
11410
|
+
if (properties === null || typeof properties !== "object" || Array.isArray(properties)) return properties;
|
|
11411
|
+
const bag = properties;
|
|
11412
|
+
const arrayMarker = path.indexOf("[].");
|
|
11413
|
+
if (arrayMarker === -1) {
|
|
11414
|
+
if (!(path in bag)) return properties;
|
|
11415
|
+
const next = canonicalizeIpProtocolValue(bag[path]);
|
|
11416
|
+
if (next === bag[path]) return properties;
|
|
11417
|
+
return {
|
|
11418
|
+
...bag,
|
|
11419
|
+
[path]: next
|
|
11420
|
+
};
|
|
11229
11421
|
}
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
if (!Array.isArray(
|
|
11234
|
-
|
|
11235
|
-
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11240
|
-
|
|
11241
|
-
|
|
11422
|
+
const arrayKey = path.slice(0, arrayMarker);
|
|
11423
|
+
const elementKey = path.slice(arrayMarker + 3);
|
|
11424
|
+
const list = bag[arrayKey];
|
|
11425
|
+
if (!Array.isArray(list)) return properties;
|
|
11426
|
+
let changed = false;
|
|
11427
|
+
const mapped = list.map((element) => {
|
|
11428
|
+
if (element === null || typeof element !== "object" || Array.isArray(element)) return element;
|
|
11429
|
+
const rule = element;
|
|
11430
|
+
if (!(elementKey in rule)) return element;
|
|
11431
|
+
const next = canonicalizeIpProtocolValue(rule[elementKey]);
|
|
11432
|
+
if (next === rule[elementKey]) return element;
|
|
11433
|
+
changed = true;
|
|
11434
|
+
return {
|
|
11435
|
+
...rule,
|
|
11436
|
+
[elementKey]: next
|
|
11437
|
+
};
|
|
11438
|
+
});
|
|
11439
|
+
if (!changed) return properties;
|
|
11440
|
+
return {
|
|
11441
|
+
...bag,
|
|
11442
|
+
[arrayKey]: mapped
|
|
11242
11443
|
};
|
|
11243
|
-
const have = keys(live);
|
|
11244
|
-
const want = keys(declared);
|
|
11245
|
-
return have !== void 0 && want !== void 0 && have.size === want.size && [...want].every((key) => have.has(key));
|
|
11246
11444
|
}
|
|
11247
|
-
function
|
|
11248
|
-
|
|
11249
|
-
if (
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11445
|
+
function canonicalizeIpProtocols(baseline, aws, resourceType) {
|
|
11446
|
+
const paths = IP_PROTOCOL_PATHS.get(resourceType);
|
|
11447
|
+
if (paths === void 0) return {
|
|
11448
|
+
baseline,
|
|
11449
|
+
aws
|
|
11450
|
+
};
|
|
11451
|
+
let nextBaseline = baseline;
|
|
11452
|
+
let nextAws = aws;
|
|
11453
|
+
for (const path of paths) {
|
|
11454
|
+
nextBaseline = rewriteAtPath(nextBaseline, path);
|
|
11455
|
+
nextAws = rewriteAtPath(nextAws, path);
|
|
11254
11456
|
}
|
|
11255
|
-
const protocol = sgProtocolKey(rule["IpProtocol"]);
|
|
11256
|
-
out["IpProtocol"] = protocol;
|
|
11257
|
-
if (protocol === "-1") {
|
|
11258
|
-
delete out["FromPort"];
|
|
11259
|
-
delete out["ToPort"];
|
|
11260
|
-
} else for (const key of ["FromPort", "ToPort"]) if (out[key] !== void 0) out[key] = cfnIngressPortValue(out[key]);
|
|
11261
|
-
return out;
|
|
11262
|
-
}
|
|
11263
|
-
function mergeDeclaredSgRules(read, declared, direction) {
|
|
11264
|
-
const keyOf = (rule) => typeof rule === "object" && rule !== null ? sgSettleRuleKey(rule, direction) : void 0;
|
|
11265
|
-
return mergeDeclaredEntries(read, declared, (entry, want) => {
|
|
11266
|
-
const key = keyOf(want);
|
|
11267
|
-
return key !== void 0 && keyOf(entry) === key;
|
|
11268
|
-
}, (want) => typeof want === "object" && want !== null ? sgRuleReadbackShape(want, direction) : void 0);
|
|
11269
|
-
}
|
|
11270
|
-
function sgRuleListMember(key, direction, declared, revoked, reorder, read) {
|
|
11271
|
-
const gone = sgRemovedNotDeclared(revoked, declared, direction);
|
|
11272
11457
|
return {
|
|
11273
|
-
|
|
11274
|
-
|
|
11275
|
-
matches: (value) => declaredSgRulesRead(value, declared, direction) && !value.some((rule) => sgRuleIsRemoved(rule, gone, direction)),
|
|
11276
|
-
whenUnsettled: (newest) => reorder(mergeDeclaredSgRules(newest, declared, direction).filter((rule) => !sgRuleIsRemoved(rule, gone, direction))),
|
|
11277
|
-
read
|
|
11458
|
+
baseline: nextBaseline,
|
|
11459
|
+
aws: nextAws
|
|
11278
11460
|
};
|
|
11279
11461
|
}
|
|
11280
11462
|
|
|
11281
|
-
// src/
|
|
11282
|
-
const
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
return readsWithAgreeingCopies.has(read);
|
|
11288
|
-
}
|
|
11289
|
-
|
|
11290
|
-
// src/cli/commands/drift/baseline-keys.ts
|
|
11291
|
-
const UNDECLARED_UNCOMPARED_KEYS = {
|
|
11292
|
-
"AWS::S3::Bucket": ["NotificationConfiguration"],
|
|
11293
|
-
"AWS::Events::EventBus": ["Policy"],
|
|
11294
|
-
"AWS::IAM::ManagedPolicy": [
|
|
11295
|
-
"Groups",
|
|
11296
|
-
"Roles",
|
|
11297
|
-
"Users"
|
|
11463
|
+
// src/analyzer/drift-undeclared-grants.ts
|
|
11464
|
+
const UNDECLARED_GRANT_KEYS = {
|
|
11465
|
+
"AWS::IAM::Role": [
|
|
11466
|
+
"ManagedPolicyArns",
|
|
11467
|
+
"PermissionsBoundary",
|
|
11468
|
+
"Policies"
|
|
11298
11469
|
],
|
|
11299
|
-
"AWS::
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
"
|
|
11304
|
-
"HooksConfiguration",
|
|
11305
|
-
"RequestHeaderConfiguration",
|
|
11306
|
-
"ResourceConfigurations"
|
|
11470
|
+
"AWS::IAM::User": [
|
|
11471
|
+
"Groups",
|
|
11472
|
+
"ManagedPolicyArns",
|
|
11473
|
+
"PermissionsBoundary",
|
|
11474
|
+
"Policies"
|
|
11307
11475
|
],
|
|
11308
|
-
"AWS::IAM::
|
|
11476
|
+
"AWS::IAM::Group": ["ManagedPolicyArns", "Policies"]
|
|
11309
11477
|
};
|
|
11310
|
-
|
|
11311
|
-
|
|
11478
|
+
const BOUNDARY_KEY = "PermissionsBoundary";
|
|
11479
|
+
const NONE = [];
|
|
11480
|
+
function isPlainRecord$3(value) {
|
|
11481
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11312
11482
|
}
|
|
11313
|
-
function
|
|
11314
|
-
|
|
11315
|
-
if (
|
|
11316
|
-
|
|
11317
|
-
return keys.filter((key) => !hasOwnKey(properties, key));
|
|
11483
|
+
function undeclaredGrantDriftKeys(resourceType, properties) {
|
|
11484
|
+
if (!hasOwnKey(UNDECLARED_GRANT_KEYS, resourceType)) return NONE;
|
|
11485
|
+
if (!isPlainRecord$3(properties)) return NONE;
|
|
11486
|
+
return UNDECLARED_GRANT_KEYS[resourceType].filter((key) => !hasOwnKey(properties, key));
|
|
11318
11487
|
}
|
|
11319
|
-
function
|
|
11320
|
-
|
|
11321
|
-
return preFixBaselineKeys(resourceType, observed, properties, aws).filter((key) => !(holdsPrincipalForm({ [key]: observed[key] }, "uniqueIds") && holdsPrincipalForm({ [key]: aws[key] }, "arns")));
|
|
11488
|
+
function isUndeclaredGrantScalarKey(key) {
|
|
11489
|
+
return key === BOUNDARY_KEY;
|
|
11322
11490
|
}
|
|
11323
|
-
function
|
|
11324
|
-
if (
|
|
11325
|
-
|
|
11326
|
-
|
|
11327
|
-
return [...staleTablePolicyBaseline(observed, bag, aws) ? ["ResourcePolicy"] : [], ...tagsHeal.liveIsDeclared(bag, aws) ? [tagsHeal.key] : []];
|
|
11328
|
-
}
|
|
11329
|
-
if (resourceType === "AWS::SQS::QueuePolicy" || resourceType === "AWS::SNS::TopicPolicy") {
|
|
11330
|
-
const declared = declaredPolicyDocument(properties);
|
|
11331
|
-
return declared !== void 0 && policyDocumentMatchesDeclared(aws["PolicyDocument"], declared) && !policyDocumentMatchesDeclared(observed["PolicyDocument"], declared) ? ["PolicyDocument"] : [];
|
|
11332
|
-
}
|
|
11333
|
-
if (resourceType === "AWS::Lambda::Permission") {
|
|
11334
|
-
const declared = properties;
|
|
11335
|
-
return lambdaPermissionMatchesDeclared(aws, declared) && !lambdaPermissionMatchesDeclared(observed, declared) ? [...LAMBDA_PERMISSION_STATEMENT_KEYS] : [];
|
|
11491
|
+
function grantMemberIdentity(key, member) {
|
|
11492
|
+
if (key === "Policies") {
|
|
11493
|
+
const name = isPlainRecord$3(member) ? member["PolicyName"] : void 0;
|
|
11494
|
+
return typeof name === "string" ? name : void 0;
|
|
11336
11495
|
}
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
if (resourceType !== "AWS::Lambda::EventSourceMapping") return [];
|
|
11340
|
-
const declared = hasOwnKey(properties, "Enabled") ? coerceCfnBoolean(properties["Enabled"]) : void 0;
|
|
11341
|
-
const recorded = hasOwnKey(observed, "Enabled") ? coerceCfnBoolean(observed["Enabled"]) : void 0;
|
|
11342
|
-
const live = hasOwnKey(aws, "Enabled") ? aws["Enabled"] : void 0;
|
|
11343
|
-
return recorded === false && declared !== false && live === true ? ["Enabled"] : [];
|
|
11496
|
+
if (typeof member !== "string") return void 0;
|
|
11497
|
+
return key === "Groups" ? member.toLowerCase() : member;
|
|
11344
11498
|
}
|
|
11345
|
-
|
|
11346
|
-
|
|
11347
|
-
|
|
11348
|
-
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
}
|
|
11352
|
-
|
|
11353
|
-
|
|
11354
|
-
|
|
11355
|
-
|
|
11356
|
-
|
|
11357
|
-
|
|
11358
|
-
|
|
11359
|
-
const boundaryHeal = {
|
|
11360
|
-
key: "PermissionsBoundary",
|
|
11361
|
-
liveIsDeclared: (properties, aws) => typeof properties["PermissionsBoundary"] === "string" && properties["PermissionsBoundary"] !== "" && aws["PermissionsBoundary"] === properties["PermissionsBoundary"]
|
|
11362
|
-
};
|
|
11363
|
-
const inlinePoliciesHeal = {
|
|
11364
|
-
key: "Policies",
|
|
11365
|
-
liveIsDeclared: (properties, aws) => {
|
|
11366
|
-
const declared = declaredInlinePolicies(properties["Policies"]);
|
|
11367
|
-
return declared !== void 0 && inlinePoliciesAreDeclared(aws["Policies"], declared);
|
|
11368
|
-
}
|
|
11369
|
-
};
|
|
11370
|
-
const sgRulesHeal = (key, direction) => ({
|
|
11371
|
-
key,
|
|
11372
|
-
liveIsDeclared: (properties, aws) => sgRulesAreDeclared(aws[key], properties[key], direction)
|
|
11373
|
-
});
|
|
11374
|
-
const tagsHeal = {
|
|
11375
|
-
key: "Tags",
|
|
11376
|
-
liveIsDeclared: (properties, aws) => {
|
|
11377
|
-
const declared = declaredTagsReadback(properties["Tags"]);
|
|
11378
|
-
return declared !== void 0 && tagsMatchDeclared(aws["Tags"], declared);
|
|
11379
|
-
}
|
|
11380
|
-
};
|
|
11381
|
-
const OWN_WRITE_MEMBERS = new Map(Object.entries({
|
|
11382
|
-
"AWS::KMS::Key": [documentHeal("KeyPolicy")],
|
|
11383
|
-
"AWS::Logs::DeliveryDestination": [{
|
|
11384
|
-
key: "DeliveryDestinationPolicy",
|
|
11385
|
-
liveIsDeclared: (properties, aws) => {
|
|
11386
|
-
const inner = (block) => {
|
|
11387
|
-
const document = typeof block === "object" && block !== null && !Array.isArray(block) ? block["DeliveryDestinationPolicy"] : void 0;
|
|
11388
|
-
return typeof document === "object" && document !== null && !Array.isArray(document) ? document : void 0;
|
|
11389
|
-
};
|
|
11390
|
-
const declared = inner(properties["DeliveryDestinationPolicy"]);
|
|
11391
|
-
if (declared === void 0) return properties["DeliveryDestinationPolicy"] === void 0 && aws["DeliveryDestinationPolicy"] === void 0;
|
|
11392
|
-
return policyDocumentMatchesDeclared(inner(aws["DeliveryDestinationPolicy"]), declared);
|
|
11393
|
-
}
|
|
11394
|
-
}],
|
|
11395
|
-
"AWS::Logs::LogGroup": [{
|
|
11396
|
-
key: "DataProtectionPolicy",
|
|
11397
|
-
liveIsDeclared: (properties, aws) => {
|
|
11398
|
-
const declared = declaredMemberDocument(properties["DataProtectionPolicy"]);
|
|
11399
|
-
if (declared === void 0) return (properties["DataProtectionPolicy"] === void 0 || properties["DataProtectionPolicy"] === "") && aws["DataProtectionPolicy"] === "";
|
|
11400
|
-
return policyDocumentMatchesDeclared(aws["DataProtectionPolicy"], declared);
|
|
11401
|
-
}
|
|
11402
|
-
}],
|
|
11403
|
-
"AWS::ApiGateway::RestApi": [documentHeal("Policy")],
|
|
11404
|
-
"AWS::EFS::FileSystem": [{
|
|
11405
|
-
key: "FileSystemPolicy",
|
|
11406
|
-
liveIsDeclared: (properties, aws) => {
|
|
11407
|
-
const declared = declaredMemberDocument(properties["FileSystemPolicy"]);
|
|
11408
|
-
if (declared === void 0) return properties["FileSystemPolicy"] === void 0 && aws["FileSystemPolicy"] === void 0;
|
|
11409
|
-
return efsPolicyMatchesDeclared(aws["FileSystemPolicy"], declared);
|
|
11410
|
-
}
|
|
11411
|
-
}],
|
|
11412
|
-
"AWS::S3::Bucket": [{
|
|
11413
|
-
key: "LifecycleConfiguration",
|
|
11414
|
-
liveIsDeclared: (properties, aws) => {
|
|
11415
|
-
const declared = declaredLifecycle(properties);
|
|
11416
|
-
const live = aws["LifecycleConfiguration"];
|
|
11417
|
-
if (declared === void 0 || typeof live !== "object" || live === null) return false;
|
|
11418
|
-
const liveBag = live;
|
|
11419
|
-
return declared.kind === "absent" ? lifecycleReadIsAbsent(liveBag) : lifecycleMatchesDeclared(liveBag, declared.expected);
|
|
11499
|
+
function isNoBoundary(value) {
|
|
11500
|
+
return value === void 0 || value === null || value === "";
|
|
11501
|
+
}
|
|
11502
|
+
function withUndeclaredGrantBaseline(baseline, aws, keys, siblingRecorded = {}) {
|
|
11503
|
+
let out = baseline;
|
|
11504
|
+
const set = (key, value) => {
|
|
11505
|
+
if (out === baseline) out = { ...baseline };
|
|
11506
|
+
defineOwnKey(out, key, value);
|
|
11507
|
+
};
|
|
11508
|
+
for (const key of keys) {
|
|
11509
|
+
if (!hasOwnKey(aws, key)) continue;
|
|
11510
|
+
if (isUndeclaredGrantScalarKey(key)) {
|
|
11511
|
+
if (!hasOwnKey(baseline, key)) set(key, "");
|
|
11512
|
+
continue;
|
|
11420
11513
|
}
|
|
11421
|
-
|
|
11422
|
-
|
|
11423
|
-
|
|
11424
|
-
|
|
11425
|
-
|
|
11426
|
-
|
|
11427
|
-
|
|
11428
|
-
|
|
11429
|
-
boundaryHeal,
|
|
11430
|
-
stringListHeal("ManagedPolicyArns"),
|
|
11431
|
-
inlinePoliciesHeal
|
|
11432
|
-
],
|
|
11433
|
-
"AWS::IAM::User": [
|
|
11434
|
-
boundaryHeal,
|
|
11435
|
-
stringListHeal("ManagedPolicyArns"),
|
|
11436
|
-
stringListHeal("Groups"),
|
|
11437
|
-
inlinePoliciesHeal
|
|
11438
|
-
],
|
|
11439
|
-
"AWS::IAM::Group": [stringListHeal("ManagedPolicyArns"), inlinePoliciesHeal],
|
|
11440
|
-
"AWS::IAM::ManagedPolicy": [
|
|
11441
|
-
documentHeal("PolicyDocument"),
|
|
11442
|
-
stringListHeal("Roles"),
|
|
11443
|
-
stringListHeal("Users"),
|
|
11444
|
-
stringListHeal("Groups")
|
|
11445
|
-
],
|
|
11446
|
-
"AWS::IAM::InstanceProfile": [stringListHeal("Roles")],
|
|
11447
|
-
"AWS::IAM::Policy": [
|
|
11448
|
-
{
|
|
11449
|
-
key: "PolicyDocument",
|
|
11450
|
-
liveIsDeclared: (properties, aws) => readHadAgreeingCopies(aws) && documentHeal("PolicyDocument").liveIsDeclared(properties, aws)
|
|
11451
|
-
},
|
|
11452
|
-
{
|
|
11453
|
-
key: "PolicyName",
|
|
11454
|
-
liveIsDeclared: (properties, aws) => typeof properties["PolicyName"] === "string" && properties["PolicyName"] !== "" && aws["PolicyName"] === properties["PolicyName"]
|
|
11455
|
-
},
|
|
11456
|
-
stringListHeal("Roles"),
|
|
11457
|
-
stringListHeal("Users"),
|
|
11458
|
-
stringListHeal("Groups")
|
|
11459
|
-
],
|
|
11460
|
-
"AWS::S3::BucketPolicy": [{
|
|
11461
|
-
key: "PolicyDocument",
|
|
11462
|
-
liveIsDeclared: (properties, aws) => {
|
|
11463
|
-
const declared = declaredPolicyDocument(properties);
|
|
11464
|
-
return declared !== void 0 && policyDocumentMatchesDeclared(aws["PolicyDocument"], declared);
|
|
11514
|
+
const live = aws[key];
|
|
11515
|
+
if (!Array.isArray(live)) continue;
|
|
11516
|
+
const recorded = hasOwnKey(baseline, key) ? baseline[key] : [];
|
|
11517
|
+
if (!Array.isArray(recorded)) continue;
|
|
11518
|
+
const byId = /* @__PURE__ */ new Map();
|
|
11519
|
+
for (const member of [...siblingRecorded[key] ?? [], ...recorded]) {
|
|
11520
|
+
const id = grantMemberIdentity(key, member);
|
|
11521
|
+
if (id !== void 0 && !byId.has(id)) byId.set(id, member);
|
|
11465
11522
|
}
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
const declared = readStreamPolicy(properties);
|
|
11473
|
-
const live = readStreamPolicy(aws);
|
|
11474
|
-
if (recorded.kind === "usable" && declared.kind === "absent" && live.kind === "absent") return true;
|
|
11475
|
-
return declared.kind === "usable" && live.kind === "usable" && streamPolicyMatchesDeclared(live.document, properties);
|
|
11476
|
-
}
|
|
11477
|
-
function readOnlyUncomparedDriftPaths(readOnlyPaths, properties) {
|
|
11478
|
-
if (!readOnlyPaths || readOnlyPaths.length === 0) return [];
|
|
11479
|
-
const declared = (path) => {
|
|
11480
|
-
let node = properties;
|
|
11481
|
-
for (const segment of path.split(".")) {
|
|
11482
|
-
if (typeof node !== "object" || node === null || Array.isArray(node)) return false;
|
|
11483
|
-
if (!hasOwnKey(node, segment)) return false;
|
|
11484
|
-
node = node[segment];
|
|
11523
|
+
const projected = [];
|
|
11524
|
+
for (const member of live) {
|
|
11525
|
+
const id = grantMemberIdentity(key, member);
|
|
11526
|
+
if (id === void 0 || !byId.has(id)) continue;
|
|
11527
|
+
projected.push(typeof member === "string" ? member : byId.get(id));
|
|
11528
|
+
byId.delete(id);
|
|
11485
11529
|
}
|
|
11486
|
-
|
|
11487
|
-
};
|
|
11488
|
-
return readOnlyPaths.filter((path) => !declared(path));
|
|
11489
|
-
}
|
|
11490
|
-
const DERIVED_ECHO_MEMBERS = { "AWS::SecretsManager::RotationSchedule": [{
|
|
11491
|
-
parent: "RotationRules",
|
|
11492
|
-
source: "ScheduleExpression",
|
|
11493
|
-
echo: "AutomaticallyAfterDays"
|
|
11494
|
-
}] };
|
|
11495
|
-
function stripDerivedEchoMembers(resourceType, bag) {
|
|
11496
|
-
const rules = DERIVED_ECHO_MEMBERS[resourceType];
|
|
11497
|
-
if (!rules) return bag;
|
|
11498
|
-
let out = bag;
|
|
11499
|
-
for (const { parent, source, echo } of rules) {
|
|
11500
|
-
const node = hasOwnKey(out, parent) ? out[parent] : void 0;
|
|
11501
|
-
if (typeof node !== "object" || node === null || Array.isArray(node)) continue;
|
|
11502
|
-
const members = node;
|
|
11503
|
-
if (!hasOwnKey(members, echo) || !hasOwnKey(members, source)) continue;
|
|
11504
|
-
if (members[source] === void 0 || members[source] === null) continue;
|
|
11505
|
-
const { [echo]: _echo, ...rest } = members;
|
|
11506
|
-
out = {
|
|
11507
|
-
...out,
|
|
11508
|
-
[parent]: rest
|
|
11509
|
-
};
|
|
11530
|
+
if (!(hasOwnKey(baseline, key) && projected.length === recorded.length && projected.every((m, i) => m === recorded[i]))) set(key, projected);
|
|
11510
11531
|
}
|
|
11511
11532
|
return out;
|
|
11512
11533
|
}
|
|
11513
|
-
function
|
|
11514
|
-
|
|
11515
|
-
|
|
11516
|
-
|
|
11534
|
+
function undeclaredGrantIgnorePaths(baseline, aws, keys) {
|
|
11535
|
+
return keys.filter((key) => {
|
|
11536
|
+
if (hasOwnKey(aws, key)) return false;
|
|
11537
|
+
if (isUndeclaredGrantScalarKey(key)) return !hasOwnKey(baseline, key) || isNoBoundary(baseline[key]);
|
|
11538
|
+
return true;
|
|
11539
|
+
});
|
|
11517
11540
|
}
|
|
11518
|
-
function
|
|
11519
|
-
const
|
|
11520
|
-
if (
|
|
11521
|
-
|
|
11522
|
-
|
|
11523
|
-
|
|
11524
|
-
|
|
11525
|
-
|
|
11526
|
-
|
|
11527
|
-
|
|
11528
|
-
|
|
11529
|
-
|
|
11530
|
-
} else if (isEmpty(value)) out.add(key);
|
|
11531
|
-
return out;
|
|
11541
|
+
function withoutUndeclaredNoBoundary(desired, keys) {
|
|
11542
|
+
const absent = keys.filter((key) => isUndeclaredGrantScalarKey(key) && isNoBoundary(desired[key]));
|
|
11543
|
+
if (absent.length === 0) return {
|
|
11544
|
+
desired,
|
|
11545
|
+
absent
|
|
11546
|
+
};
|
|
11547
|
+
const out = { ...desired };
|
|
11548
|
+
for (const key of absent) delete out[key];
|
|
11549
|
+
return {
|
|
11550
|
+
desired: out,
|
|
11551
|
+
absent
|
|
11552
|
+
};
|
|
11532
11553
|
}
|
|
11533
|
-
function
|
|
11534
|
-
|
|
11535
|
-
|
|
11536
|
-
|
|
11554
|
+
function removedGrantMembers(key, awsValue, stateValue) {
|
|
11555
|
+
if (isUndeclaredGrantScalarKey(key)) return !isNoBoundary(awsValue) && isNoBoundary(stateValue) ? [{
|
|
11556
|
+
key,
|
|
11557
|
+
member: awsValue
|
|
11558
|
+
}] : [];
|
|
11559
|
+
if (!Array.isArray(awsValue)) return [];
|
|
11560
|
+
const kept = new Set((Array.isArray(stateValue) ? stateValue : []).map((m) => grantMemberIdentity(key, m)));
|
|
11561
|
+
const out = [];
|
|
11562
|
+
for (const m of awsValue) {
|
|
11563
|
+
const id = grantMemberIdentity(key, m);
|
|
11564
|
+
if (id !== void 0 && kept.has(id)) continue;
|
|
11565
|
+
const name = key === "Policies" && isPlainRecord$3(m) ? m["PolicyName"] : void 0;
|
|
11566
|
+
out.push({
|
|
11567
|
+
key,
|
|
11568
|
+
member: typeof name === "string" ? name : m
|
|
11569
|
+
});
|
|
11570
|
+
}
|
|
11537
11571
|
return out;
|
|
11538
11572
|
}
|
|
11539
11573
|
|
|
@@ -12563,7 +12597,7 @@ function sameRecordedJson(candidate, recorded) {
|
|
|
12563
12597
|
|
|
12564
12598
|
// src/cli/commands/drift/compare.ts
|
|
12565
12599
|
async function compareDriftReadback(args) {
|
|
12566
|
-
const { region, resolvePrincipalUniqueId, outcomes, logger, secretResolvers, producerRegions, stackSecretNames, resource, logicalId, provider, secrets, printing, aws, readContext, readOnlyPathsLookup, notComparedPolicyArns } = args;
|
|
12600
|
+
const { region, resolvePrincipalUniqueId, outcomes, logger, secretResolvers, producerRegions, stackSecretNames, resource, logicalId, provider, secrets, printing, aws, readContext, readOnlyPathsLookup, writeOnlyPathsLookup, notComparedPolicyArns } = args;
|
|
12567
12601
|
const ignorePaths = provider.getDriftUnknownPaths ? provider.getDriftUnknownPaths(resource.resourceType, resource.properties ?? {}) : [];
|
|
12568
12602
|
const unorderedPaths = provider.getDriftUnorderedPaths ? provider.getDriftUnorderedPaths(resource.resourceType) : [];
|
|
12569
12603
|
const useObserved = resource.observedProperties !== void 0;
|
|
@@ -12627,11 +12661,13 @@ async function compareDriftReadback(args) {
|
|
|
12627
12661
|
const ownedIgnorePaths = [...undeclaredUncomparedDriftKeys(resource.resourceType, resource.properties), ...undeclaredGrantIgnorePaths(comparedBaseline, paired.aws, grantKeys)];
|
|
12628
12662
|
const preFixIgnorePaths = preFixBaselineUncomparedDriftKeys(resource.resourceType, resource.observedProperties, resource.properties, aws);
|
|
12629
12663
|
const readOnlyIgnorePaths = readOnlyUncomparedDriftPaths(readOnlyPathsLookup ? await readOnlyPathsLookup : void 0, resource.properties);
|
|
12664
|
+
const writeOnlyIgnorePaths = !useObserved && writeOnlyPathsLookup ? await writeOnlyPathsLookup ?? [] : [];
|
|
12630
12665
|
const extraIgnorePaths = [
|
|
12631
12666
|
...observedIgnorePaths,
|
|
12632
12667
|
...ownedIgnorePaths,
|
|
12633
12668
|
...preFixIgnorePaths,
|
|
12634
|
-
...readOnlyIgnorePaths
|
|
12669
|
+
...readOnlyIgnorePaths,
|
|
12670
|
+
...writeOnlyIgnorePaths
|
|
12635
12671
|
];
|
|
12636
12672
|
const changes = calculateResourceDrift(comparedBaseline, paired.aws, {
|
|
12637
12673
|
ignorePaths: extraIgnorePaths.length ? [...ignorePaths, ...extraIgnorePaths] : ignorePaths,
|
|
@@ -12897,6 +12933,7 @@ async function runDriftForStack(stackName, region, stateBackend, providerRegistr
|
|
|
12897
12933
|
let readReturned = false;
|
|
12898
12934
|
const printing = printingBagOf(logicalId);
|
|
12899
12935
|
const readOnlyPathsLookup = readPath === "ccApi" && (provider.readCurrentState !== void 0 || !CC_API_FALLBACK_DENY_LIST[resource.resourceType]) ? getReadOnlyPropertyPaths(resource.resourceType) : void 0;
|
|
12936
|
+
const writeOnlyPathsLookup = readOnlyPathsLookup !== void 0 && resource.observedProperties === void 0 ? writeOnlyDriftPaths(resource.resourceType) : void 0;
|
|
12900
12937
|
await withPrintingSecrets(printing, async () => {
|
|
12901
12938
|
try {
|
|
12902
12939
|
let aws;
|
|
@@ -12960,6 +12997,7 @@ async function runDriftForStack(stackName, region, stateBackend, providerRegistr
|
|
|
12960
12997
|
aws,
|
|
12961
12998
|
readContext,
|
|
12962
12999
|
...readOnlyPathsLookup && { readOnlyPathsLookup },
|
|
13000
|
+
...writeOnlyPathsLookup && { writeOnlyPathsLookup },
|
|
12963
13001
|
...notComparedPolicyArns && { notComparedPolicyArns }
|
|
12964
13002
|
});
|
|
12965
13003
|
} catch (err) {
|
|
@@ -13287,8 +13325,8 @@ function ingressRuleIdentity(groupId, properties) {
|
|
|
13287
13325
|
p: sgProtocolKey(properties["IpProtocol"]),
|
|
13288
13326
|
f: cfnIngressPortValue(properties["FromPort"]),
|
|
13289
13327
|
t: cfnIngressPortValue(properties["ToPort"]),
|
|
13290
|
-
c4: source("CidrIp"),
|
|
13291
|
-
c6: source("CidrIpv6"),
|
|
13328
|
+
c4: sgCidrKey(source("CidrIp")),
|
|
13329
|
+
c6: sgCidrKey(source("CidrIpv6")),
|
|
13292
13330
|
sg: source("SourceSecurityGroupId"),
|
|
13293
13331
|
sgName: source("SourceSecurityGroupName"),
|
|
13294
13332
|
sgOwner: source("SourceSecurityGroupOwnerId"),
|
|
@@ -13402,14 +13440,25 @@ function securityGroupRuleMatchesCfnIngress(rule, properties) {
|
|
|
13402
13440
|
if ((rule.FromPort ?? -1) !== cfnIngressPortValue(properties["FromPort"])) return false;
|
|
13403
13441
|
if ((rule.ToPort ?? -1) !== cfnIngressPortValue(properties["ToPort"])) return false;
|
|
13404
13442
|
const sources = [
|
|
13405
|
-
[properties["CidrIp"], rule.CidrIpv4],
|
|
13406
|
-
[properties["CidrIpv6"], rule.CidrIpv6],
|
|
13443
|
+
[sgCidrKey(properties["CidrIp"]), sgCidrKey(rule.CidrIpv4)],
|
|
13444
|
+
[sgCidrKey(properties["CidrIpv6"]), sgCidrKey(rule.CidrIpv6)],
|
|
13407
13445
|
[properties["SourceSecurityGroupId"], rule.ReferencedGroupInfo?.GroupId],
|
|
13408
13446
|
[properties["SourcePrefixListId"], rule.PrefixListId]
|
|
13409
13447
|
];
|
|
13410
13448
|
for (const [declared, actual] of sources) if (declared !== void 0 && declared !== null && declared !== actual) return false;
|
|
13411
13449
|
return true;
|
|
13412
13450
|
}
|
|
13451
|
+
function withRecordedCidrSpelling(live, recorded) {
|
|
13452
|
+
let out = live;
|
|
13453
|
+
for (const key of ["CidrIp", "CidrIpv6"]) {
|
|
13454
|
+
const spelled = recorded[key];
|
|
13455
|
+
if (typeof spelled === "string" && spelled !== out[key]) out = {
|
|
13456
|
+
...out,
|
|
13457
|
+
[key]: spelled
|
|
13458
|
+
};
|
|
13459
|
+
}
|
|
13460
|
+
return out;
|
|
13461
|
+
}
|
|
13413
13462
|
function sgRuleKey(rule, direction) {
|
|
13414
13463
|
const peerKey = direction === "egress" ? rule["DestinationSecurityGroupId"] : rule["SourceSecurityGroupId"];
|
|
13415
13464
|
const prefixKey = direction === "egress" ? rule["DestinationPrefixListId"] : rule["SourcePrefixListId"];
|
|
@@ -13418,8 +13467,8 @@ function sgRuleKey(rule, direction) {
|
|
|
13418
13467
|
p: sgProtocolKey(rule["IpProtocol"]),
|
|
13419
13468
|
f: rule["FromPort"] ?? null,
|
|
13420
13469
|
t: rule["ToPort"] ?? null,
|
|
13421
|
-
c4: rule["CidrIp"] ?? null,
|
|
13422
|
-
c6: rule["CidrIpv6"] ?? null,
|
|
13470
|
+
c4: sgCidrKey(rule["CidrIp"]) ?? null,
|
|
13471
|
+
c6: sgCidrKey(rule["CidrIpv6"]) ?? null,
|
|
13423
13472
|
peer: peerKey ?? null,
|
|
13424
13473
|
peerOwner: peerOwner ?? null,
|
|
13425
13474
|
pl: prefixKey ?? null,
|
|
@@ -13433,7 +13482,7 @@ function reconcileSgRules(awsRules, stateRules, direction) {
|
|
|
13433
13482
|
for (const sr of stateRules) {
|
|
13434
13483
|
const key = sgRuleKey(sr, direction);
|
|
13435
13484
|
const idx = remaining.findIndex((ar) => sgRuleKey(ar, direction) === key);
|
|
13436
|
-
if (idx >= 0) reordered.push(remaining.splice(idx, 1)[0]);
|
|
13485
|
+
if (idx >= 0) reordered.push(withRecordedCidrSpelling(remaining.splice(idx, 1)[0], sr));
|
|
13437
13486
|
}
|
|
13438
13487
|
return [...reordered, ...remaining];
|
|
13439
13488
|
}
|
|
@@ -13557,31 +13606,6 @@ function sgRevokesHeldBySiblings(rules, groupId, toRevoke, direction, siblingIds
|
|
|
13557
13606
|
}
|
|
13558
13607
|
return held;
|
|
13559
13608
|
}
|
|
13560
|
-
function cidrKey(value) {
|
|
13561
|
-
if (typeof value !== "string") return value;
|
|
13562
|
-
const [address, prefix, ...rest] = value.trim().split("/");
|
|
13563
|
-
if (address === void 0 || prefix === void 0 || rest.length > 0) return value;
|
|
13564
|
-
const length = Number(prefix);
|
|
13565
|
-
if (!Number.isInteger(length)) return value;
|
|
13566
|
-
const octets = address.split(".");
|
|
13567
|
-
if (octets.length === 4 && length >= 0 && length <= 32) {
|
|
13568
|
-
const parts = octets.map(Number);
|
|
13569
|
-
if (parts.some((p) => !Number.isInteger(p) || p < 0 || p > 255)) return value;
|
|
13570
|
-
const n = parts.reduce((acc, p) => acc * 256 + p, 0);
|
|
13571
|
-
const network = length === 0 ? 0 : n - n % 2 ** (32 - length);
|
|
13572
|
-
return `${[
|
|
13573
|
-
24,
|
|
13574
|
-
16,
|
|
13575
|
-
8,
|
|
13576
|
-
0
|
|
13577
|
-
].map((shift) => Math.floor(network / 2 ** shift) % 256).join(".")}/${length}`;
|
|
13578
|
-
}
|
|
13579
|
-
try {
|
|
13580
|
-
return `${new URL(`http://[${address}]`).hostname}/${length}`;
|
|
13581
|
-
} catch {
|
|
13582
|
-
return value;
|
|
13583
|
-
}
|
|
13584
|
-
}
|
|
13585
13609
|
const INGRESS_IDENTITY_KEYS = [
|
|
13586
13610
|
"IpProtocol",
|
|
13587
13611
|
"FromPort",
|
|
@@ -13598,8 +13622,8 @@ function describedRuleMatchesRecord(rule, properties) {
|
|
|
13598
13622
|
if ((rule.FromPort ?? -1) !== cfnIngressPortValue(properties["FromPort"])) return false;
|
|
13599
13623
|
if ((rule.ToPort ?? -1) !== cfnIngressPortValue(properties["ToPort"])) return false;
|
|
13600
13624
|
if ([
|
|
13601
|
-
[
|
|
13602
|
-
[
|
|
13625
|
+
[sgCidrKey(properties["CidrIp"] ?? void 0), sgCidrKey(rule.CidrIpv4)],
|
|
13626
|
+
[sgCidrKey(properties["CidrIpv6"] ?? void 0), sgCidrKey(rule.CidrIpv6)],
|
|
13603
13627
|
[properties["SourceSecurityGroupId"] ?? void 0, rule.ReferencedGroupInfo?.GroupId],
|
|
13604
13628
|
[properties["SourcePrefixListId"] ?? void 0, rule.PrefixListId]
|
|
13605
13629
|
].some(([declared, live]) => declared !== live)) return false;
|
|
@@ -14399,13 +14423,13 @@ function createIamPrincipalUniqueIdResolver(awsClients) {
|
|
|
14399
14423
|
entityArn = user?.Arn;
|
|
14400
14424
|
entityId = user?.UserId;
|
|
14401
14425
|
}
|
|
14402
|
-
if (entityArn !== void 0 && entityArn
|
|
14426
|
+
if (entityArn !== void 0 && entityArn === arn) uniqueId = entityId;
|
|
14403
14427
|
else {
|
|
14404
14428
|
if (!warnedOnOtherEntity) {
|
|
14405
14429
|
warnedOnOtherEntity = true;
|
|
14406
|
-
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)")}.`);
|
|
14430
|
+
getLogger().warn("A resource policy principal ARN names another account or IAM path, or spells the name or path in another case, 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)")}.`);
|
|
14407
14431
|
}
|
|
14408
|
-
getLogger().debug(`Principal ${displayIdent(arn, { maxCodePoints: 613 })} resolved to ${entityArn === void 0 ? "no entity" : displayIdent(entityArn, { maxCodePoints: 613 })} — same name in this account
|
|
14432
|
+
getLogger().debug(`Principal ${displayIdent(arn, { maxCodePoints: 613 })} resolved to ${entityArn === void 0 ? "no entity" : displayIdent(entityArn, { maxCodePoints: 613 })} — same name in this account, under another IAM path or in another case; leaving the policy principal comparison untouched.`);
|
|
14409
14433
|
}
|
|
14410
14434
|
} catch (error) {
|
|
14411
14435
|
const message = describeAwsFailure(error).detail;
|
|
@@ -15098,6 +15122,35 @@ function printDestroySummary({ result, ctx, stackName, logger, preserveState, gu
|
|
|
15098
15122
|
}
|
|
15099
15123
|
}
|
|
15100
15124
|
|
|
15125
|
+
// src/cli/commands/destroy-runner/protection-refusal-hint.ts
|
|
15126
|
+
const PROTECTION_REFUSAL_TEXT = /(?<![a-z])(?:delet(?:e|ion)[ _-]protection|termination[ _-]protect(?:ion|ed))(?![a-z])|\bprotected against deletion\b|\bdisableApiTermination\b|\bprevent-all-deletion\b/i;
|
|
15127
|
+
const ARN_TEXT = /\barn:\S+/g;
|
|
15128
|
+
const MAX_CAUSE_DEPTH = 8;
|
|
15129
|
+
function isAwsWrittenLink(link) {
|
|
15130
|
+
return isAwsAuthoredFailure(link) || link.name === "CloudControlOperationFailedError";
|
|
15131
|
+
}
|
|
15132
|
+
function isProtectionRefusal(error, physicalId) {
|
|
15133
|
+
let link = error;
|
|
15134
|
+
for (let depth = 0; depth < MAX_CAUSE_DEPTH && link instanceof Error; depth++) {
|
|
15135
|
+
if (isAwsWrittenLink(link)) {
|
|
15136
|
+
let text = link.message.replace(ARN_TEXT, " ");
|
|
15137
|
+
if (physicalId) {
|
|
15138
|
+
const own = new RegExp(`(?<![A-Za-z0-9])${escapeRegExp(physicalId)}(?![A-Za-z0-9])`, "g");
|
|
15139
|
+
text = text.replace(own, " ");
|
|
15140
|
+
}
|
|
15141
|
+
if (PROTECTION_REFUSAL_TEXT.test(text)) return true;
|
|
15142
|
+
}
|
|
15143
|
+
link = link.cause;
|
|
15144
|
+
}
|
|
15145
|
+
return false;
|
|
15146
|
+
}
|
|
15147
|
+
function protectionRefusalHint(error, resourceType, removeProtection, physicalId) {
|
|
15148
|
+
if (removeProtection === true) return void 0;
|
|
15149
|
+
if (!removeProtectionTypes().includes(resourceType)) return void 0;
|
|
15150
|
+
if (!isProtectionRefusal(error, physicalId)) return void 0;
|
|
15151
|
+
return "AWS refused the delete because deletion protection is on for this resource. Re-run the destroy with --remove-protection to turn it off and delete it.";
|
|
15152
|
+
}
|
|
15153
|
+
|
|
15101
15154
|
// src/cli/commands/destroy-runner/delete-resource.ts
|
|
15102
15155
|
async function deleteStackResource({ lock, state, ctx, stackName, logger, result, renderer, blockedBy, blockedIds, blockDependenciesOf, retainedForReadoption, startRetainedEarlierRead, skippedStateTargets, failedStateTargets, stateTargetFor, guardIndeterminateTargets, remainingResources, persistStateAfterDelete, printingBagOf, destroyProviderRegistry, destroyAwsClients, secretPrincipalRegions, secretPrincipalRegionsIncomplete }, logicalId, stackRegion) {
|
|
15103
15156
|
if (lock.interrupted) return;
|
|
@@ -15353,6 +15406,8 @@ async function deleteStackResource({ lock, state, ctx, stackName, logger, result
|
|
|
15353
15406
|
});
|
|
15354
15407
|
} else {
|
|
15355
15408
|
logger.error(` ✗ Failed to delete ${displaySafe(logicalId)}:`, safeStringify(error));
|
|
15409
|
+
const protectionHint = protectionRefusalHint(error, resource.resourceType, ctx.removeProtection, resource.physicalId);
|
|
15410
|
+
if (protectionHint) logger.error(safeMsg` ${protectionHint}`);
|
|
15356
15411
|
result.errorCount++;
|
|
15357
15412
|
failedStateTargets.add(stateTargetFor(logicalId, resource.resourceType));
|
|
15358
15413
|
blockDependenciesOf(logicalId);
|
|
@@ -18085,27 +18140,6 @@ function recordedArnIdentifier(options) {
|
|
|
18085
18140
|
}
|
|
18086
18141
|
const COMPOSITE_PHYSICAL_ID_IDENTIFIER_TYPES = Object.keys(COMPOSITE_PHYSICAL_ID_IDENTIFIERS);
|
|
18087
18142
|
|
|
18088
|
-
// src/utils/ipv4-cidr.ts
|
|
18089
|
-
function canonicalizeIpv4Cidr(value) {
|
|
18090
|
-
const match = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\/(\d{1,2})$/.exec(value);
|
|
18091
|
-
if (!match) return void 0;
|
|
18092
|
-
const octets = [
|
|
18093
|
-
match[1],
|
|
18094
|
-
match[2],
|
|
18095
|
-
match[3],
|
|
18096
|
-
match[4]
|
|
18097
|
-
].map(Number);
|
|
18098
|
-
const prefixLength = Number(match[5]);
|
|
18099
|
-
if (prefixLength > 32 || octets.some((octet) => octet > 255)) return void 0;
|
|
18100
|
-
const network = ((octets[0] << 24 | octets[1] << 16 | octets[2] << 8 | octets[3]) >>> 0 & (prefixLength === 0 ? 0 : 4294967295 << 32 - prefixLength >>> 0)) >>> 0;
|
|
18101
|
-
return `${[
|
|
18102
|
-
network >>> 24,
|
|
18103
|
-
network >>> 16 & 255,
|
|
18104
|
-
network >>> 8 & 255,
|
|
18105
|
-
network & 255
|
|
18106
|
-
].join(".")}/${prefixLength}`;
|
|
18107
|
-
}
|
|
18108
|
-
|
|
18109
18143
|
// src/cli/commands/export/composite-id-shapes.ts
|
|
18110
18144
|
const EIP_ALLOCATION_ID_PREFIX = "eipalloc-";
|
|
18111
18145
|
const EIP_PUBLIC_IP_PATTERN = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
|
|
@@ -37198,5 +37232,5 @@ function collectVerbFlags(program) {
|
|
|
37198
37232
|
return map;
|
|
37199
37233
|
}
|
|
37200
37234
|
|
|
37201
|
-
export { effectiveInventoryItem as $,
|
|
37202
|
-
//# sourceMappingURL=program-
|
|
37235
|
+
export { effectiveInventoryItem as $, withRecordedCidrSpelling as A, LIFECYCLE_DEFAULT_STATUS as B, securityGroupReadbackDelays as C, stackIngressRuleHolder as D, singleSecurityGroupRuleId 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, sgRemovalRuleKey as M, sgRuleListMember as N, survivingRecordOfRuleId as O, LIFECYCLE_BASELINE_REREAD_DELAYS_MS as P, effectiveIntelligentTieringItem as Q, settleLifecycleRead as R, reconcileSgRules as S, sgRuleKey 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, ingressRuleIdentity as _, refuseRevertRevokingSiblingRules as a, declaresBucketObjectLock as at, isResendableSocketFailure as b, buildProgram, siblingIdOwnedSgRules as c, isPlainObject as ct, authorizeDefinitelyNotApplied as d, shownLifecycleRuleId as dt, effectiveNotificationConfiguration as et, canonicalizeSgInlineRuleProtocols as f, flattenIpPermissions as g, descriptionKey as h, resolveSecretDerivedPrincipals as i, configItemId as it, markCopiesAgreed as j, tagListsMatch as k, SG_READBACK_RETRY_DELAY_MS as l, manualBucketDeletionClause as lt, comparableIngressIdentity as m, holdsUnprovenSecretPrincipalToken as n, caughtErrorName as nt, sgRuleDiffKey as o, declaresNestedObjectLock as ot, canonicalizeSgRuleProtocol as p, lifecycleRuleScope as q, isResolvableSecretPrincipalList as r, coerceCfnNumber as rt, readSgIngressById as s, describeValue as st, runDestroyForStack as t, eventBridgeEnabledOf as tt, SG_RULE_PAGE_SIZE$1 as u, mergeLegacySingular as ut, isConnectTimeout as v, securityGroupRuleMatchesCfnIngress as w, narrowIngressIpProtocol as x, isDefaultEgressRule as y, takeLifecycleWrite as z };
|
|
37236
|
+
//# sourceMappingURL=program-DwAbyuS-.js.map
|