@go-to-k/cdkd 0.280.14 → 0.280.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
- import { $ as requireConfigString, $t as processStackMessages, A as red, At as runDockerStreaming, B as isTerminationProtectionPropagationError, Bt as resolveSkipPrefix, C as isStatefulRecreateTargetSync, Ct as parseBootstrapMarker, D as cyan, Dn as normalizeAwsError, Dt as formatDockerLoginError, E as bold, Et as buildDockerImage, F as ProviderRegistry, Ft as getDefaultStateBucketName, G as normalizeAwsTagsToCfn, Gt as warnDeprecatedNoPrefixCliFlag, H as cfnRefValueFromPhysicalId, Ht as resolveStateBucketWithDefaultAndSource, I as findActionableSilentDrops, It as getLegacyStateBucketName, J as configStringRefusal, Jt as MIGRATE_TMP_PREFIX, K as resolveExplicitPhysicalId, Kt as CFN_TEMPLATE_BODY_LIMIT, L as CloudControlProvider, Lt as resolveApp, M as IAMRoleProvider, Mt as getDockerImageBySourceHash, N as collectInlinePolicyNamesManagedBySiblings, Nt as Synthesizer, O as gray, On as withErrorHandling, Ot as getDockerCmd, P as clearOnUpdateRemoval, Pt as synthesisStatusMessage, Q as requireConfigObject, Qt as AssemblyReader, R as slowCcOperationTimeoutMs, Rt as resolveAutoAssetStorage, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, Sn as StackTerminationProtectionError, St as getBootstrapMarkerKey, T as formatResourceLine, Tt as validateContainerRepoName, U as refStateLookupFromResource, Ut as resolveUseCdkBootstrapAssets, V as IntrinsicFunctionResolver, Vt as resolveStateBucketWithDefault, W as WAFv2WebACLProvider, Wt as stateBucketExistenceConfirmed, X as replayWarn, Xt as uploadCfnTemplate, Y as readConfigString, Yt as findLargeInlineResources, Z as requireConfigArray, Zt as expectedOwnerParam, _ as createPreDeleteFinalSnapshot, _n as PartialFailureError, _t as loadPublishableAssetManifest, a as DeploymentEventsStore, an as setAwsClients, at as isThrottlingError, b as unsupportedFinalSnapshotError, bn as ResourceUpdateNotSupportedError, bt as BOOTSTRAP_MARKER_PREFIX, c as replayFailedOperations, ct as LockManager, d as IMPLICIT_DELETE_DEPENDENCIES, dn as LocalInvokeBuildError$1, dt as shouldRetainResource, et as applyRoleArnIfSet, f as computeImplicitDeleteEdges, fn as LocalMigrateError, ft as AssetPublisher, g as ccRoutedFinalSnapshotError, gn as NestedStackChildDirectDestroyError, gt as createAssetRedirectResolver, h as buildFinalSnapshotIdentifier, hn as MissingCdkCliError, ht as buildAssetRedirectMap, i as DeploymentEventsReader, in as resetAwsClients, it as isRetryableTransientError, j as yellow, jt as AssetManifestLoader, k as green, kt as runDockerForeground, l as replayRollback, lt as S3StateBackend, m as PRE_DELETE_SNAPSHOT_TYPES, mt as WorkGraph, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as AwsClients, nt as describeTypeWithThrottleRetry, o as planFailedOps, ot as DagBuilder, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as LocalStartServiceError, pt as stringifyValue, q as assertRegionMatch, qt as CFN_TEMPLATE_URL_LIMIT, r as DeployEngine, rn as getAwsClients, rt as withRetry, s as planRollback, sn as CdkdError, st as TemplateParser, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as resolveBucketRegion, tt as DiffCalculator, u as withResourceDeadline, un as DeployCancelledError, ut as rebuildClientForBucketRegion, v as isFinalSnapshotError, vn as ProvisioningError, vt as rewriteTemplateAssetReferences, w as renderStatefulReason, wt as validateAssetBucketName, x as extractDeploymentEventError, xn as StackHasActiveImportsError, xt as ensureAssetStorage, y as refusesFinalSnapshot, yn as ResourceTimeoutError, yt as AssetModeResolver, z as disableInstanceApiTermination, zt as resolveCaptureObservedState } from "./deploy-engine-D4VaoTK7.js";
2
+ import { $ as requireConfigString, $t as processStackMessages, A as red, At as runDockerStreaming, B as isTerminationProtectionPropagationError, Bt as resolveSkipPrefix, C as isStatefulRecreateTargetSync, Ct as parseBootstrapMarker, D as cyan, Dn as normalizeAwsError, Dt as formatDockerLoginError, E as bold, Et as buildDockerImage, F as ProviderRegistry, Ft as getDefaultStateBucketName, G as normalizeAwsTagsToCfn, Gt as warnDeprecatedNoPrefixCliFlag, H as cfnRefValueFromPhysicalId, Ht as resolveStateBucketWithDefaultAndSource, I as findActionableSilentDrops, It as getLegacyStateBucketName, J as configStringRefusal, Jt as MIGRATE_TMP_PREFIX, K as resolveExplicitPhysicalId, Kt as CFN_TEMPLATE_BODY_LIMIT, L as CloudControlProvider, Lt as resolveApp, M as IAMRoleProvider, Mt as getDockerImageBySourceHash, N as collectInlinePolicyNamesManagedBySiblings, Nt as Synthesizer, O as gray, On as withErrorHandling, Ot as getDockerCmd, P as clearOnUpdateRemoval, Pt as synthesisStatusMessage, Q as requireConfigObject, Qt as AssemblyReader, R as slowCcOperationTimeoutMs, Rt as resolveAutoAssetStorage, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, Sn as StackTerminationProtectionError, St as getBootstrapMarkerKey, T as formatResourceLine, Tt as validateContainerRepoName, U as refStateLookupFromResource, Ut as resolveUseCdkBootstrapAssets, V as IntrinsicFunctionResolver, Vt as resolveStateBucketWithDefault, W as WAFv2WebACLProvider, Wt as stateBucketExistenceConfirmed, X as replayWarn, Xt as uploadCfnTemplate, Y as readConfigString, Yt as findLargeInlineResources, Z as requireConfigArray, Zt as expectedOwnerParam, _ as createPreDeleteFinalSnapshot, _n as PartialFailureError, _t as loadPublishableAssetManifest, a as DeploymentEventsStore, an as setAwsClients, at as isThrottlingError, b as unsupportedFinalSnapshotError, bn as ResourceUpdateNotSupportedError, bt as BOOTSTRAP_MARKER_PREFIX, c as replayFailedOperations, ct as LockManager, d as IMPLICIT_DELETE_DEPENDENCIES, dn as LocalInvokeBuildError$1, dt as shouldRetainResource, et as applyRoleArnIfSet, f as computeImplicitDeleteEdges, fn as LocalMigrateError, ft as AssetPublisher, g as ccRoutedFinalSnapshotError, gn as NestedStackChildDirectDestroyError, gt as createAssetRedirectResolver, h as buildFinalSnapshotIdentifier, hn as MissingCdkCliError, ht as buildAssetRedirectMap, i as DeploymentEventsReader, in as resetAwsClients, it as isRetryableTransientError, j as yellow, jt as AssetManifestLoader, k as green, kt as runDockerForeground, l as replayRollback, lt as S3StateBackend, m as PRE_DELETE_SNAPSHOT_TYPES, mt as WorkGraph, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as AwsClients, nt as describeTypeWithThrottleRetry, o as planFailedOps, ot as DagBuilder, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as LocalStartServiceError, pt as stringifyValue, q as assertRegionMatch, qt as CFN_TEMPLATE_URL_LIMIT, r as DeployEngine, rn as getAwsClients, rt as withRetry, s as planRollback, sn as CdkdError, st as TemplateParser, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as resolveBucketRegion, tt as DiffCalculator, u as withResourceDeadline, un as DeployCancelledError, ut as rebuildClientForBucketRegion, v as isFinalSnapshotError, vn as ProvisioningError, vt as rewriteTemplateAssetReferences, w as renderStatefulReason, wt as validateAssetBucketName, x as extractDeploymentEventError, xn as StackHasActiveImportsError, xt as ensureAssetStorage, y as refusesFinalSnapshot, yn as ResourceTimeoutError, yt as AssetModeResolver, z as disableInstanceApiTermination, zt as resolveCaptureObservedState } from "./deploy-engine-1eZqhWKB.js";
3
3
  import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, f as withSkipPrefix, i as runStackBuffered, n as getLogger, o as PATTERN_B_NAME_OPTIONS, p as withStackName, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-BYMEE-BS.js";
4
- import { t as ASGProvider } from "./asg-provider-DIMKyE07.js";
4
+ import { t as ASGProvider } from "./asg-provider-4pPwAL_v.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { createHash, randomBytes, randomUUID } from "node:crypto";
7
7
  import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
8
8
  import { AddRoleToInstanceProfileCommand, AddUserToGroupCommand, AttachGroupPolicyCommand, AttachRolePolicyCommand, AttachUserPolicyCommand, CreateAccessKeyCommand, CreateGroupCommand, CreateInstanceProfileCommand, CreateLoginProfileCommand, CreatePolicyCommand, CreatePolicyVersionCommand, CreateUserCommand, DeleteAccessKeyCommand, DeleteGroupCommand, DeleteGroupPolicyCommand, DeleteInstanceProfileCommand, DeleteLoginProfileCommand, DeletePolicyCommand, DeletePolicyVersionCommand, DeleteRolePolicyCommand, DeleteUserCommand, DeleteUserPermissionsBoundaryCommand, DeleteUserPolicyCommand, DetachGroupPolicyCommand, DetachRolePolicyCommand, DetachUserPolicyCommand, GetAccessKeyLastUsedCommand, GetGroupCommand, GetGroupPolicyCommand, GetInstanceProfileCommand, GetPolicyCommand, GetPolicyVersionCommand, GetRoleCommand, GetRolePolicyCommand, GetUserCommand, GetUserPolicyCommand, IAMClient, ListAccessKeysCommand, ListAttachedGroupPoliciesCommand, ListAttachedUserPoliciesCommand, ListEntitiesForPolicyCommand, ListGroupPoliciesCommand, ListGroupsForUserCommand, ListPoliciesCommand, ListPolicyTagsCommand, ListPolicyVersionsCommand, ListUserPoliciesCommand, NoSuchEntityException, PutGroupPolicyCommand, PutRolePolicyCommand, PutUserPermissionsBoundaryCommand, PutUserPolicyCommand, RemoveRoleFromInstanceProfileCommand, RemoveUserFromGroupCommand, TagPolicyCommand, TagUserCommand, UntagPolicyCommand, UntagUserCommand, UpdateAccessKeyCommand, UpdateLoginProfileCommand } from "@aws-sdk/client-iam";
9
9
  import { CreateQueueCommand, DeleteQueueCommand, GetQueueAttributesCommand, GetQueueUrlCommand, ListQueueTagsCommand, QueueDoesNotExist, SQSClient, SetQueueAttributesCommand, TagQueueCommand, UntagQueueCommand } from "@aws-sdk/client-sqs";
10
10
  import { CreateTopicCommand, DeleteTopicCommand, GetSubscriptionAttributesCommand, GetTopicAttributesCommand, InvalidParameterException, ListSubscriptionsByTopicCommand, ListTagsForResourceCommand, ListTopicsCommand, NotFoundException, SNSClient, SetTopicAttributesCommand, SubscribeCommand, TagResourceCommand, UnsubscribeCommand, UntagResourceCommand } from "@aws-sdk/client-sns";
11
- import { AddPermissionCommand, CreateEventSourceMappingCommand, CreateFunctionCommand, CreateFunctionUrlConfigCommand, DeleteEventSourceMappingCommand, DeleteFunctionCommand, DeleteFunctionConcurrencyCommand, DeleteFunctionEventInvokeConfigCommand, DeleteFunctionUrlConfigCommand, DeleteLayerVersionCommand, GetEventSourceMappingCommand, GetFunctionCommand, GetFunctionConcurrencyCommand, GetFunctionEventInvokeConfigCommand, GetFunctionRecursionConfigCommand, GetFunctionUrlConfigCommand, GetLayerVersionByArnCommand, GetPolicyCommand as GetPolicyCommand$1, LambdaClient, ListTagsCommand, PublishLayerVersionCommand, PutFunctionConcurrencyCommand, PutFunctionEventInvokeConfigCommand, PutFunctionRecursionConfigCommand, RemovePermissionCommand, ResourceNotFoundException, TagResourceCommand as TagResourceCommand$1, UntagResourceCommand as UntagResourceCommand$1, UpdateEventSourceMappingCommand, UpdateFunctionCodeCommand, UpdateFunctionConfigurationCommand, UpdateFunctionUrlConfigCommand, waitUntilFunctionUpdatedV2 } from "@aws-sdk/client-lambda";
11
+ import { AddPermissionCommand, CreateEventSourceMappingCommand, CreateFunctionCommand, CreateFunctionUrlConfigCommand, DeleteEventSourceMappingCommand, DeleteFunctionCodeSigningConfigCommand, DeleteFunctionCommand, DeleteFunctionConcurrencyCommand, DeleteFunctionEventInvokeConfigCommand, DeleteFunctionUrlConfigCommand, DeleteLayerVersionCommand, GetEventSourceMappingCommand, GetFunctionCodeSigningConfigCommand, GetFunctionCommand, GetFunctionConcurrencyCommand, GetFunctionEventInvokeConfigCommand, GetFunctionRecursionConfigCommand, GetFunctionUrlConfigCommand, GetLayerVersionByArnCommand, GetPolicyCommand as GetPolicyCommand$1, GetRuntimeManagementConfigCommand, LambdaClient, ListTagsCommand, PublishLayerVersionCommand, PutFunctionCodeSigningConfigCommand, PutFunctionConcurrencyCommand, PutFunctionEventInvokeConfigCommand, PutFunctionRecursionConfigCommand, PutRuntimeManagementConfigCommand, RemovePermissionCommand, ResourceNotFoundException, TagResourceCommand as TagResourceCommand$1, UntagResourceCommand as UntagResourceCommand$1, UpdateEventSourceMappingCommand, UpdateFunctionCodeCommand, UpdateFunctionConfigurationCommand, UpdateFunctionUrlConfigCommand, waitUntilFunctionActiveV2, waitUntilFunctionUpdatedV2 } from "@aws-sdk/client-lambda";
12
12
  import { AssumeRoleCommand, GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
13
13
  import { AllocateAddressCommand, AssociateAddressCommand, AssociateIamInstanceProfileCommand, AssociateRouteTableCommand, AttachInternetGatewayCommand, AuthorizeSecurityGroupEgressCommand, AuthorizeSecurityGroupIngressCommand, CreateInternetGatewayCommand, CreateNatGatewayCommand, CreateNetworkAclCommand, CreateNetworkAclEntryCommand, CreateRouteCommand, CreateRouteTableCommand, CreateSecurityGroupCommand, CreateSubnetCommand, CreateTagsCommand, CreateVpcCommand, DeleteInternetGatewayCommand, DeleteNatGatewayCommand, DeleteNetworkAclCommand, DeleteNetworkAclEntryCommand, DeleteNetworkInterfaceCommand, DeleteRouteCommand, DeleteRouteTableCommand, DeleteSecurityGroupCommand, DeleteSubnetCommand, DeleteTagsCommand, DeleteVpcCommand, DescribeAddressesCommand, DescribeAvailabilityZonesCommand, DescribeIamInstanceProfileAssociationsCommand, DescribeInstanceAttributeCommand, DescribeInstanceCreditSpecificationsCommand, DescribeInstancesCommand, DescribeInternetGatewaysCommand, DescribeNatGatewaysCommand, DescribeNetworkAclsCommand, DescribeNetworkInterfacesCommand, DescribeRouteTablesCommand, DescribeSecurityGroupsCommand, DescribeSubnetsCommand, DescribeVolumesCommand, DescribeVpcAttributeCommand, DescribeVpcsCommand, DetachInternetGatewayCommand, DisassociateAddressCommand, DisassociateRouteTableCommand, EC2Client, ModifyInstanceAttributeCommand, ModifyInstanceCreditSpecificationCommand, ModifyInstanceMetadataOptionsCommand, ModifySubnetAttributeCommand, ModifyVpcAttributeCommand, MonitorInstancesCommand, ReleaseAddressCommand, ReplaceNetworkAclAssociationCommand, RevokeSecurityGroupEgressCommand, RevokeSecurityGroupIngressCommand, RunInstancesCommand, TerminateInstancesCommand, UnmonitorInstancesCommand, waitUntilInstanceRunning, waitUntilInstanceTerminated, waitUntilNatGatewayAvailable, waitUntilNatGatewayDeleted } from "@aws-sdk/client-ec2";
14
14
  import { CreateTableCommand, DeleteResourcePolicyCommand, DeleteTableCommand, DescribeContinuousBackupsCommand, DescribeContributorInsightsCommand, DescribeKinesisStreamingDestinationCommand, DescribeTableCommand, DescribeTimeToLiveCommand, DisableKinesisStreamingDestinationCommand, DynamoDBClient, EnableKinesisStreamingDestinationCommand, GetResourcePolicyCommand, ListTagsOfResourceCommand, PutResourcePolicyCommand, ResourceNotFoundException as ResourceNotFoundException$1, TagResourceCommand as TagResourceCommand$2, UntagResourceCommand as UntagResourceCommand$2, UpdateContinuousBackupsCommand, UpdateContributorInsightsCommand, UpdateTableCommand, UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
@@ -9028,6 +9028,13 @@ function isSnsTopicArnList(value) {
9028
9028
  //#endregion
9029
9029
  //#region src/provisioning/providers/lambda-function-provider.ts
9030
9030
  /**
9031
+ * Attempts the create path's atomicity cleanup makes when DeleteFunction is
9032
+ * refused because the function is still settling. Three attempts with the
9033
+ * linear backoff in `cleanupDeleteRetryDelayMs` covers the few seconds a
9034
+ * `Pending` -> terminal transition takes without stalling a failed deploy.
9035
+ */
9036
+ const LAMBDA_CLEANUP_DELETE_MAX_ATTEMPTS = 3;
9037
+ /**
9031
9038
  * Pick the inline-code filename for a Lambda runtime.
9032
9039
  *
9033
9040
  * CloudFormation's `Code.ZipFile` auto-zips inline code into a file named
@@ -9078,8 +9085,28 @@ var LambdaFunctionProvider = class {
9078
9085
  "SnapStart",
9079
9086
  "LoggingConfig",
9080
9087
  "RecursiveLoop",
9081
- "ReservedConcurrentExecutions"
9088
+ "ReservedConcurrentExecutions",
9089
+ "CodeSigningConfigArn",
9090
+ "RuntimeManagementConfig",
9091
+ "DurableConfig",
9092
+ "TenancyConfig"
9082
9093
  ])]]);
9094
+ /**
9095
+ * Properties the provider deliberately does NOT wire (issue #391 /
9096
+ * see `ResourceProvider.unhandledByDesign`).
9097
+ *
9098
+ * `CapacityProviderConfig` / `FunctionScalingConfig` are deliberately NOT
9099
+ * here — they stay in `silentDrop` (pre-flight rejection with the
9100
+ * `--allow-unsupported-properties` escape hatch) rather than being declared
9101
+ * un-wirable, because they ARE wirable once Lambda managed instances are
9102
+ * supported. They are one coupled feature: `PutFunctionScalingConfig` fails
9103
+ * with `AccessDeniedException: The function provided by the arn does not
9104
+ * contain a capacity provider configuration` unless the function already
9105
+ * carries a capacity provider (live-probed us-east-1, 2026-08-11). Tracked
9106
+ * in issue #1616.
9107
+ */
9108
+ unhandledByDesign = /* @__PURE__ */ new Map([["AWS::Lambda::Function", /* @__PURE__ */ new Map([["PublishToLatestPublished", "CloudFormation-only version-publishing directive with no AWS SDK equivalent"]])]]);
9109
+ cleanupDeleteRetryDelayMs = 2e3;
9083
9110
  eniWaitTimeoutMs = 600 * 1e3;
9084
9111
  eniWaitInitialDelayMs = 1e4;
9085
9112
  eniWaitMaxDelayMs = 1e4;
@@ -9131,39 +9158,50 @@ var LambdaFunctionProvider = class {
9131
9158
  ImageConfig: properties["ImageConfig"],
9132
9159
  SnapStart: properties["SnapStart"],
9133
9160
  LoggingConfig: properties["LoggingConfig"],
9161
+ DurableConfig: properties["DurableConfig"],
9162
+ TenancyConfig: properties["TenancyConfig"],
9163
+ CodeSigningConfigArn: properties["CodeSigningConfigArn"],
9134
9164
  Tags: tags
9135
9165
  };
9136
9166
  const response = await this.lambdaClient.send(new CreateFunctionCommand(createParams));
9137
9167
  const recursiveLoop = properties["RecursiveLoop"];
9138
- if (recursiveLoop !== void 0) try {
9139
- await this.lambdaClient.send(new PutFunctionRecursionConfigCommand({
9140
- FunctionName: functionName,
9141
- RecursiveLoop: recursiveLoop
9142
- }));
9143
- } catch (rlError) {
9144
- this.logger.warn(`PutFunctionRecursionConfig failed for ${logicalId}: ${rlError instanceof Error ? rlError.message : String(rlError)} — deleting partially-created function to maintain atomicity`);
9145
- try {
9146
- await this.lambdaClient.send(new DeleteFunctionCommand({ FunctionName: functionName }));
9147
- } catch (deleteError) {
9148
- this.logger.error(`Cleanup DeleteFunction failed for ${logicalId} after PutFunctionRecursionConfig failure — function may be orphaned: ${deleteError instanceof Error ? deleteError.message : String(deleteError)}`);
9149
- }
9150
- throw new ProvisioningError(`Failed to set RecursiveLoop on Lambda function ${logicalId} (function was deleted to maintain atomicity): ${rlError instanceof Error ? rlError.message : String(rlError)}`, resourceType, logicalId, functionName, rlError instanceof Error ? rlError : void 0);
9151
- }
9168
+ if (recursiveLoop !== void 0) await this.applyPostCreateConfig(() => this.lambdaClient.send(new PutFunctionRecursionConfigCommand({
9169
+ FunctionName: functionName,
9170
+ RecursiveLoop: recursiveLoop
9171
+ })), {
9172
+ apiName: "PutFunctionRecursionConfig",
9173
+ propertyName: "RecursiveLoop",
9174
+ logicalId,
9175
+ resourceType,
9176
+ functionName
9177
+ });
9152
9178
  const reservedConcurrentExecutions = properties["ReservedConcurrentExecutions"];
9153
- if (reservedConcurrentExecutions !== void 0) try {
9154
- await this.lambdaClient.send(new PutFunctionConcurrencyCommand({
9155
- FunctionName: functionName,
9156
- ReservedConcurrentExecutions: reservedConcurrentExecutions
9157
- }));
9158
- } catch (pcError) {
9159
- this.logger.warn(`PutFunctionConcurrency failed for ${logicalId}: ${pcError instanceof Error ? pcError.message : String(pcError)} — deleting partially-created function to maintain atomicity`);
9160
- try {
9161
- await this.lambdaClient.send(new DeleteFunctionCommand({ FunctionName: functionName }));
9162
- } catch (deleteError) {
9163
- this.logger.error(`Cleanup DeleteFunction failed for ${logicalId} after PutFunctionConcurrency failure — function may be orphaned: ${deleteError instanceof Error ? deleteError.message : String(deleteError)}`);
9164
- }
9165
- throw new ProvisioningError(`Failed to set ReservedConcurrentExecutions on Lambda function ${logicalId} (function was deleted to maintain atomicity): ${pcError instanceof Error ? pcError.message : String(pcError)}`, resourceType, logicalId, functionName, pcError instanceof Error ? pcError : void 0);
9166
- }
9179
+ if (reservedConcurrentExecutions !== void 0) await this.applyPostCreateConfig(() => this.lambdaClient.send(new PutFunctionConcurrencyCommand({
9180
+ FunctionName: functionName,
9181
+ ReservedConcurrentExecutions: reservedConcurrentExecutions
9182
+ })), {
9183
+ apiName: "PutFunctionConcurrency",
9184
+ propertyName: "ReservedConcurrentExecutions",
9185
+ logicalId,
9186
+ resourceType,
9187
+ functionName
9188
+ });
9189
+ const runtimeManagementConfig = properties["RuntimeManagementConfig"];
9190
+ if (runtimeManagementConfig !== void 0) await this.applyPostCreateConfig(async () => {
9191
+ await waitUntilFunctionActiveV2({
9192
+ client: this.lambdaClient,
9193
+ maxWaitTime: this.functionUpdateMaxWaitSeconds,
9194
+ minDelay: 1,
9195
+ maxDelay: 5
9196
+ }, { FunctionName: functionName });
9197
+ await this.putRuntimeManagementConfig(functionName, runtimeManagementConfig);
9198
+ }, {
9199
+ apiName: "PutRuntimeManagementConfig",
9200
+ propertyName: "RuntimeManagementConfig",
9201
+ logicalId,
9202
+ resourceType,
9203
+ functionName
9204
+ });
9167
9205
  this.logger.debug(`Successfully created Lambda function ${logicalId}: ${functionName}`);
9168
9206
  return {
9169
9207
  physicalId: response.FunctionName || functionName,
@@ -9178,6 +9216,63 @@ var LambdaFunctionProvider = class {
9178
9216
  }
9179
9217
  }
9180
9218
  /**
9219
+ * Run a post-create control-plane call under the create path's atomicity
9220
+ * contract: on failure, DELETE the just-created function so the next deploy
9221
+ * retry sees a fresh slate instead of an orphan that already exists.
9222
+ *
9223
+ * Extracted from the (previously duplicated) `RecursiveLoop` /
9224
+ * `ReservedConcurrentExecutions` blocks when `RuntimeManagementConfig`
9225
+ * became the third caller — the wording of all three log lines and of the
9226
+ * thrown error is preserved verbatim, parameterized only by the API name
9227
+ * and the CFn property name.
9228
+ *
9229
+ * VPC-attached Lambda caveat (unchanged): the cleanup uses a bare
9230
+ * `DeleteFunction`, not the provider's own `delete()`, so hyperplane ENIs
9231
+ * are NOT pre-detached / awaited. For a VPC-attached function whose call
9232
+ * fails, the next deploy retry's downstream Subnet/SG creation can race the
9233
+ * asynchronous ENI release until AWS finishes the detach. The "concurrent
9234
+ * update operation" substring is preserved in the wrapped error message so
9235
+ * the outer `withRetry` classifier still retries cleanly.
9236
+ */
9237
+ async applyPostCreateConfig(send, ctx) {
9238
+ try {
9239
+ await send();
9240
+ } catch (error) {
9241
+ const message = error instanceof Error ? error.message : String(error);
9242
+ this.logger.warn(`${ctx.apiName} failed for ${ctx.logicalId}: ${message} — deleting partially-created function to maintain atomicity`);
9243
+ let cleanupFailure;
9244
+ for (let attempt = 0; attempt < LAMBDA_CLEANUP_DELETE_MAX_ATTEMPTS; attempt++) try {
9245
+ await this.lambdaClient.send(new DeleteFunctionCommand({ FunctionName: ctx.functionName }));
9246
+ cleanupFailure = void 0;
9247
+ break;
9248
+ } catch (deleteError) {
9249
+ const deleteMessage = deleteError instanceof Error ? deleteError.message : String(deleteError);
9250
+ cleanupFailure = deleteMessage;
9251
+ if (!/currently in the following state|ResourceConflict/i.test(deleteMessage)) break;
9252
+ if (attempt < LAMBDA_CLEANUP_DELETE_MAX_ATTEMPTS - 1) await new Promise((resolve) => setTimeout(resolve, this.cleanupDeleteRetryDelayMs * (attempt + 1)));
9253
+ }
9254
+ if (cleanupFailure !== void 0) this.logger.error(`Cleanup DeleteFunction failed for ${ctx.logicalId} after ${ctx.apiName} failure — function may be orphaned: ${cleanupFailure}`);
9255
+ throw new ProvisioningError(`Failed to set ${ctx.propertyName} on Lambda function ${ctx.logicalId} (function was deleted to maintain atomicity): ${message}`, ctx.resourceType, ctx.logicalId, ctx.functionName, error instanceof Error ? error : void 0);
9256
+ }
9257
+ }
9258
+ /**
9259
+ * Send the CFn `RuntimeManagementConfig` block to `PutRuntimeManagementConfig`.
9260
+ *
9261
+ * CFn spells the block `{ UpdateRuntimeOn, RuntimeVersionArn }` and the SDK
9262
+ * request carries the same two members flat on the request (plus the
9263
+ * function name), so this is a straight lift rather than a re-shape.
9264
+ * `UpdateRuntimeOn` is required by the API; a template that omits it is
9265
+ * refused by AWS with its own validation error, which is the behavior we
9266
+ * want to surface rather than paper over with a cdkd-invented default.
9267
+ */
9268
+ async putRuntimeManagementConfig(functionName, config) {
9269
+ await this.lambdaClient.send(new PutRuntimeManagementConfigCommand({
9270
+ FunctionName: functionName,
9271
+ UpdateRuntimeOn: config["UpdateRuntimeOn"],
9272
+ RuntimeVersionArn: config["RuntimeVersionArn"]
9273
+ }));
9274
+ }
9275
+ /**
9181
9276
  * Update a Lambda function
9182
9277
  */
9183
9278
  async update(logicalId, physicalId, resourceType, properties, previousProperties) {
@@ -9200,7 +9295,8 @@ var LambdaFunctionProvider = class {
9200
9295
  "FileSystemConfigs",
9201
9296
  "ImageConfig",
9202
9297
  "SnapStart",
9203
- "LoggingConfig"
9298
+ "LoggingConfig",
9299
+ "DurableConfig"
9204
9300
  ];
9205
9301
  let hasConfigChanges = false;
9206
9302
  for (const field of configFields) if (JSON.stringify(properties[field]) !== JSON.stringify(previousProperties[field])) {
@@ -9226,12 +9322,19 @@ var LambdaFunctionProvider = class {
9226
9322
  FileSystemConfigs: clearOnUpdateRemoval(properties["FileSystemConfigs"], previousProperties["FileSystemConfigs"], []),
9227
9323
  ImageConfig: clearOnUpdateRemoval(properties["ImageConfig"], previousProperties["ImageConfig"], {}),
9228
9324
  SnapStart: clearOnUpdateRemoval(properties["SnapStart"], previousProperties["SnapStart"], { ApplyOn: "None" }),
9229
- LoggingConfig: clearOnUpdateRemoval(properties["LoggingConfig"], previousProperties["LoggingConfig"], { LogFormat: "Text" })
9325
+ LoggingConfig: clearOnUpdateRemoval(properties["LoggingConfig"], previousProperties["LoggingConfig"], { LogFormat: "Text" }),
9326
+ DurableConfig: properties["DurableConfig"]
9230
9327
  };
9231
9328
  await this.lambdaClient.send(new UpdateFunctionConfigurationCommand(configParams));
9232
9329
  this.logger.debug(`Updated configuration for Lambda function ${physicalId}`);
9233
9330
  await this.waitForFunctionUpdated(logicalId, resourceType, physicalId);
9234
9331
  }
9332
+ const newCodeSigningConfigArn = properties["CodeSigningConfigArn"];
9333
+ const codeSigningChanged = newCodeSigningConfigArn !== previousProperties["CodeSigningConfigArn"];
9334
+ if (codeSigningChanged && newCodeSigningConfigArn === void 0) {
9335
+ await this.lambdaClient.send(new DeleteFunctionCodeSigningConfigCommand({ FunctionName: physicalId }));
9336
+ this.logger.debug(`Detached CodeSigningConfigArn from Lambda function ${physicalId} (template removed the property)`);
9337
+ }
9235
9338
  const newCode = properties["Code"];
9236
9339
  const oldCode = previousProperties["Code"];
9237
9340
  const normalizeArchitectures = (v) => Array.isArray(v) && v.length > 0 ? v : ["x86_64"];
@@ -9271,6 +9374,19 @@ var LambdaFunctionProvider = class {
9271
9374
  }));
9272
9375
  this.logger.debug(`Updated ReservedConcurrentExecutions for Lambda function ${physicalId} to ${newReservedConcurrentExecutions}`);
9273
9376
  }
9377
+ if (codeSigningChanged && newCodeSigningConfigArn !== void 0) {
9378
+ await this.lambdaClient.send(new PutFunctionCodeSigningConfigCommand({
9379
+ FunctionName: physicalId,
9380
+ CodeSigningConfigArn: newCodeSigningConfigArn
9381
+ }));
9382
+ this.logger.debug(`Updated CodeSigningConfigArn for Lambda function ${physicalId} to ${newCodeSigningConfigArn}`);
9383
+ }
9384
+ const newRuntimeManagementConfig = properties["RuntimeManagementConfig"];
9385
+ const prevRuntimeManagementConfig = previousProperties["RuntimeManagementConfig"];
9386
+ if (newRuntimeManagementConfig?.["UpdateRuntimeOn"] !== prevRuntimeManagementConfig?.["UpdateRuntimeOn"] || newRuntimeManagementConfig?.["RuntimeVersionArn"] !== prevRuntimeManagementConfig?.["RuntimeVersionArn"]) {
9387
+ await this.putRuntimeManagementConfig(physicalId, newRuntimeManagementConfig ?? { UpdateRuntimeOn: "Auto" });
9388
+ this.logger.debug(`Updated RuntimeManagementConfig for Lambda function ${physicalId} to ${JSON.stringify(newRuntimeManagementConfig ?? { UpdateRuntimeOn: "Auto" })}`);
9389
+ }
9274
9390
  const getResponse = await this.lambdaClient.send(new GetFunctionCommand({ FunctionName: physicalId }));
9275
9391
  const functionArn = getResponse.Configuration?.FunctionArn;
9276
9392
  await this.applyTagDiff(functionArn, previousProperties["Tags"], properties["Tags"]);
@@ -9795,6 +9911,13 @@ var LambdaFunctionProvider = class {
9795
9911
  if (cfg.LoggingConfig.LogGroup !== void 0) lc["LogGroup"] = cfg.LoggingConfig.LogGroup;
9796
9912
  result["LoggingConfig"] = lc;
9797
9913
  }
9914
+ if (cfg.DurableConfig !== void 0) {
9915
+ const dc = {};
9916
+ if (cfg.DurableConfig.ExecutionTimeout !== void 0) dc["ExecutionTimeout"] = cfg.DurableConfig.ExecutionTimeout;
9917
+ if (cfg.DurableConfig.RetentionPeriodInDays !== void 0) dc["RetentionPeriodInDays"] = cfg.DurableConfig.RetentionPeriodInDays;
9918
+ if (Object.keys(dc).length > 0) result["DurableConfig"] = dc;
9919
+ }
9920
+ if (cfg.TenancyConfig?.TenantIsolationMode !== void 0) result["TenancyConfig"] = { TenantIsolationMode: cfg.TenancyConfig.TenantIsolationMode };
9798
9921
  result["Tags"] = normalizeAwsTagsToCfn(resp.Tags);
9799
9922
  try {
9800
9923
  const rlResp = await this.lambdaClient.send(new GetFunctionRecursionConfigCommand({ FunctionName: physicalId }));
@@ -9808,6 +9931,22 @@ var LambdaFunctionProvider = class {
9808
9931
  } catch (pcErr) {
9809
9932
  if (!(pcErr instanceof ResourceNotFoundException)) this.logger.debug(`GetFunctionConcurrency failed for ${physicalId}: ${pcErr instanceof Error ? pcErr.message : String(pcErr)}`);
9810
9933
  }
9934
+ try {
9935
+ const rmResp = await this.lambdaClient.send(new GetRuntimeManagementConfigCommand({ FunctionName: physicalId }));
9936
+ if (rmResp.UpdateRuntimeOn !== void 0) {
9937
+ const rm = { UpdateRuntimeOn: rmResp.UpdateRuntimeOn };
9938
+ if (rmResp.RuntimeVersionArn !== void 0) rm["RuntimeVersionArn"] = rmResp.RuntimeVersionArn;
9939
+ result["RuntimeManagementConfig"] = rm;
9940
+ }
9941
+ } catch (rmErr) {
9942
+ if (!(rmErr instanceof ResourceNotFoundException)) this.logger.warn(`GetRuntimeManagementConfig failed for ${physicalId} — RuntimeManagementConfig omitted from the drift snapshot (may surface as a false removal): ${rmErr instanceof Error ? rmErr.message : String(rmErr)}`);
9943
+ }
9944
+ try {
9945
+ const csResp = await this.lambdaClient.send(new GetFunctionCodeSigningConfigCommand({ FunctionName: physicalId }));
9946
+ if (csResp.CodeSigningConfigArn !== void 0) result["CodeSigningConfigArn"] = csResp.CodeSigningConfigArn;
9947
+ } catch (csErr) {
9948
+ if (!(csErr instanceof ResourceNotFoundException)) this.logger.warn(`GetFunctionCodeSigningConfig failed for ${physicalId} — CodeSigningConfigArn omitted from the drift snapshot (may surface as a false removal): ${csErr instanceof Error ? csErr.message : String(csErr)}`);
9949
+ }
9811
9950
  return result;
9812
9951
  } catch (err) {
9813
9952
  if (err instanceof ResourceNotFoundException) return void 0;
@@ -11696,6 +11835,28 @@ function mapSSESpecification(raw) {
11696
11835
  return out;
11697
11836
  }
11698
11837
  /**
11838
+ * Read one capacity member out of a per-index `ProvisionedThroughput` block,
11839
+ * returning `undefined` for anything that is not a usable number.
11840
+ *
11841
+ * Deliberately has NO default (issue #1588 review). The BillingMode-flip caller
11842
+ * suppresses the per-index update path for every index it handles, so a
11843
+ * defaulted capacity would never be corrected by a later call and would land in
11844
+ * cdkd state as if the template had declared it. Returning `undefined` routes
11845
+ * the index to the same warn-and-omit path an absent block takes, letting AWS
11846
+ * name it — the CFn-handler outcome.
11847
+ *
11848
+ * CFn is stringly typed, so a numeric string is accepted and coerced; `NaN` /
11849
+ * `Infinity` / objects / unresolved intrinsics are not.
11850
+ */
11851
+ function readCapacityNumber(block, member) {
11852
+ if (typeof block !== "object" || block === null || Array.isArray(block)) return void 0;
11853
+ const raw = block[member];
11854
+ if (raw === void 0 || raw === null || raw === "") return void 0;
11855
+ if (typeof raw !== "number" && typeof raw !== "string") return void 0;
11856
+ const value = Number(raw);
11857
+ return Number.isFinite(value) ? value : void 0;
11858
+ }
11859
+ /**
11699
11860
  * `DescribeTable` poll budget (seconds, 1 poll/s) after an ordinary
11700
11861
  * `UpdateTable` — capacity, TTL, tags, table class. Calibrated on those and
11701
11862
  * sufficient for them.
@@ -11835,7 +11996,8 @@ var DynamoDBTableProvider = class {
11835
11996
  } });
11836
11997
  const billingMode = billingModeUnusable ? prevBillingMode : requestedBillingMode;
11837
11998
  const billingOrThroughputChanged = billingMode !== prevBillingMode || JSON.stringify(properties["ProvisionedThroughput"]) !== JSON.stringify(previousProperties["ProvisionedThroughput"]);
11838
- if (billingMode === "PROVISIONED" && prevBillingMode === "PAY_PER_REQUEST" && properties["OnDemandThroughput"] !== void 0) throw new ProvisioningError(`AWS::DynamoDB::Table ${logicalId}: the template flips BillingMode to PROVISIONED${properties["BillingMode"] === void 0 ? " (BillingMode is absent from the template, which CloudFormation resets to PROVISIONED)" : ""} while still declaring OnDemandThroughput, which AWS accepts only on a PAY_PER_REQUEST table. Nothing was applied. Remove OnDemandThroughput, or keep BillingMode: PAY_PER_REQUEST.`, logicalId, resourceType);
11999
+ if (billingOrThroughputChanged && billingMode === "PROVISIONED" && (prevBillingMode === "PAY_PER_REQUEST" || liveBillingMode === "PAY_PER_REQUEST") && properties["OnDemandThroughput"] !== void 0) throw new ProvisioningError(`AWS::DynamoDB::Table ${logicalId}: the template flips BillingMode to PROVISIONED${properties["BillingMode"] === void 0 ? " (BillingMode is absent from the template, which CloudFormation resets to PROVISIONED)" : ""} while still declaring OnDemandThroughput, which AWS accepts only on a PAY_PER_REQUEST table. Nothing was applied. Remove OnDemandThroughput, or keep BillingMode: PAY_PER_REQUEST.`, logicalId, resourceType);
12000
+ const gsiHandledByBillingFlip = /* @__PURE__ */ new Set();
11839
12001
  if (billingOrThroughputChanged || tableClassChanged) {
11840
12002
  const updateInput = { TableName: physicalId };
11841
12003
  if (billingOrThroughputChanged) updateInput.BillingMode = billingMode;
@@ -11847,6 +12009,38 @@ var DynamoDBTableProvider = class {
11847
12009
  WriteCapacityUnits: Number(pt["WriteCapacityUnits"] ?? 5)
11848
12010
  };
11849
12011
  }
12012
+ const liveIndexes = table?.GlobalSecondaryIndexes ?? [];
12013
+ if (billingOrThroughputChanged && billingMode === "PROVISIONED" && liveBillingMode === "PAY_PER_REQUEST" && liveIndexes.length > 0) {
12014
+ const desiredIndexes = Array.isArray(properties["GlobalSecondaryIndexes"]) ? properties["GlobalSecondaryIndexes"] : [];
12015
+ const desiredByName = /* @__PURE__ */ new Map();
12016
+ for (const entry of desiredIndexes) {
12017
+ const name = entry?.["IndexName"];
12018
+ if (typeof name === "string") desiredByName.set(name, entry);
12019
+ }
12020
+ const indexUpdates = [];
12021
+ const unspecified = [];
12022
+ for (const live of liveIndexes) {
12023
+ const indexName = live.IndexName;
12024
+ if (typeof indexName !== "string") continue;
12025
+ const declared = desiredByName.get(indexName)?.["ProvisionedThroughput"];
12026
+ const read = readCapacityNumber(declared, "ReadCapacityUnits");
12027
+ const write = readCapacityNumber(declared, "WriteCapacityUnits");
12028
+ if (read === void 0 || write === void 0) {
12029
+ unspecified.push(indexName);
12030
+ continue;
12031
+ }
12032
+ indexUpdates.push({ Update: {
12033
+ IndexName: indexName,
12034
+ ProvisionedThroughput: {
12035
+ ReadCapacityUnits: read,
12036
+ WriteCapacityUnits: write
12037
+ }
12038
+ } });
12039
+ gsiHandledByBillingFlip.add(indexName);
12040
+ }
12041
+ if (indexUpdates.length > 0) updateInput.GlobalSecondaryIndexUpdates = indexUpdates;
12042
+ if (unspecified.length > 0) this.logger.warn(`AWS::DynamoDB::Table ${logicalId}: flipping BillingMode to PROVISIONED, but the template declares no usable ProvisionedThroughput for live index(es) ${unspecified.join(", ")}. AWS requires per-index capacity in the same UpdateTable and will reject the flip naming them. Declare GlobalSecondaryIndexes[].ProvisionedThroughput (both ReadCapacityUnits and WriteCapacityUnits) for each. If an index is listed here because this deploy REMOVES it, drop it in a separate deploy BEFORE the flip — AWS demands capacity for every index still live at flip time, so the two cannot be combined.`);
12043
+ }
11850
12044
  await this.dynamoDBClient.send(new UpdateTableCommand(updateInput));
11851
12045
  if (billingMode !== liveBillingMode) await this.waitForTableAndIndexesActive(physicalId, BILLING_FLIP_ACTIVE_WAIT_ATTEMPTS);
11852
12046
  else await this.waitForTableActiveAfterUpdate(physicalId, TABLE_ACTIVE_WAIT_ATTEMPTS);
@@ -11923,7 +12117,7 @@ var DynamoDBTableProvider = class {
11923
12117
  this.logger.debug(`Disabled DynamoDB Stream on table ${physicalId}`);
11924
12118
  }
11925
12119
  }
11926
- if (JSON.stringify(properties["GlobalSecondaryIndexes"]) !== JSON.stringify(previousProperties["GlobalSecondaryIndexes"])) await this.applyGsiUpdates(physicalId, resourceType, logicalId, previousProperties["GlobalSecondaryIndexes"], properties["GlobalSecondaryIndexes"], properties["AttributeDefinitions"]);
12120
+ if (JSON.stringify(properties["GlobalSecondaryIndexes"]) !== JSON.stringify(previousProperties["GlobalSecondaryIndexes"])) await this.applyGsiUpdates(physicalId, resourceType, logicalId, previousProperties["GlobalSecondaryIndexes"], properties["GlobalSecondaryIndexes"], properties["AttributeDefinitions"], gsiHandledByBillingFlip);
11927
12121
  if (JSON.stringify(properties["PointInTimeRecoverySpecification"]) !== JSON.stringify(previousProperties["PointInTimeRecoverySpecification"])) await this.applyPointInTimeRecovery(physicalId, properties["PointInTimeRecoverySpecification"], previousProperties["PointInTimeRecoverySpecification"]);
11928
12122
  if (JSON.stringify(properties["TimeToLiveSpecification"]) !== JSON.stringify(previousProperties["TimeToLiveSpecification"])) {
11929
12123
  this.assertNoActiveTtlAttributeNameChange(logicalId, resourceType, physicalId, properties["TimeToLiveSpecification"], previousProperties["TimeToLiveSpecification"]);
@@ -12361,7 +12555,7 @@ var DynamoDBTableProvider = class {
12361
12555
  * a remove-then-add pair, so this method throws on such a change rather than
12362
12556
  * silently dropping it.
12363
12557
  */
12364
- async applyGsiUpdates(physicalId, resourceType, logicalId, previousGsis, desiredGsis, desiredAttributeDefinitions) {
12558
+ async applyGsiUpdates(physicalId, resourceType, logicalId, previousGsis, desiredGsis, desiredAttributeDefinitions, handledByBillingFlip = /* @__PURE__ */ new Set()) {
12365
12559
  const prev = previousGsis ?? [];
12366
12560
  const desired = desiredGsis ?? [];
12367
12561
  const prevByName = new Map(prev.filter((g) => g.IndexName).map((g) => [g.IndexName, g]));
@@ -12380,7 +12574,7 @@ var DynamoDBTableProvider = class {
12380
12574
  } else {
12381
12575
  const before = prevByName.get(name);
12382
12576
  if (JSON.stringify(before.KeySchema) !== JSON.stringify(gsi.KeySchema) || JSON.stringify(before.Projection) !== JSON.stringify(gsi.Projection)) throw new ProvisioningError(`GlobalSecondaryIndex ${name} on DynamoDB table ${logicalId} changed its KeySchema or Projection, which DynamoDB cannot modify in place. Rename the index (so it is dropped and re-created) or replace the table.`, resourceType, logicalId, physicalId);
12383
- if (gsi.ProvisionedThroughput && JSON.stringify(before.ProvisionedThroughput) !== JSON.stringify(gsi.ProvisionedThroughput)) ops.push({ Update: {
12577
+ if (gsi.ProvisionedThroughput && !handledByBillingFlip.has(name) && JSON.stringify(before.ProvisionedThroughput) !== JSON.stringify(gsi.ProvisionedThroughput)) ops.push({ Update: {
12384
12578
  IndexName: name,
12385
12579
  ProvisionedThroughput: gsi.ProvisionedThroughput
12386
12580
  } });
@@ -69225,7 +69419,7 @@ function createMigrateCommand() {
69225
69419
  */
69226
69420
  function buildProgram() {
69227
69421
  const program = new Command();
69228
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.280.14");
69422
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.280.16");
69229
69423
  program.hook("preAction", (_thisCommand, actionCommand) => {
69230
69424
  const { profile } = actionCommand.optsWithGlobals();
69231
69425
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;