@go-to-k/cdkd 0.306.0 → 0.308.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/{asg-provider-DrREeZeh.js → asg-provider-CsRMe_zh.js} +4 -4
  2. package/dist/{asg-provider-DrREeZeh.js.map → asg-provider-CsRMe_zh.js.map} +1 -1
  3. package/dist/{aws-clients-DhsLtXsN.js → aws-clients-Bu9EMILF.js} +3 -4
  4. package/dist/aws-clients-Bu9EMILF.js.map +1 -0
  5. package/dist/{aws-failure-text-Durl920o.js → aws-failure-text-NSBdKPYK.js} +7 -1
  6. package/dist/aws-failure-text-NSBdKPYK.js.map +1 -0
  7. package/dist/cli.js +2 -2
  8. package/dist/{db-instance-modify-retry-DvidzfJp.js → db-instance-modify-retry-DOJPkECL.js} +3 -3
  9. package/dist/{db-instance-modify-retry-DvidzfJp.js.map → db-instance-modify-retry-DOJPkECL.js.map} +1 -1
  10. package/dist/{deploy-engine-Bjr-FAuZ.js → deploy-engine-DSpxEUjC.js} +1831 -290
  11. package/dist/deploy-engine-DSpxEUjC.js.map +1 -0
  12. package/dist/{iam-policy-targets-BbtwI9vN.js → iam-policy-targets-TFGunWmV.js} +56 -56
  13. package/dist/{iam-policy-targets-BbtwI9vN.js.map → iam-policy-targets-TFGunWmV.js.map} +1 -1
  14. package/dist/{iam-role-provider-BJ26M4Ez.js → iam-role-provider--eWrOXce.js} +5 -5
  15. package/dist/{iam-role-provider-BJ26M4Ez.js.map → iam-role-provider--eWrOXce.js.map} +1 -1
  16. package/dist/index.js +5 -5
  17. package/dist/{neptune-provider-D_3VAhFf.js → neptune-provider-p59T8CFv.js} +17 -12
  18. package/dist/neptune-provider-p59T8CFv.js.map +1 -0
  19. package/dist/{program-CcYD-_fU.js → program-DOPic-aS.js} +7 -7
  20. package/dist/{program-CcYD-_fU.js.map → program-DOPic-aS.js.map} +1 -1
  21. package/dist/{provider-classes-C_AbFNEi.js → provider-classes-d9K3vBVh.js} +3035 -1765
  22. package/dist/provider-classes-d9K3vBVh.js.map +1 -0
  23. package/dist/{rds-provider-Dps9UxBz.js → rds-provider-BPs9JSk_.js} +31 -19
  24. package/dist/rds-provider-BPs9JSk_.js.map +1 -0
  25. package/dist/{version-CZkNvTWF.js → version-DzajQDkv.js} +2 -2
  26. package/dist/{version-CZkNvTWF.js.map → version-DzajQDkv.js.map} +1 -1
  27. package/package.json +2 -2
  28. package/dist/aws-clients-DhsLtXsN.js.map +0 -1
  29. package/dist/aws-failure-text-Durl920o.js.map +0 -1
  30. package/dist/deploy-engine-Bjr-FAuZ.js.map +0 -1
  31. package/dist/neptune-provider-D_3VAhFf.js.map +0 -1
  32. package/dist/provider-classes-C_AbFNEi.js.map +0 -1
  33. package/dist/rds-provider-Dps9UxBz.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import { c as __exportAll, r as getAwsClients } from "./aws-clients-DhsLtXsN.js";
2
- import { A as isNameGeneration, B as SECRET_REF_MAX_CODE_POINTS, D as getCurrentStackInstanceId, E as getCurrentSkipPrefix, F as withSkipPrefix, G as displayAwsMessage, H as UNRENDERABLE, I as withStackScope, J as displayStackName, K as displayIdent, L as withStackScopeBeforeStateRead, N as stackInstanceNameSuffix, O as getCurrentStackName, P as withNameGeneration, Q as safeMsg, R as withoutGeneratedFallbackName, S as fallbackNamePropertyFor, T as generatedNameFor, U as asIsMessage, V as STACK_REF_MAX_CODE_POINTS, Y as isPasteableIdent, Z as plainIdentOr, a as safeStringify$1, c as isStdoutReservedForPayload, et as terminalSafe, f as currentLogLineMasker, j as looksLikeCdkdGeneratedName, m as getLiveRenderer, n as describeAwsFailure, p as installLogLineMaskerSource, q as displaySafe, s as getLogger, t as VERBOSE_POINTER, tt as truncateCodePoints, v as applyDefaultNameForFallback, w as generateResourceNameWithFallback, x as explicitNamePropertyFor, y as currentNameGeneration, z as SAFE_MSG_ALTERED_CHAR } from "./aws-failure-text-Durl920o.js";
3
- import { $n as isUpdateUnsupportedError, An as StateError, At as carryCreatedBeforeFailure, B as compensateProtectionFlip, Bn as UNSHOWABLE_VALUE, Bt as replayMadeAnotherResource, Cr as markNonRetryable, Ct as createMaskedLogSinks, D as markNotGone, Dn as ResourceUpdateNotSupportedError, Dt as maskerOrIdentity, E as isMarkedNotGone, En as ResourceTimeoutError, Et as maskDeep, F as refusalTypeShown, Fn as normalizeAwsError, Ft as isAuxiliaryFailure, Gn as physicalIdShownBesideCommand, Gt as formatLockExpiry, H as deleteWithProtectionCompensation, Ht as buildForceUnlockCommand, It as isAuxiliaryMarkOf, J as observeThenDisableProtection, Jn as shellBoundedDisplay, Jt as recoveryCommandFlags, K as isTerminalDeleteFailure, Kn as plainOrDescribed, Kt as formatLockOperation, L as resolveExplicitPhysicalId, Lt as markAuxiliaryFailure, M as isQuotableImportValue, Mt as createdBeforeFailure, N as normalizeAwsTagsToCfn, Nt as createdResourceIdentityBeforeFailure, O as assertRegionMatch, Ot as withDerivedNameMasks, P as quotedRemedyLogicalId, Pn as isSoftAbort, Pt as hasCreatedBeforeFailure, Qt as injectiveKey, Rn as SHELL_ACTIVE, Rt as markCreatedBeforeFailure, Sn as MalformedProducerRecordRefusalError, Sr as isThrottlingError, St as stateOrphanRecordRemedy, T as RESOURCE_NOT_FOUND, Tn as ProvisioningError, Tr as wrapMaskedAwsError, Tt as isSecretDerivedValue, Un as isInertUnquoted, Vn as commandHole, Vt as UNREPRODUCIBLE_LOCK_CLAUSE, Wn as pasteableCommand, Xn as withheldTargetClause, Xt as CUSTOM_RESOURCE_RESPONSE_PREFIX, Y as protectionFlipKey, Yn as shellQuote, Yt as sanitizeRecoveryValue, Z as runDeleteAttempt, Zt as DEFAULT_STATE_PREFIX, _n as IntrinsicResolutionRefusalError, _r as isRetryableTransientError, an as ambientCredentialConfig, at as protectedReplacementAdvice, bn as LockError, bt as resourceTypeShown, cn as AccountIdUnavailableError, cr as escapeRegExp$3, d as prepareRemovalForUpdate, dt as startInterruptWatch, er as hasReplayMayCollide, et as DELETION_PROTECTION_DOC_POINTER, f as removalWarning, fn as CrossAccountSecretRefusalError, fr as formatRetryClassificationSignals, ft as ElapsedBudgetRegistry, gn as DynamicReferenceRegionAmbiguousError, gr as isIamPropagationError, gt as compositeIdSeparatorRefusal, hn as DeploymentNotApprovedError, i as holdsSecretDerivedEntry, in as ambientClientDefaults, ir as isReplayedNameCollisionFrom, it as pasteableAwsCommand, jn as SynthesisError, kt as RETRY_AUXILIARY_OWNER, l as withUnchangedSecretPrincipalLists, ln as AssetError, lr as stripControlChars, m as withoutInjectedRemovals, mr as isAmbiguousOutcomeError, mt as canonicalizeRoute53QueryName, nr as isNameCooldownError, on as clientDefaultsFor, or as markReplayMayCollide, pn as DependencyError, pr as isAmbiguousCcHandlerErrorCode, pt as monotonicNowMs, qn as quotedOrDescribed, qt as formatLockOwner, rn as withPasteableAwsProfile, rr as isRecreateRetryableError, sn as credentialFingerprint, sr as relayedNameCollision, tn as producerRecordKey, tr as isNameCollisionErrorFrom, un as CdkdError, ut as isInterruptedWaitError, vr as isTransientServerError, vt as logicalIdShown, w as withoutServerErrorRetries, wr as markRedactedCause, wt as createMaskedRetryLogger, xn as MacroExpansionError, xr as isMarkedNonRetryable, xt as segmentAfterAnchor, yr as retryClassificationText, z as ProtectionFlipRegistry, zn as SHELL_ACTIVE_WHY } from "./iam-policy-targets-BbtwI9vN.js";
1
+ import { c as __exportAll, r as getAwsClients } from "./aws-clients-Bu9EMILF.js";
2
+ import { A as isNameGeneration, B as SECRET_REF_MAX_CODE_POINTS, D as getCurrentStackInstanceId, E as getCurrentSkipPrefix, F as withSkipPrefix, G as displayAwsMessage, H as UNRENDERABLE, I as withStackScope, J as displayStackName, K as displayIdent, L as withStackScopeBeforeStateRead, N as stackInstanceNameSuffix, O as getCurrentStackName, P as withNameGeneration, Q as safeMsg, R as withoutGeneratedFallbackName, S as fallbackNamePropertyFor, T as generatedNameFor, U as asIsMessage, V as STACK_REF_MAX_CODE_POINTS, Y as isPasteableIdent, Z as plainIdentOr, a as safeStringify$1, c as isStdoutReservedForPayload, et as terminalSafe, f as currentLogLineMasker, j as looksLikeCdkdGeneratedName, m as getLiveRenderer, n as describeAwsFailure, p as installLogLineMaskerSource, q as displaySafe, s as getLogger, t as VERBOSE_POINTER, tt as truncateCodePoints, v as applyDefaultNameForFallback, w as generateResourceNameWithFallback, x as explicitNamePropertyFor, y as currentNameGeneration, z as SAFE_MSG_ALTERED_CHAR } from "./aws-failure-text-NSBdKPYK.js";
3
+ import { $n as isUpdateUnsupportedError, An as StateError, At as carryCreatedBeforeFailure, B as compensateProtectionFlip, Bn as UNSHOWABLE_VALUE, Bt as replayMadeAnotherResource, Cr as markNonRetryable, Ct as createMaskedLogSinks, D as markNotGone, Dn as ResourceUpdateNotSupportedError, Dt as maskerOrIdentity, E as isMarkedNotGone, En as ResourceTimeoutError, Et as maskDeep, F as refusalTypeShown, Fn as normalizeAwsError, Ft as isAuxiliaryFailure, Gn as physicalIdShownBesideCommand, Gt as formatLockExpiry, H as deleteWithProtectionCompensation, Ht as buildForceUnlockCommand, It as isAuxiliaryMarkOf, J as observeThenDisableProtection, Jn as shellBoundedDisplay, Jt as recoveryCommandFlags, K as isTerminalDeleteFailure, Kn as plainOrDescribed, Kt as formatLockOperation, L as resolveExplicitPhysicalId, Lt as markAuxiliaryFailure, M as isQuotableImportValue, Mt as createdBeforeFailure, N as normalizeAwsTagsToCfn, Nt as createdResourceIdentityBeforeFailure, O as assertRegionMatch, Ot as withDerivedNameMasks, P as quotedRemedyLogicalId, Pn as isSoftAbort, Pt as hasCreatedBeforeFailure, Qt as injectiveKey, Rn as SHELL_ACTIVE, Rt as markCreatedBeforeFailure, Sn as MalformedProducerRecordRefusalError, Sr as isThrottlingError, St as stateOrphanRecordRemedy, T as RESOURCE_NOT_FOUND, Tn as ProvisioningError, Tr as wrapMaskedAwsError, Tt as isSecretDerivedValue, Un as isInertUnquoted, Vn as commandHole, Vt as UNREPRODUCIBLE_LOCK_CLAUSE, Wn as pasteableCommand, Xn as withheldTargetClause, Xt as CUSTOM_RESOURCE_RESPONSE_PREFIX, Y as protectionFlipKey, Yn as shellQuote, Yt as sanitizeRecoveryValue, Z as runDeleteAttempt, Zt as DEFAULT_STATE_PREFIX, _n as IntrinsicResolutionRefusalError, _r as isRetryableTransientError, an as ambientCredentialConfig, at as protectedReplacementAdvice, bn as LockError, bt as resourceTypeShown, cn as AccountIdUnavailableError, cr as escapeRegExp$3, ct as monotonicNowMs, d as prepareRemovalForUpdate, er as hasReplayMayCollide, et as DELETION_PROTECTION_DOC_POINTER, f as removalWarning, fn as CrossAccountSecretRefusalError, fr as formatRetryClassificationSignals, ft as isInterruptedWaitError, gn as DynamicReferenceRegionAmbiguousError, gr as isIamPropagationError, gt as compositeIdSeparatorRefusal, hn as DeploymentNotApprovedError, i as holdsSecretDerivedEntry, in as ambientClientDefaults, ir as isReplayedNameCollisionFrom, it as pasteableAwsCommand, jn as SynthesisError, kt as RETRY_AUXILIARY_OWNER, l as withUnchangedSecretPrincipalLists, ln as AssetError, lr as stripControlChars, m as withoutInjectedRemovals, mr as isAmbiguousOutcomeError, mt as canonicalizeRoute53QueryName, nr as isNameCooldownError, on as clientDefaultsFor, or as markReplayMayCollide, pn as DependencyError, pr as isAmbiguousCcHandlerErrorCode, pt as startInterruptWatch, qn as quotedOrDescribed, qt as formatLockOwner, rn as withPasteableAwsProfile, rr as isRecreateRetryableError, sn as credentialFingerprint, sr as relayedNameCollision, st as ElapsedBudgetRegistry, tn as producerRecordKey, tr as isNameCollisionErrorFrom, un as CdkdError, vr as isTransientServerError, vt as logicalIdShown, w as withoutServerErrorRetries, wr as markRedactedCause, wt as createMaskedRetryLogger, xn as MacroExpansionError, xr as isMarkedNonRetryable, xt as segmentAfterAnchor, yr as retryClassificationText, z as ProtectionFlipRegistry, zn as SHELL_ACTIVE_WHY } from "./iam-policy-targets-TFGunWmV.js";
4
4
  import { a as setAssumedRoleCredentials, c as ambientRegion, i as getPreAssumeEnvCredentials, n as awsClientDefaults, o as setPreAssumeEnvCredentials, r as getAssumedRoleCredentials, s as quietS3Logger, t as SECOND_ROLE_PUBLISH_REFUSAL } from "./aws-client-defaults-BX9Y_fKp.js";
5
- import { t as getCdkdVersion } from "./version-CZkNvTWF.js";
5
+ import { t as getCdkdVersion } from "./version-DzajQDkv.js";
6
6
  import { createHash, randomUUID } from "node:crypto";
7
7
  import { AsyncLocalStorage } from "node:async_hooks";
8
8
  import { CreateBucketCommand, DeleteObjectCommand, DeleteObjectsCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketReplicationCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchKey, PutBucketEncryptionCommand, PutBucketLifecycleConfigurationCommand, PutBucketPolicyCommand, PutObjectCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
@@ -10,8 +10,8 @@ import { CloudControlClient, CreateResourceCommand, DeleteResourceCommand, GetRe
10
10
  import { PublishCommand, SNSClient } from "@aws-sdk/client-sns";
11
11
  import { GetFunctionCommand, GetFunctionConfigurationCommand, GetFunctionUrlConfigCommand, InvokeCommand, LambdaClient, UpdateFunctionConfigurationCommand, waitUntilFunctionActiveV2, waitUntilFunctionUpdatedV2 } from "@aws-sdk/client-lambda";
12
12
  import { AssumeRoleCommand, GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
13
- import { CreateSnapshotCommand, DeleteVolumeCommand, DescribeAvailabilityZonesCommand, DescribeImagesCommand, DescribeInstanceAttributeCommand, DescribeInstancesCommand, DescribeLaunchTemplatesCommand, DescribeRouteTablesCommand, DescribeSecurityGroupsCommand, DescribeSnapshotsCommand, DescribeSubnetsCommand, DescribeVolumesCommand, DescribeVpcsCommand, DescribeVpnGatewaysCommand, EC2Client, ModifyInstanceAttributeCommand } from "@aws-sdk/client-ec2";
14
- import { CreateTableCommand, DeleteTableCommand, DescribeContinuousBackupsCommand, DescribeContributorInsightsCommand, DescribeKinesisStreamingDestinationCommand, DescribeTableCommand, DescribeTimeToLiveCommand, DynamoDBClient, ListTagsOfResourceCommand, ResourceNotFoundException as ResourceNotFoundException$1, TagResourceCommand as TagResourceCommand$2, UntagResourceCommand as UntagResourceCommand$2, UpdateTableCommand, UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
13
+ import { CreateSnapshotCommand, DeleteVolumeCommand, DescribeAvailabilityZonesCommand, DescribeImagesCommand, DescribeInstanceAttributeCommand, DescribeInstancesCommand, DescribeLaunchTemplatesCommand, DescribeNatGatewaysCommand, DescribeRouteTablesCommand, DescribeSecurityGroupsCommand, DescribeSnapshotsCommand, DescribeSubnetsCommand, DescribeVolumesCommand, DescribeVpcsCommand, DescribeVpnGatewaysCommand, EC2Client, ModifyInstanceAttributeCommand } from "@aws-sdk/client-ec2";
14
+ import { CreateTableCommand, DeleteResourcePolicyCommand, DeleteTableCommand, DescribeContinuousBackupsCommand, DescribeContributorInsightsCommand, DescribeKinesisStreamingDestinationCommand, DescribeTableCommand, DescribeTimeToLiveCommand, DisableKinesisStreamingDestinationCommand, DynamoDBClient, EnableKinesisStreamingDestinationCommand, GetResourcePolicyCommand, ListTagsOfResourceCommand, PolicyNotFoundException, PutResourcePolicyCommand, ResourceNotFoundException as ResourceNotFoundException$1, TagResourceCommand as TagResourceCommand$2, UntagResourceCommand as UntagResourceCommand$2, UpdateContinuousBackupsCommand, UpdateContributorInsightsCommand, UpdateKinesisStreamingDestinationCommand, UpdateTableCommand, UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
15
15
  import { CloudFormationClient, CreateChangeSetCommand, DeleteStackCommand, DescribeChangeSetCommand, DescribeStacksCommand, DescribeTypeCommand, GetTemplateCommand, ListExportsCommand, waitUntilChangeSetCreateComplete } from "@aws-sdk/client-cloudformation";
16
16
  import { GetRestApiCommand } from "@aws-sdk/client-api-gateway";
17
17
  import { DescribeApiDestinationCommand, DescribeConnectionCommand } from "@aws-sdk/client-eventbridge";
@@ -2360,7 +2360,7 @@ async function resolveStateBucketWithDefaultAndSource(cliBucket, region, legacyF
2360
2360
  logger.debug("No state bucket specified, resolving default from account...");
2361
2361
  const { GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
2362
2362
  const { S3Client, HeadBucketCommand, ListObjectsV2Command } = await import("@aws-sdk/client-s3");
2363
- const { getAwsClients } = await import("./aws-clients-DhsLtXsN.js").then((n) => n.n);
2363
+ const { getAwsClients } = await import("./aws-clients-Bu9EMILF.js").then((n) => n.n);
2364
2364
  const { expectedOwnerParam, recordResolvedAccountId } = await Promise.resolve().then(() => expected_bucket_owner_exports);
2365
2365
  const probeDeps = {
2366
2366
  HeadBucketCommand,
@@ -7845,7 +7845,7 @@ const WHOLE_DYNAMIC_REFERENCE_PATTERN = new RegExp(`^\\{\\{resolve:${DYNAMIC_REF
7845
7845
  function isSingleDynamicReferenceToken(value) {
7846
7846
  return WHOLE_DYNAMIC_REFERENCE_PATTERN.test(value);
7847
7847
  }
7848
- function isPlainObject$7(value) {
7848
+ function isPlainObject$9(value) {
7849
7849
  return value !== null && typeof value === "object" && !Array.isArray(value);
7850
7850
  }
7851
7851
 
@@ -8101,7 +8101,7 @@ function crossStackSourceKey(source) {
8101
8101
  }
8102
8102
  if (key === "Fn::GetStackOutput") {
8103
8103
  const args = source[key];
8104
- if (!isPlainObject$7(args)) return void 0;
8104
+ if (!isPlainObject$9(args)) return void 0;
8105
8105
  const stackName = Object.hasOwn(args, "StackName") ? literalStringOrUndefined(args["StackName"]) : void 0;
8106
8106
  const outputName = Object.hasOwn(args, "OutputName") ? literalStringOrUndefined(args["OutputName"]) : void 0;
8107
8107
  if (stackName === void 0 || outputName === void 0) return void 0;
@@ -8147,7 +8147,7 @@ function crossStackSourceKey(source) {
8147
8147
  let template;
8148
8148
  let variables;
8149
8149
  if (typeof raw === "string") template = raw;
8150
- else if (Array.isArray(raw) && raw.length === 2 && isPlainObject$7(raw[1])) {
8150
+ else if (Array.isArray(raw) && raw.length === 2 && isPlainObject$9(raw[1])) {
8151
8151
  if (typeof raw[0] !== "string") return void 0;
8152
8152
  template = raw[0];
8153
8153
  variables = raw[1];
@@ -8441,12 +8441,12 @@ const UNFRAMED_SPELLING = Symbol("cdkd.nested-parameter.unframed-spelling");
8441
8441
  function recordNestedStackParameterExpressions(secrets, resourceType, resolvedProperties, sourceProperties, provenance = "template-derived") {
8442
8442
  if (resourceType !== NESTED_STACK_RESOURCE_TYPE$4) return;
8443
8443
  if (secrets.size === 0) return;
8444
- if (!isPlainObject$7(resolvedProperties) || !isPlainObject$7(sourceProperties)) return;
8444
+ if (!isPlainObject$9(resolvedProperties) || !isPlainObject$9(sourceProperties)) return;
8445
8445
  if (!Object.hasOwn(resolvedProperties, "Parameters")) return;
8446
8446
  if (!Object.hasOwn(sourceProperties, "Parameters")) return;
8447
8447
  const resolvedParameters = resolvedProperties["Parameters"];
8448
8448
  const sourceParameters = sourceProperties["Parameters"];
8449
- if (!isPlainObject$7(resolvedParameters) || !isPlainObject$7(sourceParameters)) return;
8449
+ if (!isPlainObject$9(resolvedParameters) || !isPlainObject$9(sourceParameters)) return;
8450
8450
  const positioned = redactAtProvenance({ ...resolvedParameters }, secrets, sourceParameters, provenance, true);
8451
8451
  let table = nestedStackParameterExpressions.get(secrets);
8452
8452
  for (const [name, resolvedValue] of Object.entries(resolvedParameters)) {
@@ -8495,7 +8495,7 @@ function recordNestedStackParameterExpressions(secrets, resourceType, resolvedPr
8495
8495
  if (typeof resolvedValue !== "string") return void 0;
8496
8496
  const sourceLeaf = sourceParameters[name];
8497
8497
  if (typeof sourceLeaf === "string") return sourceLeaf;
8498
- if (!isPlainObject$7(sourceLeaf)) return void 0;
8498
+ if (!isPlainObject$9(sourceLeaf)) return void 0;
8499
8499
  const written = positioned[name];
8500
8500
  if (typeof written !== "string") return void 0;
8501
8501
  const rendered = intrinsicSkeletonSegments(sourceLeaf)?.map((s) => s === UNKNOWN_PART ? "\0" : s).join("");
@@ -8832,7 +8832,7 @@ function evaluatePureRead(node, bind, pseudo, split, choose, depth = 0) {
8832
8832
  }
8833
8833
  return { value: out };
8834
8834
  }
8835
- if (!isPlainObject$7(node)) return void 0;
8835
+ if (!isPlainObject$9(node)) return void 0;
8836
8836
  const keys = Object.keys(node);
8837
8837
  if (keys.length !== 1) return void 0;
8838
8838
  const key = keys[0];
@@ -8873,7 +8873,7 @@ function evaluatePureRead(node, bind, pseudo, split, choose, depth = 0) {
8873
8873
  }
8874
8874
  function evaluatePureSub(args, bind, pseudo, evaluate) {
8875
8875
  const [text, variables] = typeof args === "string" ? [args, {}] : Array.isArray(args) && args.length === 2 ? [args[0], args[1]] : [void 0, void 0];
8876
- if (typeof text !== "string" || text.includes("{{resolve:") || !isPlainObject$7(variables)) return;
8876
+ if (typeof text !== "string" || text.includes("{{resolve:") || !isPlainObject$9(variables)) return;
8877
8877
  const bound = /* @__PURE__ */ new Map();
8878
8878
  for (const [name, variable] of Object.entries(variables)) {
8879
8879
  const evaluated = evaluate(variable);
@@ -8906,7 +8906,7 @@ function bindReadName(name, bind, pseudo) {
8906
8906
  function collectRereadConditions(node, names, depth = 0) {
8907
8907
  if (depth > MAX_REREAD_DEPTH) return false;
8908
8908
  if (Array.isArray(node)) return node.every((element) => collectRereadConditions(element, names, depth + 1));
8909
- if (!isPlainObject$7(node)) return true;
8909
+ if (!isPlainObject$9(node)) return true;
8910
8910
  if (Object.hasOwn(node, "Fn::If")) {
8911
8911
  const args = node["Fn::If"];
8912
8912
  if (!Array.isArray(args) || typeof args[0] !== "string") return false;
@@ -8917,7 +8917,7 @@ function collectRereadConditions(node, names, depth = 0) {
8917
8917
  function holdsRereadTrigger(node, depth = 0) {
8918
8918
  if (depth > MAX_REREAD_DEPTH) return false;
8919
8919
  if (Array.isArray(node)) return node.some((element) => holdsRereadTrigger(element, depth + 1));
8920
- if (!isPlainObject$7(node)) return false;
8920
+ if (!isPlainObject$9(node)) return false;
8921
8921
  return Object.entries(node).some(([key, child]) => REREAD_TRIGGERS.has(key) || holdsRereadTrigger(child, depth + 1));
8922
8922
  }
8923
8923
  function rendersReadTo(spelling, parentSecrets, value) {
@@ -8960,7 +8960,7 @@ function namesParameterOnBranches(node, choose, isParameter, depth = 0) {
8960
8960
  if (depth > MAX_REREAD_DEPTH) return true;
8961
8961
  if (typeof node === "string") return node.includes("{{resolve:");
8962
8962
  if (Array.isArray(node)) return node.some((element) => namesParameterOnBranches(element, choose, isParameter, depth + 1));
8963
- if (!isPlainObject$7(node)) return false;
8963
+ if (!isPlainObject$9(node)) return false;
8964
8964
  if (Object.hasOwn(node, "Fn::If")) {
8965
8965
  const args = node["Fn::If"];
8966
8966
  if (Object.keys(node).length !== 1) return true;
@@ -9073,7 +9073,7 @@ function appendValuePlaceholderParts(value, out, budget, depth) {
9073
9073
  if (budget.exhausted) return;
9074
9074
  const literal = joinPartLiteralText(value);
9075
9075
  if (literal !== void 0) return pushPlaceholderPart(out, literal, budget);
9076
- if (isPlainObject$7(value) && Object.keys(value).length === 1) {
9076
+ if (isPlainObject$9(value) && Object.keys(value).length === 1) {
9077
9077
  const ref = value["Ref"];
9078
9078
  if (typeof ref === "string" && ref !== "") return pushPlaceholderPart(out, keyedPart({ Ref: ref }), budget);
9079
9079
  if (depth >= MAX_PLACEHOLDER_DEPTH) {
@@ -9105,7 +9105,7 @@ function appendParameterPlaceholderParts(source, out, budget, depth) {
9105
9105
  let template;
9106
9106
  let variables = {};
9107
9107
  if (typeof args === "string") template = args;
9108
- else if (Array.isArray(args) && args.length === 2 && isPlainObject$7(args[1])) {
9108
+ else if (Array.isArray(args) && args.length === 2 && isPlainObject$9(args[1])) {
9109
9109
  template = args[0];
9110
9110
  variables = args[1];
9111
9111
  } else return false;
@@ -9268,7 +9268,7 @@ function isUniquelyKeyedBy(items, key) {
9268
9268
  if (items.length === 0) return false;
9269
9269
  const seen = /* @__PURE__ */ new Set();
9270
9270
  for (const item of items) {
9271
- if (!isPlainObject$7(item) || !Object.hasOwn(item, key)) return false;
9271
+ if (!isPlainObject$9(item) || !Object.hasOwn(item, key)) return false;
9272
9272
  const id = item[key];
9273
9273
  if (typeof id !== "string" || id === "") return false;
9274
9274
  if (seen.has(id)) return false;
@@ -9296,7 +9296,7 @@ const NEVER_DROPPING_INTRINSICS = /* @__PURE__ */ new Set([
9296
9296
  ]);
9297
9297
  function arrayElementDrop(element, depth = 0) {
9298
9298
  if (depth > 16) return "unknown";
9299
- if (!isPlainObject$7(element)) return "never";
9299
+ if (!isPlainObject$9(element)) return "never";
9300
9300
  if (Object.hasOwn(element, "Ref")) return element["Ref"] === "AWS::NoValue" ? "always" : "never";
9301
9301
  const keys = Object.keys(element);
9302
9302
  if (keys.filter((key) => key.startsWith("Fn::") || key === "Condition").length === 0) return "never";
@@ -9332,7 +9332,7 @@ function keptLiteralsCorroborate(kept, bag, secrets) {
9332
9332
  return kept.every((element, i) => keptElementCorroborates(element, bag[i], secrets));
9333
9333
  }
9334
9334
  function isIntrinsicNode(value) {
9335
- if (!isPlainObject$7(value)) return false;
9335
+ if (!isPlainObject$9(value)) return false;
9336
9336
  const keys = Object.keys(value);
9337
9337
  return keys.length === 1 && (keys[0] === "Ref" || keys[0].startsWith("Fn::"));
9338
9338
  }
@@ -9345,7 +9345,7 @@ function keptElementCorroborates(source, bag, secrets, depth = 0) {
9345
9345
  if (source === null || typeof source !== "object") return source === bag;
9346
9346
  if (isIntrinsicNode(source)) return true;
9347
9347
  if (Array.isArray(source)) return Array.isArray(bag) && bag.length === source.length && source.every((element, i) => keptElementCorroborates(element, bag[i], secrets, depth + 1));
9348
- if (!isPlainObject$7(source) || !isPlainObject$7(bag)) return false;
9348
+ if (!isPlainObject$9(source) || !isPlainObject$9(bag)) return false;
9349
9349
  if (Object.keys(bag).some((key) => !Object.hasOwn(source, key))) return false;
9350
9350
  return Object.entries(source).every(([key, value]) => Object.hasOwn(bag, key) ? keptElementCorroborates(value, bag[key], secrets, depth + 1) : arrayElementDrop(value) === "always" || arrayElementDrop(value) === "maybe");
9351
9351
  }
@@ -9355,12 +9355,12 @@ function corroboratesWhateverResolves(source, depth = 0) {
9355
9355
  if (source === null || typeof source !== "object") return true;
9356
9356
  if (isIntrinsicNode(source)) return true;
9357
9357
  if (Array.isArray(source)) return source.every((element) => arrayElementDrop(element) === "never" && corroboratesWhateverResolves(element, depth + 1));
9358
- if (!isPlainObject$7(source)) return false;
9358
+ if (!isPlainObject$9(source)) return false;
9359
9359
  if (Object.keys(source).some((key) => key === "Ref" || key.startsWith("Fn::"))) return false;
9360
9360
  return Object.values(source).every((value) => arrayElementDrop(value) !== "unknown" && corroboratesWhateverResolves(value, depth + 1));
9361
9361
  }
9362
9362
  function arrayPairsWhateverDrops(source) {
9363
- if (!source.some((element) => isPlainObject$7(element) && (Object.hasOwn(element, "Fn::If") || element["Ref"] === "AWS::NoValue" || Array.isArray(element["Fn::FindInMap"]) && element["Fn::FindInMap"].length > 3))) return true;
9363
+ if (!source.some((element) => isPlainObject$9(element) && (Object.hasOwn(element, "Fn::If") || element["Ref"] === "AWS::NoValue" || Array.isArray(element["Fn::FindInMap"]) && element["Fn::FindInMap"].length > 3))) return true;
9364
9364
  return source.every((element) => corroboratesWhateverResolves(element));
9365
9365
  }
9366
9366
  function redactByPath(bag, source, secrets, rules, secretExpressions, bagIsSameGeneration) {
@@ -9377,13 +9377,13 @@ function redactByPath(bag, source, secrets, rules, secretExpressions, bagIsSameG
9377
9377
  }
9378
9378
  return positionByEmbeddedSpan(bag, source, secrets, bagIsSameGeneration);
9379
9379
  }
9380
- if ((typeof bag === "string" || Array.isArray(bag)) && isPlainObject$7(source)) {
9380
+ if ((typeof bag === "string" || Array.isArray(bag)) && isPlainObject$9(source)) {
9381
9381
  const inherited = positionByInheritedParameter(bag, source, secrets);
9382
9382
  if (inherited !== void 0) return inherited;
9383
9383
  const reread = positionByParameterReread(bag, source, secrets);
9384
9384
  if (reread !== void 0) return reread;
9385
9385
  }
9386
- if (typeof bag === "string" && isPlainObject$7(source)) {
9386
+ if (typeof bag === "string" && isPlainObject$9(source)) {
9387
9387
  const certified = positionByCrossStackSource(bag, source, secrets);
9388
9388
  if (certified !== void 0) return certified;
9389
9389
  const placeheld = positionByParameterPlaceholders(bag, source, secrets);
@@ -9393,7 +9393,7 @@ function redactByPath(bag, source, secrets, rules, secretExpressions, bagIsSameG
9393
9393
  const framed = positionByIntrinsicFrame(bag, source, secrets, secretExpressions, bagIsSameGeneration);
9394
9394
  if (framed !== void 0) return framed;
9395
9395
  }
9396
- if (Array.isArray(bag) && isPlainObject$7(source)) {
9396
+ if (Array.isArray(bag) && isPlainObject$9(source)) {
9397
9397
  const positionedList = positionListByCrossStackSource(bag, source, secrets);
9398
9398
  if (positionedList !== void 0) return positionedList;
9399
9399
  }
@@ -9428,7 +9428,7 @@ function redactByPath(bag, source, secrets, rules, secretExpressions, bagIsSameG
9428
9428
  if (kept !== void 0 && keptLiteralsCorroborate(kept, bag, secrets)) return bag.map((item, i) => redactByPath(item, kept[i], secrets, rules, secretExpressions, bagIsSameGeneration));
9429
9429
  }
9430
9430
  }
9431
- if (isPlainObject$7(bag) && hasPlainPrototype(bag) && isPlainObject$7(source)) {
9431
+ if (isPlainObject$9(bag) && hasPlainPrototype(bag) && isPlainObject$9(source)) {
9432
9432
  const out = Object.create(null);
9433
9433
  for (const [k, v] of Object.entries(bag)) {
9434
9434
  out[k] = Object.hasOwn(source, k) ? redactByPath(v, source[k], secrets, rules, secretExpressions, bagIsSameGeneration) : redactForState(v, {
@@ -9450,7 +9450,7 @@ function isReadbackProjectedFromState(rules) {
9450
9450
  function subtreeHasDynamicReference(value) {
9451
9451
  if (isDynamicReferenceString(value)) return true;
9452
9452
  if (Array.isArray(value)) return value.some(subtreeHasDynamicReference);
9453
- if (isPlainObject$7(value)) return Object.values(value).some(subtreeHasDynamicReference);
9453
+ if (isPlainObject$9(value)) return Object.values(value).some(subtreeHasDynamicReference);
9454
9454
  return false;
9455
9455
  }
9456
9456
  function pathCrossesDottedKey(bag, path) {
@@ -9487,7 +9487,7 @@ function nameScalarSecrets(value, secrets) {
9487
9487
  return secrets.has(String(node)) || byValue.has(node) ? "***" : node;
9488
9488
  }
9489
9489
  if (Array.isArray(node)) return node.map(walk);
9490
- if (isPlainObject$7(node) && hasPlainPrototype(node)) {
9490
+ if (isPlainObject$9(node) && hasPlainPrototype(node)) {
9491
9491
  const out = Object.create(null);
9492
9492
  for (const [k, v] of Object.entries(node)) out[k] = walk(v);
9493
9493
  return out;
@@ -9504,13 +9504,13 @@ function substitutionIsSecret(value) {
9504
9504
  function sentinelDefinitionOf(source) {
9505
9505
  const subs = source["DefinitionSubstitutions"];
9506
9506
  const values = /* @__PURE__ */ new Map();
9507
- if (isPlainObject$7(subs)) {
9507
+ if (isPlainObject$9(subs)) {
9508
9508
  for (const [name, value] of Object.entries(subs)) if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") values.set(name, String(value));
9509
9509
  }
9510
9510
  for (const key of ["DefinitionString", "Definition"]) {
9511
9511
  if (!Object.hasOwn(source, key)) continue;
9512
9512
  const raw = source[key];
9513
- const body = typeof raw === "string" ? raw : isPlainObject$7(raw) ? JSON.stringify(raw) : void 0;
9513
+ const body = typeof raw === "string" ? raw : isPlainObject$9(raw) ? JSON.stringify(raw) : void 0;
9514
9514
  if (body === void 0) continue;
9515
9515
  if (body.includes(SENTINEL_IN_STRING) || body.includes(SENTINEL_OUT_OF_STRING) || /\\u[eE]00[01]/.test(body)) continue;
9516
9516
  const names = [];
@@ -9581,7 +9581,7 @@ function sentinelDefinitionOf(source) {
9581
9581
  node.forEach((item, i) => walk(item, [...path, i], [...shapes, node.length]));
9582
9582
  return;
9583
9583
  }
9584
- if (isPlainObject$7(node)) {
9584
+ if (isPlainObject$9(node)) {
9585
9585
  const own = new Set(Object.keys(node).map(written));
9586
9586
  for (const [k, v] of Object.entries(node)) {
9587
9587
  if (!marked(k)) keys.add(k);
@@ -9609,7 +9609,7 @@ function alignedSecretLeaf(root, leaf) {
9609
9609
  if (!Array.isArray(cursor) || cursor.length !== shape) return void 0;
9610
9610
  cursor = cursor[segment];
9611
9611
  } else {
9612
- if (!isPlainObject$7(cursor)) return void 0;
9612
+ if (!isPlainObject$9(cursor)) return void 0;
9613
9613
  const own = Object.keys(cursor);
9614
9614
  if (own.length !== shape.size || own.some((k) => !shape.has(k))) return void 0;
9615
9615
  if (!Object.hasOwn(cursor, segment)) return void 0;
@@ -9620,7 +9620,7 @@ function alignedSecretLeaf(root, leaf) {
9620
9620
  }
9621
9621
  function collectObjectKeys(value, into) {
9622
9622
  if (Array.isArray(value)) for (const item of value) collectObjectKeys(item, into);
9623
- else if (isPlainObject$7(value)) for (const [k, v] of Object.entries(value)) {
9623
+ else if (isPlainObject$9(value)) for (const [k, v] of Object.entries(value)) {
9624
9624
  into.add(k);
9625
9625
  collectObjectKeys(v, into);
9626
9626
  }
@@ -9633,7 +9633,7 @@ function spelledKeysOf(properties) {
9633
9633
  }
9634
9634
  function someKeyIsUnspelled(value, spelled) {
9635
9635
  if (Array.isArray(value)) return value.some((item) => someKeyIsUnspelled(item, spelled));
9636
- if (isPlainObject$7(value)) return Object.entries(value).some(([k, v]) => !spelled(k) || someKeyIsUnspelled(v, spelled));
9636
+ if (isPlainObject$9(value)) return Object.entries(value).some(([k, v]) => !spelled(k) || someKeyIsUnspelled(v, spelled));
9637
9637
  return false;
9638
9638
  }
9639
9639
  function nameDefinitionSecrets(value, source, secrets) {
@@ -9728,8 +9728,8 @@ function deepEqualJsonValue(a, b) {
9728
9728
  if (!Array.isArray(b) || a.length !== b.length) return false;
9729
9729
  return a.every((item, i) => deepEqualJsonValue(item, b[i]));
9730
9730
  }
9731
- if (isPlainObject$7(a)) {
9732
- if (!isPlainObject$7(b)) return false;
9731
+ if (isPlainObject$9(a)) {
9732
+ if (!isPlainObject$9(b)) return false;
9733
9733
  if (!hasPlainPrototype(a) || !hasPlainPrototype(b)) return false;
9734
9734
  const keys = Object.keys(a);
9735
9735
  if (keys.length !== Object.keys(b).length) return false;
@@ -9746,7 +9746,7 @@ function renderedDefinitionLiterals(source) {
9746
9746
  const keyKeep = /* @__PURE__ */ new Set();
9747
9747
  const subs = source["DefinitionSubstitutions"];
9748
9748
  const scalars = [];
9749
- if (isPlainObject$7(subs)) {
9749
+ if (isPlainObject$9(subs)) {
9750
9750
  for (const [name, value] of Object.entries(subs)) if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
9751
9751
  scalars.push([name, String(value)]);
9752
9752
  if (typeof value === "string") keep.add(value);
@@ -9758,7 +9758,7 @@ function renderedDefinitionLiterals(source) {
9758
9758
  if (!Object.hasOwn(source, key)) continue;
9759
9759
  const body = source[key];
9760
9760
  if (typeof body === "string") bodies.push(body);
9761
- else if (isPlainObject$7(body)) bodies.push(JSON.stringify(body));
9761
+ else if (isPlainObject$9(body)) bodies.push(JSON.stringify(body));
9762
9762
  }
9763
9763
  for (const body of bodies) {
9764
9764
  let rendered = body;
@@ -9809,7 +9809,7 @@ function collectScalarLeaves(value, into) {
9809
9809
  return;
9810
9810
  }
9811
9811
  if (Array.isArray(value)) for (const item of value) collectScalarLeaves(item, into);
9812
- else if (isPlainObject$7(value)) for (const item of Object.values(value)) collectScalarLeaves(item, into);
9812
+ else if (isPlainObject$9(value)) for (const item of Object.values(value)) collectScalarLeaves(item, into);
9813
9813
  }
9814
9814
  function refuseUncertifiedSubtree(value, sourceLiterals, mark, scalarLiterals, seen = /* @__PURE__ */ new Map()) {
9815
9815
  if (scalarLiterals !== void 0 && (typeof value === "number" || typeof value === "boolean") && !scalarLiterals.has(value)) return mark ? POSITION_UNCERTIFIED : "***";
@@ -9827,7 +9827,7 @@ function refuseUncertifiedSubtree(value, sourceLiterals, mark, scalarLiterals, s
9827
9827
  for (const item of value) out.push(refuseUncertifiedSubtree(item, sourceLiterals, mark, scalarLiterals, seen));
9828
9828
  return out;
9829
9829
  }
9830
- if (isPlainObject$7(value) && hasPlainPrototype(value)) {
9830
+ if (isPlainObject$9(value) && hasPlainPrototype(value)) {
9831
9831
  const out = Object.create(null);
9832
9832
  seen.set(value, out);
9833
9833
  for (const [k, v] of Object.entries(value)) out[k] = refuseUncertifiedSubtree(v, sourceLiterals, mark, scalarLiterals, seen);
@@ -9854,7 +9854,7 @@ function refuseUncertifiedReadbackPositions(bag, source, secrets, failClosed, le
9854
9854
  if (learn) learnMixedLeafNeedle(learn, bag, source);
9855
9855
  return mark ? POSITION_DECIDED : source;
9856
9856
  }
9857
- if (failClosed === true && isPlainObject$7(bag) && hasPlainPrototype(bag) && isPlainObject$7(source) && Object.keys(bag).some((k) => RENDERED_DEFINITION_KEYS.has(k)) && definitionSourceCarriesSecret(source)) {
9857
+ if (failClosed === true && isPlainObject$9(bag) && hasPlainPrototype(bag) && isPlainObject$9(source) && Object.keys(bag).some((k) => RENDERED_DEFINITION_KEYS.has(k)) && definitionSourceCarriesSecret(source)) {
9858
9858
  const keep = renderedDefinitionLiterals(source);
9859
9859
  const out = Object.create(null);
9860
9860
  const rest = Object.create(null);
@@ -9888,7 +9888,7 @@ function refuseUncertifiedReadbackPositions(bag, source, secrets, failClosed, le
9888
9888
  return out;
9889
9889
  }
9890
9890
  if (!subtreeHasDynamicReference(source)) return bag;
9891
- if (isPlainObject$7(bag) && hasPlainPrototype(bag) && isPlainObject$7(source)) {
9891
+ if (isPlainObject$9(bag) && hasPlainPrototype(bag) && isPlainObject$9(source)) {
9892
9892
  const out = Object.create(null);
9893
9893
  for (const [k, v] of Object.entries(bag)) out[k] = Object.hasOwn(source, k) ? refuseUncertifiedReadbackPositions(v, source[k], secrets, failClosed, learn, mark) : v;
9894
9894
  return out;
@@ -9915,14 +9915,14 @@ function refuseUncertifiedReadbackPositions(bag, source, secrets, failClosed, le
9915
9915
  function isDistinguishingAnchor(value) {
9916
9916
  if (typeof value === "string") return value !== "";
9917
9917
  if (Array.isArray(value)) return value.some(isDistinguishingAnchor);
9918
- if (isPlainObject$7(value)) return Object.values(value).some(isDistinguishingAnchor);
9918
+ if (isPlainObject$9(value)) return Object.values(value).some(isDistinguishingAnchor);
9919
9919
  return false;
9920
9920
  }
9921
9921
  const ANCHOR_REFERENCE_MASK = "<ref>";
9922
9922
  function anchorSignature(source) {
9923
9923
  if (isDynamicReferenceString(source)) return ANCHOR_REFERENCE_MASK;
9924
9924
  if (Array.isArray(source)) return `[${source.map(anchorSignature).sort().join(",")}]`;
9925
- if (isPlainObject$7(source)) return `{${Object.keys(source).sort().map((k) => `${JSON.stringify(k)}:${anchorSignature(source[k])}`).join(",")}}`;
9925
+ if (isPlainObject$9(source)) return `{${Object.keys(source).sort().map((k) => `${JSON.stringify(k)}:${anchorSignature(source[k])}`).join(",")}}`;
9926
9926
  return JSON.stringify(source) ?? "undefined";
9927
9927
  }
9928
9928
  function anchorsCorroboratePairing(bag, source, anchors) {
@@ -9932,8 +9932,8 @@ function anchorsCorroboratePairing(bag, source, anchors) {
9932
9932
  return true;
9933
9933
  }
9934
9934
  if (isDynamicReferenceString(source)) return typeof bag === "string";
9935
- if (isPlainObject$7(source)) {
9936
- if (!isPlainObject$7(bag)) return false;
9935
+ if (isPlainObject$9(source)) {
9936
+ if (!isPlainObject$9(bag)) return false;
9937
9937
  return Object.keys(source).every((k) => Object.hasOwn(bag, k) && anchorsCorroboratePairing(bag[k], source[k], anchors));
9938
9938
  }
9939
9939
  if (Array.isArray(source)) {
@@ -10024,13 +10024,13 @@ function learnMixedLeafNeedle(collector, bag, source) {
10024
10024
  learnNeedle(collector, plaintext, token);
10025
10025
  }
10026
10026
  function asChild(marks, key) {
10027
- return isPlainObject$7(marks) && hasPlainPrototype(marks) ? marks[key] : void 0;
10027
+ return isPlainObject$9(marks) && hasPlainPrototype(marks) ? marks[key] : void 0;
10028
10028
  }
10029
10029
  function asIndex(marks, index) {
10030
10030
  return Array.isArray(marks) ? marks[index] : void 0;
10031
10031
  }
10032
10032
  function preferPositionDecisions(scanned, refused, bag, marks, inferred) {
10033
- if (isPlainObject$7(bag) && hasPlainPrototype(bag) && isPlainObject$7(refused) && isPlainObject$7(scanned)) {
10033
+ if (isPlainObject$9(bag) && hasPlainPrototype(bag) && isPlainObject$9(refused) && isPlainObject$9(scanned)) {
10034
10034
  const out = Object.create(null);
10035
10035
  for (const [k, v] of Object.entries(refused)) out[k] = preferPositionDecisions(scanned[k], v, bag[k], asChild(marks, k), inferred);
10036
10036
  return out;
@@ -11520,7 +11520,7 @@ function readsNoEchoSource(node, sources) {
11520
11520
  if (typeof argument === "string") return subStringReadsNoEcho(argument, void 0, sources);
11521
11521
  if (Array.isArray(argument)) {
11522
11522
  const [text, variables] = argument;
11523
- const vars = isPlainObject$7(variables) ? variables : void 0;
11523
+ const vars = isPlainObject$9(variables) ? variables : void 0;
11524
11524
  if (typeof text === "string" && subStringReadsNoEcho(text, vars, sources)) return true;
11525
11525
  return vars !== void 0 && Object.values(vars).some(walk);
11526
11526
  }
@@ -11554,7 +11554,7 @@ function noEchoCoordinatesOf(template, resolved, sources, onCoordinate) {
11554
11554
  parameters: sources.parameters,
11555
11555
  ...sources.conditions !== void 0 && { conditions: sources.conditions }
11556
11556
  };
11557
- const isBareDeclaredGetAtt = (node) => isPlainObject$7(node) && intrinsicKeyOf(node) === "Fn::GetAtt" && getAttReadsNoEcho(node["Fn::GetAtt"], sources);
11557
+ const isBareDeclaredGetAtt = (node) => isPlainObject$9(node) && intrinsicKeyOf(node) === "Fn::GetAtt" && getAttReadsNoEcho(node["Fn::GetAtt"], sources);
11558
11558
  const walk = (source, value, path) => {
11559
11559
  if (value === void 0) return;
11560
11560
  if (source === null || typeof source !== "object") return;
@@ -11570,7 +11570,7 @@ function noEchoCoordinatesOf(template, resolved, sources, onCoordinate) {
11570
11570
  const record = source;
11571
11571
  const intrinsic = intrinsicKeyOf(record);
11572
11572
  if (intrinsic === void 0) {
11573
- if (!isPlainObject$7(value)) {
11573
+ if (!isPlainObject$9(value)) {
11574
11574
  if (readsNoEchoSource(record, parametersOnly)) push(path, source);
11575
11575
  return;
11576
11576
  }
@@ -11619,7 +11619,7 @@ function noEchoParameterNodesAt(templateProperties, shape, noEchoParameters, con
11619
11619
  noEchoCoordinatesOf(templateProperties ?? {}, shape, {
11620
11620
  parameters: noEchoParameters,
11621
11621
  ...conditions !== void 0 && { conditions }
11622
- }, (coordinate, node) => nodes.set(canonicalJson$3(coordinate), {
11622
+ }, (coordinate, node) => nodes.set(canonicalJson$4(coordinate), {
11623
11623
  coordinate,
11624
11624
  node
11625
11625
  }));
@@ -11631,7 +11631,7 @@ function recordedNoEchoValuesOf(templateProperties, record, noEchoParameterNames
11631
11631
  if (properties === null || typeof properties !== "object") return bag;
11632
11632
  const coordinates = /* @__PURE__ */ new Map();
11633
11633
  if (noEchoParameterNames.size > 0 && templateProperties !== void 0) for (const [key, { coordinate }] of noEchoParameterNodesAt(templateProperties, properties, noEchoParameterNames, conditions)) coordinates.set(key, coordinate);
11634
- for (const coordinate of noEchoLeavesOf(record ?? {}) ?? []) coordinates.set(canonicalJson$3(coordinate), coordinate);
11634
+ for (const coordinate of noEchoLeavesOf(record ?? {}) ?? []) coordinates.set(canonicalJson$4(coordinate), coordinate);
11635
11635
  const recordLeaf = (leaf) => {
11636
11636
  if (typeof leaf === "string") {
11637
11637
  if (leaf === "***" || leaf.includes("{{resolve:")) return;
@@ -11655,7 +11655,7 @@ function maskWholeValue(value) {
11655
11655
  if (value === null || value === void 0) return value;
11656
11656
  if (typeof value === "string" && isSingleDynamicReferenceToken(value)) return value;
11657
11657
  if (Array.isArray(value)) return value.map(maskWholeValue);
11658
- if (isPlainObject$7(value)) {
11658
+ if (isPlainObject$9(value)) {
11659
11659
  const out = {};
11660
11660
  for (const [key, child] of Object.entries(value)) Object.defineProperty(out, key, {
11661
11661
  value: maskWholeValue(child),
@@ -11678,7 +11678,7 @@ function readAt(bag, coordinate) {
11678
11678
  node = node[segment];
11679
11679
  continue;
11680
11680
  }
11681
- if (!isPlainObject$7(node) || !Object.hasOwn(node, segment)) return {
11681
+ if (!isPlainObject$9(node) || !Object.hasOwn(node, segment)) return {
11682
11682
  found: false,
11683
11683
  value: void 0
11684
11684
  };
@@ -11694,7 +11694,7 @@ function valueAtCoordinate(bag, coordinate) {
11694
11694
  }
11695
11695
  function cloneContainer(node) {
11696
11696
  if (Array.isArray(node)) return [...node];
11697
- if (isPlainObject$7(node)) return { ...node };
11697
+ if (isPlainObject$9(node)) return { ...node };
11698
11698
  return node;
11699
11699
  }
11700
11700
  function maskAtCoordinates(bag, coordinates) {
@@ -11761,20 +11761,20 @@ function readbackPathFor(readback, properties, coordinate) {
11761
11761
  if (!Array.isArray(live)) return path.length === 0 ? void 0 : path;
11762
11762
  const key = Array.isArray(desired) ? identityKeyFor(live, desired) : void 0;
11763
11763
  const element = Array.isArray(desired) ? desired[segment] : void 0;
11764
- if (key === void 0 || !isPlainObject$7(element)) return path;
11764
+ if (key === void 0 || !isPlainObject$9(element)) return path;
11765
11765
  const identity = element[key];
11766
- const index = live.findIndex((item) => isPlainObject$7(item) && item[key] === identity);
11766
+ const index = live.findIndex((item) => isPlainObject$9(item) && item[key] === identity);
11767
11767
  if (index < 0) return path;
11768
11768
  path.push(index);
11769
11769
  live = live[index];
11770
11770
  desired = element;
11771
11771
  continue;
11772
11772
  }
11773
- if (!isPlainObject$7(live)) return path.length === 0 ? void 0 : path;
11773
+ if (!isPlainObject$9(live)) return path.length === 0 ? void 0 : path;
11774
11774
  if (!Object.hasOwn(live, segment)) return void 0;
11775
11775
  path.push(segment);
11776
11776
  live = live[segment];
11777
- desired = isPlainObject$7(desired) ? desired[segment] : void 0;
11777
+ desired = isPlainObject$9(desired) ? desired[segment] : void 0;
11778
11778
  }
11779
11779
  return path;
11780
11780
  }
@@ -11803,7 +11803,7 @@ function witnessNormalize(stored, today, v11) {
11803
11803
  const confirmed = [];
11804
11804
  const differing = [];
11805
11805
  const walk = (s, t, v, path) => {
11806
- if (v !== "***" && containsMask(v) && (Array.isArray(v) ? !Array.isArray(s) || s.length !== v.length : isPlainObject$7(v) ? !isPlainObject$7(s) : false)) {
11806
+ if (v !== "***" && containsMask(v) && (Array.isArray(v) ? !Array.isArray(s) || s.length !== v.length : isPlainObject$9(v) ? !isPlainObject$9(s) : false)) {
11807
11807
  if (s === void 0 || containsMask(s)) return s;
11808
11808
  if (jsonEqual(s, t)) {
11809
11809
  confirmed.push(path);
@@ -11832,8 +11832,8 @@ function witnessNormalize(stored, today, v11) {
11832
11832
  });
11833
11833
  return changed ? out : s;
11834
11834
  }
11835
- if (isPlainObject$7(v) && isPlainObject$7(s)) {
11836
- const tt = isPlainObject$7(t) ? t : {};
11835
+ if (isPlainObject$9(v) && isPlainObject$9(s)) {
11836
+ const tt = isPlainObject$9(t) ? t : {};
11837
11837
  let out;
11838
11838
  for (const key of Object.keys(v)) {
11839
11839
  if (!Object.hasOwn(s, key)) continue;
@@ -11856,13 +11856,13 @@ function witnessNormalize(stored, today, v11) {
11856
11856
  function containsMask(value) {
11857
11857
  if (value === "***") return true;
11858
11858
  if (Array.isArray(value)) return value.some(containsMask);
11859
- if (isPlainObject$7(value)) return Object.values(value).some(containsMask);
11859
+ if (isPlainObject$9(value)) return Object.values(value).some(containsMask);
11860
11860
  return false;
11861
11861
  }
11862
11862
  function jsonEqual(a, b) {
11863
- return canonicalJson$3(a) === canonicalJson$3(b);
11863
+ return canonicalJson$4(a) === canonicalJson$4(b);
11864
11864
  }
11865
- function canonicalJson$3(value) {
11865
+ function canonicalJson$4(value) {
11866
11866
  return JSON.stringify(value, (_key, node) => {
11867
11867
  if (node === null || typeof node !== "object" || Array.isArray(node)) return node;
11868
11868
  const sorted = Object.create(null);
@@ -11900,7 +11900,7 @@ function noEchoComparison(options) {
11900
11900
  const out = node.map(walk);
11901
11901
  return out.some((item, i) => item !== node[i]) ? out : node;
11902
11902
  }
11903
- if (isPlainObject$7(node)) {
11903
+ if (isPlainObject$9(node)) {
11904
11904
  let out;
11905
11905
  for (const [key, child] of Object.entries(node)) {
11906
11906
  const next = walk(child);
@@ -11943,8 +11943,8 @@ function noEchoOutputsComparison(templateValues, sources) {
11943
11943
  return (current, desired) => {
11944
11944
  const coordinates = noEchoCoordinatesOf(templateValues, desired, sources);
11945
11945
  const maskedKeys = new Set(coordinates.map((coordinate) => coordinate[0]).filter((key) => typeof key === "string"));
11946
- const maskedValues = new Set([...maskedKeys].map((key) => canonicalJson$3(desired[key])));
11947
- for (const key of Object.keys(desired)) if (!Object.hasOwn(templateValues, key) && maskedValues.has(canonicalJson$3(desired[key]))) maskedKeys.add(key);
11946
+ const maskedValues = new Set([...maskedKeys].map((key) => canonicalJson$4(desired[key])));
11947
+ for (const key of Object.keys(desired)) if (!Object.hasOwn(templateValues, key) && maskedValues.has(canonicalJson$4(desired[key]))) maskedKeys.add(key);
11948
11948
  if (maskedKeys.size === 0) return {
11949
11949
  current,
11950
11950
  desired,
@@ -11958,7 +11958,7 @@ function noEchoOutputsComparison(templateValues, sources) {
11958
11958
  const stored = current[key];
11959
11959
  if (containsMask(stored)) continue;
11960
11960
  normalized = { ...normalized ?? {} };
11961
- normalized[key] = canonicalJson$3(stored) === canonicalJson$3(desired[key]) ? maskedDesired[key] : PREVIOUS_NOECHO_VALUE;
11961
+ normalized[key] = canonicalJson$4(stored) === canonicalJson$4(desired[key]) ? maskedDesired[key] : PREVIOUS_NOECHO_VALUE;
11962
11962
  }
11963
11963
  return {
11964
11964
  current: normalized,
@@ -12614,6 +12614,39 @@ function glueTableNameChanged(oldValue, newValue) {
12614
12614
  if (oldName === void 0 || newName === void 0) return false;
12615
12615
  return oldName.toLowerCase() !== newName.toLowerCase();
12616
12616
  }
12617
+ function natZoneAddressesAddedToAutomaticGateway(oldValue, newValue) {
12618
+ return oldValue == null && newValue != null;
12619
+ }
12620
+ function ecsServiceLaunchTypeSetOrChanged(oldValue, newValue) {
12621
+ return newValue != null && !isDeepStrictEqual(oldValue, newValue);
12622
+ }
12623
+ const EMR_INSTANCES_IN_PLACE_MEMBERS = ["TerminationProtected", "UnhealthyNodeReplacement"];
12624
+ const EMR_GROUP_IN_PLACE_MEMBERS = ["InstanceCount", "AutoScalingPolicy"];
12625
+ const EMR_FLEET_IN_PLACE_MEMBERS = ["TargetOnDemandCapacity", "TargetSpotCapacity"];
12626
+ function withoutKeys(value, keys) {
12627
+ if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
12628
+ const copy = { ...value };
12629
+ for (const key of keys) delete copy[key];
12630
+ return copy;
12631
+ }
12632
+ function emrInstancesReplacingPart(value) {
12633
+ if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
12634
+ const instances = withoutKeys(value, EMR_INSTANCES_IN_PLACE_MEMBERS);
12635
+ const strip = (key, keys) => {
12636
+ if (!(key in instances)) return;
12637
+ const member = instances[key];
12638
+ instances[key] = Array.isArray(member) ? member.map((entry) => withoutKeys(entry, keys)) : withoutKeys(member, keys);
12639
+ };
12640
+ strip("CoreInstanceGroup", EMR_GROUP_IN_PLACE_MEMBERS);
12641
+ strip("TaskInstanceGroups", EMR_GROUP_IN_PLACE_MEMBERS);
12642
+ strip("CoreInstanceFleet", EMR_FLEET_IN_PLACE_MEMBERS);
12643
+ strip("TaskInstanceFleets", EMR_FLEET_IN_PLACE_MEMBERS);
12644
+ return instances;
12645
+ }
12646
+ function emrClusterInstancesReplaced(oldValue, newValue) {
12647
+ if (oldValue === void 0 && newValue === void 0) return true;
12648
+ return !isDeepStrictEqual(emrInstancesReplacingPart(oldValue), emrInstancesReplacingPart(newValue));
12649
+ }
12617
12650
  var ReplacementRulesRegistry = class {
12618
12651
  logger = getLogger().child("ReplacementRulesRegistry");
12619
12652
  rules = /* @__PURE__ */ new Map();
@@ -12938,6 +12971,10 @@ var ReplacementRulesRegistry = class {
12938
12971
  "KeyName",
12939
12972
  "NetworkInterfaces"
12940
12973
  ]) });
12974
+ this.rules.set("AWS::EC2::NatGateway", {
12975
+ replacementProperties: /* @__PURE__ */ new Set(),
12976
+ conditionalReplacements: /* @__PURE__ */ new Map([["AvailabilityZoneAddresses", natZoneAddressesAddedToAutomaticGateway]])
12977
+ });
12941
12978
  this.rules.set("AWS::EC2::Volume", {
12942
12979
  replacementProperties: /* @__PURE__ */ new Set([
12943
12980
  "AvailabilityZone",
@@ -12967,6 +13004,14 @@ var ReplacementRulesRegistry = class {
12967
13004
  "TaskRoleArn",
12968
13005
  "Volumes"
12969
13006
  ]) });
13007
+ this.rules.set("AWS::ECS::Service", {
13008
+ replacementProperties: /* @__PURE__ */ new Set(),
13009
+ conditionalReplacements: /* @__PURE__ */ new Map([["LaunchType", ecsServiceLaunchTypeSetOrChanged]])
13010
+ });
13011
+ this.rules.set("AWS::EMR::Cluster", {
13012
+ replacementProperties: /* @__PURE__ */ new Set(),
13013
+ conditionalReplacements: /* @__PURE__ */ new Map([["Instances", emrClusterInstancesReplaced]])
13014
+ });
12970
13015
  this.rules.set("AWS::ElasticLoadBalancingV2::ListenerRule", { replacementProperties: /* @__PURE__ */ new Set(["ListenerArn"]) });
12971
13016
  this.logger.debug(`Initialized replacement rules for ${this.rules.size} resource types`);
12972
13017
  }
@@ -14846,7 +14891,7 @@ function probeFoundSameId(resourceType, a, b) {
14846
14891
  //#region src/provisioning/config-shape.ts
14847
14892
  function readConfigString(container, key, fallback, containerPath, options) {
14848
14893
  if (container === void 0 || container === null) return fallback;
14849
- if (!isPlainObject$6(container) || isUnresolvedIntrinsicContainer(container)) {
14894
+ if (!isPlainObject$8(container) || isUnresolvedIntrinsicContainer(container)) {
14850
14895
  const detail = malformedShapeDetail(container);
14851
14896
  if (options?.onUnusable) {
14852
14897
  const named = fallback === "" ? "" : ` (${fallback})`;
@@ -14886,7 +14931,7 @@ function requireConfigArray(value, path, options) {
14886
14931
  return value;
14887
14932
  }
14888
14933
  function requireConfigObject(value, path, options) {
14889
- if (!isPlainObject$6(value) || isUnresolvedIntrinsicContainer(value)) {
14934
+ if (!isPlainObject$8(value) || isUnresolvedIntrinsicContainer(value)) {
14890
14935
  const detail = malformedShapeDetail(value);
14891
14936
  if (options?.onUnusable) {
14892
14937
  options.onUnusable(`${path} must be an object ${detail}. Leaving this configuration unapplied here; the same value is REFUSED on a template-path create.`);
@@ -14898,7 +14943,7 @@ function requireConfigObject(value, path, options) {
14898
14943
  }
14899
14944
  function configStringRefusal(container, key, fallback, containerPath, options) {
14900
14945
  if (container === void 0 || container === null) return void 0;
14901
- if (!isPlainObject$6(container) || isUnresolvedIntrinsicContainer(container)) return `${containerPath} must be an object ${malformedShapeDetail(container)}`;
14946
+ if (!isPlainObject$8(container) || isUnresolvedIntrinsicContainer(container)) return `${containerPath} must be an object ${malformedShapeDetail(container)}`;
14902
14947
  return configValueRefusal(container[key], fallback, `${containerPath}.${key}`, options);
14903
14948
  }
14904
14949
  function coerceCfnBoolean(value) {
@@ -14911,7 +14956,7 @@ function coerceCfnBoolean(value) {
14911
14956
  }
14912
14957
  function configBooleanRefusal(container, key, containerPath) {
14913
14958
  if (container === void 0 || container === null) return void 0;
14914
- if (!isPlainObject$6(container) || isUnresolvedIntrinsicContainer(container)) return `${containerPath} must be an object ${malformedShapeDetail(container)}`;
14959
+ if (!isPlainObject$8(container) || isUnresolvedIntrinsicContainer(container)) return `${containerPath} must be an object ${malformedShapeDetail(container)}`;
14915
14960
  const value = container[key];
14916
14961
  if (value === void 0) return void 0;
14917
14962
  if (coerceCfnBoolean(value) !== void 0) return void 0;
@@ -14925,7 +14970,7 @@ function coerceCfnInteger(value) {
14925
14970
  }
14926
14971
  function configIntegerRefusal(container, key, containerPath, min, max) {
14927
14972
  if (container === void 0 || container === null) return void 0;
14928
- if (!isPlainObject$6(container) || isUnresolvedIntrinsicContainer(container)) return `${containerPath} must be an object ${malformedShapeDetail(container)}`;
14973
+ if (!isPlainObject$8(container) || isUnresolvedIntrinsicContainer(container)) return `${containerPath} must be an object ${malformedShapeDetail(container)}`;
14929
14974
  const value = container[key];
14930
14975
  if (value === void 0) return void 0;
14931
14976
  const n = coerceCfnInteger(value);
@@ -14939,10 +14984,10 @@ function configValueRefusal(value, fallback, path, options) {
14939
14984
  if (typeof value !== "string" || value.trim() === "") return `${path} must be a non-empty string ${malformedShapeDetail(value)}`;
14940
14985
  }
14941
14986
  function malformedShapeDetail(value) {
14942
- if (isPlainObject$6(value) && isUnresolvedIntrinsicContainer(value)) return `(got ${describe(value)} — nothing substituted it before this call)`;
14987
+ if (isPlainObject$8(value) && isUnresolvedIntrinsicContainer(value)) return `(got ${describe(value)} — nothing substituted it before this call)`;
14943
14988
  return `(got ${describe(value)}) — check for an unresolved intrinsic or a mis-nested template value`;
14944
14989
  }
14945
- function isPlainObject$6(value) {
14990
+ function isPlainObject$8(value) {
14946
14991
  return typeof value === "object" && value !== null && !Array.isArray(value);
14947
14992
  }
14948
14993
  const NAMEABLE_INTRINSIC_KEYS = /* @__PURE__ */ new Set([
@@ -14969,7 +15014,7 @@ function describe(value) {
14969
15014
  if (value === null) return "null";
14970
15015
  if (Array.isArray(value)) return "an array";
14971
15016
  if (typeof value === "string") return value.trim() === "" ? "a blank string" : "a string";
14972
- if (isPlainObject$6(value) && isUnresolvedIntrinsicContainer(value)) {
15017
+ if (isPlainObject$8(value) && isUnresolvedIntrinsicContainer(value)) {
14973
15018
  const key = Object.keys(value)[0];
14974
15019
  return NAMEABLE_INTRINSIC_KEYS.has(key) ? `an unresolved ${key} intrinsic` : "an unresolved intrinsic";
14975
15020
  }
@@ -15146,6 +15191,7 @@ const STATEFUL_TYPES = /* @__PURE__ */ new Set([
15146
15191
  "AWS::AppConfig::ConfigurationProfile",
15147
15192
  "AWS::AIOps::InvestigationGroup",
15148
15193
  "AWS::IoTSiteWise::Workspace",
15194
+ "AWS::CloudWatch::Space",
15149
15195
  "AWS::Rbin::Rule",
15150
15196
  "AWS::SMSVOICE::PhoneNumber",
15151
15197
  "AWS::SMSVOICE::SenderId"
@@ -16680,21 +16726,19 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
16680
16726
  ["AWS::EC2::NatGateway", {
16681
16727
  handled: /* @__PURE__ */ new Set([
16682
16728
  "AllocationId",
16729
+ "AvailabilityMode",
16730
+ "AvailabilityZoneAddresses",
16683
16731
  "ConnectivityType",
16684
16732
  "PrivateIpAddress",
16685
16733
  "SecondaryAllocationIds",
16686
16734
  "SecondaryPrivateIpAddressCount",
16687
16735
  "SecondaryPrivateIpAddresses",
16688
16736
  "SubnetId",
16689
- "Tags"
16690
- ]),
16691
- silentDrop: /* @__PURE__ */ new Map([
16692
- ["AvailabilityMode", "not yet implemented by cdkd"],
16693
- ["AvailabilityZoneAddresses", "not yet implemented by cdkd"],
16694
- ["MaxDrainDurationSeconds", "write-only address-drain timeout with no CreateNatGateway member and no NAT gateway modify API; only ec2:DisassociateNatGatewayAddress / UnassignPrivateNatGatewayAddress accept it, and cdkd rejects NatGateway updates outright — routed via Cloud Control instead"],
16695
- ["VpcId", "AWS derives the VPC from SubnetId; the ec2:CreateNatGateway API has no VpcId parameter"]
16737
+ "Tags",
16738
+ "VpcId"
16696
16739
  ]),
16697
- createOnlyDrops: /* @__PURE__ */ new Set(["AvailabilityMode", "VpcId"]),
16740
+ silentDrop: /* @__PURE__ */ new Map([["MaxDrainDurationSeconds", "write-only address-drain timeout with no CreateNatGateway member and no NAT gateway modify API; only ec2:DisassociateNatGatewayAddress / UnassignPrivateNatGatewayAddress accept it, and the cdkd NatGateway update releases only the AvailabilityZoneAddresses of a regional gateway, never the secondary addresses of a zonal one — routed via Cloud Control instead"]]),
16741
+ createOnlyDrops: /* @__PURE__ */ new Set(),
16698
16742
  readOnly: /* @__PURE__ */ new Set([
16699
16743
  "AutoProvisionZones",
16700
16744
  "AutoScalingIps",
@@ -17008,19 +17052,14 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
17008
17052
  ["AWS::EFS::MountTarget", {
17009
17053
  handled: /* @__PURE__ */ new Set([
17010
17054
  "FileSystemId",
17011
- "SecurityGroups",
17012
- "SubnetId"
17013
- ]),
17014
- silentDrop: /* @__PURE__ */ new Map([
17015
- ["IpAddress", "not yet implemented by cdkd"],
17016
- ["IpAddressType", "not yet implemented by cdkd"],
17017
- ["Ipv6Address", "not yet implemented by cdkd"]
17018
- ]),
17019
- createOnlyDrops: /* @__PURE__ */ new Set([
17020
17055
  "IpAddress",
17021
17056
  "IpAddressType",
17022
- "Ipv6Address"
17057
+ "Ipv6Address",
17058
+ "SecurityGroups",
17059
+ "SubnetId"
17023
17060
  ]),
17061
+ silentDrop: /* @__PURE__ */ new Map(),
17062
+ createOnlyDrops: /* @__PURE__ */ new Set(),
17024
17063
  readOnly: /* @__PURE__ */ new Set(["Id"]),
17025
17064
  ccRouteUnavailable: false
17026
17065
  }],
@@ -18244,6 +18283,7 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
18244
18283
  }],
18245
18284
  ["AWS::Route53::HostedZone", {
18246
18285
  handled: /* @__PURE__ */ new Set([
18286
+ "DelegationSetId",
18247
18287
  "HostedZoneConfig",
18248
18288
  "HostedZoneFeatures",
18249
18289
  "HostedZoneTags",
@@ -18251,8 +18291,8 @@ const PROPERTY_COVERAGE_BY_TYPE = /* @__PURE__ */ new Map([
18251
18291
  "QueryLoggingConfig",
18252
18292
  "VPCs"
18253
18293
  ]),
18254
- silentDrop: /* @__PURE__ */ new Map([["DelegationSetId", "not yet implemented by cdkd"]]),
18255
- createOnlyDrops: /* @__PURE__ */ new Set(["DelegationSetId"]),
18294
+ silentDrop: /* @__PURE__ */ new Map(),
18295
+ createOnlyDrops: /* @__PURE__ */ new Set(),
18256
18296
  readOnly: /* @__PURE__ */ new Set(["Id", "NameServers"]),
18257
18297
  ccRouteUnavailable: false
18258
18298
  }],
@@ -19976,12 +20016,12 @@ function declaresNoEcho(definition) {
19976
20016
  //#region src/deployment/masked-property-fingerprints.ts
19977
20017
  const FINGERPRINT_LAYOUT$1 = 1;
19978
20018
  const INPUT_FINGERPRINT_LAYOUT = 2;
19979
- function canonicalJson$2(value) {
20019
+ function canonicalJson$3(value) {
19980
20020
  if (value === void 0) return "null";
19981
- if (Array.isArray(value)) return `[${value.map(canonicalJson$2).join(",")}]`;
20021
+ if (Array.isArray(value)) return `[${value.map(canonicalJson$3).join(",")}]`;
19982
20022
  if (value !== null && typeof value === "object") {
19983
20023
  const record = value;
19984
- return `{${Object.keys(record).filter((key) => record[key] !== void 0).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson$2(record[key])}`).join(",")}}`;
20024
+ return `{${Object.keys(record).filter((key) => record[key] !== void 0).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson$3(record[key])}`).join(",")}}`;
19985
20025
  }
19986
20026
  return JSON.stringify(value) ?? "null";
19987
20027
  }
@@ -20002,7 +20042,7 @@ function splitInputFingerprint(entry) {
20002
20042
  };
20003
20043
  }
20004
20044
  function templateCarriesNeedle(templateValue, secrets) {
20005
- const text = canonicalJson$2(templateValue);
20045
+ const text = canonicalJson$3(templateValue);
20006
20046
  for (const needle of printingCorpusOf(secrets).keys()) {
20007
20047
  if (needle.length < 4) continue;
20008
20048
  if (text.includes(needle) || text.includes(JSON.stringify(needle).slice(1, -1))) return true;
@@ -20010,14 +20050,14 @@ function templateCarriesNeedle(templateValue, secrets) {
20010
20050
  return false;
20011
20051
  }
20012
20052
  function maskedPropertyFingerprint(templateValue) {
20013
- const digest = createHash("sha256").update(canonicalJson$2({
20053
+ const digest = createHash("sha256").update(canonicalJson$3({
20014
20054
  layout: FINGERPRINT_LAYOUT$1,
20015
20055
  value: templateValue
20016
20056
  })).digest("hex");
20017
20057
  return `${FINGERPRINT_PREFIX}${digest}`;
20018
20058
  }
20019
20059
  var UnknownInput = class extends Error {};
20020
- function isPlainObject$5(value) {
20060
+ function isPlainObject$7(value) {
20021
20061
  return value !== null && typeof value === "object" && !Array.isArray(value);
20022
20062
  }
20023
20063
  const DYNAMIC_REFERENCE_OPEN = "{{resolve:";
@@ -20025,7 +20065,7 @@ const NESTED_STACK_TYPE$4 = "AWS::CloudFormation::Stack";
20025
20065
  const NESTED_OUTPUT_PREFIX = "Outputs.";
20026
20066
  function carriesSecretValue(value, corpora) {
20027
20067
  if (carriesSecretMask(value)) return true;
20028
- const text = canonicalJson$2(value);
20068
+ const text = canonicalJson$3(value);
20029
20069
  if (text.includes(DYNAMIC_REFERENCE_OPEN)) return true;
20030
20070
  for (const corpus of corpora) {
20031
20071
  if (corpus === void 0) continue;
@@ -20037,7 +20077,7 @@ function carriesSecretValue(value, corpora) {
20037
20077
  return false;
20038
20078
  }
20039
20079
  function parameterInputsFor(args) {
20040
- const declared = isPlainObject$5(args.template.Parameters) ? args.template.Parameters : {};
20080
+ const declared = isPlainObject$7(args.template.Parameters) ? args.template.Parameters : {};
20041
20081
  const values = args.values ?? {};
20042
20082
  const inputs = /* @__PURE__ */ new Map();
20043
20083
  const bound = {};
@@ -20048,7 +20088,7 @@ function parameterInputsFor(args) {
20048
20088
  continue;
20049
20089
  }
20050
20090
  const value = values[name];
20051
- let secret = isPlainObject$5(definition) && declaresNoEcho(definition) || carriesSecretValue(value, []);
20091
+ let secret = isPlainObject$7(definition) && declaresNoEcho(definition) || carriesSecretValue(value, []);
20052
20092
  if (!secret && args.nestedChild === true && args.supplied !== void 0) {
20053
20093
  if (Object.hasOwn(args.supplied, name)) {
20054
20094
  const passed = args.passedClasses?.get(name);
@@ -20099,7 +20139,7 @@ function intrinsicKey(value) {
20099
20139
  const OPAQUE_ATTRIBUTE_TYPES = /* @__PURE__ */ new Set(["AWS::CloudFormation::CustomResource", NESTED_STACK_TYPE$4]);
20100
20140
  function hasOpaqueAttributes(logicalId, walk) {
20101
20141
  const definition = walk.resources[logicalId];
20102
- const type = isPlainObject$5(definition) ? definition["Type"] : void 0;
20142
+ const type = isPlainObject$7(definition) ? definition["Type"] : void 0;
20103
20143
  return typeof type === "string" && (type.startsWith("Custom::") || OPAQUE_ATTRIBUTE_TYPES.has(type));
20104
20144
  }
20105
20145
  function getAttTarget(operand) {
@@ -20124,7 +20164,7 @@ function taintOf(logicalId, walk) {
20124
20164
  const visit = (value) => {
20125
20165
  if (typeof value === "string") return value.includes(DYNAMIC_REFERENCE_OPEN);
20126
20166
  if (Array.isArray(value)) return value.some(visit);
20127
- if (!isPlainObject$5(value)) return false;
20167
+ if (!isPlainObject$7(value)) return false;
20128
20168
  const key = intrinsicKey(value);
20129
20169
  const operand = key === void 0 ? void 0 : value[key];
20130
20170
  let verdict = "clean";
@@ -20136,7 +20176,7 @@ function taintOf(logicalId, walk) {
20136
20176
  else if (key === "Fn::FindInMap" && mapReadClass(operand, walk.sources.template) !== "clean") verdict = "tainted";
20137
20177
  else if (key === "Fn::Sub") {
20138
20178
  const text = Array.isArray(operand) ? operand[0] : operand;
20139
- const vars = Array.isArray(operand) && isPlainObject$5(operand[1]) ? operand[1] : {};
20179
+ const vars = Array.isArray(operand) && isPlainObject$7(operand[1]) ? operand[1] : {};
20140
20180
  if (typeof text === "string") for (const name of subPlaceholders(text)) {
20141
20181
  if (Object.hasOwn(vars, name)) continue;
20142
20182
  const owner = name.includes(".") ? name.split(".")[0] : name;
@@ -20150,7 +20190,7 @@ function taintOf(logicalId, walk) {
20150
20190
  return Object.values(value).some(visit);
20151
20191
  };
20152
20192
  const definition = walk.resources[logicalId];
20153
- const result = visit(isPlainObject$5(definition) ? definition["Properties"] : void 0) ? "tainted" : unknown ? "unknown" : "clean";
20193
+ const result = visit(isPlainObject$7(definition) ? definition["Properties"] : void 0) ? "tainted" : unknown ? "unknown" : "clean";
20154
20194
  walk.inProgress.delete(logicalId);
20155
20195
  walk.taint.set(logicalId, result);
20156
20196
  return result;
@@ -20166,7 +20206,7 @@ function conditionInput(name, walk) {
20166
20206
  return typeof verdict === "boolean" ? verdict : "unknown";
20167
20207
  }
20168
20208
  function conditionClosure(name, walk) {
20169
- const definitions = isPlainObject$5(walk.sources.template.Conditions) ? walk.sources.template.Conditions : {};
20209
+ const definitions = isPlainObject$7(walk.sources.template.Conditions) ? walk.sources.template.Conditions : {};
20170
20210
  let secret = false;
20171
20211
  let unknown = false;
20172
20212
  let unread = false;
@@ -20181,7 +20221,7 @@ function conditionClosure(name, walk) {
20181
20221
  value.forEach(visit);
20182
20222
  return;
20183
20223
  }
20184
- if (!isPlainObject$5(value)) return;
20224
+ if (!isPlainObject$7(value)) return;
20185
20225
  const keys = Object.keys(value);
20186
20226
  if (keys.length === 1 && keys[0] === "Condition" && typeof value["Condition"] === "string") {
20187
20227
  pending.push(value["Condition"]);
@@ -20214,7 +20254,7 @@ function conditionClosure(name, walk) {
20214
20254
  if (key === "Fn::Sub") {
20215
20255
  const operand = value["Fn::Sub"];
20216
20256
  const text = Array.isArray(operand) ? operand[0] : operand;
20217
- const vars = Array.isArray(operand) && isPlainObject$5(operand[1]) ? operand[1] : {};
20257
+ const vars = Array.isArray(operand) && isPlainObject$7(operand[1]) ? operand[1] : {};
20218
20258
  if (typeof text === "string") for (const name of subPlaceholders(text)) {
20219
20259
  if (Object.hasOwn(vars, name)) continue;
20220
20260
  if (name.includes(".") && !name.startsWith("AWS::")) secret = true;
@@ -20243,8 +20283,8 @@ function mapReadClass(operand, template) {
20243
20283
  const mapName = Array.isArray(operand) ? operand[0] : void 0;
20244
20284
  if (typeof mapName !== "string") return "unknown";
20245
20285
  const mappings = template.Mappings;
20246
- const map = isPlainObject$5(mappings) && Object.hasOwn(mappings, mapName) ? mappings[mapName] : void 0;
20247
- if (!isPlainObject$5(map)) return "unknown";
20286
+ const map = isPlainObject$7(mappings) && Object.hasOwn(mappings, mapName) ? mappings[mapName] : void 0;
20287
+ if (!isPlainObject$7(map)) return "unknown";
20248
20288
  return carriesSecretValue(map, []) ? "secret" : "clean";
20249
20289
  }
20250
20290
  async function resolvedInput(node, walk) {
@@ -20312,7 +20352,7 @@ async function inputForm(value, walk) {
20312
20352
  concrete: parts.every((p) => p.concrete)
20313
20353
  };
20314
20354
  }
20315
- if (!isPlainObject$5(value)) return {
20355
+ if (!isPlainObject$7(value)) return {
20316
20356
  form: value,
20317
20357
  concrete: true
20318
20358
  };
@@ -20375,7 +20415,7 @@ async function inputForm(value, walk) {
20375
20415
  concrete: false
20376
20416
  };
20377
20417
  }
20378
- const explicit = Array.isArray(operand) && isPlainObject$5(operand[1]) ? operand[1] : {};
20418
+ const explicit = Array.isArray(operand) && isPlainObject$7(operand[1]) ? operand[1] : {};
20379
20419
  const vars = await inputForm(explicit, walk);
20380
20420
  const placeholders = [];
20381
20421
  let concrete = vars.concrete && !text.includes(DYNAMIC_REFERENCE_OPEN);
@@ -20428,8 +20468,8 @@ function newWalk(sources, nested = {
20428
20468
  }) {
20429
20469
  return {
20430
20470
  sources,
20431
- resources: isPlainObject$5(sources.template.Resources) ? sources.template.Resources : {},
20432
- parameters: isPlainObject$5(sources.template.Parameters) ? sources.template.Parameters : {},
20471
+ resources: isPlainObject$7(sources.template.Resources) ? sources.template.Resources : {},
20472
+ parameters: isPlainObject$7(sources.template.Parameters) ? sources.template.Parameters : {},
20433
20473
  taint: /* @__PURE__ */ new Map(),
20434
20474
  inProgress: /* @__PURE__ */ new Set(),
20435
20475
  stackChain: nested.stackChain,
@@ -20453,34 +20493,34 @@ function passedKey(passed) {
20453
20493
  function isNestedStackRow(logicalId, walk) {
20454
20494
  if (!Object.hasOwn(walk.resources, logicalId)) return false;
20455
20495
  const definition = walk.resources[logicalId];
20456
- return isPlainObject$5(definition) && definition["Type"] === NESTED_STACK_TYPE$4;
20496
+ return isPlainObject$7(definition) && definition["Type"] === NESTED_STACK_TYPE$4;
20457
20497
  }
20458
20498
  function getAttAttribute(operand, target) {
20459
20499
  if (Array.isArray(operand)) return operand.length === 2 && typeof operand[1] === "string" ? operand[1] : void 0;
20460
20500
  return typeof operand === "string" ? operand.slice(target.length + 1) : void 0;
20461
20501
  }
20462
20502
  function rowParameters(definition) {
20463
- const properties = isPlainObject$5(definition) ? definition["Properties"] : void 0;
20503
+ const properties = isPlainObject$7(definition) ? definition["Properties"] : void 0;
20464
20504
  if (properties === void 0) return {};
20465
- if (!isPlainObject$5(properties)) return "unknown";
20505
+ if (!isPlainObject$7(properties)) return "unknown";
20466
20506
  const parameters = properties["Parameters"];
20467
20507
  if (parameters === void 0) return {};
20468
- if (!isPlainObject$5(parameters) || intrinsicKey(parameters) !== void 0) return "unknown";
20508
+ if (!isPlainObject$7(parameters) || intrinsicKey(parameters) !== void 0) return "unknown";
20469
20509
  return parameters;
20470
20510
  }
20471
20511
  function childParameterInputs(template, passed) {
20472
- const declared = isPlainObject$5(template.Parameters) ? template.Parameters : {};
20512
+ const declared = isPlainObject$7(template.Parameters) ? template.Parameters : {};
20473
20513
  const inputs = /* @__PURE__ */ new Map();
20474
20514
  for (const name of Object.keys(declared)) {
20475
20515
  const definition = declared[name];
20476
- if (isPlainObject$5(definition) && declaresNoEcho(definition)) inputs.set(name, { kind: "secret" });
20516
+ if (isPlainObject$7(definition) && declaresNoEcho(definition)) inputs.set(name, { kind: "secret" });
20477
20517
  else if (passed.has(name)) {
20478
20518
  const passedClass = passed.get(name);
20479
20519
  inputs.set(name, passedClass === "clean" ? {
20480
20520
  kind: "value",
20481
20521
  value: void 0
20482
20522
  } : passedClass === "unknown" ? { kind: "unknown" } : { kind: "secret" });
20483
- } else if (isPlainObject$5(definition) && Object.hasOwn(definition, "Default") && !carriesSecretValue(definition["Default"], [])) inputs.set(name, {
20523
+ } else if (isPlainObject$7(definition) && Object.hasOwn(definition, "Default") && !carriesSecretValue(definition["Default"], [])) inputs.set(name, {
20484
20524
  kind: "value",
20485
20525
  value: definition["Default"]
20486
20526
  });
@@ -20497,7 +20537,7 @@ function closureClass(closure) {
20497
20537
  return closure.unread ? "unread" : "clean";
20498
20538
  }
20499
20539
  async function childOutputClass(loaded, outputName, passed, chain, shared) {
20500
- if (loaded === void 0 || !isPlainObject$5(loaded.template)) return "unknown";
20540
+ if (loaded === void 0 || !isPlainObject$7(loaded.template)) return "unknown";
20501
20541
  const scopeKey = JSON.stringify([loaded.identity, passedKey(passed)]);
20502
20542
  const memoKey = JSON.stringify([scopeKey, outputName]);
20503
20543
  const memo = shared.outputs.get(memoKey);
@@ -20510,8 +20550,8 @@ async function classifyChildOutput(loaded, outputName, passed, chain, shared, sc
20510
20550
  if (++shared.steps > MAX_NESTED_OUTPUT_STEPS) return "unknown";
20511
20551
  if (chain.includes(loaded.identity) || chain.length >= MAX_NESTED_OUTPUT_DEPTH) return "unknown";
20512
20552
  const template = loaded.template;
20513
- const output = (isPlainObject$5(template.Outputs) ? template.Outputs : {})[outputName];
20514
- if (!isPlainObject$5(output) || !Object.hasOwn(output, "Value")) return "unknown";
20553
+ const output = (isPlainObject$7(template.Outputs) ? template.Outputs : {})[outputName];
20554
+ if (!isPlainObject$7(output) || !Object.hasOwn(output, "Value")) return "unknown";
20515
20555
  const scope = {
20516
20556
  walk: newWalk({
20517
20557
  template,
@@ -20583,7 +20623,7 @@ async function expressionClass(value, scope) {
20583
20623
  return result;
20584
20624
  };
20585
20625
  if (Array.isArray(value)) return all(value);
20586
- if (!isPlainObject$5(value)) return "clean";
20626
+ if (!isPlainObject$7(value)) return "clean";
20587
20627
  const key = intrinsicKey(value);
20588
20628
  if (key === void 0) return all(Object.values(value));
20589
20629
  const operand = value[key];
@@ -20598,7 +20638,7 @@ async function expressionClass(value, scope) {
20598
20638
  case "Fn::Sub": {
20599
20639
  const text = Array.isArray(operand) ? operand[0] : operand;
20600
20640
  if (typeof text !== "string") return worseOf("unknown", await expressionClass(operand, scope));
20601
- const vars = Array.isArray(operand) && isPlainObject$5(operand[1]) ? operand[1] : {};
20641
+ const vars = Array.isArray(operand) && isPlainObject$7(operand[1]) ? operand[1] : {};
20602
20642
  let result = text.includes(DYNAMIC_REFERENCE_OPEN) ? "secret" : "clean";
20603
20643
  result = worseOf(result, await all(Object.values(vars)));
20604
20644
  for (const name of subPlaceholders(text)) {
@@ -20662,7 +20702,7 @@ async function maskedInputFingerprint(templateValue, sources) {
20662
20702
  if (error instanceof UnknownInput) return void 0;
20663
20703
  throw error;
20664
20704
  }
20665
- const digest = createHash("sha256").update(canonicalJson$2({
20705
+ const digest = createHash("sha256").update(canonicalJson$3({
20666
20706
  layout: INPUT_FINGERPRINT_LAYOUT,
20667
20707
  value: form
20668
20708
  })).digest("hex");
@@ -20676,7 +20716,7 @@ async function classifyPassedParameters(parameters, sources) {
20676
20716
  }
20677
20717
  async function classifyPassed(parameters, sources, nested) {
20678
20718
  const classes = /* @__PURE__ */ new Map();
20679
- if (!isPlainObject$5(parameters)) return classes;
20719
+ if (!isPlainObject$7(parameters)) return classes;
20680
20720
  for (const [name, expression] of Object.entries(parameters)) {
20681
20721
  let passedClass;
20682
20722
  try {
@@ -20717,13 +20757,13 @@ function possiblyMaskedKeys(resolvedProps, corpora) {
20717
20757
  const wholeShortLeaf = (value) => {
20718
20758
  if (typeof value === "string") return short.includes(value);
20719
20759
  if (Array.isArray(value)) return value.some(wholeShortLeaf);
20720
- if (isPlainObject$5(value)) return Object.values(value).some(wholeShortLeaf);
20760
+ if (isPlainObject$7(value)) return Object.values(value).some(wholeShortLeaf);
20721
20761
  return false;
20722
20762
  };
20723
20763
  return Object.keys(resolvedProps).filter((key) => {
20724
20764
  const value = resolvedProps[key];
20725
20765
  if (carriesSecretMask(value) || wholeShortLeaf(value)) return true;
20726
- const text = canonicalJson$2(value);
20766
+ const text = canonicalJson$3(value);
20727
20767
  return long.some((needle) => text.includes(needle) || text.includes(JSON.stringify(needle).slice(1, -1)));
20728
20768
  });
20729
20769
  }
@@ -20748,7 +20788,7 @@ function maskedPropertyFingerprintsOf(record) {
20748
20788
  const read = /* @__PURE__ */ new Map();
20749
20789
  if (record === null || typeof record !== "object") return read;
20750
20790
  const field = record.maskedPropertyFingerprints;
20751
- if (!isPlainObject$5(field)) return read;
20791
+ if (!isPlainObject$7(field)) return read;
20752
20792
  for (const [key, value] of Object.entries(field)) if (typeof value === "string" && value.startsWith(FINGERPRINT_PREFIX)) read.set(key, value);
20753
20793
  return read;
20754
20794
  }
@@ -20756,7 +20796,7 @@ function maskedPropertyInputFingerprintsOf(record) {
20756
20796
  const read = /* @__PURE__ */ new Map();
20757
20797
  if (record === null || typeof record !== "object") return read;
20758
20798
  const field = record.maskedPropertyInputFingerprints;
20759
- if (!isPlainObject$5(field)) return read;
20799
+ if (!isPlainObject$7(field)) return read;
20760
20800
  const text = maskedPropertyFingerprintsOf(record);
20761
20801
  for (const [key, value] of Object.entries(field)) {
20762
20802
  if (typeof value !== "string" || !value.startsWith(INPUT_FINGERPRINT_PREFIX)) continue;
@@ -20803,7 +20843,7 @@ async function movedMaskedProperties(record, templateProps, fingerprinter, onReb
20803
20843
  function withRebaselinedFingerprints(record, fingerprints) {
20804
20844
  const text = maskedPropertyFingerprintsOf(record);
20805
20845
  const field = record.maskedPropertyInputFingerprints;
20806
- const next = isPlainObject$5(field) ? Object.entries(field) : [];
20846
+ const next = isPlainObject$7(field) ? Object.entries(field) : [];
20807
20847
  let changed = false;
20808
20848
  for (const [key, value] of Object.entries(fingerprints)) {
20809
20849
  if (text.get(key) !== splitInputFingerprint(value).text) continue;
@@ -20836,10 +20876,10 @@ function withMaskedPropertyFingerprints(scrubbed, writtenBag, templateProps, sec
20836
20876
  fingerprints = maskedPropertyFingerprintsFor(scrubbed.properties, templateProps);
20837
20877
  inputs = boundInputFingerprints(fingerprints, inputFingerprints);
20838
20878
  } else {
20839
- if (!isPlainObject$5(previous)) return scrubbed;
20879
+ if (!isPlainObject$7(previous)) return scrubbed;
20840
20880
  if (corpora.length === 0) return scrubbed;
20841
20881
  fingerprints = { ...previous };
20842
- inputs = isPlainObject$5(previousInputs) ? { ...previousInputs } : void 0;
20882
+ inputs = isPlainObject$7(previousInputs) ? { ...previousInputs } : void 0;
20843
20883
  }
20844
20884
  if (fingerprints !== void 0 && corpora.length > 0) {
20845
20885
  const refused = Object.keys(fingerprints).filter((key) => Object.hasOwn(templateProps, key) && corpora.some((corpus) => templateCarriesNeedle(templateProps[key], corpus)));
@@ -22180,11 +22220,11 @@ function validReferenceRegion(region) {
22180
22220
  if (typeof region !== "string") return void 0;
22181
22221
  return canonicalizeRegion(region) === region && isClientSafeRegion(region) ? region : void 0;
22182
22222
  }
22183
- function isPlainObject$4(value) {
22223
+ function isPlainObject$6(value) {
22184
22224
  return value !== null && typeof value === "object" && !Array.isArray(value);
22185
22225
  }
22186
22226
  function validateReferenceProvenance(token, raw) {
22187
- if (!isSingleDynamicReferenceToken(token) || !isPlainObject$4(raw)) return void 0;
22227
+ if (!isSingleDynamicReferenceToken(token) || !isPlainObject$6(raw)) return void 0;
22188
22228
  const versionsRaw = Object.hasOwn(raw, "versions") ? raw["versions"] : void 0;
22189
22229
  const readRaw = Object.hasOwn(raw, "readVersions") ? raw["readVersions"] : void 0;
22190
22230
  if (readRaw !== void 0) {
@@ -22202,11 +22242,11 @@ function validateReferenceProvenance(token, raw) {
22202
22242
  return out;
22203
22243
  }
22204
22244
  function referenceProvenanceOf(record) {
22205
- if (!isPlainObject$4(record) || !Object.hasOwn(record, "referenceProvenance")) return void 0;
22245
+ if (!isPlainObject$6(record) || !Object.hasOwn(record, "referenceProvenance")) return void 0;
22206
22246
  return validatedBag(record["referenceProvenance"]);
22207
22247
  }
22208
22248
  function validatedBag(field) {
22209
- if (!isPlainObject$4(field)) return void 0;
22249
+ if (!isPlainObject$6(field)) return void 0;
22210
22250
  const out = Object.create(null);
22211
22251
  for (const [token, raw] of Object.entries(field)) {
22212
22252
  const entry = validateReferenceProvenance(token, raw);
@@ -22215,9 +22255,9 @@ function validatedBag(field) {
22215
22255
  return { ...out };
22216
22256
  }
22217
22257
  function recordedProvenanceOf(record, token) {
22218
- if (!isPlainObject$4(record) || !Object.hasOwn(record, "referenceProvenance")) return void 0;
22258
+ if (!isPlainObject$6(record) || !Object.hasOwn(record, "referenceProvenance")) return void 0;
22219
22259
  const field = record["referenceProvenance"];
22220
- if (!isPlainObject$4(field) || !Object.hasOwn(field, token)) return void 0;
22260
+ if (!isPlainObject$6(field) || !Object.hasOwn(field, token)) return void 0;
22221
22261
  return validateReferenceProvenance(token, field[token]);
22222
22262
  }
22223
22263
  function recordedReferenceRegions(record) {
@@ -22239,7 +22279,7 @@ function regionsOf(field) {
22239
22279
  function keepHeldTokenProvenance(record) {
22240
22280
  if (!hasReferenceProvenanceField(record)) return record;
22241
22281
  const field = record.referenceProvenance;
22242
- if (!isPlainObject$4(field)) return record;
22282
+ if (!isPlainObject$6(field)) return record;
22243
22283
  const held = recordReferenceTokens(record);
22244
22284
  const keys = Object.keys(field);
22245
22285
  if (keys.every((token) => held.has(token))) return record;
@@ -22251,12 +22291,12 @@ function keepHeldTokenProvenance(record) {
22251
22291
  };
22252
22292
  }
22253
22293
  function hasReferenceProvenanceField(record) {
22254
- return isPlainObject$4(record) && Object.hasOwn(record, "referenceProvenance") && record["referenceProvenance"] !== void 0;
22294
+ return isPlainObject$6(record) && Object.hasOwn(record, "referenceProvenance") && record["referenceProvenance"] !== void 0;
22255
22295
  }
22256
22296
  function outputReferenceProvenanceOf(state, outputKey) {
22257
- if (!isPlainObject$4(state) || !Object.hasOwn(state, "outputReferenceProvenance")) return;
22297
+ if (!isPlainObject$6(state) || !Object.hasOwn(state, "outputReferenceProvenance")) return;
22258
22298
  const field = state["outputReferenceProvenance"];
22259
- if (!isPlainObject$4(field) || !Object.hasOwn(field, outputKey)) return void 0;
22299
+ if (!isPlainObject$6(field) || !Object.hasOwn(field, outputKey)) return void 0;
22260
22300
  return validatedBag(field[outputKey]);
22261
22301
  }
22262
22302
  function persistable(token, entry) {
@@ -22274,7 +22314,7 @@ function tokensUnderPaths(properties, paths) {
22274
22314
  for (const item of value) descend(item, path, next);
22275
22315
  return;
22276
22316
  }
22277
- if (isPlainObject$4(value) && Object.hasOwn(value, path[at])) descend(value[path[at]], path, at + 1);
22317
+ if (isPlainObject$6(value) && Object.hasOwn(value, path[at])) descend(value[path[at]], path, at + 1);
22278
22318
  };
22279
22319
  for (const path of paths) descend(properties, path, 0);
22280
22320
  return out;
@@ -22317,7 +22357,7 @@ function unionWithPrevious(pass, before) {
22317
22357
  }
22318
22358
  function outputProvenanceForPersist(args) {
22319
22359
  const { outputs, resolvedThisRun, carriedFrom, sinkOf } = args;
22320
- if (!resolvedThisRun) return carriedFrom !== void 0 && isPlainObject$4(carriedFrom.outputReferenceProvenance) ? carriedFrom.outputReferenceProvenance : void 0;
22360
+ if (!resolvedThisRun) return carriedFrom !== void 0 && isPlainObject$6(carriedFrom.outputReferenceProvenance) ? carriedFrom.outputReferenceProvenance : void 0;
22321
22361
  let out;
22322
22362
  for (const [outputKey, value] of Object.entries(outputs)) {
22323
22363
  const sink = sinkOf(outputKey);
@@ -24052,6 +24092,68 @@ async function constructAttributeForComputeTypes(resolver, attributeName, contex
24052
24092
  }
24053
24093
  default: return guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceType, physicalId, context);
24054
24094
  }
24095
+ if (resourceType === "AWS::EC2::NatGateway") {
24096
+ if (attributeName === "NatGatewayId") return physicalId;
24097
+ if (attributeName === "RouteTableId" || attributeName === "EniId" || attributeName === "AutoProvisionZones" || attributeName === "AutoScalingIps") {
24098
+ const read = async () => {
24099
+ try {
24100
+ const gateway = (await resolver.clients.clientsForRegion(resolver.explicitRegion).ec2.send(new DescribeNatGatewaysCommand({ NatGatewayIds: [physicalId] }))).NatGateways?.find((g) => g.NatGatewayId === physicalId);
24101
+ const addresses = gateway?.NatGatewayAddresses ?? [];
24102
+ const primary = addresses.find((a) => a.IsPrimary === true) ?? addresses[0];
24103
+ const value = attributeName === "RouteTableId" ? gateway?.RouteTableId : attributeName === "AutoProvisionZones" ? gateway?.AutoProvisionZones : attributeName === "AutoScalingIps" ? gateway?.AutoScalingIps : gateway?.AvailabilityMode === "regional" ? void 0 : primary?.NetworkInterfaceId;
24104
+ return {
24105
+ state: gateway?.State,
24106
+ regional: gateway?.AvailabilityMode === "regional",
24107
+ value: typeof value === "string" && value !== "" ? value : void 0
24108
+ };
24109
+ } catch (err) {
24110
+ return refuseUnservedAttribute(resolver, {
24111
+ logicalId,
24112
+ attributeName,
24113
+ resourceType,
24114
+ physicalId,
24115
+ context,
24116
+ observed: describeFailureObserved(resolver, "DescribeNatGateways", err, context),
24117
+ remedy: "Fix the read (the ec2:DescribeNatGateways permission, or the region) and deploy again."
24118
+ });
24119
+ }
24120
+ };
24121
+ let observedRead = await read();
24122
+ if (observedRead.value === void 0 && observedRead.state === "pending") {
24123
+ const watch = startInterruptWatch(`NAT gateway ${logicalId} attribute wait`);
24124
+ try {
24125
+ for (let poll = 0; poll < natGatewayAttributeWait.polls && observedRead.state === "pending"; poll++) {
24126
+ if (watch.isInterrupted()) throw watch.onInterrupted();
24127
+ await natGatewayAttributeWait.sleep(natGatewayAttributeWait.delayMs);
24128
+ observedRead = await read();
24129
+ }
24130
+ } finally {
24131
+ watch.dispose();
24132
+ }
24133
+ }
24134
+ if (observedRead.value !== void 0) return observedRead.value;
24135
+ if (observedRead.state === "pending") return refuseUnservedAttribute(resolver, {
24136
+ logicalId,
24137
+ attributeName,
24138
+ resourceType,
24139
+ physicalId,
24140
+ context,
24141
+ observed: "the NAT gateway was still pending when the attribute wait ran out",
24142
+ remedy: "Check the gateway with `aws ec2 describe-nat-gateways`, then deploy again once it is available."
24143
+ });
24144
+ const remedy = observedRead.state === "available" ? attributeName === "EniId" && observedRead.regional ? "The gateway is available and has no such value: a regional NAT gateway reports no single EniId. Reference another attribute." : attributeName !== "EniId" && !observedRead.regional ? "The gateway is available, and AWS reports no such value for this zonal gateway; the attribute is set on regional NAT gateways. Reference another attribute." : "The gateway is available and AWS reports no such value for it; check it with `aws ec2 describe-nat-gateways`." : observedRead.state === "failed" ? "The gateway is failed and has no such attribute to serve; fix the gateway and deploy again." : observedRead.state === void 0 ? "DescribeNatGateways no longer returns the gateway; check it in the console." : "The gateway is deleted or being deleted and has no such attribute to serve.";
24145
+ return refuseUnservedAttribute(resolver, {
24146
+ logicalId,
24147
+ attributeName,
24148
+ resourceType,
24149
+ physicalId,
24150
+ context,
24151
+ observed: `DescribeNatGateways reports no ${displayMasked(resolver, attributeName, context)}`,
24152
+ remedy
24153
+ });
24154
+ }
24155
+ return guardedPhysicalIdFallback(resolver, logicalId, attributeName, resourceType, physicalId, context);
24156
+ }
24055
24157
  if (resourceType === "AWS::EC2::LaunchTemplate") {
24056
24158
  if (attributeName === "LatestVersionNumber" || attributeName === "DefaultVersionNumber") {
24057
24159
  try {
@@ -24112,6 +24214,11 @@ async function constructAttributeForComputeTypes(resolver, attributeName, contex
24112
24214
  }
24113
24215
  return NOT_CONSTRUCTED;
24114
24216
  }
24217
+ const natGatewayAttributeWait = {
24218
+ polls: 60,
24219
+ delayMs: 1e4,
24220
+ sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms))
24221
+ };
24115
24222
 
24116
24223
  //#endregion
24117
24224
  //#region src/deployment/intrinsic-resolver/functions.ts
@@ -25772,17 +25879,17 @@ var IntrinsicFunctionResolver = class IntrinsicFunctionResolver {
25772
25879
 
25773
25880
  //#endregion
25774
25881
  //#region src/analyzer/read-provenance-promotion.ts
25775
- function isPlainObject$3(value) {
25882
+ function isPlainObject$5(value) {
25776
25883
  return value !== null && typeof value === "object" && !Array.isArray(value);
25777
25884
  }
25778
25885
  function readsAcrossStacks(value) {
25779
25886
  if (Array.isArray(value)) return value.some(readsAcrossStacks);
25780
- if (!isPlainObject$3(value)) return false;
25887
+ if (!isPlainObject$5(value)) return false;
25781
25888
  if (Object.hasOwn(value, "Fn::ImportValue") || Object.hasOwn(value, "Fn::GetStackOutput")) return true;
25782
25889
  return Object.values(value).some(readsAcrossStacks);
25783
25890
  }
25784
25891
  function recordedReadVersions(record) {
25785
- if (!isPlainObject$3(record) || !Object.hasOwn(record, "referenceProvenance")) return void 0;
25892
+ if (!isPlainObject$5(record) || !Object.hasOwn(record, "referenceProvenance")) return void 0;
25786
25893
  const field = referenceProvenanceOf(record);
25787
25894
  if (field === void 0) return void 0;
25788
25895
  let out;
@@ -25793,7 +25900,7 @@ async function readProvenancePromotions(args) {
25793
25900
  const { currentState, desiredTemplate, sources } = args;
25794
25901
  const parser = args.parser ?? new TemplateParser();
25795
25902
  const records = currentState.resources;
25796
- const parameters = isPlainObject$3(desiredTemplate.Parameters) ? desiredTemplate.Parameters : void 0;
25903
+ const parameters = isPlainObject$5(desiredTemplate.Parameters) ? desiredTemplate.Parameters : void 0;
25797
25904
  const out = [];
25798
25905
  for (const { logicalId, changeType } of args.rows) {
25799
25906
  if (changeType !== "NO_CHANGE" && changeType !== "UPDATE") continue;
@@ -25801,7 +25908,7 @@ async function readProvenancePromotions(args) {
25801
25908
  const readVersions = recordedReadVersions(record);
25802
25909
  if (readVersions === void 0) continue;
25803
25910
  const resource = Object.hasOwn(desiredTemplate.Resources, logicalId) ? desiredTemplate.Resources[logicalId] : void 0;
25804
- const properties = isPlainObject$3(resource?.Properties) ? resource.Properties : {};
25911
+ const properties = isPlainObject$5(resource?.Properties) ? resource.Properties : {};
25805
25912
  const reads = [];
25806
25913
  for (const [key, value] of Object.entries(properties)) {
25807
25914
  const referenced = [...parser.extractReferences(value)].filter((id) => id !== logicalId);
@@ -25844,7 +25951,7 @@ async function readProvenancePromotions(args) {
25844
25951
  if (recorded.some((version) => !domain.has(version))) moved.push(token);
25845
25952
  }
25846
25953
  if (moved.length === 0) continue;
25847
- const recordProperties = isPlainObject$3(record?.properties) ? record.properties : {};
25954
+ const recordProperties = isPlainObject$5(record?.properties) ? record.properties : {};
25848
25955
  const keys = [];
25849
25956
  for (const r of reads) {
25850
25957
  if (!Object.hasOwn(recordProperties, r.key)) continue;
@@ -27417,8 +27524,8 @@ function compare(desired, previous, mask) {
27417
27524
  if (!Array.isArray(desired) || desired.length !== previous.length) return "differs";
27418
27525
  return combine(previous.map((item, i) => compare(desired[i], item, mask)));
27419
27526
  }
27420
- if (isPlainObject$2(previous)) {
27421
- if (!isPlainObject$2(desired)) return "differs";
27527
+ if (isPlainObject$4(previous)) {
27528
+ if (!isPlainObject$4(desired)) return "differs";
27422
27529
  if (!Object.keys(desired).every((k) => Object.prototype.hasOwnProperty.call(previous, k))) return "differs";
27423
27530
  return combine(Object.keys(previous).map((k) => compare(desired[k], previous[k], mask)));
27424
27531
  }
@@ -27444,7 +27551,7 @@ function resolvesReference(desired, previous, mask) {
27444
27551
  const pattern = literals.map(escapeRegExp$1).join("[\\s\\S]*");
27445
27552
  return new RegExp(`^${pattern}$`).test(desired);
27446
27553
  }
27447
- function isPlainObject$2(value) {
27554
+ function isPlainObject$4(value) {
27448
27555
  return typeof value === "object" && value !== null && !Array.isArray(value);
27449
27556
  }
27450
27557
  function escapeRegExp$1(text) {
@@ -27836,6 +27943,7 @@ const SLOW_CC_OPERATION_TIMEOUTS = {
27836
27943
  },
27837
27944
  "AWS::ElastiCache::CacheCluster": {
27838
27945
  create: 60 * MINUTE_MS,
27946
+ update: 60 * MINUTE_MS,
27839
27947
  delete: 60 * MINUTE_MS
27840
27948
  },
27841
27949
  "AWS::RDS::DBInstance": {
@@ -28394,7 +28502,7 @@ var CloudControlProvider = class {
28394
28502
  const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
28395
28503
  if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
28396
28504
  this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
28397
- const { ASGProvider } = await import("./asg-provider-DrREeZeh.js");
28505
+ const { ASGProvider } = await import("./asg-provider-CsRMe_zh.js");
28398
28506
  const delegateRegion = ambientRegion();
28399
28507
  let asgProvider = this.asgDeleteDelegates.get(delegateRegion);
28400
28508
  if (asgProvider === void 0) {
@@ -28503,7 +28611,7 @@ var CloudControlProvider = class {
28503
28611
  const family = SDK_DELETE_FAMILIES.get(resourceType);
28504
28612
  const cached = this.sdkDeleteDelegates.get(family);
28505
28613
  if (cached !== void 0 && cached.region === ccRegion) return cached.provider;
28506
- const provider = family === "rds" ? new (await (import("./rds-provider-Dps9UxBz.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-D_3VAhFf.js"))).NeptuneProvider({ region: ccRegion });
28614
+ const provider = family === "rds" ? new (await (import("./rds-provider-BPs9JSk_.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-p59T8CFv.js"))).NeptuneProvider({ region: ccRegion });
28507
28615
  this.sdkDeleteDelegates.set(family, {
28508
28616
  region: ccRegion,
28509
28617
  provider
@@ -29659,11 +29767,11 @@ function applyNoEchoDeleteValues(properties, recordedLeaves, values) {
29659
29767
  payload: properties,
29660
29768
  unresolved: []
29661
29769
  };
29662
- const byKey = new Map((values?.leaves ?? []).map((leaf) => [canonicalJson$3(leaf.coordinate), leaf]));
29770
+ const byKey = new Map((values?.leaves ?? []).map((leaf) => [canonicalJson$4(leaf.coordinate), leaf]));
29663
29771
  const entries = [];
29664
29772
  const unresolved = [];
29665
29773
  for (const coordinate of masked) {
29666
- const leaf = byKey.get(canonicalJson$3(coordinate));
29774
+ const leaf = byKey.get(canonicalJson$4(coordinate));
29667
29775
  if (leaf === void 0) unresolved.push(coordinate);
29668
29776
  else entries.push({
29669
29777
  coordinate,
@@ -29714,7 +29822,7 @@ async function noEchoDeleteValuesFromResolved(options) {
29714
29822
  const fingerprinter = options.inputSources === void 0 ? void 0 : inputFingerprinter(templateProps, options.inputSources);
29715
29823
  const leaves = [];
29716
29824
  for (const coordinate of masked) {
29717
- if (!nodes.has(canonicalJson$3(coordinate))) continue;
29825
+ if (!nodes.has(canonicalJson$4(coordinate))) continue;
29718
29826
  if (!await fingerprintsUnchanged(record, templateProps, coordinate, fingerprinter)) continue;
29719
29827
  const value = valueAtCoordinate(resolvedProperties, coordinate);
29720
29828
  if (value === void 0 || carriesSecretMask(value)) continue;
@@ -29893,7 +30001,7 @@ var TemplateNoEchoReresolver = class TemplateNoEchoReresolver {
29893
30001
  const bag = await this.noEchoNeedles();
29894
30002
  const leaves = [];
29895
30003
  for (const coordinate of masked) {
29896
- const key = canonicalJson$3(coordinate);
30004
+ const key = canonicalJson$4(coordinate);
29897
30005
  if (!nodes.has(key)) continue;
29898
30006
  const node = nodes.get(key)?.node;
29899
30007
  if (!readsParametersOnly(node, declared, refused)) continue;
@@ -36984,7 +37092,7 @@ const DEFAULT_RESOURCE_TIMEOUT_MS = 18e5;
36984
37092
 
36985
37093
  //#endregion
36986
37094
  //#region src/analyzer/skipped-outputs.ts
36987
- function canonicalJson$1(value) {
37095
+ function canonicalJson$2(value) {
36988
37096
  return JSON.stringify(value, (_key, v) => {
36989
37097
  if (v !== null && typeof v === "object" && !Array.isArray(v)) {
36990
37098
  const sorted = Object.create(null);
@@ -37014,7 +37122,7 @@ function skippedOutputDigest(template, outputKey) {
37014
37122
  sections[section] = section === "Parameters" ? withNoEchoDefaultsMasked(body) : body;
37015
37123
  }
37016
37124
  const entry = template.Outputs?.[outputKey];
37017
- return createHash("sha256").update(canonicalJson$1({
37125
+ return createHash("sha256").update(canonicalJson$2({
37018
37126
  output: entry,
37019
37127
  template: sections
37020
37128
  })).digest("hex");
@@ -38887,7 +38995,7 @@ function maskRestoredNoEchoRecord(record, baseline, substituted = []) {
38887
38995
  const marked = noEchoLeavesOf(baseline) ?? [];
38888
38996
  const names = declaredNoEchoAttributeNames(baseline);
38889
38997
  if (marked.length === 0 && names.length === 0 && substituted.length === 0) return record;
38890
- const echoes = (name, value) => value !== record.physicalId && substituted.some((leaf) => leaf.coordinate[0] === name && canonicalJson$3(leaf.value) === canonicalJson$3(value));
38998
+ const echoes = (name, value) => value !== record.physicalId && substituted.some((leaf) => leaf.coordinate[0] === name && canonicalJson$4(leaf.value) === canonicalJson$4(value));
38891
38999
  let attributes = record.attributes;
38892
39000
  if (attributes !== void 0 && attributes !== null && typeof attributes === "object") for (const [name, value] of Object.entries(attributes)) {
38893
39001
  if (!names.includes(name) && !echoes(name, value)) continue;
@@ -38898,7 +39006,7 @@ function maskRestoredNoEchoRecord(record, baseline, substituted = []) {
38898
39006
  const list = coordinate.findIndex((segment) => typeof segment === "number");
38899
39007
  if (list < 0) return false;
38900
39008
  const path = coordinate.slice(0, list);
38901
- return canonicalJson$3(valueAtCoordinate(byIndex, path)) !== canonicalJson$3(valueAtCoordinate(baseline.properties, path));
39009
+ return canonicalJson$4(valueAtCoordinate(byIndex, path)) !== canonicalJson$4(valueAtCoordinate(baseline.properties, path));
38902
39010
  });
38903
39011
  const properties = reshaped.length === 0 ? byIndex : maskReadbackAtCoordinates(byIndex, baseline.properties, reshaped);
38904
39012
  const widened = reshaped.map((coordinate) => readbackPathFor(byIndex, baseline.properties, coordinate)).filter((path, i) => path !== void 0 && path.length < reshaped[i].length);
@@ -44747,18 +44855,18 @@ function conditionInputsFrom(args) {
44747
44855
  };
44748
44856
  }
44749
44857
  const FINGERPRINT_LAYOUT = 1;
44750
- function isPlainObject$1(value) {
44858
+ function isPlainObject$3(value) {
44751
44859
  return value !== null && typeof value === "object" && !Array.isArray(value);
44752
44860
  }
44753
- function canonicalJson(value) {
44754
- if (Array.isArray(value)) return `[${value.map(canonicalJson).join(",")}]`;
44755
- if (isPlainObject$1(value)) return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson(value[key])}`).join(",")}}`;
44861
+ function canonicalJson$1(value) {
44862
+ if (Array.isArray(value)) return `[${value.map(canonicalJson$1).join(",")}]`;
44863
+ if (isPlainObject$3(value)) return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson$1(value[key])}`).join(",")}}`;
44756
44864
  const encoded = JSON.stringify(value);
44757
44865
  return encoded === void 0 ? "undefined" : encoded;
44758
44866
  }
44759
44867
  function walkModelledDefinition(value, declaredParameters, parameters, conditions) {
44760
44868
  if (typeof value === "string") return !carriesDynamicReference(value);
44761
- if (!isPlainObject$1(value)) return false;
44869
+ if (!isPlainObject$3(value)) return false;
44762
44870
  const keys = Object.keys(value);
44763
44871
  if (keys.length !== 1) return false;
44764
44872
  const [key] = keys;
@@ -44781,8 +44889,8 @@ function walkModelledDefinition(value, declaredParameters, parameters, condition
44781
44889
  }
44782
44890
  function conditionFingerprint(template, name, inputOf) {
44783
44891
  const definitions = template.Conditions;
44784
- if (!isPlainObject$1(definitions)) return void 0;
44785
- const declared = isPlainObject$1(template.Parameters) ? template.Parameters : {};
44892
+ if (!isPlainObject$3(definitions)) return void 0;
44893
+ const declared = isPlainObject$3(template.Parameters) ? template.Parameters : {};
44786
44894
  const declaredNames = new Set(Object.keys(declared));
44787
44895
  const closure = nullPrototypeRecord();
44788
44896
  const parameters = /* @__PURE__ */ new Set();
@@ -44804,7 +44912,7 @@ function conditionFingerprint(template, name, inputOf) {
44804
44912
  let hasToken = false;
44805
44913
  for (const parameter of parameters) {
44806
44914
  const definition = declared[parameter];
44807
- const type = isPlainObject$1(definition) ? definition["Type"] : void 0;
44915
+ const type = isPlainObject$3(definition) ? definition["Type"] : void 0;
44808
44916
  if (typeof type !== "string") return void 0;
44809
44917
  const input = inputOf(parameter);
44810
44918
  if (input === void 0) return void 0;
@@ -44822,7 +44930,7 @@ function conditionFingerprint(template, name, inputOf) {
44822
44930
  }
44823
44931
  }
44824
44932
  return {
44825
- fingerprint: `sha256:${createHash("sha256").update(canonicalJson({
44933
+ fingerprint: `sha256:${createHash("sha256").update(canonicalJson$1({
44826
44934
  layout: FINGERPRINT_LAYOUT,
44827
44935
  conditions: closure,
44828
44936
  parameters: inputs
@@ -44835,7 +44943,7 @@ function collectIfConditionNames(value, names, conditions) {
44835
44943
  for (const element of value) collectIfConditionNames(element, names, conditions);
44836
44944
  return;
44837
44945
  }
44838
- if (!isPlainObject$1(value)) return;
44946
+ if (!isPlainObject$3(value)) return;
44839
44947
  const ifArgs = value["Fn::If"];
44840
44948
  if (Array.isArray(ifArgs) && typeof ifArgs[0] === "string") {
44841
44949
  names.add(ifArgs[0]);
@@ -44849,9 +44957,9 @@ function collectIfConditionNames(value, names, conditions) {
44849
44957
  function conditionsReadByDiff(template, conditions) {
44850
44958
  const names = /* @__PURE__ */ new Set();
44851
44959
  for (const section of [template.Resources, template.Outputs]) {
44852
- if (!isPlainObject$1(section)) continue;
44960
+ if (!isPlainObject$3(section)) continue;
44853
44961
  for (const entry of Object.values(section)) {
44854
- if (!isPlainObject$1(entry)) continue;
44962
+ if (!isPlainObject$3(entry)) continue;
44855
44963
  const gate = entry["Condition"];
44856
44964
  if (typeof gate === "string") {
44857
44965
  names.add(gate);
@@ -44883,10 +44991,10 @@ function buildConditionVerdictRecord(template, conditions, inputOf) {
44883
44991
  function readRecordedConditionVerdicts(state) {
44884
44992
  const read = nullPrototypeRecord();
44885
44993
  const field = state?.conditionVerdicts;
44886
- if (!isPlainObject$1(field)) return read;
44994
+ if (!isPlainObject$3(field)) return read;
44887
44995
  for (const name of Object.keys(field)) {
44888
44996
  const entry = field[name];
44889
- if (isPlainObject$1(entry) && typeof entry["verdict"] === "boolean" && typeof entry["fingerprint"] === "string") read[name] = {
44997
+ if (isPlainObject$3(entry) && typeof entry["verdict"] === "boolean" && typeof entry["fingerprint"] === "string") read[name] = {
44890
44998
  verdict: entry["verdict"],
44891
44999
  fingerprint: entry["fingerprint"]
44892
45000
  };
@@ -44932,11 +45040,11 @@ function deployConditionInputs(parameterValues, inheritedSecrets, shadowedBy = /
44932
45040
  function parentSuppliedValues(template, supplied, tokens) {
44933
45041
  const names = /* @__PURE__ */ new Set();
44934
45042
  if (supplied === void 0) return names;
44935
- const declared = isPlainObject$1(template.Parameters) ? template.Parameters : {};
45043
+ const declared = isPlainObject$3(template.Parameters) ? template.Parameters : {};
44936
45044
  for (const [name, value] of Object.entries(supplied)) {
44937
45045
  if (tokens.has(name)) continue;
44938
45046
  const definition = declared[name];
44939
- const fallback = isPlainObject$1(definition) ? definition["Default"] : void 0;
45047
+ const fallback = isPlainObject$3(definition) ? definition["Default"] : void 0;
44940
45048
  if (fallback === void 0 || String(fallback) !== String(value)) names.add(name);
44941
45049
  }
44942
45050
  return names;
@@ -45271,7 +45379,7 @@ function deferredServiceTokenWarning(row) {
45271
45379
 
45272
45380
  //#endregion
45273
45381
  //#region src/deployment/read-provenance-sources.ts
45274
- function isPlainObject(value) {
45382
+ function isPlainObject$2(value) {
45275
45383
  return value !== null && typeof value === "object" && !Array.isArray(value);
45276
45384
  }
45277
45385
  function crossStackNodes(value, into = []) {
@@ -45279,7 +45387,7 @@ function crossStackNodes(value, into = []) {
45279
45387
  for (const item of value) crossStackNodes(item, into);
45280
45388
  return into;
45281
45389
  }
45282
- if (!isPlainObject(value)) return into;
45390
+ if (!isPlainObject$2(value)) return into;
45283
45391
  const keys = Object.keys(value);
45284
45392
  if (keys.length === 1 && (keys[0] === "Fn::ImportValue" || keys[0] === "Fn::GetStackOutput")) into.push(value);
45285
45393
  for (const item of Object.values(value)) crossStackNodes(item, into);
@@ -45303,11 +45411,11 @@ function crossStackOutputProvenanceSource(reads, scope, stateBackend) {
45303
45411
  function inheritedProvenanceForChildDiff(args) {
45304
45412
  const { row, rowRecord, parentRecords, parentTemplate } = args;
45305
45413
  if (!args.rowProvisioned || rowRecord === void 0) return void 0;
45306
- const recordedParameters = isPlainObject(rowRecord.properties) ? rowRecord.properties["Parameters"] : void 0;
45414
+ const recordedParameters = isPlainObject$2(rowRecord.properties) ? rowRecord.properties["Parameters"] : void 0;
45307
45415
  const tokens = referenceTokensIn(recordedParameters);
45308
45416
  if (tokens.size === 0) return void 0;
45309
45417
  const own = referenceProvenanceOf(rowRecord);
45310
- const upstreams = [...new TemplateParser().extractReferences(isPlainObject(row.Properties) ? row.Properties["Parameters"] : void 0)].filter((id) => Object.hasOwn(parentTemplate.Resources, id) && Object.hasOwn(parentRecords, id));
45418
+ const upstreams = [...new TemplateParser().extractReferences(isPlainObject$2(row.Properties) ? row.Properties["Parameters"] : void 0)].filter((id) => Object.hasOwn(parentTemplate.Resources, id) && Object.hasOwn(parentRecords, id));
45311
45419
  const out = /* @__PURE__ */ new Map();
45312
45420
  for (const token of tokens) {
45313
45421
  const versions = /* @__PURE__ */ new Set();
@@ -46138,6 +46246,41 @@ function isTruthyCfnBoolean(value) {
46138
46246
  return value === true || value === "true";
46139
46247
  }
46140
46248
 
46249
+ //#endregion
46250
+ //#region src/provisioning/dynamodb-ttl.ts
46251
+ function readTtlSpec(spec) {
46252
+ if (spec === void 0 || spec === null) return {
46253
+ enabled: false,
46254
+ attributeName: void 0
46255
+ };
46256
+ const s = spec;
46257
+ const rawName = s["AttributeName"];
46258
+ const attributeName = typeof rawName === "string" && rawName !== "" ? rawName : void 0;
46259
+ const rawEnabled = s["Enabled"];
46260
+ return {
46261
+ enabled: rawEnabled === void 0 ? true : typeof rawEnabled === "string" ? rawEnabled.toLowerCase() === "true" : Boolean(rawEnabled),
46262
+ attributeName
46263
+ };
46264
+ }
46265
+ function planTimeToLive(spec, previousSpec, mode) {
46266
+ const desired = readTtlSpec(spec);
46267
+ if (spec !== void 0 && spec !== null && desired.enabled) return desired.attributeName ? {
46268
+ kind: "enable",
46269
+ attributeName: desired.attributeName
46270
+ } : { kind: "none" };
46271
+ if (mode === "create") return { kind: "none" };
46272
+ const previousPresent = previousSpec !== void 0 && previousSpec !== null;
46273
+ const previous = readTtlSpec(previousSpec);
46274
+ if (previousPresent && previous.enabled && previous.attributeName) return {
46275
+ kind: "disable",
46276
+ attributeName: previous.attributeName
46277
+ };
46278
+ return { kind: "disable-live" };
46279
+ }
46280
+ function isTtlAlreadyDisabled(awsDetail) {
46281
+ return /TimeToLive is already disabled/i.test(awsDetail);
46282
+ }
46283
+
46141
46284
  //#endregion
46142
46285
  //#region src/provisioning/dynamodb-index-busy-delete.ts
46143
46286
  function maskedLogger(logger, maskSecrets, name) {
@@ -46356,6 +46499,718 @@ function isResourceNotFoundError(error) {
46356
46499
  return typeof error === "object" && error !== null && error.name === "ResourceNotFoundException";
46357
46500
  }
46358
46501
 
46502
+ //#endregion
46503
+ //#region src/provisioning/dynamodb-contributor-insights.ts
46504
+ const CONTRIBUTOR_INSIGHTS_KEY = "ContributorInsightsSpecification";
46505
+ function readContributorInsightsSpec(value, path) {
46506
+ if (value === void 0 || value === null) return { kind: "absent" };
46507
+ const refusal = configBooleanRefusal(value, "Enabled", path) ?? configStringRefusal(value, "Mode", "", path);
46508
+ if (refusal !== void 0) return {
46509
+ kind: "unusable",
46510
+ reason: refusal
46511
+ };
46512
+ const block = value;
46513
+ const enabled = coerceCfnBoolean(block["Enabled"]) ?? false;
46514
+ const mode = block["Mode"];
46515
+ return typeof mode === "string" && mode.length > 0 ? {
46516
+ kind: "usable",
46517
+ enabled,
46518
+ mode
46519
+ } : {
46520
+ kind: "usable",
46521
+ enabled
46522
+ };
46523
+ }
46524
+ function planContributorInsightsOp(desired, previous, onUnusable) {
46525
+ if (desired.kind === "unusable") {
46526
+ onUnusable(desired.reason);
46527
+ return;
46528
+ }
46529
+ if (desired.kind === "absent") return previous.kind === "absent" ? void 0 : { action: "DISABLE" };
46530
+ if (previous.kind === "usable" && previous.enabled === desired.enabled && (!desired.enabled || previous.mode === desired.mode)) return;
46531
+ if (!desired.enabled) return { action: "DISABLE" };
46532
+ return desired.mode === void 0 ? { action: "ENABLE" } : {
46533
+ action: "ENABLE",
46534
+ mode: desired.mode
46535
+ };
46536
+ }
46537
+ const INDEX_CONTRIBUTOR_INSIGHTS_PATH = `GlobalSecondaryIndexes[].${CONTRIBUTOR_INSIGHTS_KEY}`;
46538
+ function indexEntriesByName(value) {
46539
+ const byName = /* @__PURE__ */ new Map();
46540
+ if (!Array.isArray(value)) return byName;
46541
+ for (const entry of value) {
46542
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) continue;
46543
+ const name = entry["IndexName"];
46544
+ if (typeof name === "string") byName.set(name, entry);
46545
+ }
46546
+ return byName;
46547
+ }
46548
+ function planIndexContributorInsightsOps(desiredIndexes, previousIndexes, onUnusable) {
46549
+ const previousByName = indexEntriesByName(previousIndexes);
46550
+ const ops = [];
46551
+ for (const [indexName, entry] of indexEntriesByName(desiredIndexes)) {
46552
+ const path = INDEX_CONTRIBUTOR_INSIGHTS_PATH;
46553
+ const op = planContributorInsightsOp(readContributorInsightsSpec(entry[CONTRIBUTOR_INSIGHTS_KEY], path), readContributorInsightsSpec(previousByName.get(indexName)?.[CONTRIBUTOR_INSIGHTS_KEY], path), (reason) => onUnusable(indexName, reason));
46554
+ if (op !== void 0) ops.push({
46555
+ indexName,
46556
+ ...op
46557
+ });
46558
+ }
46559
+ return ops;
46560
+ }
46561
+ function contributorInsightsRefusals(tableBlock, indexes) {
46562
+ const refusals = [];
46563
+ const table = readContributorInsightsSpec(tableBlock, CONTRIBUTOR_INSIGHTS_KEY);
46564
+ if (table.kind === "unusable") refusals.push(table.reason);
46565
+ if (!Array.isArray(indexes)) return refusals;
46566
+ indexes.forEach((entry, position) => {
46567
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) return;
46568
+ const read = readContributorInsightsSpec(entry[CONTRIBUTOR_INSIGHTS_KEY], `GlobalSecondaryIndexes[${position}].${CONTRIBUTOR_INSIGHTS_KEY}`);
46569
+ if (read.kind === "unusable") refusals.push(read.reason);
46570
+ });
46571
+ return refusals;
46572
+ }
46573
+ function stripIndexContributorInsights(entry) {
46574
+ if (typeof entry !== "object" || entry === null || Array.isArray(entry)) return entry;
46575
+ if (!("ContributorInsightsSpecification" in entry)) return entry;
46576
+ const { [CONTRIBUTOR_INSIGHTS_KEY]: _stripped, ...rest } = entry;
46577
+ return rest;
46578
+ }
46579
+ function indexDeclaresContributorInsights(desiredEntry) {
46580
+ return readContributorInsightsSpec(desiredEntry?.[CONTRIBUTOR_INSIGHTS_KEY], "").kind === "usable";
46581
+ }
46582
+ function enabledForStatus(status, transientAsTarget) {
46583
+ if (status === "ENABLED" || transientAsTarget && status === "ENABLING") return true;
46584
+ if (status === "DISABLED" || transientAsTarget && status === "DISABLING") return false;
46585
+ }
46586
+ function reverseMapTableContributorInsights(status, mode) {
46587
+ const enabled = enabledForStatus(status, false);
46588
+ if (enabled === void 0) return void 0;
46589
+ const block = { Enabled: enabled };
46590
+ if (enabled && mode !== void 0) block["Mode"] = mode;
46591
+ return block;
46592
+ }
46593
+ function reverseMapIndexContributorInsights(status, mode, declaredBlock) {
46594
+ const declared = readContributorInsightsSpec(declaredBlock, INDEX_CONTRIBUTOR_INSIGHTS_PATH);
46595
+ if (declared.kind !== "usable") return void 0;
46596
+ const enabled = enabledForStatus(status, true);
46597
+ if (enabled === void 0) return void 0;
46598
+ const declaredEnabled = declaredBlock["Enabled"];
46599
+ const block = { Enabled: typeof declaredEnabled !== "string" ? enabled : declared.enabled === enabled ? declaredEnabled : String(enabled) };
46600
+ if (enabled && declared.mode !== void 0) {
46601
+ const liveMode = mode ?? (status === "ENABLING" ? declared.mode : void 0);
46602
+ if (liveMode !== void 0) block["Mode"] = liveMode;
46603
+ }
46604
+ return block;
46605
+ }
46606
+
46607
+ //#endregion
46608
+ //#region src/provisioning/dynamodb-replica-settings.ts
46609
+ const PITR_KEY = "PointInTimeRecoverySpecification";
46610
+ const KINESIS_KEY = "KinesisStreamSpecification";
46611
+ const TABLE_POLICY_KEY = "ResourcePolicy";
46612
+ const REPLICA_STREAM_KEY = "ReplicaStreamSpecification";
46613
+ const DEFAULT_RECOVERY_PERIOD_DAYS = 35;
46614
+ const DEFAULT_KINESIS_PRECISION = "MILLISECOND";
46615
+ const PITR_PATH = `Replicas[].${PITR_KEY}`;
46616
+ const CI_PATH = `Replicas[].${CONTRIBUTOR_INSIGHTS_KEY}`;
46617
+ const KINESIS_PATH = `Replicas[].${KINESIS_KEY}`;
46618
+ const TABLE_POLICY_PATH = `Replicas[].${TABLE_POLICY_KEY}`;
46619
+ const STREAM_POLICY_PATH = `Replicas[].${REPLICA_STREAM_KEY}.ResourcePolicy`;
46620
+ function isPlainObject$1(value) {
46621
+ return typeof value === "object" && value !== null && !Array.isArray(value);
46622
+ }
46623
+ function readPitrSpec(value) {
46624
+ if (value === void 0 || value === null) return { kind: "absent" };
46625
+ const refusal = configBooleanRefusal(value, "PointInTimeRecoveryEnabled", PITR_PATH) ?? configIntegerRefusal(value, "RecoveryPeriodInDays", PITR_PATH, 1, 35);
46626
+ if (refusal !== void 0) return {
46627
+ kind: "unusable",
46628
+ reason: refusal
46629
+ };
46630
+ const block = value;
46631
+ const enabled = coerceCfnBoolean(block["PointInTimeRecoveryEnabled"]) ?? false;
46632
+ const period = enabled ? coerceCfnInteger(block["RecoveryPeriodInDays"]) : void 0;
46633
+ return period === void 0 ? {
46634
+ kind: "usable",
46635
+ enabled
46636
+ } : {
46637
+ kind: "usable",
46638
+ enabled,
46639
+ recoveryPeriodInDays: period
46640
+ };
46641
+ }
46642
+ function readKinesisSpec(value) {
46643
+ if (value === void 0 || value === null) return { kind: "absent" };
46644
+ const refusal = configStringRefusal(value, "StreamArn", "required", KINESIS_PATH) ?? configStringRefusal(value, "ApproximateCreationDateTimePrecision", "", KINESIS_PATH);
46645
+ if (refusal !== void 0) return {
46646
+ kind: "unusable",
46647
+ reason: refusal
46648
+ };
46649
+ const block = value;
46650
+ const streamArn = block["StreamArn"];
46651
+ if (typeof streamArn !== "string") return {
46652
+ kind: "unusable",
46653
+ reason: `${KINESIS_PATH}.StreamArn is required`
46654
+ };
46655
+ const precision = block["ApproximateCreationDateTimePrecision"];
46656
+ return typeof precision === "string" && precision.length > 0 ? {
46657
+ kind: "usable",
46658
+ streamArn,
46659
+ precision
46660
+ } : {
46661
+ kind: "usable",
46662
+ streamArn
46663
+ };
46664
+ }
46665
+ function readPolicyBlock(value, path) {
46666
+ if (value === void 0 || value === null) return { kind: "absent" };
46667
+ if (!isPlainObject$1(value)) return {
46668
+ kind: "unusable",
46669
+ reason: `${path} must be an object with a PolicyDocument`
46670
+ };
46671
+ const document = value["PolicyDocument"];
46672
+ if (typeof document === "string") return document.trim() === "" ? {
46673
+ kind: "unusable",
46674
+ reason: `${path}.PolicyDocument must not be a blank string`
46675
+ } : {
46676
+ kind: "usable",
46677
+ document
46678
+ };
46679
+ if (!isPlainObject$1(document)) return {
46680
+ kind: "unusable",
46681
+ reason: `${path}.PolicyDocument must be a policy object or a JSON string`
46682
+ };
46683
+ const keys = Object.keys(document);
46684
+ if (keys.length === 1 && (keys[0] === "Ref" || keys[0].startsWith("Fn::"))) return {
46685
+ kind: "unusable",
46686
+ reason: `${path}.PolicyDocument is an unresolved intrinsic`
46687
+ };
46688
+ return {
46689
+ kind: "usable",
46690
+ document: JSON.stringify(document)
46691
+ };
46692
+ }
46693
+ function readTablePolicy(replica) {
46694
+ return readPolicyBlock(replica?.[TABLE_POLICY_KEY], TABLE_POLICY_PATH);
46695
+ }
46696
+ function readStreamPolicy$1(replica) {
46697
+ const stream = replica?.[REPLICA_STREAM_KEY];
46698
+ if (stream === void 0 || stream === null) return { kind: "absent" };
46699
+ if (!isPlainObject$1(stream)) return {
46700
+ kind: "unusable",
46701
+ reason: `Replicas[].${REPLICA_STREAM_KEY} must be an object`
46702
+ };
46703
+ return readPolicyBlock(stream["ResourcePolicy"], STREAM_POLICY_PATH);
46704
+ }
46705
+ function replicaSettingRefusals(replica) {
46706
+ return [
46707
+ readPitrSpec(replica?.[PITR_KEY]),
46708
+ readContributorInsightsSpec(replica?.[CONTRIBUTOR_INSIGHTS_KEY], CI_PATH),
46709
+ readKinesisSpec(replica?.[KINESIS_KEY]),
46710
+ readTablePolicy(replica),
46711
+ readStreamPolicy$1(replica)
46712
+ ].flatMap((read) => read.kind === "unusable" ? [read.reason] : []);
46713
+ }
46714
+ function settingOf(op) {
46715
+ switch (op.kind) {
46716
+ case "pitr": return "pitr";
46717
+ case "contributorInsights": return "contributorInsights";
46718
+ case "kinesisDisable":
46719
+ case "kinesisEnable":
46720
+ case "kinesisPrecision": return "kinesis";
46721
+ case "deleteTablePolicy":
46722
+ case "putTablePolicy": return "tablePolicy";
46723
+ case "deleteStreamPolicy":
46724
+ case "putStreamPolicy": return "streamPolicy";
46725
+ }
46726
+ }
46727
+ const SETTING_MEMBER = {
46728
+ pitr: PITR_KEY,
46729
+ contributorInsights: CONTRIBUTOR_INSIGHTS_KEY,
46730
+ kinesis: KINESIS_KEY,
46731
+ tablePolicy: TABLE_POLICY_KEY,
46732
+ streamPolicy: `${REPLICA_STREAM_KEY}.ResourcePolicy`
46733
+ };
46734
+ function samePolicyDocument$1(left, right) {
46735
+ if (left === right) return true;
46736
+ try {
46737
+ return JSON.stringify(JSON.parse(left)) === JSON.stringify(JSON.parse(right));
46738
+ } catch {
46739
+ return false;
46740
+ }
46741
+ }
46742
+ function planReplicaSettingOps(desired, previous, options, onUnusable) {
46743
+ const prev = options.fresh ? void 0 : previous;
46744
+ const ops = [];
46745
+ const removes = (setting) => options.keepOnRemoval?.has(setting) !== true;
46746
+ const pitr = readPitrSpec(desired?.[PITR_KEY]);
46747
+ const prevPitr = readPitrSpec(prev?.[PITR_KEY]);
46748
+ if (pitr.kind === "unusable") onUnusable(pitr.reason);
46749
+ else if (pitr.kind === "absent") {
46750
+ if (prevPitr.kind !== "absent" && removes("pitr")) ops.push({
46751
+ kind: "pitr",
46752
+ enabled: false
46753
+ });
46754
+ } else {
46755
+ const unchanged = prevPitr.kind === "usable" && prevPitr.enabled === pitr.enabled && prevPitr.recoveryPeriodInDays === pitr.recoveryPeriodInDays;
46756
+ const noop = options.fresh && !pitr.enabled;
46757
+ if (!unchanged && !noop) ops.push(pitr.recoveryPeriodInDays === void 0 ? {
46758
+ kind: "pitr",
46759
+ enabled: pitr.enabled
46760
+ } : {
46761
+ kind: "pitr",
46762
+ enabled: pitr.enabled,
46763
+ recoveryPeriodInDays: pitr.recoveryPeriodInDays
46764
+ });
46765
+ }
46766
+ const desiredCi = readContributorInsightsSpec(desired?.[CONTRIBUTOR_INSIGHTS_KEY], CI_PATH);
46767
+ const ci = planContributorInsightsOp(desiredCi, readContributorInsightsSpec(prev?.[CONTRIBUTOR_INSIGHTS_KEY], CI_PATH), onUnusable);
46768
+ if (ci !== void 0 && !(options.fresh && ci.action === "DISABLE") && !(desiredCi.kind === "absent" && !removes("contributorInsights"))) ops.push(ci.mode === void 0 ? {
46769
+ kind: "contributorInsights",
46770
+ action: ci.action
46771
+ } : {
46772
+ kind: "contributorInsights",
46773
+ action: ci.action,
46774
+ mode: ci.mode
46775
+ });
46776
+ const kinesis = readKinesisSpec(desired?.[KINESIS_KEY]);
46777
+ const prevKinesis = readKinesisSpec(prev?.[KINESIS_KEY]);
46778
+ if (kinesis.kind === "unusable") onUnusable(kinesis.reason);
46779
+ else if (kinesis.kind === "absent") {
46780
+ if (prevKinesis.kind === "usable" && removes("kinesis")) ops.push({
46781
+ kind: "kinesisDisable",
46782
+ streamArn: prevKinesis.streamArn
46783
+ });
46784
+ } else if (prevKinesis.kind === "usable" && prevKinesis.streamArn === kinesis.streamArn) {
46785
+ if (kinesis.precision !== void 0 && kinesis.precision !== prevKinesis.precision) ops.push({
46786
+ kind: "kinesisPrecision",
46787
+ streamArn: kinesis.streamArn,
46788
+ precision: kinesis.precision
46789
+ });
46790
+ else if (kinesis.precision === void 0 && prevKinesis.precision !== void 0 && prevKinesis.precision !== DEFAULT_KINESIS_PRECISION && removes("kinesis")) ops.push({
46791
+ kind: "kinesisPrecision",
46792
+ streamArn: kinesis.streamArn,
46793
+ precision: DEFAULT_KINESIS_PRECISION
46794
+ });
46795
+ } else {
46796
+ if (prevKinesis.kind === "usable") ops.push({
46797
+ kind: "kinesisDisable",
46798
+ streamArn: prevKinesis.streamArn
46799
+ });
46800
+ ops.push(kinesis.precision === void 0 ? {
46801
+ kind: "kinesisEnable",
46802
+ streamArn: kinesis.streamArn
46803
+ } : {
46804
+ kind: "kinesisEnable",
46805
+ streamArn: kinesis.streamArn,
46806
+ precision: kinesis.precision
46807
+ });
46808
+ }
46809
+ const policyOps = (want, had, replaced, put, del, setting) => {
46810
+ if (want.kind === "unusable") {
46811
+ onUnusable(want.reason);
46812
+ return;
46813
+ }
46814
+ if (want.kind === "absent") {
46815
+ if (had.kind !== "absent" && removes(setting)) ops.push(del);
46816
+ return;
46817
+ }
46818
+ if (!replaced && had.kind === "usable" && samePolicyDocument$1(had.document, want.document)) return;
46819
+ ops.push(put(want.document));
46820
+ };
46821
+ policyOps(readTablePolicy(desired), readTablePolicy(prev), false, (document) => ({
46822
+ kind: "putTablePolicy",
46823
+ document
46824
+ }), { kind: "deleteTablePolicy" }, "tablePolicy");
46825
+ policyOps(readStreamPolicy$1(desired), readStreamPolicy$1(prev), options.streamReplaced === true, (document) => ({
46826
+ kind: "putStreamPolicy",
46827
+ document
46828
+ }), { kind: "deleteStreamPolicy" }, "streamPolicy");
46829
+ return ops;
46830
+ }
46831
+ function planReplicaSettingCorrections(desired, live, only) {
46832
+ const ops = [];
46833
+ const pitr = readPitrSpec(desired?.[PITR_KEY]);
46834
+ if (only.has("pitr") && pitr.kind === "usable" && live.pitr !== void 0) {
46835
+ if (pitr.enabled && !live.pitr.enabled) ops.push(pitr.recoveryPeriodInDays === void 0 ? {
46836
+ kind: "pitr",
46837
+ enabled: pitr.enabled
46838
+ } : {
46839
+ kind: "pitr",
46840
+ enabled: pitr.enabled,
46841
+ recoveryPeriodInDays: pitr.recoveryPeriodInDays
46842
+ });
46843
+ }
46844
+ const ci = readContributorInsightsSpec(desired?.[CONTRIBUTOR_INSIGHTS_KEY], CI_PATH);
46845
+ if (only.has("contributorInsights") && ci.kind === "usable" && live.contributorInsightsEnabled !== void 0 && live.contributorInsightsEnabled !== ci.enabled) ops.push(!ci.enabled ? {
46846
+ kind: "contributorInsights",
46847
+ action: "DISABLE"
46848
+ } : ci.mode === void 0 ? {
46849
+ kind: "contributorInsights",
46850
+ action: "ENABLE"
46851
+ } : {
46852
+ kind: "contributorInsights",
46853
+ action: "ENABLE",
46854
+ mode: ci.mode
46855
+ });
46856
+ const kinesis = readKinesisSpec(desired?.[KINESIS_KEY]);
46857
+ if (only.has("kinesis") && kinesis.kind === "usable" && live.kinesisStreamArns !== void 0 && !live.kinesisStreamArns.has(kinesis.streamArn)) ops.push(kinesis.precision === void 0 ? {
46858
+ kind: "kinesisEnable",
46859
+ streamArn: kinesis.streamArn
46860
+ } : {
46861
+ kind: "kinesisEnable",
46862
+ streamArn: kinesis.streamArn,
46863
+ precision: kinesis.precision
46864
+ });
46865
+ const tablePolicy = readTablePolicy(desired);
46866
+ if (only.has("tablePolicy") && tablePolicy.kind === "usable" && live.hasTablePolicy === false) ops.push({
46867
+ kind: "putTablePolicy",
46868
+ document: tablePolicy.document
46869
+ });
46870
+ const streamPolicy = readStreamPolicy$1(desired);
46871
+ if (only.has("streamPolicy") && streamPolicy.kind === "usable" && live.hasStreamPolicy === false) ops.push({
46872
+ kind: "putStreamPolicy",
46873
+ document: streamPolicy.document
46874
+ });
46875
+ return ops;
46876
+ }
46877
+ function declaredReplicaSettings(desired) {
46878
+ const declared = /* @__PURE__ */ new Set();
46879
+ if (readPitrSpec(desired?.["PointInTimeRecoverySpecification"]).kind === "usable") declared.add("pitr");
46880
+ if (readContributorInsightsSpec(desired?.["ContributorInsightsSpecification"], CI_PATH).kind === "usable") declared.add("contributorInsights");
46881
+ if (readKinesisSpec(desired?.["KinesisStreamSpecification"]).kind === "usable") declared.add("kinesis");
46882
+ if (readTablePolicy(desired).kind === "usable") declared.add("tablePolicy");
46883
+ if (readStreamPolicy$1(desired).kind === "usable") declared.add("streamPolicy");
46884
+ return declared;
46885
+ }
46886
+ function enabledForReadStatus(status) {
46887
+ if (status === "ENABLED" || status === "ENABLING") return true;
46888
+ if (status === "DISABLED" || status === "DISABLING") return false;
46889
+ }
46890
+ function reverseMapReplicaPitr(status, recoveryPeriodInDays, declaredBlock) {
46891
+ const enabled = enabledForReadStatus(status);
46892
+ if (enabled === void 0) return void 0;
46893
+ const block = { PointInTimeRecoveryEnabled: enabled };
46894
+ if (!enabled) return block;
46895
+ const declared = readPitrSpec(declaredBlock);
46896
+ const period = recoveryPeriodInDays ?? (status === "ENABLING" ? (declared.kind === "usable" ? declared.recoveryPeriodInDays : void 0) ?? DEFAULT_RECOVERY_PERIOD_DAYS : void 0);
46897
+ if (period !== void 0) block["RecoveryPeriodInDays"] = period;
46898
+ return block;
46899
+ }
46900
+ function reverseMapReplicaContributorInsights(status, mode, declaredBlock) {
46901
+ const enabled = enabledForReadStatus(status);
46902
+ if (enabled === void 0) return void 0;
46903
+ const block = { Enabled: enabled };
46904
+ const declared = readContributorInsightsSpec(declaredBlock, CI_PATH);
46905
+ if (enabled && declared.kind === "usable" && declared.mode !== void 0) {
46906
+ const liveMode = mode ?? (status === "ENABLING" ? declared.mode : void 0);
46907
+ if (liveMode !== void 0) block["Mode"] = liveMode;
46908
+ }
46909
+ return block;
46910
+ }
46911
+ const READBACK_5381_MEMBERS = [
46912
+ "SSESpecification",
46913
+ "TableClass",
46914
+ "DeletionProtectionEnabled",
46915
+ TABLE_POLICY_KEY,
46916
+ REPLICA_STREAM_KEY
46917
+ ];
46918
+ const READBACK_5381_NESTED = [[
46919
+ PITR_KEY,
46920
+ "RecoveryPeriodInDays",
46921
+ "PointInTimeRecoveryEnabled"
46922
+ ], [
46923
+ CONTRIBUTOR_INSIGHTS_KEY,
46924
+ "Mode",
46925
+ "Enabled"
46926
+ ]];
46927
+ function isPre5381ReplicaBaseline(baseline) {
46928
+ if ("TableClass" in baseline || "DeletionProtectionEnabled" in baseline) return true;
46929
+ const replicas = baseline["Replicas"];
46930
+ return Array.isArray(replicas) && replicas.some((r) => isPlainObject$1(r) && "KMSMasterKeyId" in r);
46931
+ }
46932
+ function canonicalizePre5381ReplicaBaseline(baseline, aws, localRegion, localFromReadback = false) {
46933
+ if (!isPre5381ReplicaBaseline(baseline)) return baseline;
46934
+ const result = { ...baseline };
46935
+ const topLevel = {};
46936
+ for (const key of ["TableClass", "DeletionProtectionEnabled"]) if (key in result) {
46937
+ topLevel[key] = result[key];
46938
+ delete result[key];
46939
+ }
46940
+ const replicas = result["Replicas"];
46941
+ if (!Array.isArray(replicas)) return result;
46942
+ const awsReplicas = Array.isArray(aws["Replicas"]) ? aws["Replicas"] : [];
46943
+ result["Replicas"] = replicas.map((element) => {
46944
+ if (!isPlainObject$1(element)) return element;
46945
+ const region = element["Region"];
46946
+ const entry = { ...element };
46947
+ if (region === localRegion && localRegion !== "") {
46948
+ for (const [key, value] of Object.entries(topLevel)) if (localFromReadback || !(key in entry)) entry[key] = value;
46949
+ }
46950
+ if ("KMSMasterKeyId" in entry) {
46951
+ const key = entry["KMSMasterKeyId"];
46952
+ delete entry["KMSMasterKeyId"];
46953
+ if (!("SSESpecification" in entry)) entry["SSESpecification"] = { KMSMasterKeyId: key };
46954
+ }
46955
+ const live = awsReplicas.find((r) => isPlainObject$1(r) && r["Region"] === region);
46956
+ if (live !== void 0) {
46957
+ for (const member of READBACK_5381_MEMBERS) if (!(member in entry) && member in live) entry[member] = structuredClone(live[member]);
46958
+ for (const [block, member, flag] of READBACK_5381_NESTED) {
46959
+ const mine = entry[block];
46960
+ const theirs = live[block];
46961
+ if (isPlainObject$1(mine) && isPlainObject$1(theirs) && !(member in mine) && member in theirs && mine[flag] === theirs[flag]) entry[block] = {
46962
+ ...mine,
46963
+ [member]: theirs[member]
46964
+ };
46965
+ }
46966
+ }
46967
+ return entry;
46968
+ });
46969
+ return result;
46970
+ }
46971
+ const UNREAD_REPLICA_MEMBERS = [
46972
+ "TableClass",
46973
+ "DeletionProtectionEnabled",
46974
+ "SSESpecification"
46975
+ ];
46976
+ function keepUnreadReplicaMembers(desired, previous) {
46977
+ const replicas = desired["Replicas"];
46978
+ const prevReplicas = previous["Replicas"];
46979
+ if (!Array.isArray(replicas) || !Array.isArray(prevReplicas)) return desired;
46980
+ const sse = desired["SSESpecification"];
46981
+ const sseOn = isPlainObject$1(sse) && coerceCfnBoolean(sse["SSEEnabled"]) !== false;
46982
+ let changed = false;
46983
+ const completed = replicas.map((element) => {
46984
+ if (!isPlainObject$1(element)) return element;
46985
+ const live = prevReplicas.find((r) => isPlainObject$1(r) && r["Region"] === element["Region"]);
46986
+ if (live === void 0) return element;
46987
+ const entry = { ...element };
46988
+ let touched = false;
46989
+ for (const member of UNREAD_REPLICA_MEMBERS) {
46990
+ if (member === "SSESpecification" && !sseOn) continue;
46991
+ if (!(member in entry) && member in live) {
46992
+ entry[member] = structuredClone(live[member]);
46993
+ touched = true;
46994
+ }
46995
+ }
46996
+ const pitr = entry[PITR_KEY];
46997
+ const wantPitr = readPitrSpec(pitr);
46998
+ const livePitr = readPitrSpec(live[PITR_KEY]);
46999
+ if (isPlainObject$1(pitr) && wantPitr.kind === "usable" && wantPitr.enabled && wantPitr.recoveryPeriodInDays === void 0 && livePitr.kind === "usable" && livePitr.enabled && livePitr.recoveryPeriodInDays !== void 0) {
47000
+ entry[PITR_KEY] = {
47001
+ ...pitr,
47002
+ RecoveryPeriodInDays: livePitr.recoveryPeriodInDays
47003
+ };
47004
+ touched = true;
47005
+ }
47006
+ if (!touched) return element;
47007
+ changed = true;
47008
+ return entry;
47009
+ });
47010
+ return changed ? {
47011
+ ...desired,
47012
+ Replicas: completed
47013
+ } : desired;
47014
+ }
47015
+
47016
+ //#endregion
47017
+ //#region src/provisioning/dynamodb-stream-members.ts
47018
+ const STREAM_SPECIFICATION_KEY$1 = "StreamSpecification";
47019
+ const STREAM_POLICY_KEY = "ResourcePolicy";
47020
+ const STREAM_TAGS_KEY = "Tags";
47021
+ const POLICY_PATH = `${STREAM_SPECIFICATION_KEY$1}.${STREAM_POLICY_KEY}`;
47022
+ const TAGS_PATH = `${STREAM_SPECIFICATION_KEY$1}.${STREAM_TAGS_KEY}`;
47023
+ function isPlainObject(value) {
47024
+ return typeof value === "object" && value !== null && !Array.isArray(value);
47025
+ }
47026
+ function refusalOf(guard) {
47027
+ try {
47028
+ guard();
47029
+ return;
47030
+ } catch (error) {
47031
+ return describeAwsFailure(error).detail;
47032
+ }
47033
+ }
47034
+ function blockMembers(block) {
47035
+ return isPlainObject(block) ? block : {};
47036
+ }
47037
+ function readStreamPolicy(block) {
47038
+ const value = blockMembers(block)[STREAM_POLICY_KEY];
47039
+ if (value === void 0 || value === null) return { kind: "absent" };
47040
+ const containerRefusal = refusalOf(() => requireConfigObject(value, POLICY_PATH));
47041
+ if (containerRefusal !== void 0) return {
47042
+ kind: "unusable",
47043
+ reason: containerRefusal
47044
+ };
47045
+ const documentPath = `${POLICY_PATH}.PolicyDocument`;
47046
+ const document = value["PolicyDocument"];
47047
+ if (typeof document === "string") return document.trim() === "" ? {
47048
+ kind: "unusable",
47049
+ reason: `${documentPath} must not be a blank string`
47050
+ } : {
47051
+ kind: "usable",
47052
+ document
47053
+ };
47054
+ if (document === void 0 || document === null) return {
47055
+ kind: "unusable",
47056
+ reason: `${documentPath} is required when ${POLICY_PATH} is declared`
47057
+ };
47058
+ const documentRefusal = refusalOf(() => requireConfigObject(document, documentPath));
47059
+ if (documentRefusal !== void 0) return {
47060
+ kind: "unusable",
47061
+ reason: documentRefusal
47062
+ };
47063
+ return {
47064
+ kind: "usable",
47065
+ document: JSON.stringify(document)
47066
+ };
47067
+ }
47068
+ function readStreamTags(block) {
47069
+ const value = blockMembers(block)[STREAM_TAGS_KEY];
47070
+ if (value === void 0 || value === null) return { kind: "absent" };
47071
+ if (!Array.isArray(value)) return {
47072
+ kind: "unusable",
47073
+ reason: `${TAGS_PATH} must be an array of {Key, Value} entries`
47074
+ };
47075
+ const tags = /* @__PURE__ */ new Map();
47076
+ for (const [position, entry] of value.entries()) {
47077
+ const entryPath = `${TAGS_PATH}[${position}]`;
47078
+ const refusal = refusalOf(() => requireConfigObject(entry, entryPath)) ?? configStringRefusal(entry, "Key", "required", entryPath) ?? configStringRefusal(entry, "Value", "", entryPath);
47079
+ if (refusal !== void 0) return {
47080
+ kind: "unusable",
47081
+ reason: refusal
47082
+ };
47083
+ const { Key: key, Value: tagValue } = entry;
47084
+ if (typeof key !== "string") return {
47085
+ kind: "unusable",
47086
+ reason: `${entryPath}.Key is required`
47087
+ };
47088
+ tags.set(key, typeof tagValue === "string" ? tagValue : "");
47089
+ }
47090
+ return {
47091
+ kind: "usable",
47092
+ tags
47093
+ };
47094
+ }
47095
+ function streamMemberRefusals(block) {
47096
+ const refusals = [];
47097
+ const policy = readStreamPolicy(block);
47098
+ if (policy.kind === "unusable") refusals.push(policy.reason);
47099
+ const tags = readStreamTags(block);
47100
+ if (tags.kind === "unusable") refusals.push(tags.reason);
47101
+ return refusals;
47102
+ }
47103
+ function planStreamMemberOps(desiredBlock, previousBlock, options, onUnusable) {
47104
+ let desiredPolicy = readStreamPolicy(desiredBlock);
47105
+ let desiredTags = readStreamTags(desiredBlock);
47106
+ if (desiredPolicy.kind === "unusable") onUnusable(desiredPolicy.reason);
47107
+ if (desiredTags.kind === "unusable") onUnusable(desiredTags.reason);
47108
+ let previousPolicy = readStreamPolicy(previousBlock);
47109
+ let previousTags = readStreamTags(previousBlock);
47110
+ if (options.freshStream) {
47111
+ if (desiredPolicy.kind === "unusable" && previousPolicy.kind === "usable") desiredPolicy = previousPolicy;
47112
+ if (desiredTags.kind === "unusable" && previousTags.kind === "usable") desiredTags = previousTags;
47113
+ previousPolicy = { kind: "absent" };
47114
+ previousTags = { kind: "absent" };
47115
+ } else if (options.contentsUnknown === true) {
47116
+ previousPolicy = {
47117
+ kind: "unusable",
47118
+ reason: ""
47119
+ };
47120
+ previousTags = { kind: "absent" };
47121
+ }
47122
+ const tagOps = [];
47123
+ if (desiredTags.kind !== "unusable") {
47124
+ const desired = desiredTags.kind === "usable" ? desiredTags.tags : /* @__PURE__ */ new Map();
47125
+ const previous = previousTags.kind === "usable" ? previousTags.tags : /* @__PURE__ */ new Map();
47126
+ const keysToRemove = [...previous.keys()].filter((key) => !desired.has(key));
47127
+ if (keysToRemove.length > 0) tagOps.push({
47128
+ kind: "untag",
47129
+ keys: keysToRemove
47130
+ });
47131
+ const tagsToSet = [...desired].filter(([key, value]) => previous.get(key) !== value).map(([Key, Value]) => ({
47132
+ Key,
47133
+ Value
47134
+ }));
47135
+ if (tagsToSet.length > 0) tagOps.push({
47136
+ kind: "tag",
47137
+ tags: tagsToSet
47138
+ });
47139
+ }
47140
+ const policyPut = desiredPolicy.kind === "usable" && !(previousPolicy.kind === "usable" && samePolicyDocument(previousPolicy.document, desiredPolicy.document));
47141
+ const policyDelete = previousPolicy.kind !== "absent" && (desiredPolicy.kind === "absent" || policyPut && tagOps.length > 0);
47142
+ const ops = [];
47143
+ if (policyDelete) ops.push({ kind: "deletePolicy" });
47144
+ ops.push(...tagOps);
47145
+ if (policyPut && desiredPolicy.kind === "usable") ops.push({
47146
+ kind: "putPolicy",
47147
+ document: desiredPolicy.document
47148
+ });
47149
+ return ops;
47150
+ }
47151
+ function samePolicyDocument(left, right) {
47152
+ if (left === right) return true;
47153
+ try {
47154
+ return canonicalJson(JSON.parse(left)) === canonicalJson(JSON.parse(right));
47155
+ } catch {
47156
+ return false;
47157
+ }
47158
+ }
47159
+ function streamDeclaresPolicy(desiredBlock) {
47160
+ return readStreamPolicy(desiredBlock).kind === "usable";
47161
+ }
47162
+ function streamDeclaresTags(desiredBlock) {
47163
+ return readStreamTags(desiredBlock).kind === "usable";
47164
+ }
47165
+ function reverseMapStreamPolicy(livePolicy, desiredBlock) {
47166
+ if (livePolicy === void 0 || livePolicy === "") return void 0;
47167
+ const declared = blockMembers(blockMembers(desiredBlock)[STREAM_POLICY_KEY])["PolicyDocument"];
47168
+ let parsed;
47169
+ try {
47170
+ parsed = JSON.parse(livePolicy);
47171
+ } catch {
47172
+ return { PolicyDocument: livePolicy };
47173
+ }
47174
+ if (typeof declared !== "string") return { PolicyDocument: parsed };
47175
+ let declaredParsed;
47176
+ try {
47177
+ declaredParsed = JSON.parse(declared);
47178
+ } catch {
47179
+ return { PolicyDocument: livePolicy };
47180
+ }
47181
+ return { PolicyDocument: canonicalJson(declaredParsed) === canonicalJson(parsed) ? declared : livePolicy };
47182
+ }
47183
+ function streamPolicyMatchesDeclared(livePolicy, desiredBlock) {
47184
+ const declared = readStreamPolicy(desiredBlock);
47185
+ if (declared.kind !== "usable" || livePolicy === void 0) return false;
47186
+ try {
47187
+ return canonicalJson(JSON.parse(livePolicy)) === canonicalJson(JSON.parse(declared.document));
47188
+ } catch {
47189
+ return false;
47190
+ }
47191
+ }
47192
+ function declaredStreamPolicyMember(desiredBlock) {
47193
+ const declared = readStreamPolicy(desiredBlock);
47194
+ return declared.kind === "usable" ? reverseMapStreamPolicy(declared.document, desiredBlock) : void 0;
47195
+ }
47196
+ function declaredStreamTagsMember(desiredBlock) {
47197
+ const declared = readStreamTags(desiredBlock);
47198
+ return declared.kind === "usable" ? [...declared.tags].map(([Key, Value]) => ({
47199
+ Key,
47200
+ Value
47201
+ })) : void 0;
47202
+ }
47203
+ function streamTagsMatchDeclared(liveTags, desiredBlock) {
47204
+ const declared = readStreamTags(desiredBlock);
47205
+ if (declared.kind !== "usable" || liveTags.length !== declared.tags.size) return false;
47206
+ return liveTags.every((tag) => declared.tags.get(tag.Key) === tag.Value);
47207
+ }
47208
+ function canonicalJson(value) {
47209
+ if (Array.isArray(value)) return `[${value.map(canonicalJson).join(",")}]`;
47210
+ if (isPlainObject(value)) return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${canonicalJson(value[key])}`).join(",")}}`;
47211
+ return JSON.stringify(value) ?? "null";
47212
+ }
47213
+
46359
47214
  //#endregion
46360
47215
  //#region src/provisioning/providers/dynamodb-globaltable-provider.ts
46361
47216
  function isTableName(id) {
@@ -46590,15 +47445,19 @@ var DynamoDBGlobalTableProvider = class {
46590
47445
  }
46591
47446
  if (sdkIndexes.length > 0) createParams.GlobalSecondaryIndexes = sdkIndexes;
46592
47447
  if (properties["LocalSecondaryIndexes"]) createParams.LocalSecondaryIndexes = properties["LocalSecondaryIndexes"];
46593
- if (properties["SSESpecification"]) {
46594
- const sse = properties["SSESpecification"];
46595
- const sseInput = { Enabled: sse["SSEEnabled"] !== void 0 ? Boolean(sse["SSEEnabled"]) : true };
46596
- if (sse["SSEType"]) sseInput.SSEType = sse["SSEType"];
46597
- createParams.SSESpecification = sseInput;
46598
- }
47448
+ const sseEnabledRefusal = configBooleanRefusal(properties["SSESpecification"], "SSEEnabled", "AWS::DynamoDB::GlobalTable SSESpecification");
47449
+ if (sseEnabledRefusal !== void 0) {
47450
+ const onReplay = replayWarn(log, context).onUnusable;
47451
+ if (!onReplay) throw new ProvisioningError(log.mask(`AWS::DynamoDB::GlobalTable ${logicalId}: ${sseEnabledRefusal}. Nothing was created; fix the template value`), resourceType, logicalId);
47452
+ onReplay(`${sseEnabledRefusal}. Encryption is enabled, the block's default.`);
47453
+ }
47454
+ const replicaSettingRefusal = replicaSettingsRefusal(properties, void 0, currentRegion);
47455
+ if (replicaSettingRefusal !== void 0 && !replayWarn(log, context).onUnusable) throw new ProvisioningError(log.mask(`AWS::DynamoDB::GlobalTable ${logicalId}: ${replicaSettingRefusal}. Nothing was created; fix the template value`), resourceType, logicalId);
47456
+ if (properties["SSESpecification"]) createParams.SSESpecification = toSdkTableSseSpecification(properties["SSESpecification"], readReplicaKmsMasterKeyId(localReplicaEntry(properties, currentRegion)));
46599
47457
  const dpeResolved = extractLocalDeletionProtection(properties, currentRegion);
46600
47458
  if (dpeResolved !== void 0) createParams.DeletionProtectionEnabled = dpeResolved;
46601
- if (properties["TableClass"]) createParams.TableClass = properties["TableClass"];
47459
+ const localTableClass = extractLocalTableClass(properties, currentRegion);
47460
+ if (localTableClass !== void 0) createParams.TableClass = localTableClass;
46602
47461
  const createCeilings = collectTableOnDemandCeilings(properties, currentRegion, diagnostics, maskSecrets);
46603
47462
  const createOnDemand = {
46604
47463
  ...createCeilings.read.value !== void 0 && { MaxReadRequestUnits: createCeilings.read.value },
@@ -46641,18 +47500,15 @@ var DynamoDBGlobalTableProvider = class {
46641
47500
  if (!replicaTags || replicaTags.length === 0) continue;
46642
47501
  await this.applyCrossRegionReplicaTagsDiff(tableInfo.tableArn, region, void 0, replicaTags, resourceType, logicalId, tableName, maskSecrets);
46643
47502
  }
46644
- if (properties["TimeToLiveSpecification"]) {
46645
- const ttl = properties["TimeToLiveSpecification"];
46646
- const attributeName = ttl["AttributeName"];
46647
- const enabled = ttl["Enabled"] !== void 0 ? Boolean(ttl["Enabled"]) : true;
46648
- if (attributeName) await this.dynamoDBClient.send(new UpdateTimeToLiveCommand({
46649
- TableName: tableName,
46650
- TimeToLiveSpecification: {
46651
- Enabled: enabled,
46652
- AttributeName: attributeName
46653
- }
46654
- }));
46655
- }
47503
+ await this.applyReplicaSettings(tableName, logicalId, currentRegion, wiringProperties, void 0, /* @__PURE__ */ new Set(), false, replayWarn(log, context).onUnusable !== void 0, /* @__PURE__ */ new Set(), void 0, warn, maskSecrets);
47504
+ const createTtl = planTimeToLive(properties["TimeToLiveSpecification"], void 0, "create");
47505
+ if (createTtl.kind === "enable") await this.dynamoDBClient.send(new UpdateTimeToLiveCommand({
47506
+ TableName: tableName,
47507
+ TimeToLiveSpecification: {
47508
+ Enabled: true,
47509
+ AttributeName: createTtl.attributeName
47510
+ }
47511
+ }));
46656
47512
  if (billingMode === "PROVISIONED") try {
46657
47513
  await this.reconcileAutoScalingTargets(tableName, [], collectAutoScalingTargets(wiringProperties, currentRegion), currentRegion, void 0, maskSecrets);
46658
47514
  } catch (autoScalingErr) {
@@ -46678,12 +47534,20 @@ var DynamoDBGlobalTableProvider = class {
46678
47534
  const region = replica.RegionName;
46679
47535
  if (!region || region === currentRegion) continue;
46680
47536
  try {
47537
+ const declared = readReplicaDeletionProtection(localReplicaEntry(wiringProperties, region), region);
47538
+ try {
47539
+ if ((declared === true ? await this.getRegionalClient(region).send(new DescribeTableCommand({ TableName: tableName })) : void 0)?.Table?.DeletionProtectionEnabled === true) await this.setReplicaDeletionProtection(tableName, region, false, logicalId, maskSecrets);
47540
+ } catch (flipError) {
47541
+ if (isInterruptedWaitError(flipError)) throw flipError;
47542
+ log.debug(`Partial-create cleanup: could not turn off deletion protection on the ${region} replica of ${log.value(tableName)}: ` + log.mask(describeAwsFailure(flipError).detail));
47543
+ }
46681
47544
  await this.dynamoDBClient.send(new UpdateTableCommand({
46682
47545
  TableName: tableName,
46683
47546
  ReplicaUpdates: [{ Delete: { RegionName: region } }]
46684
47547
  }));
46685
47548
  await this.waitForReplicaGone(tableName, region, logicalId, void 0, void 0, maskSecrets);
46686
47549
  } catch (replicaCleanupErr) {
47550
+ if (isInterruptedWaitError(replicaCleanupErr)) throw replicaCleanupErr;
46687
47551
  warn(`Partial-create cleanup: failed to drop replica ${region} on ${tableName}: ${this.cleanupFailureText(log, `Partial-create cleanup: failed to drop replica ${region} on ${tableName}: `, replicaCleanupErr)} Run: ${pasteableAwsCommand(maskSecrets)`aws dynamodb update-table --table-name ${tableName} --replica-updates 'Delete={RegionName='${region}'}' --region ${currentRegion}`.render()}`);
46688
47552
  }
46689
47553
  }
@@ -46719,13 +47583,15 @@ var DynamoDBGlobalTableProvider = class {
46719
47583
  }
46720
47584
  async addReplica(tableName, replica, region, logicalId, billingMode, diagnostics, maskSecrets = (text) => text) {
46721
47585
  const create = { RegionName: region };
46722
- if (replica["KMSMasterKeyId"]) create.KMSMasterKeyId = replica["KMSMasterKeyId"];
47586
+ const kmsMasterKeyId = readReplicaKmsMasterKeyId(replica);
47587
+ if (kmsMasterKeyId !== void 0) create.KMSMasterKeyId = kmsMasterKeyId;
46723
47588
  const replicaIndexes = toSdkReplicaGlobalSecondaryIndexes(replica["GlobalSecondaryIndexes"], billingMode, diagnostics, maskSecrets);
46724
47589
  if (replicaIndexes) create.GlobalSecondaryIndexes = replicaIndexes;
46725
47590
  const tableOverrides = toSdkReplicaThroughputOverrides(replica, billingMode, diagnostics, {}, maskSecrets);
46726
47591
  if (tableOverrides.ProvisionedThroughputOverride) create.ProvisionedThroughputOverride = tableOverrides.ProvisionedThroughputOverride;
46727
47592
  if (tableOverrides.OnDemandThroughputOverride) create.OnDemandThroughputOverride = tableOverrides.OnDemandThroughputOverride;
46728
- if (replica["TableClassOverride"]) create.TableClassOverride = replica["TableClassOverride"];
47593
+ const tableClass = readReplicaTableClass(replica);
47594
+ if (tableClass !== void 0) create.TableClassOverride = tableClass;
46729
47595
  const replicaUpdates = [{ Create: create }];
46730
47596
  for (let attempt = 1;; attempt++) try {
46731
47597
  await this.dynamoDBClient.send(new UpdateTableCommand({
@@ -46739,6 +47605,481 @@ var DynamoDBGlobalTableProvider = class {
46739
47605
  await new Promise((resolve) => setTimeout(resolve, REPLICA_COPY_RELEASE_POLL_MS));
46740
47606
  }
46741
47607
  await this.waitForReplicaActive(tableName, region, logicalId, void 0, maskSecrets);
47608
+ if (readReplicaDeletionProtection(replica, region, (message) => this.logger.warn(maskSecrets(message))) === true) await this.setReplicaDeletionProtection(tableName, region, true, logicalId, maskSecrets);
47609
+ }
47610
+ async setReplicaDeletionProtection(tableName, region, enabled, logicalId, maskSecrets, budget) {
47611
+ await this.sendReplicaDeletionProtection(tableName, region, enabled, logicalId, maskSecrets, { budget });
47612
+ await this.waitForReplicaProtectionSettled(tableName, region, enabled, logicalId, maskSecrets, budget);
47613
+ }
47614
+ async sendReplicaDeletionProtection(tableName, region, enabled, logicalId, maskSecrets, opts = {}) {
47615
+ await this.waitForGlobalTableSettled(tableName, logicalId, maskSecrets, {
47616
+ ...opts,
47617
+ region
47618
+ });
47619
+ await this.writeReplicaDeletionProtection(tableName, region, enabled);
47620
+ }
47621
+ async writeReplicaDeletionProtection(tableName, region, enabled) {
47622
+ await this.getRegionalClient(region).send(new UpdateTableCommand({
47623
+ TableName: tableName,
47624
+ DeletionProtectionEnabled: enabled
47625
+ }));
47626
+ }
47627
+ async waitForReplicaProtectionSettled(tableName, region, enabled, logicalId, maskSecrets, budget) {
47628
+ const wait = beginDeleteWait(60, budget);
47629
+ const watch = startInterruptWatch(maskSecrets(`DynamoDB replica ${region} deletion-protection change on ${tableName}`));
47630
+ try {
47631
+ while (wait.nextPoll()) {
47632
+ if (watch.isInterrupted()) throw watch.onInterrupted();
47633
+ const replica = await this.getRegionalClient(region).send(new DescribeTableCommand({ TableName: tableName }));
47634
+ if (replica.Table?.TableStatus === "ACTIVE" && replica.Table.DeletionProtectionEnabled === enabled) {
47635
+ if ((await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: tableName }))).Table?.TableStatus === "ACTIVE") return;
47636
+ }
47637
+ await new Promise((resolve) => setTimeout(resolve, REPLICA_PROTECTION_SETTLE_POLL_MS));
47638
+ }
47639
+ } finally {
47640
+ watch.dispose();
47641
+ }
47642
+ throw new ProvisioningError(maskSecrets(`DeletionProtectionEnabled=${enabled} on the ${region} replica of ${tableName} did not settle within ${wait.pollsRun} polls${wait.note()}`), "AWS::DynamoDB::GlobalTable", logicalId, tableName);
47643
+ }
47644
+ async convergeReplicaDeletionProtection(tableName, logicalId, currentRegion, previousProperties, properties, addedRegions, desiredFromReadback, warn, maskSecrets) {
47645
+ const desired = Array.isArray(properties["Replicas"]) ? properties["Replicas"] : [];
47646
+ for (const entry of desired) {
47647
+ const replica = asRecord(entry);
47648
+ const region = replica?.["Region"];
47649
+ if (typeof region !== "string" || region === currentRegion || addedRegions.has(region)) continue;
47650
+ const declared = readReplicaDeletionProtection(replica, region, warn);
47651
+ if (declared === UNUSABLE) continue;
47652
+ if (declared === void 0 && desiredFromReadback) continue;
47653
+ const previous = readReplicaDeletionProtection(localReplicaEntry(previousProperties, region), region);
47654
+ const newDpe = declared ?? false;
47655
+ const oldDpe = previous === UNUSABLE ? void 0 : previous ?? false;
47656
+ if (oldDpe !== void 0 && newDpe !== oldDpe) {
47657
+ if (oldDpe && declared === void 0) warn(`Auto-disabling DeletionProtectionEnabled on the ${region} replica of ${tableName}: the template no longer sets it for that replica. Set it to false explicitly to silence this warning.`);
47658
+ await this.setReplicaDeletionProtection(tableName, region, newDpe, logicalId, maskSecrets);
47659
+ continue;
47660
+ }
47661
+ if (declared === void 0) continue;
47662
+ let live;
47663
+ try {
47664
+ live = (await this.getRegionalClient(region).send(new DescribeTableCommand({ TableName: tableName }))).Table?.DeletionProtectionEnabled;
47665
+ } catch (readError) {
47666
+ this.logger.debug(maskSecrets(`Could not read DeletionProtectionEnabled on the ${region} replica of ${tableName}: ` + describeAwsFailure(readError).detail));
47667
+ }
47668
+ if (typeof live === "boolean" && live !== newDpe) await this.setReplicaDeletionProtection(tableName, region, newDpe, logicalId, maskSecrets);
47669
+ }
47670
+ }
47671
+ async convergeReplicaSettings(tableName, logicalId, currentRegion, properties, addedRegions, maskSecrets) {
47672
+ const kept = (Array.isArray(properties["Replicas"]) ? properties["Replicas"] : []).map(asRecord).filter((r) => typeof r?.["Region"] === "string" && r["Region"] !== currentRegion && !addedRegions.has(r["Region"]));
47673
+ if (kept.every((r) => readReplicaTableClass(r) === void 0)) return;
47674
+ let liveReplicas;
47675
+ let sourceClass;
47676
+ try {
47677
+ const described = await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: tableName }));
47678
+ liveReplicas = described.Table?.Replicas;
47679
+ sourceClass = described.Table?.TableClassSummary?.TableClass;
47680
+ } catch (readError) {
47681
+ this.logger.debug(maskSecrets(`Could not read the replicas of ${tableName} to converge their table class: ` + describeAwsFailure(readError).detail));
47682
+ return;
47683
+ }
47684
+ for (const replica of kept) {
47685
+ const region = replica["Region"];
47686
+ const live = liveReplicas?.find((r) => r.RegionName === region);
47687
+ if (!live) continue;
47688
+ const tableClass = readReplicaTableClass(replica);
47689
+ if (tableClass === void 0) continue;
47690
+ if (tableClass === (live.ReplicaTableClassSummary?.TableClass ?? sourceClass ?? "STANDARD")) {
47691
+ this.logger.debug(maskSecrets(`The ${region} replica of ${tableName} already holds its declared table class`));
47692
+ continue;
47693
+ }
47694
+ this.logger.debug(maskSecrets(`Bringing the ${region} replica of ${tableName} to its declared table class`));
47695
+ try {
47696
+ await this.dynamoDBClient.send(new UpdateTableCommand({
47697
+ TableName: tableName,
47698
+ ReplicaUpdates: [{ Update: {
47699
+ RegionName: region,
47700
+ TableClassOverride: tableClass
47701
+ } }]
47702
+ }));
47703
+ await this.waitForGlobalTableSettled(tableName, logicalId, maskSecrets);
47704
+ } catch (convergeError) {
47705
+ if (isInterruptedWaitError(convergeError)) throw convergeError;
47706
+ this.logger.debug(maskSecrets(`Could not bring the ${region} replica of ${tableName} to its declared table class: ` + describeAwsFailure(convergeError).detail));
47707
+ this.logger.warn(maskSecrets(`The ${region} replica of ${tableName} does not hold its declared TableClass, and setting it failed (${describeAwsFailure(convergeError).summary}). The next deploy that updates this table tries again.`));
47708
+ }
47709
+ }
47710
+ }
47711
+ async applyReplicaKeys(tableName, logicalId, currentRegion, properties, previousProperties, addedRegions, deferredSseUpdate, deferredSseFromTemplate, keylessSseFromTemplate, maskSecrets) {
47712
+ if (!(properties["SSESpecification"] !== void 0 && configBooleanRefusal(properties["SSESpecification"], "SSEEnabled", "AWS::DynamoDB::GlobalTable SSESpecification") === void 0 && toSdkTableSseSpecification(properties["SSESpecification"], void 0).Enabled)) return;
47713
+ const declared = /* @__PURE__ */ new Map();
47714
+ for (const entry of Array.isArray(properties["Replicas"]) ? properties["Replicas"] : []) {
47715
+ const replica = asRecord(entry);
47716
+ const region = replica?.["Region"];
47717
+ if (typeof region === "string") declared.set(region, readReplicaKmsMasterKeyId(replica));
47718
+ }
47719
+ if ([...declared.values()].every((key) => key === void 0)) return;
47720
+ const replicaKeyChanged = [...declared].some(([region, key]) => region !== currentRegion && key !== void 0 && !addedRegions.has(region) && key !== readReplicaKmsMasterKeyId(localReplicaEntry(previousProperties, region)));
47721
+ let liveKeys;
47722
+ try {
47723
+ liveKeys = await this.readLiveKeys(tableName, currentRegion);
47724
+ } catch (readError) {
47725
+ if (replicaKeyChanged || deferredSseFromTemplate || keylessSseFromTemplate) throw readError;
47726
+ this.logger.debug(maskSecrets(`Could not read the KMS keys of ${tableName} to converge them: ` + describeAwsFailure(readError).detail));
47727
+ return;
47728
+ }
47729
+ const templateChanged = replicaKeyChanged || keylessSseFromTemplate && [...declared].some(([region, key]) => region !== currentRegion && key !== void 0) || deferredSseFromTemplate && declared.get(currentRegion) !== liveKeys.get(currentRegion);
47730
+ let request;
47731
+ if (liveKeys.size < 2) {
47732
+ if (deferredSseUpdate === void 0) return;
47733
+ request = {
47734
+ TableName: tableName,
47735
+ SSESpecification: deferredSseUpdate
47736
+ };
47737
+ } else {
47738
+ const built = this.replicaKeysRequest(tableName, logicalId, liveKeys, declared, templateChanged, maskSecrets);
47739
+ if (built === void 0) return;
47740
+ request = built;
47741
+ }
47742
+ try {
47743
+ await this.dynamoDBClient.send(new UpdateTableCommand(request));
47744
+ await this.waitForGlobalTableSettled(tableName, logicalId, maskSecrets);
47745
+ } catch (keyError) {
47746
+ if (templateChanged || isInterruptedWaitError(keyError)) throw keyError;
47747
+ this.logger.debug(maskSecrets(`Could not bring the KMS keys of ${tableName} to the declared ones: ` + describeAwsFailure(keyError).detail));
47748
+ this.logger.warn(maskSecrets(`${tableName} does not hold its declared KMS keys, and setting them failed (${describeAwsFailure(keyError).summary}). The next deploy that updates this table tries again.`));
47749
+ }
47750
+ }
47751
+ async readLiveKeys(tableName, currentRegion) {
47752
+ const described = await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: tableName }));
47753
+ const keys = /* @__PURE__ */ new Map([[currentRegion, described.Table?.SSEDescription?.KMSMasterKeyArn]]);
47754
+ for (const r of described.Table?.Replicas ?? []) if (r.RegionName !== void 0 && r.RegionName !== currentRegion) keys.set(r.RegionName, r.KMSMasterKeyId);
47755
+ return keys;
47756
+ }
47757
+ replicaKeysRequest(tableName, logicalId, liveKeys, declared, templateChanged, maskSecrets) {
47758
+ const drifted = [...liveKeys].some(([region, live]) => {
47759
+ const key = declared.get(region);
47760
+ return isKmsKeyArn(key) && key !== live;
47761
+ });
47762
+ if (!templateChanged && !drifted) {
47763
+ this.logger.debug(maskSecrets(`Every region of ${tableName} already holds its declared KMS key`));
47764
+ return;
47765
+ }
47766
+ const entries = [...liveKeys].map(([region, live]) => ({ Update: {
47767
+ RegionName: region,
47768
+ KMSMasterKeyId: declared.get(region) ?? live
47769
+ } }));
47770
+ const keyless = entries.filter((e) => e.Update.KMSMasterKeyId === void 0);
47771
+ if (keyless.length > 0) {
47772
+ const text = `The KMS keys of ${tableName} were not changed: DynamoDB takes every region's key in one call, and no key is declared or reported for ${keyless.map((e) => e.Update.RegionName).join(", ")}`;
47773
+ if (templateChanged) throw new ProvisioningError(maskSecrets(`${text}. Declare a key for every replica`), "AWS::DynamoDB::GlobalTable", logicalId, tableName);
47774
+ this.logger.warn(maskSecrets(`${text}.`));
47775
+ return;
47776
+ }
47777
+ this.logger.debug(maskSecrets(`Setting the KMS key of every region of ${tableName} in one ReplicaUpdates call`));
47778
+ return {
47779
+ TableName: tableName,
47780
+ ReplicaUpdates: entries
47781
+ };
47782
+ }
47783
+ async applyReplicaSettings(tableName, logicalId, currentRegion, properties, previousProperties, freshRegions, streamReplaced, replaying, keepOnRemoval, previousLocalStreamArn, warn, maskSecrets) {
47784
+ const desired = Array.isArray(properties["Replicas"]) ? properties["Replicas"] : [];
47785
+ for (const entry of desired) {
47786
+ const replica = asRecord(entry);
47787
+ const region = replica?.["Region"];
47788
+ if (typeof region !== "string" || region === "") continue;
47789
+ const fresh = previousProperties === void 0 || freshRegions.has(region);
47790
+ const previous = previousProperties === void 0 ? void 0 : localReplicaEntry(previousProperties, region);
47791
+ const ops = planReplicaSettingOps(replica, previous, {
47792
+ fresh,
47793
+ streamReplaced,
47794
+ keepOnRemoval
47795
+ }, (reason) => warn(`The ${region} replica of ${tableName}: ${reason}, so that setting was left as it is. ` + (replaying ? `The value came from a recorded state, which a template edit cannot reach.` : `Fix the template value and re-deploy.`)));
47796
+ if (!fresh && keepOnRemoval.has("pitr") && replica?.["PointInTimeRecoverySpecification"] == null && (() => {
47797
+ const prior = readPitrSpec(previous?.["PointInTimeRecoverySpecification"]);
47798
+ return prior.kind === "usable" && prior.enabled;
47799
+ })()) warn(`The ${region} replica of ${tableName}: point-in-time recovery was not turned off, although the properties being applied (a rollback's recorded state, or a drift --revert read-back) declare none — turning it off would delete every recovery point. Turn it off by hand if that is intended.`);
47800
+ const unchanged = fresh ? /* @__PURE__ */ new Set() : declaredReplicaSettings(replica);
47801
+ for (const op of ops) unchanged.delete(settingOf(op));
47802
+ if (ops.length === 0 && unchanged.size === 0) continue;
47803
+ const client = region === currentRegion ? this.dynamoDBClient : this.getRegionalClient(region);
47804
+ await this.waitForGlobalTableSettled(tableName, logicalId, maskSecrets, { ...region !== currentRegion && { region } });
47805
+ let arns;
47806
+ const describe = async () => {
47807
+ if (arns === void 0) {
47808
+ const described = await client.send(new DescribeTableCommand({ TableName: tableName }));
47809
+ arns = {
47810
+ ...described.Table?.TableArn !== void 0 && { tableArn: described.Table.TableArn },
47811
+ ...described.Table?.LatestStreamArn !== void 0 && { streamArn: described.Table.LatestStreamArn }
47812
+ };
47813
+ }
47814
+ return arns;
47815
+ };
47816
+ for (const op of ops) try {
47817
+ await this.sendReplicaSettingOp(client, tableName, region, logicalId, op, describe, maskSecrets);
47818
+ } catch (error) {
47819
+ if (!replaying || !fresh || op.kind !== "putTablePolicy" || isInterruptedWaitError(error)) throw error;
47820
+ warn(`The ${region} replica of ${tableName} was created without its ResourcePolicy: ${describeAwsFailure(error).summary}. The next deploy that updates this table puts it.`);
47821
+ }
47822
+ const priorStreamPolicy = readStreamPolicy$1(previous);
47823
+ const desiredStreamPolicy = readStreamPolicy$1(replica);
47824
+ const streamPolicyChanged = priorStreamPolicy.kind !== "absent" && desiredStreamPolicy.kind !== "unusable" && !(desiredStreamPolicy.kind === "absent" && keepOnRemoval.has("streamPolicy")) && !(priorStreamPolicy.kind === "usable" && desiredStreamPolicy.kind === "usable" && samePolicyDocument$1(priorStreamPolicy.document, desiredStreamPolicy.document));
47825
+ if (region === currentRegion && streamReplaced && previousLocalStreamArn !== void 0 && streamPolicyChanged && (await describe()).streamArn !== previousLocalStreamArn) await this.deleteOldStreamPolicy(client, previousLocalStreamArn, tableName, warn, maskSecrets);
47826
+ if (unchanged.size === 0) continue;
47827
+ const live = await this.readLiveReplicaSettings(client, tableName, region, unchanged, describe, maskSecrets);
47828
+ for (const op of planReplicaSettingCorrections(replica, live, unchanged)) {
47829
+ const member = SETTING_MEMBER[settingOf(op)];
47830
+ this.logger.debug(maskSecrets(`Bringing the ${region} replica of ${tableName} to its declared ${member}`));
47831
+ try {
47832
+ await this.sendReplicaSettingOp(client, tableName, region, logicalId, op, describe, maskSecrets);
47833
+ } catch (convergeError) {
47834
+ if (isInterruptedWaitError(convergeError)) throw convergeError;
47835
+ this.logger.debug(maskSecrets(`Could not bring the ${region} replica of ${tableName} to its declared ${member}: ` + describeAwsFailure(convergeError).detail));
47836
+ this.logger.warn(maskSecrets(`The ${region} replica of ${tableName} does not hold its declared ${member}, and setting it failed (${describeAwsFailure(convergeError).summary}). The next deploy that updates this table tries again.`));
47837
+ }
47838
+ }
47839
+ }
47840
+ }
47841
+ async readLiveReplicaSettings(client, tableName, region, wanted, describe, maskSecrets) {
47842
+ const live = {};
47843
+ const attempt = async (what, read) => {
47844
+ try {
47845
+ await read();
47846
+ } catch (readError) {
47847
+ this.logger.debug(maskSecrets(`Could not read ${what} of the ${region} replica of ${tableName}: ` + describeAwsFailure(readError).detail));
47848
+ }
47849
+ };
47850
+ if (wanted.has("pitr")) await attempt("point-in-time recovery", async () => {
47851
+ const pitr = (await client.send(new DescribeContinuousBackupsCommand({ TableName: tableName }))).ContinuousBackupsDescription?.PointInTimeRecoveryDescription;
47852
+ const status = pitr?.PointInTimeRecoveryStatus;
47853
+ if (status === "ENABLED" || status === "DISABLED") live.pitr = {
47854
+ enabled: status === "ENABLED",
47855
+ ...pitr?.RecoveryPeriodInDays !== void 0 && { recoveryPeriodInDays: pitr.RecoveryPeriodInDays }
47856
+ };
47857
+ });
47858
+ if (wanted.has("contributorInsights")) await attempt("Contributor Insights", async () => {
47859
+ const status = (await client.send(new DescribeContributorInsightsCommand({ TableName: tableName }))).ContributorInsightsStatus;
47860
+ if (status === "ENABLED" || status === "ENABLING") live.contributorInsightsEnabled = true;
47861
+ else if (status === "DISABLED" || status === "DISABLING") live.contributorInsightsEnabled = false;
47862
+ });
47863
+ if (wanted.has("kinesis")) await attempt("the Kinesis streaming destination", async () => {
47864
+ live.kinesisStreamArns = await this.activeKinesisStreamArns(client, tableName);
47865
+ });
47866
+ const hasPolicy = async (arn) => {
47867
+ if (arn === void 0) return void 0;
47868
+ try {
47869
+ await client.send(new GetResourcePolicyCommand({ ResourceArn: arn }));
47870
+ return true;
47871
+ } catch (error) {
47872
+ if (error instanceof PolicyNotFoundException) return false;
47873
+ throw error;
47874
+ }
47875
+ };
47876
+ if (wanted.has("tablePolicy")) await attempt("the resource policy", async () => {
47877
+ const answer = await hasPolicy((await describe()).tableArn);
47878
+ if (answer !== void 0) live.hasTablePolicy = answer;
47879
+ });
47880
+ if (wanted.has("streamPolicy")) await attempt("the stream resource policy", async () => {
47881
+ const answer = await hasPolicy((await describe()).streamArn);
47882
+ if (answer !== void 0) live.hasStreamPolicy = answer;
47883
+ });
47884
+ return live;
47885
+ }
47886
+ async deleteOldStreamPolicy(client, streamArn, tableName, warn, maskSecrets) {
47887
+ try {
47888
+ await this.retrySettlingRefusal(() => client.send(new DeleteResourcePolicyCommand({ ResourceArn: streamArn })), `delete the policy of the retired stream of ${tableName}`, maskSecrets);
47889
+ } catch (error) {
47890
+ if (isInterruptedWaitError(error)) throw error;
47891
+ if (error instanceof PolicyNotFoundException || error instanceof ResourceNotFoundException$1) return;
47892
+ warn(`The previous stream of ${tableName} (retired by the StreamViewType change) keeps its old resource policy until it expires: deleting it failed (${describeAwsFailure(error).summary}).`);
47893
+ }
47894
+ }
47895
+ async kinesisStreaming(client, tableName, streamArn, refusal) {
47896
+ if (isInterruptedWaitError(refusal)) throw refusal;
47897
+ try {
47898
+ return (await this.activeKinesisStreamArns(client, tableName)).has(streamArn);
47899
+ } catch {
47900
+ throw refusal;
47901
+ }
47902
+ }
47903
+ async activeKinesisStreamArns(client, tableName) {
47904
+ const out = await client.send(new DescribeKinesisStreamingDestinationCommand({ TableName: tableName }));
47905
+ return new Set((out.KinesisDataStreamDestinations ?? []).filter((d) => d.DestinationStatus === "ACTIVE" || d.DestinationStatus === "ENABLING").flatMap((d) => d.StreamArn !== void 0 ? [d.StreamArn] : []));
47906
+ }
47907
+ async sendReplicaSettingOp(client, tableName, region, logicalId, op, describe, maskSecrets) {
47908
+ const scope = `the ${region} replica of ${tableName}`;
47909
+ const arnFor = async (which) => {
47910
+ const arn = (await describe())[which];
47911
+ if (arn === void 0 || arn === "") throw new ProvisioningError(maskSecrets(`Cannot apply ${SETTING_MEMBER[settingOf(op)]} to ${scope}: DescribeTable returned no ${which === "tableArn" ? "TableArn" : "LatestStreamArn (the table has no stream)"}`), "AWS::DynamoDB::GlobalTable", logicalId, tableName);
47912
+ return arn;
47913
+ };
47914
+ const send = (call) => this.retrySettlingRefusal(call, `${op.kind} on ${scope}`, maskSecrets);
47915
+ switch (op.kind) {
47916
+ case "pitr":
47917
+ await send(() => client.send(new UpdateContinuousBackupsCommand({
47918
+ TableName: tableName,
47919
+ PointInTimeRecoverySpecification: {
47920
+ PointInTimeRecoveryEnabled: op.enabled,
47921
+ ...op.recoveryPeriodInDays !== void 0 && { RecoveryPeriodInDays: op.recoveryPeriodInDays }
47922
+ }
47923
+ })));
47924
+ break;
47925
+ case "contributorInsights":
47926
+ await send(() => client.send(new UpdateContributorInsightsCommand({
47927
+ TableName: tableName,
47928
+ ContributorInsightsAction: op.action,
47929
+ ...op.mode !== void 0 && { ContributorInsightsMode: op.mode }
47930
+ })));
47931
+ break;
47932
+ case "kinesisEnable":
47933
+ if (await this.activeKinesisStreamArns(client, tableName).then((arns) => arns.has(op.streamArn), () => false)) break;
47934
+ try {
47935
+ await send(() => client.send(new EnableKinesisStreamingDestinationCommand({
47936
+ TableName: tableName,
47937
+ StreamArn: op.streamArn,
47938
+ ...op.precision !== void 0 && { EnableKinesisStreamingConfiguration: { ApproximateCreationDateTimePrecision: op.precision } }
47939
+ })));
47940
+ } catch (error) {
47941
+ if (!await this.kinesisStreaming(client, tableName, op.streamArn, error)) throw error;
47942
+ }
47943
+ break;
47944
+ case "kinesisDisable":
47945
+ try {
47946
+ await send(() => client.send(new DisableKinesisStreamingDestinationCommand({
47947
+ TableName: tableName,
47948
+ StreamArn: op.streamArn
47949
+ })));
47950
+ } catch (error) {
47951
+ if (await this.kinesisStreaming(client, tableName, op.streamArn, error)) throw error;
47952
+ }
47953
+ break;
47954
+ case "kinesisPrecision":
47955
+ await send(() => client.send(new UpdateKinesisStreamingDestinationCommand({
47956
+ TableName: tableName,
47957
+ StreamArn: op.streamArn,
47958
+ UpdateKinesisStreamingConfiguration: { ApproximateCreationDateTimePrecision: op.precision }
47959
+ })));
47960
+ break;
47961
+ case "putTablePolicy":
47962
+ case "putStreamPolicy": {
47963
+ const arn = await arnFor(op.kind === "putTablePolicy" ? "tableArn" : "streamArn");
47964
+ await send(() => client.send(new PutResourcePolicyCommand({
47965
+ ResourceArn: arn,
47966
+ Policy: op.document
47967
+ })));
47968
+ break;
47969
+ }
47970
+ case "deleteTablePolicy":
47971
+ case "deleteStreamPolicy": {
47972
+ if (op.kind === "deleteStreamPolicy" && (await describe()).streamArn === void 0) break;
47973
+ const arn = await arnFor(op.kind === "deleteTablePolicy" ? "tableArn" : "streamArn");
47974
+ try {
47975
+ await send(() => client.send(new DeleteResourcePolicyCommand({ ResourceArn: arn })));
47976
+ } catch (error) {
47977
+ if (!(error instanceof PolicyNotFoundException)) throw error;
47978
+ }
47979
+ break;
47980
+ }
47981
+ }
47982
+ this.logger.debug(maskSecrets(`Applied ${op.kind} to ${scope}`));
47983
+ }
47984
+ async retrySettlingRefusal(call, label, maskSecrets) {
47985
+ const watch = startInterruptWatch(maskSecrets(`DynamoDB ${label}`));
47986
+ try {
47987
+ let delayMs = SETTLING_RETRY_INITIAL_MS;
47988
+ for (let attempt = 1;; attempt++) try {
47989
+ await call();
47990
+ return;
47991
+ } catch (error) {
47992
+ const detail = describeAwsFailure(error).detail;
47993
+ const name = error instanceof Error ? error.name : "";
47994
+ if (!(/being enabled|being updated|please retry later|backups are being/i.test(detail) || name === "ResourceInUseException" || name === "LimitExceededException") || attempt >= 8) throw error;
47995
+ this.logger.debug(maskSecrets(`Transient refusal of ${label} (attempt ${attempt}/${8}): ${detail} - retrying in ${delayMs}ms`));
47996
+ await new Promise((resolve) => setTimeout(resolve, delayMs));
47997
+ if (watch.isInterrupted()) throw watch.onInterrupted();
47998
+ delayMs = Math.min(delayMs * 2, 3e4);
47999
+ }
48000
+ } finally {
48001
+ watch.dispose();
48002
+ }
48003
+ }
48004
+ async sendLocalSettingUpdate(input, fromTemplate, what, tableName, logicalId, maskSecrets) {
48005
+ try {
48006
+ await this.dynamoDBClient.send(new UpdateTableCommand(input));
48007
+ await this.waitForGlobalTableSettled(tableName, logicalId, maskSecrets);
48008
+ } catch (error) {
48009
+ if (fromTemplate || isInterruptedWaitError(error)) throw error;
48010
+ this.logger.debug(maskSecrets(`Could not bring the ${what} of ${tableName} to the declared one: ` + describeAwsFailure(error).detail));
48011
+ this.logger.warn(maskSecrets(`${tableName} does not hold its declared ${what}, and setting it failed (${describeAwsFailure(error).summary}). The next deploy that updates this table tries again.`));
48012
+ }
48013
+ }
48014
+ async waitForGlobalTableSettled(tableName, logicalId, maskSecrets, opts = {}) {
48015
+ const wait = beginDeleteWait(opts.maxPolls ?? 600, opts.budget);
48016
+ const watch = startInterruptWatch(maskSecrets(`DynamoDB global table ${tableName} settling after an update`));
48017
+ try {
48018
+ while (wait.nextPoll()) {
48019
+ if (opts.interruptible !== false && watch.isInterrupted()) throw watch.onInterrupted();
48020
+ const table = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: tableName }))).Table;
48021
+ if (table?.TableStatus === "ACTIVE" && table.SSEDescription?.Status !== "UPDATING" && (table.Replicas ?? []).every((r) => r.ReplicaStatus === "ACTIVE")) {
48022
+ if (opts.region === void 0) return;
48023
+ if ((await this.getRegionalClient(opts.region).send(new DescribeTableCommand({ TableName: tableName }))).Table?.TableStatus === "ACTIVE") return;
48024
+ }
48025
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
48026
+ }
48027
+ } finally {
48028
+ watch.dispose();
48029
+ }
48030
+ throw new ProvisioningError(maskSecrets(`Table ${tableName} and its replicas did not settle within ${wait.pollsRun} polls${wait.note()}`), "AWS::DynamoDB::GlobalTable", logicalId, tableName);
48031
+ }
48032
+ async dropReplicaForDelete(tableName, region, removeProtection, logicalId, budget, maskSecrets) {
48033
+ let flippedOff = false;
48034
+ if (removeProtection) {
48035
+ try {
48036
+ if ((await this.getRegionalClient(region).send(new DescribeTableCommand({ TableName: tableName }))).Table?.DeletionProtectionEnabled === true) {
48037
+ await this.sendReplicaDeletionProtection(tableName, region, false, logicalId, maskSecrets, { budget });
48038
+ flippedOff = true;
48039
+ }
48040
+ } catch (flipError) {
48041
+ if (isInterruptedWaitError(flipError)) throw flipError;
48042
+ this.logger.debug(maskSecrets(`Could not disable DeletionProtectionEnabled on the ${region} replica of ${tableName}: ` + describeAwsFailure(flipError).detail));
48043
+ }
48044
+ if (flippedOff) try {
48045
+ await this.waitForReplicaProtectionSettled(tableName, region, false, logicalId, maskSecrets, budget);
48046
+ } catch (waitError) {
48047
+ await this.restoreReplicaDeletionProtection(tableName, region, logicalId, maskSecrets, isInterruptedWaitError(waitError) ? "the destroy was interrupted" : "its deletion-protection change did not settle");
48048
+ throw waitError;
48049
+ }
48050
+ }
48051
+ try {
48052
+ await this.dynamoDBClient.send(new UpdateTableCommand({
48053
+ TableName: tableName,
48054
+ ReplicaUpdates: [{ Delete: { RegionName: region } }]
48055
+ }));
48056
+ } catch (dropError) {
48057
+ if (flippedOff) await this.restoreReplicaDeletionProtection(tableName, region, logicalId, maskSecrets, "it could not be dropped");
48058
+ throw dropError;
48059
+ }
48060
+ }
48061
+ async restoreReplicaDeletionProtection(tableName, region, logicalId, maskSecrets, reason) {
48062
+ for (let attempt = 1;; attempt++) try {
48063
+ if (attempt === 1) await this.waitForGlobalTableSettled(tableName, logicalId, maskSecrets, {
48064
+ region,
48065
+ maxPolls: 60,
48066
+ interruptible: false
48067
+ }).catch(() => void 0);
48068
+ await this.writeReplicaDeletionProtection(tableName, region, true);
48069
+ return;
48070
+ } catch (restoreError) {
48071
+ if (attempt === 1 && restoreError instanceof Error && restoreError.name === "ThrottlingException") {
48072
+ await new Promise((resolve) => setTimeout(resolve, DELETION_PROTECTION_REFLIP_MS));
48073
+ continue;
48074
+ }
48075
+ try {
48076
+ this.logger.debug(maskSecrets(`Could not restore DeletionProtectionEnabled on the ${region} replica of ${tableName}: ${describeAwsFailure(restoreError).detail}`));
48077
+ const head = maskSecrets(`The ${region} replica of ${tableName} was not deleted (${reason}), and its deletion protection, which this destroy turned off, could not be turned back on (${describeAwsFailure(restoreError).summary}). It is LEFT UNPROTECTED. To restore it, run: `);
48078
+ const command = pasteableAwsCommand(maskSecrets)`aws dynamodb update-table --table-name ${tableName} --deletion-protection-enabled --region ${region}`.render();
48079
+ this.logger.warn(safeMsg`${head}${command}`);
48080
+ } catch {}
48081
+ return;
48082
+ }
46742
48083
  }
46743
48084
  async waitForRegionalCopyReleased(tableName, region, maskSecrets) {
46744
48085
  const client = this.getRegionalClient(region);
@@ -46768,6 +48109,7 @@ var DynamoDBGlobalTableProvider = class {
46768
48109
  }
46769
48110
  }
46770
48111
  async update(logicalId, physicalId, resourceType, properties, previousProperties, context) {
48112
+ if (context?.desiredFromAwsReadback === true) properties = keepUnreadReplicaMembers(properties, previousProperties);
46771
48113
  const log = this.operationSinks(context, [[properties["TableName"], physicalId], [previousProperties["TableName"], physicalId]]);
46772
48114
  const maskSecrets = log.mask;
46773
48115
  const warn = log.warn;
@@ -46782,6 +48124,18 @@ var DynamoDBGlobalTableProvider = class {
46782
48124
  } catch {
46783
48125
  guardRegion = "";
46784
48126
  }
48127
+ const protectedReplica = guardRegion === "" || extractLocalDeletionProtection(previousProperties, guardRegion) === true ? void 0 : (Array.isArray(previousProperties["Replicas"]) ? previousProperties["Replicas"] : []).map(asRecord).find((r) => typeof r?.["Region"] === "string" && r["Region"] !== guardRegion && coerceCfnBoolean(r["DeletionProtectionEnabled"]) === true)?.["Region"];
48128
+ if (typeof protectedReplica === "string") return protectedReplacementAdvice({
48129
+ evidence: `cdkd's recorded properties for this table carry DeletionProtectionEnabled: true for the ${protectedReplica} replica`,
48130
+ replaceFlags,
48131
+ disable: {
48132
+ before: "aws dynamodb update-table --table-name",
48133
+ identifier: physicalId,
48134
+ after: "--no-deletion-protection-enabled",
48135
+ caveat: "Run it with --region set to that replica's region.",
48136
+ maskSecrets
48137
+ }
48138
+ });
46785
48139
  return extractLocalDeletionProtection(previousProperties, guardRegion) === true ? protectedReplacementAdvice({
46786
48140
  evidence: "cdkd's recorded properties for this table carry DeletionProtectionEnabled: true for the deploy region",
46787
48141
  replaceFlags,
@@ -46819,8 +48173,13 @@ var DynamoDBGlobalTableProvider = class {
46819
48173
  refuse(describeAwsFailure(error).detail, error);
46820
48174
  }
46821
48175
  if (refusal === void 0 && !deepEqual(properties["StreamSpecification"], previousProperties["StreamSpecification"])) refusal = configStringRefusal(properties["StreamSpecification"], "StreamViewType", "NEW_AND_OLD_IMAGES", "AWS::DynamoDB::GlobalTable StreamSpecification");
48176
+ if (refusal === void 0 && (changed("SSESpecification") || !deepEqual(replicaKeyBlocks(properties), replicaKeyBlocks(previousProperties)))) refusal = configBooleanRefusal(properties["SSESpecification"], "SSEEnabled", "AWS::DynamoDB::GlobalTable SSESpecification");
46822
48177
  if (refusal === void 0 && changed("GlobalSecondaryIndexes")) refusal = globalSecondaryIndexesShapeDetail(properties["GlobalSecondaryIndexes"], maskSecrets);
48178
+ if (refusal === void 0) refusal = replicaSettingsRefusal(properties, previousProperties);
46823
48179
  if (refusal !== void 0) refuse(refusal);
48180
+ } else {
48181
+ const sseEnabledRefusal = configBooleanRefusal(properties["SSESpecification"], "SSEEnabled", "AWS::DynamoDB::GlobalTable SSESpecification");
48182
+ if (sseEnabledRefusal !== void 0) warn(`${sseEnabledRefusal}. Encryption is treated as enabled, the block's default.`);
46824
48183
  }
46825
48184
  const currentRegion = await this.dynamoDBClient.config.region() ?? "";
46826
48185
  let effectiveProperties;
@@ -46884,28 +48243,38 @@ var DynamoDBGlobalTableProvider = class {
46884
48243
  toSdkReplicaThroughputOverrides(replica, newBilling, diagnostics, {}, maskSecrets);
46885
48244
  }
46886
48245
  this.reportThroughputDiagnostics(diagnostics, logicalId, physicalId, maskSecrets);
48246
+ let deferredSseUpdate;
48247
+ let deferredSseFromTemplate = false;
48248
+ let keylessSseFromTemplate = false;
46887
48249
  const newDpe = extractLocalDeletionProtection(properties, currentRegion);
46888
48250
  const oldDpe = extractLocalDeletionProtection(previousProperties, currentRegion);
46889
48251
  const awsDpe = describeResp.Table?.DeletionProtectionEnabled;
46890
48252
  const flatUpdate = { TableName: physicalId };
46891
48253
  let flatChanged = false;
48254
+ let tableClassUpdate;
48255
+ let sseUpdate;
48256
+ let sseFromTemplate = false;
48257
+ let tableClassFromTemplate = false;
46892
48258
  if (newDpe !== oldDpe || newDpe !== void 0 && typeof awsDpe === "boolean" && Boolean(newDpe) !== awsDpe) {
46893
48259
  if ((oldDpe === true || awsDpe === true) && Boolean(newDpe ?? false) === false && !(newDpe !== void 0)) warn(`Auto-disabling DeletionProtectionEnabled on ${physicalId}: the CDK code does not set 'deletionProtection: true' but AWS has it enabled. AWS will accept DeleteTable on this resource after this deploy. If you meant to keep protection on, set 'deletionProtection: true' in your CDK code; if you meant to disable it explicitly, set 'deletionProtection: false' to silence this warning.`);
46894
48260
  flatUpdate.DeletionProtectionEnabled = Boolean(newDpe ?? false);
46895
48261
  flatChanged = true;
46896
48262
  }
46897
- if (properties["TableClass"] !== void 0 && properties["TableClass"] !== previousProperties["TableClass"]) {
46898
- flatUpdate.TableClass = properties["TableClass"];
46899
- flatChanged = true;
46900
- }
46901
- if (properties["SSESpecification"] !== void 0 && !deepEqual(properties["SSESpecification"], previousProperties["SSESpecification"])) {
46902
- const sse = properties["SSESpecification"];
46903
- flatUpdate.SSESpecification = {
46904
- Enabled: sse["SSEEnabled"] !== void 0 ? Boolean(sse["SSEEnabled"]) : true,
46905
- ...sse["SSEType"] !== void 0 && { SSEType: sse["SSEType"] }
46906
- };
46907
- flatChanged = true;
46908
- }
48263
+ const tableClassChange = tableClassToSend(extractLocalTableClass(previousProperties, currentRegion), extractLocalTableClass(properties, currentRegion));
48264
+ const declaredTableClass = extractLocalTableClass(properties, currentRegion);
48265
+ const liveTableClass = describeResp.Table?.TableClassSummary?.TableClass ?? "STANDARD";
48266
+ if (tableClassChange !== void 0) {
48267
+ tableClassUpdate = tableClassChange;
48268
+ tableClassFromTemplate = true;
48269
+ } else if (declaredTableClass !== void 0 && declaredTableClass !== liveTableClass) tableClassUpdate = declaredTableClass;
48270
+ const newLocalKmsKey = readReplicaKmsMasterKeyId(localReplicaEntry(properties, currentRegion));
48271
+ if (properties["SSESpecification"] !== void 0 && (!deepEqual(properties["SSESpecification"], previousProperties["SSESpecification"]) || newLocalKmsKey !== readReplicaKmsMasterKeyId(localReplicaEntry(previousProperties, currentRegion)))) {
48272
+ sseUpdate = toSdkTableSseSpecification(properties["SSESpecification"], newLocalKmsKey);
48273
+ sseFromTemplate = true;
48274
+ } else if (properties["SSESpecification"] === void 0 && previousProperties["SSESpecification"] !== void 0 && toSdkTableSseSpecification(previousProperties["SSESpecification"], void 0).Enabled) {
48275
+ sseUpdate = { Enabled: false };
48276
+ sseFromTemplate = true;
48277
+ } else if (isKmsKeyArn(newLocalKmsKey) && properties["SSESpecification"] !== void 0 && configBooleanRefusal(properties["SSESpecification"], "SSEEnabled", "AWS::DynamoDB::GlobalTable SSESpecification") === void 0 && toSdkTableSseSpecification(properties["SSESpecification"], void 0).Enabled && describeResp.Table?.SSEDescription?.KMSMasterKeyArn !== newLocalKmsKey) sseUpdate = toSdkTableSseSpecification(properties["SSESpecification"], newLocalKmsKey);
46909
48278
  if (properties["StreamSpecification"] !== void 0 && !deepEqual(properties["StreamSpecification"], previousProperties["StreamSpecification"])) {
46910
48279
  let streamSpecUnusable = false;
46911
48280
  const streamViewType = readConfigString(properties["StreamSpecification"], "StreamViewType", "NEW_AND_OLD_IMAGES", "AWS::DynamoDB::GlobalTable StreamSpecification", { onUnusable: (message) => {
@@ -46969,6 +48338,21 @@ var DynamoDBGlobalTableProvider = class {
46969
48338
  await this.dynamoDBClient.send(new UpdateTableCommand(flatUpdate));
46970
48339
  await this.waitForTableActiveAfterUpdate(physicalId, logicalId, void 0, void 0, maskSecrets);
46971
48340
  }
48341
+ if (tableClassUpdate !== void 0) await this.sendLocalSettingUpdate({
48342
+ TableName: physicalId,
48343
+ TableClass: tableClassUpdate
48344
+ }, tableClassFromTemplate, "TableClass", physicalId, logicalId, maskSecrets);
48345
+ const liveHasCrossRegionReplica = (describeResp.Table?.Replicas ?? []).some((r) => r.RegionName !== void 0 && r.RegionName !== currentRegion);
48346
+ if (sseUpdate?.KMSMasterKeyId !== void 0 && liveHasCrossRegionReplica) {
48347
+ deferredSseUpdate = sseUpdate;
48348
+ deferredSseFromTemplate = sseFromTemplate;
48349
+ } else if (sseUpdate !== void 0) {
48350
+ await this.sendLocalSettingUpdate({
48351
+ TableName: physicalId,
48352
+ SSESpecification: sseUpdate
48353
+ }, sseFromTemplate, "encryption", physicalId, logicalId, maskSecrets);
48354
+ keylessSseFromTemplate = sseFromTemplate && sseUpdate.KMSMasterKeyId === void 0 && liveHasCrossRegionReplica;
48355
+ }
46972
48356
  const gsiHandledByBillingFlip = /* @__PURE__ */ new Set();
46973
48357
  if (oldBilling !== newBilling) {
46974
48358
  const billingUpdate = {
@@ -47081,7 +48465,6 @@ var DynamoDBGlobalTableProvider = class {
47081
48465
  }));
47082
48466
  }
47083
48467
  const updateAction = { RegionName: region };
47084
- if (replica["KMSMasterKeyId"] !== void 0) updateAction.KMSMasterKeyId = replica["KMSMasterKeyId"];
47085
48468
  const replicaIndexes = toSdkReplicaGlobalSecondaryIndexes(replica["GlobalSecondaryIndexes"], newBilling, void 0, maskSecrets);
47086
48469
  if (replicaIndexes) updateAction.GlobalSecondaryIndexes = replicaIndexes;
47087
48470
  const replicaOverrides = toSdkReplicaThroughputOverrides(replica, newBilling, void 0, {}, maskSecrets);
@@ -47094,8 +48477,9 @@ var DynamoDBGlobalTableProvider = class {
47094
48477
  if (oldReplicaOverrides.ProvisionedThroughputOverride && !replicaOverrides.ProvisionedThroughputOverride) droppedOverrides.push("ReadProvisionedThroughputSettings");
47095
48478
  if (droppedOverrides.length > 0) warn(`Cross-region replica ${region} of ${physicalId}: the template no longer declares ${droppedOverrides.map((o) => maskSecrets(o)).join(" / ")}, but DynamoDB offers no way to CLEAR a replica-level throughput override — a -1 sentinel is stored literally, and an empty override block wedges the table in UPDATING. The previous override is STILL IN EFFECT on AWS. Set an explicit value, or remove and re-add the replica, to change it.`);
47096
48479
  }
47097
- if (replica["TableClassOverride"]) updateAction.TableClassOverride = replica["TableClassOverride"];
47098
- if (!(updateAction.KMSMasterKeyId !== void 0 || updateAction.GlobalSecondaryIndexes !== void 0 || updateAction.TableClassOverride !== void 0 || updateAction.ProvisionedThroughputOverride !== void 0 || updateAction.OnDemandThroughputOverride !== void 0)) {
48480
+ const replicaTableClassChange = tableClassToSend(readReplicaTableClass(oldReplica), readReplicaTableClass(replica));
48481
+ if (replicaTableClassChange !== void 0) updateAction.TableClassOverride = replicaTableClassChange;
48482
+ if (!(updateAction.GlobalSecondaryIndexes !== void 0 || updateAction.TableClassOverride !== void 0 || updateAction.ProvisionedThroughputOverride !== void 0 || updateAction.OnDemandThroughputOverride !== void 0)) {
47099
48483
  debug(`Cross-region replica ${region} of ${maskSecrets(physicalId)}: only Tags-style changes detected; UpdateReplica skipped (AWS rejects empty Update actions). Tags propagation handled above via per-region client.`);
47100
48484
  continue;
47101
48485
  }
@@ -47105,6 +48489,17 @@ var DynamoDBGlobalTableProvider = class {
47105
48489
  }));
47106
48490
  await this.waitForReplicaActive(physicalId, region, logicalId, void 0, maskSecrets);
47107
48491
  }
48492
+ const addedReplicaRegions = new Set(replicaDiff.added.map((r) => r["Region"]));
48493
+ await this.convergeReplicaDeletionProtection(physicalId, logicalId, currentRegion, previousProperties, properties, addedReplicaRegions, context?.desiredFromAwsReadback === true, warn, maskSecrets);
48494
+ await this.convergeReplicaSettings(physicalId, logicalId, currentRegion, properties, addedReplicaRegions, maskSecrets);
48495
+ await this.applyReplicaKeys(physicalId, logicalId, currentRegion, properties, previousProperties, addedReplicaRegions, deferredSseUpdate, deferredSseFromTemplate, keylessSseFromTemplate, maskSecrets);
48496
+ await this.applyReplicaSettings(physicalId, logicalId, currentRegion, properties, previousProperties, addedReplicaRegions, !deepEqual(asRecord(properties["StreamSpecification"])?.["StreamViewType"], asRecord(previousProperties["StreamSpecification"])?.["StreamViewType"]), context?.replayingState === true || context?.desiredFromAwsReadback === true, new Set(context?.desiredFromAwsReadback === true ? [
48497
+ "pitr",
48498
+ "contributorInsights",
48499
+ "kinesis",
48500
+ "tablePolicy",
48501
+ "streamPolicy"
48502
+ ] : context?.replayingState === true ? ["pitr"] : []), describeResp.Table?.LatestStreamArn, warn, maskSecrets);
47108
48503
  const previousTranslatedIndexes = toSdkGlobalSecondaryIndexes(previousProperties, currentRegion, oldBilling, "min", void 0, onUnusablePreviousGsiBlock, maskSecrets);
47109
48504
  const previousSdkIndexes = previousGsiUnusable ? buildLiveRecoveryGsiBaseline(desiredSdkIndexes, describeResp.Table?.GlobalSecondaryIndexes, {
47110
48505
  carryLiveValues: oldBilling === newBilling && liveBillingMode === newBilling,
@@ -47202,28 +48597,39 @@ var DynamoDBGlobalTableProvider = class {
47202
48597
  try {
47203
48598
  await this.dynamoDBClient.send(cmd);
47204
48599
  } catch (ttlErr) {
47205
- if (describeAwsFailure(ttlErr).detail.includes("Time to live has been modified multiple times")) throw this.wrapMaskedError(log, ttlErr, (text) => new ProvisioningError(`AWS rejected TimeToLive update on ${log.value(physicalId)}: ${sentence(text)} AWS enforces a ~4-hour rate limit on TTL changes per table; wait and redeploy, or keep the previous TTL state in this deploy.`, resourceType, logicalId, physicalId, ttlErr instanceof Error ? ttlErr : void 0));
48600
+ const msg = describeAwsFailure(ttlErr).detail;
48601
+ if (cmd.input.TimeToLiveSpecification?.Enabled === false && isTtlAlreadyDisabled(msg)) {
48602
+ this.logger.debug(maskSecrets(`TimeToLive already disabled on ${physicalId}`));
48603
+ return;
48604
+ }
48605
+ if (msg.includes("Time to live has been modified multiple times")) throw this.wrapMaskedError(log, ttlErr, (text) => new ProvisioningError(`AWS rejected TimeToLive update on ${log.value(physicalId)}: ${sentence(text)} AWS rate-limits TTL changes per table (the interval can last up to about an hour); wait and redeploy, or keep the previous TTL state in this deploy.`, resourceType, logicalId, physicalId, ttlErr instanceof Error ? ttlErr : void 0));
47206
48606
  throw ttlErr;
47207
48607
  }
47208
48608
  };
47209
- const ttl = properties["TimeToLiveSpecification"];
47210
- if (ttl?.["AttributeName"]) await sendTtl(new UpdateTimeToLiveCommand({
48609
+ const ttlPlan = planTimeToLive(properties["TimeToLiveSpecification"], previousProperties["TimeToLiveSpecification"], "update");
48610
+ let ttlTarget;
48611
+ if (ttlPlan.kind === "enable" || ttlPlan.kind === "disable") ttlTarget = {
48612
+ enabled: ttlPlan.kind === "enable",
48613
+ attributeName: ttlPlan.attributeName
48614
+ };
48615
+ else if (ttlPlan.kind === "disable-live") {
48616
+ let live;
48617
+ await this.retrySettlingRefusal(async () => {
48618
+ live = (await this.dynamoDBClient.send(new DescribeTimeToLiveCommand({ TableName: physicalId }))).TimeToLiveDescription;
48619
+ }, `TimeToLive read on ${physicalId}`, maskSecrets);
48620
+ const status = live?.TimeToLiveStatus;
48621
+ if ((status === "ENABLED" || status === "ENABLING") && live?.AttributeName) ttlTarget = {
48622
+ enabled: false,
48623
+ attributeName: live.AttributeName
48624
+ };
48625
+ }
48626
+ if (ttlTarget) await sendTtl(new UpdateTimeToLiveCommand({
47211
48627
  TableName: physicalId,
47212
48628
  TimeToLiveSpecification: {
47213
- Enabled: ttl["Enabled"] !== void 0 ? Boolean(ttl["Enabled"]) : true,
47214
- AttributeName: ttl["AttributeName"]
48629
+ Enabled: ttlTarget.enabled,
48630
+ AttributeName: ttlTarget.attributeName
47215
48631
  }
47216
48632
  }));
47217
- else if (previousProperties["TimeToLiveSpecification"]) {
47218
- const prevTtl = previousProperties["TimeToLiveSpecification"];
47219
- if (prevTtl["AttributeName"]) await sendTtl(new UpdateTimeToLiveCommand({
47220
- TableName: physicalId,
47221
- TimeToLiveSpecification: {
47222
- Enabled: false,
47223
- AttributeName: prevTtl["AttributeName"]
47224
- }
47225
- }));
47226
- }
47227
48633
  }
47228
48634
  const finalDescribe = await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: physicalId }));
47229
48635
  const impliedStream = replicationImpliedStreamSpecification(properties);
@@ -47579,10 +48985,7 @@ var DynamoDBGlobalTableProvider = class {
47579
48985
  try {
47580
48986
  await this.applyAutoScalingDiff(physicalId, "dynamodb:table:ReadCapacityUnits", {}, void 0, this.getRegionalAutoScalingClient(region), void 0, budget, void 0, progress);
47581
48987
  for (const indexName of tableIndexNames) await this.applyAutoScalingDiff(physicalId, "dynamodb:index:ReadCapacityUnits", {}, void 0, this.getRegionalAutoScalingClient(region), indexName, budget, void 0, progress);
47582
- await this.dynamoDBClient.send(new UpdateTableCommand({
47583
- TableName: physicalId,
47584
- ReplicaUpdates: [{ Delete: { RegionName: region } }]
47585
- }));
48988
+ await this.dropReplicaForDelete(physicalId, region, context?.removeProtection === true, logicalId, budget, deleteMask);
47586
48989
  progress.stripped = true;
47587
48990
  await this.waitForReplicaGone(physicalId, region, logicalId, REPLICA_GONE_WAIT_ATTEMPTS, budget, context?.maskSecrets);
47588
48991
  } catch (replicaErr) {
@@ -47709,7 +49112,8 @@ var DynamoDBGlobalTableProvider = class {
47709
49112
  throw err;
47710
49113
  }
47711
49114
  }
47712
- async readCurrentState(physicalId, _logicalId, _resourceType) {
49115
+ async readCurrentState(physicalId, _logicalId, _resourceType, properties, context) {
49116
+ const afterOwnWrite = context?.afterOwnWrite === true;
47713
49117
  try {
47714
49118
  const table = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: physicalId }))).Table;
47715
49119
  if (!table) return void 0;
@@ -47729,21 +49133,37 @@ var DynamoDBGlobalTableProvider = class {
47729
49133
  if (table.SSEDescription.SSEType !== void 0) sse["SSEType"] = table.SSEDescription.SSEType;
47730
49134
  result["SSESpecification"] = sse;
47731
49135
  }
47732
- if (table.TableClassSummary?.TableClass) result["TableClass"] = table.TableClassSummary.TableClass;
47733
- if (table.DeletionProtectionEnabled !== void 0) result["DeletionProtectionEnabled"] = table.DeletionProtectionEnabled;
47734
49136
  const currentRegion = await this.dynamoDBClient.config.region() ?? "";
47735
49137
  const tableNameForSubs = table.TableName ?? physicalId;
47736
49138
  const sdkReplicas = table.Replicas && table.Replicas.length > 0 ? currentRegion && !table.Replicas.some((r) => r.RegionName === currentRegion) ? [...table.Replicas, { RegionName: currentRegion }] : table.Replicas : [{ RegionName: currentRegion }];
47737
49139
  const replicas = await Promise.all(sdkReplicas.map(async (r) => {
47738
49140
  const entry = { Region: r.RegionName };
47739
- if (r.KMSMasterKeyId !== void 0) entry["KMSMasterKeyId"] = r.KMSMasterKeyId;
47740
49141
  if (!r.RegionName) return entry;
47741
49142
  const isLocal = r.RegionName === currentRegion;
49143
+ const kmsKey = isLocal ? table.SSEDescription?.Status === "ENABLED" ? table.SSEDescription.KMSMasterKeyArn : void 0 : r.KMSMasterKeyId;
49144
+ if (kmsKey !== void 0 && kmsKey !== "") entry["SSESpecification"] = { KMSMasterKeyId: kmsKey };
49145
+ entry["TableClass"] = (isLocal ? void 0 : r.ReplicaTableClassSummary?.TableClass) ?? table.TableClassSummary?.TableClass ?? "STANDARD";
49146
+ const declaredReplica = properties ? localReplicaEntry(properties, r.RegionName) : void 0;
47742
49147
  const client = isLocal ? this.dynamoDBClient : this.getRegionalClient(r.RegionName);
47743
49148
  const regionLabel = r.RegionName;
47744
49149
  const replicaArn = isLocal ? table.TableArn : table.TableArn ? this.replicaArnForRegion(table.TableArn, r.RegionName) : void 0;
47745
- const subs = await this.readReplicaSubSpecs(client, tableNameForSubs, regionLabel);
49150
+ const subs = await this.readReplicaSubSpecs(client, tableNameForSubs, regionLabel, declaredReplica);
47746
49151
  Object.assign(entry, subs);
49152
+ let protection;
49153
+ let streamArn;
49154
+ if (isLocal) {
49155
+ protection = table.DeletionProtectionEnabled;
49156
+ streamArn = table.LatestStreamArn;
49157
+ } else try {
49158
+ const regional = await client.send(new DescribeTableCommand({ TableName: tableNameForSubs }));
49159
+ protection = regional.Table?.DeletionProtectionEnabled;
49160
+ streamArn = regional.Table?.LatestStreamArn;
49161
+ } catch (err) {
49162
+ if (err instanceof ResourceNotFoundException$1) this.logger.debug(safeMsg`Cross-region replica ${regionLabel} returned RNF on DescribeTable; omitting its protection and stream policy`);
49163
+ else this.logger.debug(safeMsg`Could not read the ${regionLabel} replica of ${tableNameForSubs}: ${describeAwsFailure(err).detail}`);
49164
+ }
49165
+ if (typeof protection === "boolean") entry["DeletionProtectionEnabled"] = protection;
49166
+ await this.readReplicaPolicies(client, tableNameForSubs, regionLabel, replicaArn, streamArn, declaredReplica, afterOwnWrite, entry);
47747
49167
  if (replicaArn) try {
47748
49168
  const tagsResp = await client.send(new ListTagsOfResourceCommand({ ResourceArn: replicaArn }));
47749
49169
  entry["Tags"] = normalizeAwsTagsToCfn(tagsResp.Tags);
@@ -47828,17 +49248,19 @@ var DynamoDBGlobalTableProvider = class {
47828
49248
  throw err;
47829
49249
  }
47830
49250
  }
47831
- async readReplicaSubSpecs(client, tableName, regionLabel) {
49251
+ async readReplicaSubSpecs(client, tableName, regionLabel, declaredReplica) {
47832
49252
  const out = {};
47833
49253
  try {
47834
49254
  const ci = await client.send(new DescribeContributorInsightsCommand({ TableName: tableName }));
47835
- if (ci.ContributorInsightsStatus) out["ContributorInsightsSpecification"] = { Enabled: ci.ContributorInsightsStatus === "ENABLED" };
49255
+ const block = reverseMapReplicaContributorInsights(ci.ContributorInsightsStatus, ci.ContributorInsightsMode, declaredReplica?.["ContributorInsightsSpecification"]);
49256
+ if (block !== void 0) out["ContributorInsightsSpecification"] = block;
47836
49257
  } catch (err) {
47837
49258
  this.logger.debug(`Could not read ContributorInsights for ${tableName} in ${regionLabel}: ${describeAwsFailure(err).detail}`);
47838
49259
  }
47839
49260
  try {
47840
- const pitrStatus = (await client.send(new DescribeContinuousBackupsCommand({ TableName: tableName }))).ContinuousBackupsDescription?.PointInTimeRecoveryDescription?.PointInTimeRecoveryStatus;
47841
- if (pitrStatus) out["PointInTimeRecoverySpecification"] = { PointInTimeRecoveryEnabled: pitrStatus === "ENABLED" };
49261
+ const description = (await client.send(new DescribeContinuousBackupsCommand({ TableName: tableName }))).ContinuousBackupsDescription?.PointInTimeRecoveryDescription;
49262
+ const block = reverseMapReplicaPitr(description?.PointInTimeRecoveryStatus, description?.RecoveryPeriodInDays, declaredReplica?.["PointInTimeRecoverySpecification"]);
49263
+ if (block !== void 0) out["PointInTimeRecoverySpecification"] = block;
47842
49264
  } catch (err) {
47843
49265
  this.logger.debug(`Could not read PointInTimeRecovery for ${tableName} in ${regionLabel}: ${describeAwsFailure(err).detail}`);
47844
49266
  }
@@ -47854,6 +49276,54 @@ var DynamoDBGlobalTableProvider = class {
47854
49276
  }
47855
49277
  return out;
47856
49278
  }
49279
+ policyRereadDelaysMs = [
49280
+ 500,
49281
+ 1e3,
49282
+ 2e3
49283
+ ];
49284
+ async readReplicaPolicies(client, tableName, regionLabel, tableArn, streamArn, declaredReplica, afterOwnWrite, entry) {
49285
+ if (declaredReplica === void 0) return;
49286
+ const readOne = async (what, arn, container) => {
49287
+ if (arn === void 0 || arn === "") return void 0;
49288
+ const declaredMember = () => declaredStreamPolicyMember(container);
49289
+ let last;
49290
+ const read = async () => {
49291
+ try {
49292
+ last = (await client.send(new GetResourcePolicyCommand({ ResourceArn: arn }))).Policy;
49293
+ } catch (err) {
49294
+ if (!(err instanceof PolicyNotFoundException)) throw err;
49295
+ last = void 0;
49296
+ }
49297
+ return last;
49298
+ };
49299
+ try {
49300
+ let live = await read();
49301
+ for (const delayMs of afterOwnWrite ? this.policyRereadDelaysMs : []) {
49302
+ if (streamPolicyMatchesDeclared(live, container)) break;
49303
+ await new Promise((resolve) => setTimeout(resolve, delayMs));
49304
+ live = await read();
49305
+ }
49306
+ if (afterOwnWrite && (live === void 0 || live === "")) {
49307
+ this.logger.debug(safeMsg`Kept the declared ${what} of the ${regionLabel} replica of ${tableName} in the baseline captured after its write: the read still found no policy`);
49308
+ return declaredMember();
49309
+ }
49310
+ return reverseMapStreamPolicy(live, container);
49311
+ } catch (err) {
49312
+ this.logger.debug(safeMsg`Could not read the ${what} of the ${regionLabel} replica of ${tableName}: ${describeAwsFailure(err).detail}`);
49313
+ if (afterOwnWrite && last !== void 0 && last !== "") return reverseMapStreamPolicy(last, container);
49314
+ if (afterOwnWrite && (isThrottlingError(err) || isTransientServerError(err) || isAmbiguousOutcomeError(err) || err instanceof ResourceNotFoundException$1)) return declaredMember();
49315
+ return;
49316
+ }
49317
+ };
49318
+ if (readTablePolicy(declaredReplica).kind === "usable") {
49319
+ const member = await readOne("ResourcePolicy", tableArn, declaredReplica);
49320
+ if (member !== void 0) entry["ResourcePolicy"] = member;
49321
+ }
49322
+ if (readStreamPolicy$1(declaredReplica).kind === "usable") {
49323
+ const member = await readOne("stream ResourcePolicy", streamArn, declaredReplica["ReplicaStreamSpecification"]);
49324
+ if (member !== void 0) entry["ReplicaStreamSpecification"] = { ResourcePolicy: member };
49325
+ }
49326
+ }
47857
49327
  async readAutoScalingSettings(tableName, scalableDimension, client, indexName) {
47858
49328
  const resourceId = autoScalingResourceId(tableName, indexName);
47859
49329
  try {
@@ -47933,33 +49403,14 @@ var DynamoDBGlobalTableProvider = class {
47933
49403
  baseline,
47934
49404
  aws
47935
49405
  };
47936
- const key = "Replicas";
47937
- const baselineReplicas = baseline[key];
47938
- const awsReplicas = aws[key];
47939
- if (!Array.isArray(baselineReplicas) || !Array.isArray(awsReplicas)) return {
47940
- baseline,
47941
- aws
47942
- };
47943
49406
  const localRegion = await this.dynamoDBClient.config.region() ?? "";
47944
- if (!localRegion) return {
49407
+ const completed = completeLegacyLocalReplica(baseline, aws, localRegion);
49408
+ const converted = canonicalizePre5381ReplicaBaseline(completed, aws, localRegion, completed !== baseline);
49409
+ return converted === baseline ? {
47945
49410
  baseline,
47946
49411
  aws
47947
- };
47948
- const isLocal = (element) => asRecord(element)?.["Region"] === localRegion;
47949
- if (baselineReplicas.some(isLocal)) return {
47950
- baseline,
47951
- aws
47952
- };
47953
- const liveLocal = awsReplicas.find(isLocal);
47954
- if (liveLocal === void 0) return {
47955
- baseline,
47956
- aws
47957
- };
47958
- return {
47959
- baseline: {
47960
- ...baseline,
47961
- [key]: [...baselineReplicas, structuredClone(liveLocal)]
47962
- },
49412
+ } : {
49413
+ baseline: converted,
47963
49414
  aws
47964
49415
  };
47965
49416
  }
@@ -48094,17 +49545,102 @@ function refuseMalformedReplicaTags(properties, resourceType, logicalId, physica
48094
49545
  });
48095
49546
  return tagsByReplica;
48096
49547
  }
49548
+ function completeLegacyLocalReplica(baseline, aws, localRegion) {
49549
+ const key = "Replicas";
49550
+ const baselineReplicas = baseline[key];
49551
+ const awsReplicas = aws[key];
49552
+ if (!Array.isArray(baselineReplicas) || !Array.isArray(awsReplicas)) return baseline;
49553
+ if (!localRegion) return baseline;
49554
+ const isLocal = (element) => asRecord(element)?.["Region"] === localRegion;
49555
+ if (baselineReplicas.some(isLocal)) return baseline;
49556
+ const liveLocal = awsReplicas.find(isLocal);
49557
+ if (liveLocal === void 0) return baseline;
49558
+ return {
49559
+ ...baseline,
49560
+ [key]: [...baselineReplicas, structuredClone(liveLocal)]
49561
+ };
49562
+ }
48097
49563
  function localReplicaEntry(props, region) {
48098
49564
  const raw = props["Replicas"];
48099
49565
  if (!Array.isArray(raw)) return void 0;
48100
49566
  return raw.find((r) => r?.["Region"] === region);
48101
49567
  }
49568
+ const REPLICA_SETTING_MEMBERS = [
49569
+ "PointInTimeRecoverySpecification",
49570
+ "ContributorInsightsSpecification",
49571
+ "KinesisStreamSpecification",
49572
+ "ResourcePolicy",
49573
+ "ReplicaStreamSpecification"
49574
+ ];
49575
+ function replicaSettingsRefusal(properties, previousProperties, currentRegion) {
49576
+ const desired = Array.isArray(properties["Replicas"]) ? properties["Replicas"] : [];
49577
+ const crossRegionCreate = previousProperties === void 0 && desired.some((entry) => {
49578
+ const region = asRecord(entry)?.["Region"];
49579
+ return typeof region === "string" && region !== currentRegion;
49580
+ });
49581
+ for (const entry of desired) {
49582
+ const replica = asRecord(entry);
49583
+ const region = replica?.["Region"];
49584
+ if (typeof region !== "string") continue;
49585
+ const previous = previousProperties === void 0 ? void 0 : localReplicaEntry(previousProperties, region);
49586
+ if (!(previous === void 0 || REPLICA_SETTING_MEMBERS.some((member) => !deepEqual(replica?.[member], previous[member])))) continue;
49587
+ const [refusal] = replicaSettingRefusals(replica);
49588
+ if (refusal !== void 0) return `The ${region} replica: ${refusal}`;
49589
+ if ((previousProperties === void 0 ? crossRegionCreate : previous === void 0) && replica?.["ResourcePolicy"] !== void 0 && replica["ResourcePolicy"] !== null) return `The ${region} replica: Replicas[].ResourcePolicy cannot be set in the deploy that creates the replica — CloudFormation refuses it ("A replica cannot be created in the same stack update as putting a resource-based policy on that new replica"). ` + (previousProperties === void 0 ? `Deploy the table and its replicas without it` : `Deploy the replica without it`) + `, then add the policy in a later deploy`;
49590
+ }
49591
+ }
48102
49592
  function extractLocalDeletionProtection(props, region) {
48103
- const perReplica = localReplicaEntry(props, region)?.["DeletionProtectionEnabled"];
48104
- if (typeof perReplica === "boolean") return perReplica;
49593
+ const local = localReplicaEntry(props, region);
49594
+ const perReplica = coerceCfnBoolean(local?.["DeletionProtectionEnabled"]);
49595
+ if (perReplica !== void 0) return perReplica;
48105
49596
  const topLevel = props["DeletionProtectionEnabled"];
48106
49597
  return typeof topLevel === "boolean" ? topLevel : void 0;
48107
49598
  }
49599
+ function extractAnyDeletionProtection(props, region) {
49600
+ if ((Array.isArray(props["Replicas"]) ? props["Replicas"] : []).some((r) => coerceCfnBoolean(asRecord(r)?.["DeletionProtectionEnabled"]) === true)) return true;
49601
+ return extractLocalDeletionProtection(props, region);
49602
+ }
49603
+ function readReplicaKmsMasterKeyId(replica) {
49604
+ const key = asRecord(asRecord(replica)?.["SSESpecification"])?.["KMSMasterKeyId"];
49605
+ return typeof key === "string" && key !== "" ? key : void 0;
49606
+ }
49607
+ function readReplicaTableClass(replica) {
49608
+ const tableClass = asRecord(replica)?.["TableClass"];
49609
+ return typeof tableClass === "string" && tableClass !== "" ? tableClass : void 0;
49610
+ }
49611
+ const UNUSABLE = Symbol("unusable");
49612
+ function readReplicaDeletionProtection(replica, region, warn) {
49613
+ const refusal = configBooleanRefusal(replica, "DeletionProtectionEnabled", `AWS::DynamoDB::GlobalTable Replicas[${region}]`);
49614
+ if (refusal !== void 0) {
49615
+ warn?.(`${refusal}. The ${region} replica's deletion protection is left as it is.`);
49616
+ return UNUSABLE;
49617
+ }
49618
+ return coerceCfnBoolean(replica?.["DeletionProtectionEnabled"]);
49619
+ }
49620
+ function replicaKeyBlocks(props) {
49621
+ return (Array.isArray(props["Replicas"]) ? props["Replicas"] : []).map((r) => [asRecord(r)?.["Region"], asRecord(r)?.["SSESpecification"]]);
49622
+ }
49623
+ function isKmsKeyArn(key) {
49624
+ return key !== void 0 && /^arn:aws[a-z-]*:kms:[^:]+:\d+:key\//.test(key);
49625
+ }
49626
+ function tableClassToSend(previous, desired) {
49627
+ if (desired !== void 0) return desired !== previous ? desired : void 0;
49628
+ return previous !== void 0 && previous !== "STANDARD" ? "STANDARD" : void 0;
49629
+ }
49630
+ function toSdkTableSseSpecification(block, kmsMasterKeyId) {
49631
+ const sse = asRecord(block) ?? {};
49632
+ return {
49633
+ Enabled: coerceCfnBoolean(sse["SSEEnabled"]) ?? true,
49634
+ ...sse["SSEType"] !== void 0 && sse["SSEType"] !== "" && { SSEType: sse["SSEType"] },
49635
+ ...kmsMasterKeyId !== void 0 && { KMSMasterKeyId: kmsMasterKeyId }
49636
+ };
49637
+ }
49638
+ function extractLocalTableClass(props, region) {
49639
+ const perReplica = readReplicaTableClass(localReplicaEntry(props, region));
49640
+ if (perReplica !== void 0) return perReplica;
49641
+ const topLevel = props["TableClass"];
49642
+ return typeof topLevel === "string" && topLevel !== "" ? topLevel : void 0;
49643
+ }
48108
49644
  function derivePerCallProvisionedThroughput(properties, region, source = "min", diagnostics, maskSecrets = (text) => text) {
48109
49645
  const rawReplicas = properties["Replicas"];
48110
49646
  const rawRead = (Array.isArray(rawReplicas) ? rawReplicas : []).find((r) => asRecord(r)?.["Region"] === region)?.["ReadProvisionedThroughputSettings"];
@@ -48182,6 +49718,11 @@ function collectAutoScalingTargets(properties, localRegion) {
48182
49718
  }
48183
49719
  const REPLICA_COPY_RELEASE_POLLS = 180;
48184
49720
  const REPLICA_COPY_RELEASE_POLL_MS = 5e3;
49721
+ const DELETION_PROTECTION_REFLIP_MS = 16e3;
49722
+ const REPLICA_PROTECTION_SETTLE_POLLS = 60;
49723
+ const REPLICA_PROTECTION_SETTLE_POLL_MS = 5e3;
49724
+ const SETTLING_RETRY_ATTEMPTS = 8;
49725
+ const SETTLING_RETRY_INITIAL_MS = 2e3;
48185
49726
  const REPLICA_COPY_RELEASE_ATTEMPTS = 3;
48186
49727
  function isReplicaCopyExistsRefusal(error) {
48187
49728
  return error instanceof Error && /one or more replicas already existed as tables/i.test(error.message);
@@ -48837,7 +50378,7 @@ const PROTECTION_PROPERTY_BY_TYPE = {
48837
50378
  "AWS::Neptune::DBCluster": "DeletionProtection",
48838
50379
  "AWS::Neptune::DBInstance": "DeletionProtection",
48839
50380
  "AWS::DynamoDB::Table": "DeletionProtectionEnabled",
48840
- "AWS::DynamoDB::GlobalTable": (bag, region) => extractLocalDeletionProtection(bag, region ?? ""),
50381
+ "AWS::DynamoDB::GlobalTable": (bag, region) => extractAnyDeletionProtection(bag, region ?? ""),
48841
50382
  "AWS::EC2::Instance": "DisableApiTermination",
48842
50383
  "AWS::Cognito::UserPool": "DeletionProtection",
48843
50384
  "AWS::AutoScaling::AutoScalingGroup": "DeletionProtection",
@@ -48886,7 +50427,7 @@ function isProtectionValueActive(resourceType, value) {
48886
50427
  //#endregion
48887
50428
  //#region src/provisioning/recorded-protection.ts
48888
50429
  const READER_LABELS = {
48889
- "AWS::DynamoDB::GlobalTable": "DeletionProtectionEnabled for the deploy region",
50430
+ "AWS::DynamoDB::GlobalTable": "DeletionProtectionEnabled on the table or a replica",
48890
50431
  "AWS::ElasticLoadBalancingV2::LoadBalancer": "LoadBalancerAttributes deletion_protection.enabled"
48891
50432
  };
48892
50433
  const REPLACEMENT_BLOCKING_VALUES = { "AWS::AutoScaling::AutoScalingGroup": /* @__PURE__ */ new Set(["prevent-all-deletion"]) };
@@ -52089,5 +53630,5 @@ function sameGenerationClaimsOf(record) {
52089
53630
  }
52090
53631
 
52091
53632
  //#endregion
52092
- export { pendingRequestCount as $, malformedLocalResourceEntriesWarning as $a, hasReasonlessBaselineRefusal as $c, keepHeldTokenProvenance as $i, getLegacyStateBucketName as $l, destroyStackRecordsView as $n, NO_CC_HANDLERS_REASON as $o, markDeleteStarted as $r, literalSplitDelimitersOf as $s, seedsDeleteFirstGuard as $t, inheritedProvenanceForChildDiff as A, refStateLookupFromResource as Aa, recordNoEchoAttributeValues as Ac, deleteSkipReason as Ai, buildDockerImage as Al, isWholeDynamicReferenceValue as An, refuseMalformedResourceEntriesForOrphan as Ao, secretNamePrintingBags as Ar, TemplateParser as As, readRefactorMarkerOnce as At, hasPlainPrototype$1 as Au, conditionFingerprint as B, UNREADABLE_RESOURCES_MAP_ROW as Ba, CrossPrefixReadError as Bc, DiffCalculator as Bi, isMalformedEnvKey as Bl, findDestructiveChanges as Bn, repairMalformedOrphansForReadOnly as Bo, effectiveDeletionPolicy as Br, passedNoEchoParametersOf as Bs, replayFailedOperations as Bt, clearBucketRegionCache as Bu, hasCdkAutoDeleteTag as C, carriesFetchableDynamicReference as Ca, recordAttributeIdCopy as Cc, CloudControlProvider as Ci, getBootstrapMarkerKey as Cl, exportAliasCollisionScrubWarning as Cn, refuseMalformedOutputsForDestroy as Co, createReadOnlyAttributeHealerFactory as Cr, templateResourceTypes as Cs, sameJournaledOrphans as Ct, StageLoadError as Cu, IMPLICIT_DELETE_DEPENDENCIES as D, cfnRefValueFromPhysicalId as Da, provenPublicValue as Dc, UNSPECIFIED_SKIP_REASON as Di, validateAssetBucketName as Dl, carriedExportAliasExposure as Dn, refuseMalformedResourceEntriesForDestroy as Do, namingSecretsWithRecordedNoEcho as Dr, lambdaFunctionNameForMask as Ds, lookupEachName as Dt, utf8ByteLength as Du, markRefusedBeforeApplying as E, AWS_NO_VALUE as Ea, carriesSecretMask as Ec, RollbackInlinePolicyWriters as Ei, readBootstrapMarkerBody as El, secretSafeKeyDisplay as En, refuseMalformedResourceEntriesForDeploy as Eo, maskEventTextWithBoundBags as Er, canonicalLambdaFunctionName as Es, isAccessDeniedError as Et, parseFailureDebugDetail as Eu, findNestedTemplateTreeDefect as F, declaresNoEcho as Fa, isSingleDynamicReferenceToken as Fc, ec2InstanceProtectionSite as Fi, dockerSpawnEnvWithSensitive as Fl, bindingSkippedOutputs as Fn, refuseMalformedResourcesForDeploy as Fo, ATOMIC_FINAL_SNAPSHOT_TYPES as Fr, maskWholeValue as Fs, updateRefactorMarker as Ft, displayAssemblyPath as Fu, withResourceDeadline as G, hasReadableOutputs as Ga, isNotImplemented as Gc, s3BucketArn as Gi, runDockerForeground as Gl, rollbackOrphanIds as Gn, unpreviewableOrphanRecords as Go, ledgerForStack as Gr, liveMatchesUnresolvedTokenFrame as Gs, isJournaledOrphan as Gt, parentSuppliedValues as H, deployRefusesOrphanRowsReason as Ha, applyCrossPrefixScan as Hc, IntrinsicFunctionResolver as Hi, redactDockerArgvValues as Hl, findRefactorHints as Hn, repairMalformedResourceEntriesForReadOnly as Ho, refusesFinalSnapshot as Hr, readsNoEchoSource as Hs, removeProtectionTypeList as Ht, isAbsoluteAssetPath as I, JSON_LISTING_HOLE_VALUE as Ia, LockManager as Ic, isTerminationProtectionPropagationError as Ii, finchSecretArgvRefusal as Il, DEFAULT_RESOURCE_TIMEOUT_MS as In, refuseMalformedResourcesForDestroy as Io, PRE_DELETE_SNAPSHOT_TYPES as Ir, maskedLeafCoordinatesOf as Is, hasPendingMovesOut as It, renderAssemblyPathEscape as Iu, keptWholeReasonText as J, isReadableResourceEntry as Ja, splitImportedOps as Jc, s3BucketRegionalDomainName as Ji, AssetManifestLoader as Jl, looselyEqual as Jn, withheldAccountClause as Jo, acquireIdempotencyToken as Jr, recordReferenceProvenanceEntry as Js, planRollback as Jt, diffSecurity as K, hasReadableResources as Ka, stackInstanceIdOf as Kc, s3BucketDomainName as Ki, runDockerStreaming as Kl, withMovedTo as Kn, unreadableOrphanRecords as Ko, reserveStackCreateToken as Kr, markSameGenerationBag as Ks, isReplacementOrphan as Kt, listNestedTemplateRows as L, STATE_REGION_DIVERGED as La, isLockInfoExpired as Lc, observeThenDisableInstanceApiTermination as Li, formatDockerLoginError as Ll, DEFAULT_RESOURCE_WARN_AFTER_MS as Ln, refuseMalformedResourcesForExport as Lo, buildFinalSnapshotIdentifier as Lr, noEchoCoordinatesOf as Ls, pendingMovesOutOf as Lt, resolveAssemblyPath as Lu, findServiceTokenRefusals as M, withSharedDrainBudget as Ma, recordProvenPublicExpression as Mc, isWaitAbandonedError as Mi, describeDockerCapturedOutput as Ml, collectDeclaredOutputNames as Mn, refuseMalformedResourcePropertiesForDrift as Mo, secretNamedRecordNeedles as Mr, isMarkedCoordinate as Ms, refactorMarkerRefusalMessage as Mt, ownValue as Mu, serviceTokenBlockingReason as N, parameterInputsFor as Na, wholeStringLeavesOf as Nc, markWaitAbandoned as Ni, describeDockerExecFailure as Nl, collectPublishedOutputNames as Nn, refuseMalformedResourcePropertiesForExport as No, stateSecretNameNeedles as Nr, maskAtCoordinates as Ns, refuseRefactorMarker as Nt, absoluteAssemblyPathEscape as Nu, computeImplicitDeleteEdges as O, isStalePlaceholderArnAttribute as Oa, recordMaskOnlyValue as Oc, deleteIndeterminateGuards as Oi, validateContainerRepoName as Ol, exportNameNoEchoParameters as On, refuseMalformedResourceEntriesForImport as Oo, orphanRecordsPrintingBag as Or, sameLambdaFunctionAddress as Os, withApiLimit as Ot, defineOwnKey as Ou, childTemplateLoader as P, passedParameterClassesOf as Pa, WHOLE_DYNAMIC_REFERENCE_PATTERN as Pc, disableInstanceApiTermination as Pi, describeDockerFailure as Pl, isExportAliasCollision as Pn, refuseMalformedResourcePropertiesForOrphan as Po, storedSecretNameNeedles as Pr, maskReadbackAtCoordinates as Ps, sameMove as Pt, describeFileReadFailure as Pu, planOrphanAdoption as Q, malformedLocalOutputsWarning as Qa, hasReadableExportSet as Qc, refuseUnreadableCdkCrossAccountRefs as Qi, getDefaultStateBucketName as Ql, awaitInFlightSibling as Qn, withoutSilentDropProperties as Qo, isRefusedByName as Qr, hasMaskableValues as Qs, resolveReplacementOldType as Qt, renderNestedTemplateTreeDefect as R, STATE_RESOURCES_MALFORMED as Ra, S3StateBackend as Rc, reDisableInstanceApiTermination as Ri, getDockerCmd as Rl, maskingRetryLogger as Rn, refuseMalformedState as Ro, ccRoutedFinalSnapshotError as Rr, noEchoLeavesOf as Rs, pendingMovesRefusalMessage as Rt, injectAwsRegion as Ru, S3_AUTO_DELETE_OBJECTS_TAG as S, carriesDynamicReference as Sa, physicalNameCopiesOf as Sc, customResourceResponseExpirationWarning as Si, ensureAssetStorage as Sl, displayTextOrWithheld as Sn, refuseMalformedOutputs as So, noEchoParameterNamesOf as Sr, prefetchCreateOnlyPropertyPaths as Ss, makeForeignHolderScan as St, AssemblyReader as Su, getPriorAttempts as T, keepsSecretReferenceToken as Ta, splitGetAttStringForm as Tc, unchangedBehindSecretReference as Ti, parseBootstrapMarker as Tl, secretBearingStateKeyWarning as Tn, refuseMalformedResourceEntries as To, journaledOrphanPrintingBag as Tr, withRetry as Ts, chunks as Tt, describeJsonParseFailure as Tu, readRecordedConditionVerdicts as U, displayLogicalId as Ua, crossPrefixDeniedWarning as Uc, poisonRenderedSpellingsCollidingIn as Ui, redactedCause as Ul, hintSidesOf as Un, repairMalformedResourcePropertiesForReadOnly as Uo, unsupportedFinalSnapshotError as Ur, recordedNoEchoValuesOf as Us, recordAfterRollbackUpdate as Ut, conditionInputsFrom as V, accountArgs as Va, CrossPrefixScanCache as Vc, INTRINSIC_KEYS as Vi, partitionSensitiveEnv as Vl, formatDestructiveChange as Vn, repairMalformedOutputsForReadOnly as Vo, isFinalSnapshotError as Vr, readbackPathFor as Vs, replayRollback as Vt, resolveBucketRegion as Vu, enclosingDeadlineRemainingMs as W, hasReadableOrphans as Wa, isAccessDenied$1 as Wc, isSettledInstanceState as Wi, redactedDockerCause as Wl, movedToHint as Wn, repairMalformedResourcesForReadOnly as Wo, earliestDefined as Wr, valueAtCoordinate as Ws, demoteSupersededOrphans as Wt, makeCanonicalizePropertiesFn as X, malformedExportNamesWarning as Xa, describeRegionValueKind as Xc, resolveDynamicReferences as Xi, Synthesizer as Xl, parseMappingFile as Xn, findSilentDropProperties as Xo, DeploymentEventsStore as Xr, carryLogOnlyValues as Xs, recordUnderIdIsNotOwn as Xt, mergeNoChangeOutputs as Y, malformedDriftResourcePropertiesWarning as Ya, acceptedCreateOnlyDropsOf as Yc, s3BucketWebsiteUrl as Yi, getDockerImageBySourceHash as Yl, mappingPairs as Yn, findActionableSilentDrops as Yo, DeploymentEventsReader as Yr, snapshotPassProvenance as Ys, recheckFailedPlan as Yt, makeSiblingClaimReader as Z, malformedExportSourceWarning as Za, exportNamesCarriedFrom as Zc, producerLookupOver as Zi, synthesisStatusMessage as Zl, proposeRenames as Zn, unwrittenCreateOnlyReplacement as Zo, extractDeploymentEventError as Zr, createUnionSecretMasker as Zs, replacementNeverSwapped as Zt, deleteTableWithIndexBusyRetry as _, coerceParameterTypedValue as _a, spelledKeysOf as _c, isCustomResourceType as _i, loadPublishableAssetManifest as _l, computeParameterTaint as _n, refuseMalformedOrphanRecords as _o, supersededResourcesOf as _r, readConfigString as _s, dropFailedCommands as _t, decodeListingKey as _u, isProtectionValueActive as a, assertSendableRoleArn as aa, unionOfSecretBags as ac, tagMapAsList as ai, orphansCarriedFrom as al, isRedactedRecordedValue as an, malformedOrphansWarning as ao, gray as ar, isStatefulRecreateTargetSync as as, displacedPhysicalIdShown as at, resolveStateBucketWithDefault as au, waitForIndexesSettled as b, getAccountInfo as ba, recordNestedStackParameterExpressions as bc, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as bi, BOOTSTRAP_MARKER_PREFIX as bl, resourcesNamingDeclaredParameter as bn, refuseMalformedOrphansForDestroy as bo, noEchoComparisonForTemplate as br, requireConfigObject as bs, journaledOrphanLines as bt, canonicalizeRegion as bu, DynamoDBGlobalTableProvider as c, sendableAssumeRoleCommand as ca, maskSecretsInError as cc, stringifyIfAssigned as ci, PhaseClock as cl, updatePartialMessage as cn, malformedRenderedContainersWarning as co, yellow as cr, coerceWarmThroughput as cs, nestedChildStackName as ct, stateBucketExistenceConfirmed as cu, compensateRemovedDeletionProtection as d, callerEnvCredentials as da, withPhysicalNameCopies as dc, ccBrokenReason as di, AssetPublisher as dl, nameGenerationHighWaterOf as dn, malformedResourcesWarning as do, holdsSupersededResources as dr, toFiniteNumber as ds, revertedNestedRowIds as dt, CFN_TEMPLATE_BODY_LIMIT as du, outputReferenceProvenanceOf as ea, logOnlyValueCount as ec, DBPROXY_TAGS_WHAT as ei, hasUnverifiableParameterRefusal as el, orphanNeedsIdentity as en, malformedLocalResourcesWarning as eo, getStackRecords as er, hasNoCloudControlHandlers as es, resolvePendingCloudControlRequests as et, loadCdkJson as eu, deleteBudgetKey as f, envCredentialsAreAssumedRole as fa, withoutPhysicalNameCopies as fc, isCustomResource as fi, isSensitiveAttributeName as fl, nameScopeOf as fn, malformedScrubResourceEntriesRefusalMessage as fo, isSupersededResourceRecord as fr, coerceCfnBoolean as fs, withNestedRevertRun as ft, CFN_TEMPLATE_URL_LIMIT as fu, INDEX_SETTLE_POLL_INTERVAL_MS as g, regionLessSecretName as ga, pathCrossesDottedKey as gc, readsNoEchoDeleteValues as gi, createAssetRedirectResolver as gl, withNameGenerationReached as gn, refuseMalformedNestedChildOutputs as go, supersededHolderOf as gr, configStringRefusal as gs, deleteJournaledOrphans as gt, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as gu, DELETE_INDEX_WAIT_PROCEED_NOTE as h, producerRegionsFromState as ha, isUncertifiedBaselineMaskPosition as hc, TemplateNoEchoReresolver as hi, buildAssetRedirectMap as hl, retiredNameGenerationsLeaving as hn, refuseDivergentRecordRegionForDestroy as ho, supersededHeldByOtherTypeWarning as hr, configIntegerRefusal as hs, withNestedStackContext as ht, uploadCfnTemplate as hu, PROTECTION_PROPERTY_BY_TYPE as i, assertFlagRoleArn as ia, shareLogOnlyValues as ic, refuseMalformedDesiredTags as ii, orphansAfterRollback as il, REDACTED_DELETE_ADDRESS_SKIP_REASON as in, malformedOrphansRefusalMessage as io, cyan as ir, isStatefulRecreateTargetForReplace as is, displacedOpClause as it, resolveSkipPrefix as iu, deferredServiceTokenWarning as j, parseWebACLArn as ja, recordNoEchoParameterFreshValue as jc, withIndeterminateGuard as ji, resolveDockerContextDirectory as jl, noEchoParameterValueSeed as jn, refuseMalformedResourcePropertiesForDestroy as jo, secretNamedAttributeNamesOf as jr, canonicalCoordinates as js, refactorMarkerMovesOf as jt, nullPrototypeRecord as ju, crossStackOutputProvenanceSource as k, lacksRecordedTableArn as ka, recordMaskOnlyValuesIn as kc, deleteLeftInPlace as ki, buildDenyExternalAccessPolicy as kl, exportNameSecretExposure as kn, refuseMalformedResourceEntriesForImportSave as ko, secretNamePrintingBag as kr, DagBuilder as ks, readRefactorMarker as kt, hasOwnKey as ku, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as l, AWS_CREDENTIAL_ENV_KEYS as la, maskSecretsInText as lc, CC_BROKEN_REASON as li, renderPhaseTimings as ll, updatePartialReason as ln, malformedResourceEntriesWarning as lo, addSuperseded as lr, isWarmThroughputDecrease as ls, recordDisplacedSkips as lt, warnDeprecatedNoPrefixCliFlag as lu, resolveDynamoDbDeleteBudgetMs as m, classifyReplaySecretRegion as ma, dynamicReferenceTokens as mc, waitForLambdaFunctionActive as mi, WorkGraph as ml, retiredNameGenerationsAfter as mn, previewableOrphanRecords as mo, supersededAfterRollback as mr, configBooleanRefusal as ms, getCurrentNestedStackContext as mt, findLargeInlineResources as mu, recordedProtectionEvidence as n, recordedReferenceRegions as na, recordLogOnlyParameterValue as nc, planTagDiff as ni, importableOutputs as nl, getCurrentProducerRegions as nn, malformedOrphanRecordsWarning as no, replacedDeleteFailureVerdict as nr, shownType as ns, recordRetainedForReadoption as nt, resolveAutoAssetStorage as nu, perType as o, explicitRoleArnOrThrow as oa, createSecretMasker as oc, tagPlanWarning as oi, shouldRetainResource as ol, redactedDeleteAddressFields as on, malformedOutputsRefusalMessage as oo, green as or, renderStatefulReason as os, dropSettledNestedJournals as ot, resolveStateBucketWithDefaultAndSource as ou, resolveDynamoDbDeleteBudgetClock as p, classifyRecordedSecretRegion as pa, DYNAMIC_REFERENCE_TOKEN_SCAN as pc, wouldReturnToSdkProvider as pi, stringifyValue as pl, retiredAfterRollback as pn, malformedStateRefusalMessage as po, removeSuperseded as pr, coerceCfnInteger as ps, collectNestedChildUnaddressed as pt, MIGRATE_TMP_PREFIX as pu, isSecretBearingReferenceString as q, isReadableOrphanRecord as qa, withStackInstanceIdWithheld as qc, s3BucketDualStackDomainName as qi, warnFinchArgvExposure as ql, isPairableType as qn, unreadableResourceEntries as qo, withCreateTokenLedger as qr, redactForState as qs, planFailedOps as qt, recordedProtectionNote as r, applyRoleArnIfSet as ra, recordLogOnlyValue as rc, readTagList as ri, isReadableBag as rl, inheritProducerRegions as rn, malformedOrphanRowsKeptWarning as ro, bold as rr, MULTI_REGION_RECREATE_BLOCKED_TYPES as rs, NESTED_PENDING_PARENT_REASON as rt, resolveCaptureObservedState as ru, readProtection as s, isIamRoleArn as sa, errorCauseChain as sc, definedAttributes as si, stackInstanceIdCarriedFrom as sl, redactedDeleteAddressSkip as sn, malformedOutputsWarning as so, red as sr, WARM_THROUGHPUT_MEMBERS as ss, getNestedRevertRun as st, resolveUseCdkBootstrapAssets as su, DeployEngine as t, recordedOutputReferenceRegions as ta, printingCorpusOf as tc, DBPROXY_TAG_OPTIONS as ti, importableOutputKeys as tl, findNestedStackTypeChanges as tn, malformedOrphanRecordsRefusalMessage as to, withStackRecords as tr, findReplacedReadersOfRecreateTargets as ts, keptForRetainedRecord as tt, resolveApp as tu, beginDeleteWait as u, applyCallerIdentityCredentials as ua, scrubResourceRecord as uc, ProviderRegistry as ui, timePhase as ul, nameGenerationCarriedFrom as un, malformedResourcePropertiesWarning as uo, deleteSupersededEntry as ur, toCfnInteger as us, revertNestedChildFromJournal as ut, ssmResolvedValueType as uu, maskedLogger as v, isUnboundTemplateParameter as va, identityKeyFor as vc, getCurrentResourceSecrets as vi, rewriteTemplateAssetReferences as vl, namesAnyDeclaredParameter as vn, refuseMalformedOrphanRecordsForDestroy as vo, withoutSuperseded as vr, replayWarn as vs, dropFailedHint as vt, expectedOwnerParam as vu, isTruthyCfnBoolean as w, isNamelessDynamicReferenceError as wa, recordPhysicalNameCopy as wc, slowCcOperationTimeoutMs as wi, isCrossRegionRedirect as wl, secretBearing as wn, refuseMalformedResourceAttributesForOrphan as wo, completedReplayEntries as wr, describeTypeWithThrottleRetry as ws, formatResourceLine as wt, processStackMessages as wu, ECR_AUTO_DELETE_IMAGES_TAG as x, isImpossibleEmptyStoredAttribute as xa, recoverMaskedOutput as xc, applyCustomResourceResponseExpiration as xi, assertAssetBucketRegion as xl, WITHHELD_NAME_DISPLAY as xn, refuseMalformedOrphansForOrphan as xo, noEchoExactEchoLeavesOf as xr, requireConfigString as xs, loadJournaledOrphans as xt, derivePartitionAndUrlSuffix as xu, relayedIndexBusyDelete as y, parameterTypeMayLoseSecretIdentity as ya, inheritNestedStackParameterAssociations as yc, withPrintingSecrets as yi, AssetModeResolver as yl, reachableDivergentParameters as yn, refuseMalformedOrphans as yo, noEchoAttributeNamesOf as yr, requireConfigArray as ys, isHandledOrphan as yt, PARTITION_TABLE as yu, templateIdentity as z, UNREADABLE_ORPHANS_CONTAINER_ROW as za, rebuildClientForBucketRegion as zc, reEnableInstanceApiTermination as zi, isDockerClientEnvKey as zl, constructPathOf as zn, repairMalformedOrphanRecordsForReadOnly as zo, createPreDeleteFinalSnapshot as zr, noEchoOutputsComparison as zs, refusePendingMovesOut as zt, injectedAwsRegionValue as zu };
52093
- //# sourceMappingURL=deploy-engine-Bjr-FAuZ.js.map
53633
+ export { inheritedProvenanceForChildDiff as $, isStalePlaceholderArnAttribute as $a, carriesSecretMask as $c, deleteIndeterminateGuards as $i, readBootstrapMarkerBody as $l, exportNameSecretExposure as $n, refuseMalformedResourceEntriesForImport as $o, secretNamePrintingBag as $r, canonicalLambdaFunctionName as $s, readRefactorMarker as $t, parseFailureDebugDetail as $u, beginDeleteWait as A, assertSendableRoleArn as Aa, recordLogOnlyValue as Ac, tagPlanWarning as Ai, isReadableBag as Al, redactedDeleteAddressFields as An, malformedOrphansWarning as Ao, green as Ar, isStatefulRecreateTargetSync as As, dropSettledNestedJournals as At, resolveCaptureObservedState as Au, waitForIndexesSettled as B, producerRegionsFromState as Ba, DYNAMIC_REFERENCE_TOKEN_SCAN as Bc, readsNoEchoDeleteValues as Bi, stringifyValue as Bl, withNameGenerationReached as Bn, refuseDivergentRecordRegionForDestroy as Bo, supersededHolderOf as Br, configIntegerRefusal as Bs, deleteJournaledOrphans as Bt, MIGRATE_TMP_PREFIX as Bu, planContributorInsightsOp as C, refuseUnreadableCdkCrossAccountRefs as Ca, carryLogOnlyValues as Cc, markDeleteStarted as Ci, describeRegionValueKind as Cl, seedsDeleteFirstGuard as Cn, malformedLocalOutputsWarning as Co, destroyStackRecordsView as Cr, withoutSilentDropProperties as Cs, pendingRequestCount as Ct, Synthesizer as Cu, reverseMapTableContributorInsights as D, recordedReferenceRegions as Da, logOnlyValueCount as Dc, readTagList as Di, hasUnverifiableParameterRefusal as Dl, inheritProducerRegions as Dn, malformedOrphanRecordsWarning as Do, bold as Dr, shownType as Ds, NESTED_PENDING_PARENT_REASON as Dt, loadCdkJson as Du, reverseMapIndexContributorInsights as E, recordedOutputReferenceRegions as Ea, literalSplitDelimitersOf as Ec, planTagDiff as Ei, hasReasonlessBaselineRefusal as El, getCurrentProducerRegions as En, malformedOrphanRecordsRefusalMessage as Eo, replacedDeleteFailureVerdict as Er, findReplacedReadersOfRecreateTargets as Es, recordRetainedForReadoption as Et, getLegacyStateBucketName as Eu, DELETE_INDEX_WAIT_PROCEED_NOTE as F, applyCallerIdentityCredentials as Fa, maskSecretsInError as Fc, ccBrokenReason as Fi, PhaseClock as Fl, nameGenerationHighWaterOf as Fn, malformedResourcePropertiesWarning as Fo, holdsSupersededResources as Fr, toCfnInteger as Fs, revertedNestedRowIds as Ft, stateBucketExistenceConfirmed as Fu, S3_AUTO_DELETE_OBJECTS_TAG as G, getAccountInfo as Ga, identityKeyFor as Gc, applyCustomResourceResponseExpiration as Gi, rewriteTemplateAssetReferences as Gl, WITHHELD_NAME_DISPLAY as Gn, refuseMalformedOrphansForDestroy as Go, noEchoExactEchoLeavesOf as Gr, requireConfigObject as Gs, loadJournaledOrphans as Gt, expectedOwnerParam as Gu, planTimeToLive as H, coerceParameterTypedValue as Ha, isUncertifiedBaselineMaskPosition as Hc, getCurrentResourceSecrets as Hi, buildAssetRedirectMap as Hl, namesAnyDeclaredParameter as Hn, refuseMalformedOrphanRecords as Ho, withoutSuperseded as Hr, readConfigString as Hs, dropFailedHint as Ht, uploadCfnTemplate as Hu, INDEX_SETTLE_POLL_INTERVAL_MS as I, callerEnvCredentials as Ia, maskSecretsInText as Ic, isCustomResource as Ii, renderPhaseTimings as Il, nameScopeOf as In, malformedResourcesWarning as Io, isSupersededResourceRecord as Ir, toFiniteNumber as Is, withNestedRevertRun as It, warnDeprecatedNoPrefixCliFlag as Iu, getPriorAttempts as J, carriesFetchableDynamicReference as Ja, recoverMaskedOutput as Jc, slowCcOperationTimeoutMs as Ji, assertAssetBucketRegion as Jl, secretBearing as Jn, refuseMalformedOutputsForDestroy as Jo, completedReplayEntries as Jr, templateResourceTypes as Js, formatResourceLine as Jt, derivePartitionAndUrlSuffix as Ju, hasCdkAutoDeleteTag as K, isImpossibleEmptyStoredAttribute as Ka, inheritNestedStackParameterAssociations as Kc, customResourceResponseExpirationWarning as Ki, AssetModeResolver as Kl, displayTextOrWithheld as Kn, refuseMalformedOrphansForOrphan as Ko, noEchoParameterNamesOf as Kr, requireConfigString as Ks, makeForeignHolderScan as Kt, PARTITION_TABLE as Ku, deleteTableWithIndexBusyRetry as L, envCredentialsAreAssumedRole as La, scrubResourceRecord as Lc, wouldReturnToSdkProvider as Li, timePhase as Ll, retiredAfterRollback as Ln, malformedScrubResourceEntriesRefusalMessage as Lo, removeSuperseded as Lr, coerceCfnBoolean as Ls, collectNestedChildUnaddressed as Lt, ssmResolvedValueType as Lu, deleteBudgetKey as M, isIamRoleArn as Ma, unionOfSecretBags as Mc, stringifyIfAssigned as Mi, orphansCarriedFrom as Ml, updatePartialMessage as Mn, malformedOutputsWarning as Mo, yellow as Mr, WARM_THROUGHPUT_MEMBERS as Ms, nestedChildStackName as Mt, resolveStateBucketWithDefault as Mu, resolveDynamoDbDeleteBudgetClock as N, sendableAssumeRoleCommand as Na, createSecretMasker as Nc, CC_BROKEN_REASON as Ni, shouldRetainResource as Nl, updatePartialReason as Nn, malformedRenderedContainersWarning as No, addSuperseded as Nr, coerceWarmThroughput as Ns, recordDisplacedSkips as Nt, resolveStateBucketWithDefaultAndSource as Nu, stripIndexContributorInsights as O, applyRoleArnIfSet as Oa, printingCorpusOf as Oc, refuseMalformedDesiredTags as Oi, importableOutputKeys as Ol, REDACTED_DELETE_ADDRESS_SKIP_REASON as On, malformedOrphanRowsKeptWarning as Oo, cyan as Or, MULTI_REGION_RECREATE_BLOCKED_TYPES as Os, displacedOpClause as Ot, resolveApp as Ou, resolveDynamoDbDeleteBudgetMs as P, AWS_CREDENTIAL_ENV_KEYS as Pa, errorCauseChain as Pc, ProviderRegistry as Pi, stackInstanceIdCarriedFrom as Pl, nameGenerationCarriedFrom as Pn, malformedResourceEntriesWarning as Po, deleteSupersededEntry as Pr, isWarmThroughputDecrease as Ps, revertNestedChildFromJournal as Pt, resolveUseCdkBootstrapAssets as Pu, crossStackOutputProvenanceSource as Q, cfnRefValueFromPhysicalId as Qa, splitGetAttStringForm as Qc, UNSPECIFIED_SKIP_REASON as Qi, parseBootstrapMarker as Ql, exportNameNoEchoParameters as Qn, refuseMalformedResourceEntriesForDestroy as Qo, orphanRecordsPrintingBag as Qr, emrClusterInstancesReplaced as Qs, withApiLimit as Qt, describeJsonParseFailure as Qu, maskedLogger as R, classifyRecordedSecretRegion as Ra, withPhysicalNameCopies as Rc, waitForLambdaFunctionActive as Ri, AssetPublisher as Rl, retiredNameGenerationsAfter as Rn, malformedStateRefusalMessage as Ro, supersededAfterRollback as Rr, coerceCfnInteger as Rs, getCurrentNestedStackContext as Rt, CFN_TEMPLATE_BODY_LIMIT as Ru, indexDeclaresContributorInsights as S, producerLookupOver as Sa, snapshotPassProvenance as Sc, isRefusedByName as Si, acceptedCreateOnlyDropsOf as Sl, resolveReplacementOldType as Sn, malformedExportSourceWarning as So, awaitInFlightSibling as Sr, unwrittenCreateOnlyReplacement as Ss, planOrphanAdoption as St, getDockerImageBySourceHash as Su, readContributorInsightsSpec as T, outputReferenceProvenanceOf as Ta, hasMaskableValues as Tc, DBPROXY_TAG_OPTIONS as Ti, hasReadableExportSet as Tl, findNestedStackTypeChanges as Tn, malformedLocalResourcesWarning as To, withStackRecords as Tr, hasNoCloudControlHandlers as Ts, keptForRetainedRecord as Tt, getDefaultStateBucketName as Tu, readTtlSpec as U, isUnboundTemplateParameter as Ua, pathCrossesDottedKey as Uc, withPrintingSecrets as Ui, createAssetRedirectResolver as Ul, reachableDivergentParameters as Un, refuseMalformedOrphanRecordsForDestroy as Uo, noEchoAttributeNamesOf as Ur, replayWarn as Us, isHandledOrphan as Ut, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as Uu, isTtlAlreadyDisabled as V, regionLessSecretName as Va, dynamicReferenceTokens as Vc, isCustomResourceType as Vi, WorkGraph as Vl, computeParameterTaint as Vn, refuseMalformedNestedChildOutputs as Vo, supersededResourcesOf as Vr, configStringRefusal as Vs, dropFailedCommands as Vt, findLargeInlineResources as Vu, ECR_AUTO_DELETE_IMAGES_TAG as W, parameterTypeMayLoseSecretIdentity as Wa, spelledKeysOf as Wc, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as Wi, loadPublishableAssetManifest as Wl, resourcesNamingDeclaredParameter as Wn, refuseMalformedOrphans as Wo, noEchoComparisonForTemplate as Wr, requireConfigArray as Ws, journaledOrphanLines as Wt, decodeListingKey as Wu, IMPLICIT_DELETE_DEPENDENCIES as X, keepsSecretReferenceToken as Xa, recordAttributeIdCopy as Xc, unchangedBehindSecretReference as Xi, getBootstrapMarkerKey as Xl, secretSafeKeyDisplay as Xn, refuseMalformedResourceEntries as Xo, maskEventTextWithBoundBags as Xr, withRetry as Xs, isAccessDeniedError as Xt, StageLoadError as Xu, markRefusedBeforeApplying as Y, isNamelessDynamicReferenceError as Ya, physicalNameCopiesOf as Yc, onlySecretReferencesDiffer as Yi, ensureAssetStorage as Yl, secretBearingStateKeyWarning as Yn, refuseMalformedResourceAttributesForOrphan as Yo, journaledOrphanPrintingBag as Yr, describeTypeWithThrottleRetry as Ys, chunks as Yt, AssemblyReader as Yu, computeImplicitDeleteEdges as Z, AWS_NO_VALUE as Za, recordPhysicalNameCopy as Zc, RollbackInlinePolicyWriters as Zi, isCrossRegionRedirect as Zl, carriedExportAliasExposure as Zn, refuseMalformedResourceEntriesForDeploy as Zo, namingSecretsWithRecordedNoEcho as Zr, ecsServiceLaunchTypeSetOrChanged as Zs, lookupEachName as Zt, processStackMessages as Zu, streamMemberRefusals as _, s3BucketDomainName as _a, valueAtCoordinate as _c, withCreateTokenLedger as _i, isAccessDenied$1 as _l, planFailedOps as _n, hasReadableResources as _o, isPairableType as _r, unreadableOrphanRecords as _s, isSecretBearingReferenceString as _t, redactedDockerCause as _u, isProtectionValueActive as a, disableInstanceApiTermination as aa, isMarkedCoordinate as ac, ownValue as ad, ATOMIC_FINAL_SNAPSHOT_TYPES as ai, recordProvenPublicExpression as al, updateRefactorMarker as an, passedParameterClassesOf as ao, bindingSkippedOutputs as ar, refuseMalformedResourcePropertiesForOrphan as as, isAbsoluteAssetPath as at, describeDockerCapturedOutput as au, CONTRIBUTOR_INSIGHTS_KEY as b, s3BucketWebsiteUrl as ba, redactForState as bc, DeploymentEventsStore as bi, withStackInstanceIdWithheld as bl, recordUnderIdIsNotOwn as bn, malformedDriftResourcePropertiesWarning as bo, parseMappingFile as br, findActionableSilentDrops as bs, makeCanonicalizePropertiesFn as bt, warnFinchArgvExposure as bu, DynamoDBGlobalTableProvider as c, observeThenDisableInstanceApiTermination as ca, maskWholeValue as cc, displayAssemblyPath as cd, ccRoutedFinalSnapshotError as ci, isSingleDynamicReferenceToken as cl, pendingMovesRefusalMessage as cn, STATE_REGION_DIVERGED as co, maskingRetryLogger as cr, refuseMalformedResourcesForExport as cs, templateIdentity as ct, dockerSpawnEnvWithSensitive as cu, declaredStreamPolicyMember as d, DiffCalculator as da, noEchoLeavesOf as dc, injectAwsRegion as dd, isFinalSnapshotError as di, S3StateBackend as dl, replayRollback as dn, UNREADABLE_RESOURCES_MAP_ROW as do, formatDestructiveChange as dr, repairMalformedOrphansForReadOnly as ds, parentSuppliedValues as dt, getDockerCmd as du, deleteLeftInPlace as ea, lambdaFunctionNameForMask as ec, utf8ByteLength as ed, secretNamePrintingBags as ei, provenPublicValue as el, readRefactorMarkerOnce as en, lacksRecordedTableArn as eo, isWholeDynamicReferenceValue as er, refuseMalformedResourceEntriesForImportSave as es, deferredServiceTokenWarning as et, validateAssetBucketName as eu, declaredStreamTagsMember as f, INTRINSIC_KEYS as fa, noEchoOutputsComparison as fc, injectedAwsRegionValue as fd, refusesFinalSnapshot as fi, rebuildClientForBucketRegion as fl, removeProtectionTypeList as fn, accountArgs as fo, findRefactorHints as fr, repairMalformedOutputsForReadOnly as fs, readRecordedConditionVerdicts as ft, isDockerClientEnvKey as fu, streamDeclaresTags as g, s3BucketArn as ga, recordedNoEchoValuesOf as gc, reserveStackCreateToken as gi, crossPrefixDeniedWarning as gl, isReplacementOrphan as gn, hasReadableOutputs as go, withMovedTo as gr, unpreviewableOrphanRecords as gs, diffSecurity as gt, redactedCause as gu, streamDeclaresPolicy as h, isSettledInstanceState as ha, readsNoEchoSource as hc, ledgerForStack as hi, applyCrossPrefixScan as hl, isJournaledOrphan as hn, hasReadableOrphans as ho, rollbackOrphanIds as hr, repairMalformedResourcesForReadOnly as hs, withResourceDeadline as ht, redactDockerArgvValues as hu, PROTECTION_PROPERTY_BY_TYPE as i, markWaitAbandoned as ia, canonicalCoordinates as ic, nullPrototypeRecord as id, storedSecretNameNeedles as ii, recordNoEchoParameterFreshValue as il, sameMove as in, parameterInputsFor as io, isExportAliasCollision as ir, refuseMalformedResourcePropertiesForExport as is, findNestedTemplateTreeDefect as it, resolveDockerContextDirectory as iu, compensateRemovedDeletionProtection as j, explicitRoleArnOrThrow as ja, shareLogOnlyValues as jc, definedAttributes as ji, orphansAfterRollback as jl, redactedDeleteAddressSkip as jn, malformedOutputsRefusalMessage as jo, red as jr, renderStatefulReason as js, getNestedRevertRun as jt, resolveSkipPrefix as ju, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as k, assertFlagRoleArn as ka, recordLogOnlyParameterValue as kc, tagMapAsList as ki, importableOutputs as kl, isRedactedRecordedValue as kn, malformedOrphansRefusalMessage as ko, gray as kr, isStatefulRecreateTargetForReplace as ks, displacedPhysicalIdShown as kt, resolveAutoAssetStorage as ku, STREAM_POLICY_KEY as l, reDisableInstanceApiTermination as la, maskedLeafCoordinatesOf as lc, renderAssemblyPathEscape as ld, createPreDeleteFinalSnapshot as li, LockManager as ll, refusePendingMovesOut as ln, STATE_RESOURCES_MALFORMED as lo, constructPathOf as lr, refuseMalformedState as ls, conditionFingerprint as lt, finchSecretArgvRefusal as lu, reverseMapStreamPolicy as m, poisonRenderedSpellingsCollidingIn as ma, readbackPathFor as mc, resolveBucketRegion as md, earliestDefined as mi, CrossPrefixScanCache as ml, demoteSupersededOrphans as mn, displayLogicalId as mo, movedToHint as mr, repairMalformedResourcePropertiesForReadOnly as ms, enclosingDeadlineRemainingMs as mt, partitionSensitiveEnv as mu, recordedProtectionEvidence as n, withIndeterminateGuard as na, DagBuilder as nc, hasOwnKey as nd, secretNamedRecordNeedles as ni, recordMaskOnlyValuesIn as nl, refactorMarkerRefusalMessage as nn, parseWebACLArn as no, collectDeclaredOutputNames as nr, refuseMalformedResourcePropertiesForDestroy as ns, serviceTokenBlockingReason as nt, buildDenyExternalAccessPolicy as nu, perType as o, ec2InstanceProtectionSite as oa, maskAtCoordinates as oc, absoluteAssemblyPathEscape as od, PRE_DELETE_SNAPSHOT_TYPES as oi, wholeStringLeavesOf as ol, hasPendingMovesOut as on, declaresNoEcho as oo, DEFAULT_RESOURCE_TIMEOUT_MS as or, refuseMalformedResourcesForDeploy as os, listNestedTemplateRows as ot, describeDockerExecFailure as ou, planStreamMemberOps as p, IntrinsicFunctionResolver as pa, passedNoEchoParametersOf as pc, clearBucketRegionCache as pd, unsupportedFinalSnapshotError as pi, CrossPrefixReadError as pl, recordAfterRollbackUpdate as pn, deployRefusesOrphanRowsReason as po, hintSidesOf as pr, repairMalformedResourceEntriesForReadOnly as ps, enclosingDeadlineExpired as pt, isMalformedEnvKey as pu, isTruthyCfnBoolean as q, carriesDynamicReference as qa, recordNestedStackParameterExpressions as qc, CloudControlProvider as qi, BOOTSTRAP_MARKER_PREFIX as ql, exportAliasCollisionScrubWarning as qn, refuseMalformedOutputs as qo, createReadOnlyAttributeHealerFactory as qr, prefetchCreateOnlyPropertyPaths as qs, sameJournaledOrphans as qt, canonicalizeRegion as qu, recordedProtectionNote as r, isWaitAbandonedError as ra, TemplateParser as rc, hasPlainPrototype$1 as rd, stateSecretNameNeedles as ri, recordNoEchoAttributeValues as rl, refuseRefactorMarker as rn, withSharedDrainBudget as ro, collectPublishedOutputNames as rr, refuseMalformedResourcePropertiesForDrift as rs, childTemplateLoader as rt, buildDockerImage as ru, readProtection as s, isTerminationProtectionPropagationError as sa, maskReadbackAtCoordinates as sc, describeFileReadFailure as sd, buildFinalSnapshotIdentifier as si, WHOLE_DYNAMIC_REFERENCE_PATTERN as sl, pendingMovesOutOf as sn, JSON_LISTING_HOLE_VALUE as so, DEFAULT_RESOURCE_WARN_AFTER_MS as sr, refuseMalformedResourcesForDestroy as ss, renderNestedTemplateTreeDefect as st, describeDockerFailure as su, DeployEngine as t, deleteSkipReason as ta, sameLambdaFunctionAddress as tc, defineOwnKey as td, secretNamedAttributeNamesOf as ti, recordMaskOnlyValue as tl, refactorMarkerMovesOf as tn, refStateLookupFromResource as to, noEchoParameterValueSeed as tr, refuseMalformedResourceEntriesForOrphan as ts, findServiceTokenRefusals as tt, validateContainerRepoName as tu, STREAM_TAGS_KEY as u, reEnableInstanceApiTermination as ua, noEchoCoordinatesOf as uc, resolveAssemblyPath as ud, effectiveDeletionPolicy as ui, isLockInfoExpired as ul, replayFailedOperations as un, UNREADABLE_ORPHANS_CONTAINER_ROW as uo, findDestructiveChanges as ur, repairMalformedOrphanRecordsForReadOnly as us, conditionInputsFrom as ut, formatDockerLoginError as uu, streamPolicyMatchesDeclared as v, s3BucketDualStackDomainName as va, liveMatchesUnresolvedTokenFrame as vc, acquireIdempotencyToken as vi, isNotImplemented as vl, planRollback as vn, isReadableOrphanRecord as vo, looselyEqual as vr, unreadableResourceEntries as vs, keptWholeReasonText as vt, runDockerForeground as vu, planIndexContributorInsightsOps as w, keepHeldTokenProvenance as wa, createUnionSecretMasker as wc, DBPROXY_TAGS_WHAT as wi, exportNamesCarriedFrom as wl, orphanNeedsIdentity as wn, malformedLocalResourceEntriesWarning as wo, getStackRecords as wr, NO_CC_HANDLERS_REASON as ws, resolvePendingCloudControlRequests as wt, synthesisStatusMessage as wu, contributorInsightsRefusals as x, resolveDynamicReferences as xa, recordReferenceProvenanceEntry as xc, extractDeploymentEventError as xi, splitImportedOps as xl, replacementNeverSwapped as xn, malformedExportNamesWarning as xo, proposeRenames as xr, findSilentDropProperties as xs, makeSiblingClaimReader as xt, AssetManifestLoader as xu, streamTagsMatchDeclared as y, s3BucketRegionalDomainName as ya, markSameGenerationBag as yc, DeploymentEventsReader as yi, stackInstanceIdOf as yl, recheckFailedPlan as yn, isReadableResourceEntry as yo, mappingPairs as yr, withheldAccountClause as ys, mergeNoChangeOutputs as yt, runDockerStreaming as yu, relayedIndexBusyDelete as z, classifyReplaySecretRegion as za, withoutPhysicalNameCopies as zc, TemplateNoEchoReresolver as zi, isSensitiveAttributeName as zl, retiredNameGenerationsLeaving as zn, previewableOrphanRecords as zo, supersededHeldByOtherTypeWarning as zr, configBooleanRefusal as zs, withNestedStackContext as zt, CFN_TEMPLATE_URL_LIMIT as zu };
53634
+ //# sourceMappingURL=deploy-engine-DSpxEUjC.js.map