@go-to-k/cdkd 0.280.2 → 0.280.4

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,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { $ as DiffCalculator, $t as resolveBucketRegion, A as red, At as getDockerImageBySourceHash, B as isTerminationProtectionPropagationError, Bt as resolveStateBucketWithDefaultAndSource, C as isStatefulRecreateTargetSync, Ct as validateContainerRepoName, D as cyan, Dt as runDockerForeground, E as bold, En as withErrorHandling, Et as getDockerCmd, F as ProviderRegistry, Ft as resolveApp, G as normalizeAwsTagsToCfn, Gt as CFN_TEMPLATE_URL_LIMIT, H as cfnRefValueFromPhysicalId, Ht as stateBucketExistenceConfirmed, I as findActionableSilentDrops, It as resolveAutoAssetStorage, J as readConfigString, Jt as uploadCfnTemplate, K as resolveExplicitPhysicalId, Kt as MIGRATE_TMP_PREFIX, L as CloudControlProvider, Lt as resolveCaptureObservedState, M as IAMRoleProvider, Mt as synthesisStatusMessage, N as collectInlinePolicyNamesManagedBySiblings, Nt as getDefaultStateBucketName, O as gray, Ot as runDockerStreaming, P as clearOnUpdateRemoval, Pt as getLegacyStateBucketName, Q as applyRoleArnIfSet, R as slowCcOperationTimeoutMs, Rt as resolveSkipPrefix, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as validateAssetBucketName, T as formatResourceLine, Tn as normalizeAwsError, Tt as formatDockerLoginError, U as refStateLookupFromResource, Ut as warnDeprecatedNoPrefixCliFlag, V as IntrinsicFunctionResolver, Vt as resolveUseCdkBootstrapAssets, W as WAFv2WebACLProvider, Wt as CFN_TEMPLATE_BODY_LIMIT, X as requireConfigArray, Xt as AssemblyReader, Y as replayWarn, Yt as expectedOwnerParam, Z as requireConfigString, Zt as processStackMessages, _ as createPreDeleteFinalSnapshot, _n as ResourceTimeoutError, _t as AssetModeResolver, a as DeploymentEventsStore, an as CdkdError, at as TemplateParser, b as unsupportedFinalSnapshotError, bn as StackTerminationProtectionError, bt as getBootstrapMarkerKey, c as replayFailedOperations, cn as DeployCancelledError, ct as rebuildClientForBucketRegion, d as IMPLICIT_DELETE_DEPENDENCIES, dn as LocalStartServiceError, dt as stringifyValue, en as AwsClients, et as describeTypeWithThrottleRetry, f as computeImplicitDeleteEdges, ft as WorkGraph, g as ccRoutedFinalSnapshotError, gn as ProvisioningError, gt as rewriteTemplateAssetReferences, h as buildFinalSnapshotIdentifier, hn as PartialFailureError, ht as loadPublishableAssetManifest, i as DeploymentEventsReader, it as DagBuilder, j as yellow, jt as Synthesizer, k as green, kt as AssetManifestLoader, l as replayRollback, ln as LocalInvokeBuildError$1, lt as shouldRetainResource, m as PRE_DELETE_SNAPSHOT_TYPES, mn as NestedStackChildDirectDestroyError, mt as createAssetRedirectResolver, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as resetAwsClients, nt as isRetryableTransientError, o as planFailedOps, ot as LockManager, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as MissingCdkCliError, pt as buildAssetRedirectMap, q as assertRegionMatch, qt as findLargeInlineResources, r as DeployEngine, rn as setAwsClients, rt as isThrottlingError, s as planRollback, st as S3StateBackend, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as getAwsClients, tt as withRetry, u as withResourceDeadline, un as LocalMigrateError, ut as AssetPublisher, v as isFinalSnapshotError, vn as ResourceUpdateNotSupportedError, vt as BOOTSTRAP_MARKER_PREFIX, w as renderStatefulReason, wt as buildDockerImage, x as extractDeploymentEventError, xt as parseBootstrapMarker, y as refusesFinalSnapshot, yn as StackHasActiveImportsError, yt as ensureAssetStorage, z as disableInstanceApiTermination, zt as resolveStateBucketWithDefault } from "./deploy-engine-DK0y5OP8.js";
2
+ import { $ as DiffCalculator, $t as resolveBucketRegion, A as red, At as getDockerImageBySourceHash, B as isTerminationProtectionPropagationError, Bt as resolveStateBucketWithDefaultAndSource, C as isStatefulRecreateTargetSync, Ct as validateContainerRepoName, D as cyan, Dt as runDockerForeground, E as bold, En as withErrorHandling, Et as getDockerCmd, F as ProviderRegistry, Ft as resolveApp, G as normalizeAwsTagsToCfn, Gt as CFN_TEMPLATE_URL_LIMIT, H as cfnRefValueFromPhysicalId, Ht as stateBucketExistenceConfirmed, I as findActionableSilentDrops, It as resolveAutoAssetStorage, J as readConfigString, Jt as uploadCfnTemplate, K as resolveExplicitPhysicalId, Kt as MIGRATE_TMP_PREFIX, L as CloudControlProvider, Lt as resolveCaptureObservedState, M as IAMRoleProvider, Mt as synthesisStatusMessage, N as collectInlinePolicyNamesManagedBySiblings, Nt as getDefaultStateBucketName, O as gray, Ot as runDockerStreaming, P as clearOnUpdateRemoval, Pt as getLegacyStateBucketName, Q as applyRoleArnIfSet, R as slowCcOperationTimeoutMs, Rt as resolveSkipPrefix, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as validateAssetBucketName, T as formatResourceLine, Tn as normalizeAwsError, Tt as formatDockerLoginError, U as refStateLookupFromResource, Ut as warnDeprecatedNoPrefixCliFlag, V as IntrinsicFunctionResolver, Vt as resolveUseCdkBootstrapAssets, W as WAFv2WebACLProvider, Wt as CFN_TEMPLATE_BODY_LIMIT, X as requireConfigArray, Xt as AssemblyReader, Y as replayWarn, Yt as expectedOwnerParam, Z as requireConfigString, Zt as processStackMessages, _ as createPreDeleteFinalSnapshot, _n as ResourceTimeoutError, _t as AssetModeResolver, a as DeploymentEventsStore, an as CdkdError, at as TemplateParser, b as unsupportedFinalSnapshotError, bn as StackTerminationProtectionError, bt as getBootstrapMarkerKey, c as replayFailedOperations, cn as DeployCancelledError, ct as rebuildClientForBucketRegion, d as IMPLICIT_DELETE_DEPENDENCIES, dn as LocalStartServiceError, dt as stringifyValue, en as AwsClients, et as describeTypeWithThrottleRetry, f as computeImplicitDeleteEdges, ft as WorkGraph, g as ccRoutedFinalSnapshotError, gn as ProvisioningError, gt as rewriteTemplateAssetReferences, h as buildFinalSnapshotIdentifier, hn as PartialFailureError, ht as loadPublishableAssetManifest, i as DeploymentEventsReader, it as DagBuilder, j as yellow, jt as Synthesizer, k as green, kt as AssetManifestLoader, l as replayRollback, ln as LocalInvokeBuildError$1, lt as shouldRetainResource, m as PRE_DELETE_SNAPSHOT_TYPES, mn as NestedStackChildDirectDestroyError, mt as createAssetRedirectResolver, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as resetAwsClients, nt as isRetryableTransientError, o as planFailedOps, ot as LockManager, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as MissingCdkCliError, pt as buildAssetRedirectMap, q as assertRegionMatch, qt as findLargeInlineResources, r as DeployEngine, rn as setAwsClients, rt as isThrottlingError, s as planRollback, st as S3StateBackend, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as getAwsClients, tt as withRetry, u as withResourceDeadline, un as LocalMigrateError, ut as AssetPublisher, v as isFinalSnapshotError, vn as ResourceUpdateNotSupportedError, vt as BOOTSTRAP_MARKER_PREFIX, w as renderStatefulReason, wt as buildDockerImage, x as extractDeploymentEventError, xt as parseBootstrapMarker, y as refusesFinalSnapshot, yn as StackHasActiveImportsError, yt as ensureAssetStorage, z as disableInstanceApiTermination, zt as resolveStateBucketWithDefault } from "./deploy-engine-CttwgBIB.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-CwKNCS78.js";
4
+ import { t as ASGProvider } from "./asg-provider-Cyuov8l5.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";
@@ -43,7 +43,7 @@ import readline from "node:readline/promises";
43
43
  import { writeFileSync as writeFileSync$1 } from "fs";
44
44
  import * as zlib from "node:zlib";
45
45
  import { ApplicationAutoScalingClient, DeleteScalingPolicyCommand, DeregisterScalableTargetCommand, DescribeScalableTargetsCommand, DescribeScalingPoliciesCommand, PutScalingPolicyCommand, RegisterScalableTargetCommand } from "@aws-sdk/client-application-auto-scaling";
46
- import { ApiGatewayV2Client, CreateApiCommand, CreateAuthorizerCommand as CreateAuthorizerCommand$1, CreateIntegrationCommand, CreateRouteCommand as CreateRouteCommand$1, CreateStageCommand as CreateStageCommand$1, DeleteApiCommand, DeleteAuthorizerCommand as DeleteAuthorizerCommand$1, DeleteCorsConfigurationCommand, DeleteIntegrationCommand, DeleteRouteCommand as DeleteRouteCommand$1, DeleteStageCommand as DeleteStageCommand$1, GetApiCommand, GetAuthorizerCommand as GetAuthorizerCommand$1, GetIntegrationCommand, GetRouteCommand, GetStageCommand as GetStageCommand$1, NotFoundException as NotFoundException$3, UpdateApiCommand, UpdateAuthorizerCommand as UpdateAuthorizerCommand$1, UpdateIntegrationCommand, UpdateRouteCommand, UpdateStageCommand as UpdateStageCommand$1 } from "@aws-sdk/client-apigatewayv2";
46
+ import { ApiGatewayV2Client, CreateApiCommand, CreateAuthorizerCommand as CreateAuthorizerCommand$1, CreateIntegrationCommand, CreateRouteCommand as CreateRouteCommand$1, CreateStageCommand as CreateStageCommand$1, DeleteAccessLogSettingsCommand, DeleteApiCommand, DeleteAuthorizerCommand as DeleteAuthorizerCommand$1, DeleteCorsConfigurationCommand, DeleteIntegrationCommand, DeleteRouteCommand as DeleteRouteCommand$1, DeleteRouteRequestParameterCommand, DeleteRouteSettingsCommand, DeleteStageCommand as DeleteStageCommand$1, GetApiCommand, GetAuthorizerCommand as GetAuthorizerCommand$1, GetIntegrationCommand, GetRouteCommand, GetStageCommand as GetStageCommand$1, NotFoundException as NotFoundException$3, UpdateApiCommand, UpdateAuthorizerCommand as UpdateAuthorizerCommand$1, UpdateIntegrationCommand, UpdateRouteCommand, UpdateStageCommand as UpdateStageCommand$1 } from "@aws-sdk/client-apigatewayv2";
47
47
  import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$11, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$13, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
48
48
  import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$14, UpdateClusterCommand, UpdateServiceCommand, waitUntilServicesStable } from "@aws-sdk/client-ecs";
49
49
  import { AddTagsToResourceCommand as AddTagsToResourceCommand$3, CreateDBClusterCommand as CreateDBClusterCommand$1, CreateDBInstanceCommand as CreateDBInstanceCommand$1, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$1, DeleteDBClusterCommand as DeleteDBClusterCommand$1, DeleteDBInstanceCommand as DeleteDBInstanceCommand$1, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$1, DescribeDBClustersCommand as DescribeDBClustersCommand$1, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$1, DocDBClient, ListTagsForResourceCommand as ListTagsForResourceCommand$12, ModifyDBClusterCommand as ModifyDBClusterCommand$1, ModifyDBInstanceCommand as ModifyDBInstanceCommand$1, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$1, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$3 } from "@aws-sdk/client-docdb";
@@ -5075,7 +5075,13 @@ var S3BucketProvider = class S3BucketProvider {
5075
5075
  * - CFn Transition.TransitionInDays -> SDK Transition.Days
5076
5076
  * - CFn Transition.TransitionDate -> SDK Transition.Date
5077
5077
  */
5078
- async applyLifecycleConfiguration(bucketName, lifecycleConfig) {
5078
+ async applyLifecycleConfiguration(bucketName, lifecycleConfig, onUnusable) {
5079
+ for (const rule of lifecycleConfig.Rules) {
5080
+ const rawTagFilters = rule["Filter"]?.["TagFilters"] ?? rule["TagFilters"];
5081
+ if (rawTagFilters != null) {
5082
+ if (requireConfigArray(rawTagFilters, "AWS::S3::Bucket LifecycleConfiguration.Rules[].TagFilters", { ...onUnusable ? { onUnusable } : {} }) === void 0) return;
5083
+ }
5084
+ }
5079
5085
  const gatherScope = (rule) => {
5080
5086
  const filter = rule["Filter"];
5081
5087
  return {
@@ -5088,7 +5094,7 @@ var S3BucketProvider = class S3BucketProvider {
5088
5094
  const isPlainPrefixOnly = (rule) => {
5089
5095
  if (rule["Filter"] !== void 0) return false;
5090
5096
  const s = gatherScope(rule);
5091
- return s.prefix !== void 0 && (s.tagFilters === void 0 || s.tagFilters.length === 0) && s.sizeGt === void 0 && s.sizeLt === void 0;
5097
+ return s.prefix !== void 0 && (s.tagFilters == null || s.tagFilters.length === 0) && s.sizeGt === void 0 && s.sizeLt === void 0;
5092
5098
  };
5093
5099
  const useFilterForm = !lifecycleConfig.Rules.every(isPlainPrefixOnly);
5094
5100
  const rules = lifecycleConfig.Rules.map((rule) => {
@@ -5141,7 +5147,7 @@ var S3BucketProvider = class S3BucketProvider {
5141
5147
  const abort = isPlainObject$1(rule["AbortIncompleteMultipartUpload"]) ? rule["AbortIncompleteMultipartUpload"] : void 0;
5142
5148
  if (abort) sdkRule.AbortIncompleteMultipartUpload = { DaysAfterInitiation: abort["DaysAfterInitiation"] };
5143
5149
  const { prefix, tagFilters, sizeGt, sizeLt } = gatherScope(rule);
5144
- const hasTags = tagFilters !== void 0 && tagFilters.length > 0;
5150
+ const hasTags = tagFilters != null && tagFilters.length > 0;
5145
5151
  if ((hasTags ? 1 : 0) + (prefix !== void 0 ? 1 : 0) + (sizeGt !== void 0 ? 1 : 0) + (sizeLt !== void 0 ? 1 : 0) > 1) sdkRule.Filter = { And: {
5146
5152
  Prefix: prefix,
5147
5153
  Tags: hasTags ? tagFilters : void 0,
@@ -5367,13 +5373,14 @@ var S3BucketProvider = class S3BucketProvider {
5367
5373
  * CFn property: MetricsConfigurations[] (array of configurations)
5368
5374
  * SDK: PutBucketMetricsConfiguration (one per configuration, keyed by Id)
5369
5375
  */
5370
- async applyMetricsConfigurations(bucketName, configs) {
5376
+ async applyMetricsConfigurations(bucketName, configs, onUnusable) {
5371
5377
  for (const config of configs) {
5372
5378
  const id = config["Id"];
5373
5379
  const metricsConfig = { Id: id };
5374
5380
  const prefix = config["Prefix"];
5375
5381
  const accessPointArn = config["AccessPointArn"];
5376
5382
  const tagFilters = config["TagFilters"];
5383
+ if (tagFilters != null && requireConfigArray(tagFilters, "AWS::S3::Bucket MetricsConfigurations[].TagFilters", { ...onUnusable ? { onUnusable } : {} }) === void 0) continue;
5377
5384
  const tagCount = tagFilters?.length ?? 0;
5378
5385
  if ((prefix ? 1 : 0) + tagCount + (accessPointArn ? 1 : 0) > 1) metricsConfig.Filter = { And: {
5379
5386
  Prefix: prefix,
@@ -5456,6 +5463,7 @@ var S3BucketProvider = class S3BucketProvider {
5456
5463
  };
5457
5464
  const prefix = config["Prefix"];
5458
5465
  const tagFilters = config["TagFilters"];
5466
+ if (tagFilters != null && requireConfigArray(tagFilters, "AWS::S3::Bucket AnalyticsConfigurations[].TagFilters", { ...onUnusable ? { onUnusable } : {} }) === void 0) continue;
5459
5467
  const tagCount = tagFilters?.length ?? 0;
5460
5468
  if ((prefix ? 1 : 0) + tagCount > 1) analyticsConfig.Filter = { And: {
5461
5469
  Prefix: prefix,
@@ -5494,7 +5502,7 @@ var S3BucketProvider = class S3BucketProvider {
5494
5502
  * CFn property: IntelligentTieringConfigurations[]
5495
5503
  * SDK: PutBucketIntelligentTieringConfiguration (one per configuration, keyed by Id)
5496
5504
  */
5497
- async applyIntelligentTieringConfigurations(bucketName, configs) {
5505
+ async applyIntelligentTieringConfigurations(bucketName, configs, onUnusable) {
5498
5506
  for (const config of configs) {
5499
5507
  const id = config["Id"];
5500
5508
  const tierings = config["Tierings"];
@@ -5508,6 +5516,7 @@ var S3BucketProvider = class S3BucketProvider {
5508
5516
  };
5509
5517
  const prefix = config["Prefix"];
5510
5518
  const tagFilters = config["TagFilters"];
5519
+ if (tagFilters != null && requireConfigArray(tagFilters, "AWS::S3::Bucket IntelligentTieringConfigurations[].TagFilters", { ...onUnusable ? { onUnusable } : {} }) === void 0) continue;
5511
5520
  const tagCount = tagFilters?.length ?? 0;
5512
5521
  if ((prefix ? 1 : 0) + tagCount > 1) itConfig.Filter = { And: {
5513
5522
  Prefix: prefix,
@@ -5852,7 +5861,7 @@ var S3BucketProvider = class S3BucketProvider {
5852
5861
  });
5853
5862
  await this.diffSubConfig(bucketName, previousProperties["LifecycleConfiguration"], properties["LifecycleConfiguration"], async (cfg) => {
5854
5863
  if (!cfg.Rules || !Array.isArray(cfg.Rules) || cfg.Rules.length === 0) return;
5855
- await this.applyLifecycleConfiguration(bucketName, cfg);
5864
+ await this.applyLifecycleConfiguration(bucketName, cfg, (m) => this.logger.warn(m));
5856
5865
  }, async () => {
5857
5866
  await this.s3Client.send(new DeleteBucketLifecycleCommand({ Bucket: bucketName }));
5858
5867
  this.logger.debug(`Deleted lifecycle configuration on bucket ${bucketName}`);
@@ -5882,7 +5891,7 @@ var S3BucketProvider = class S3BucketProvider {
5882
5891
  this.logger.debug(`Cleared object lock rule on bucket ${bucketName}`);
5883
5892
  });
5884
5893
  await this.diffSubConfig(bucketName, previousProperties["AccelerateConfiguration"], properties["AccelerateConfiguration"], async (cfg) => this.applyAccelerateConfiguration(bucketName, cfg), async () => this.applyAccelerateConfiguration(bucketName, { AccelerationStatus: "Suspended" }));
5885
- await this.diffArrayConfigById(bucketName, previousProperties["MetricsConfigurations"], properties["MetricsConfigurations"], async (_id, cfg) => this.applyMetricsConfigurations(bucketName, [cfg]), async (id) => {
5894
+ await this.diffArrayConfigById(bucketName, previousProperties["MetricsConfigurations"], properties["MetricsConfigurations"], async (_id, cfg) => this.applyMetricsConfigurations(bucketName, [cfg], (m) => this.logger.warn(m)), async (id) => {
5886
5895
  await this.s3Client.send(new DeleteBucketMetricsConfigurationCommand({
5887
5896
  Bucket: bucketName,
5888
5897
  Id: id
@@ -5896,7 +5905,7 @@ var S3BucketProvider = class S3BucketProvider {
5896
5905
  }));
5897
5906
  this.logger.debug(`Deleted analytics configuration ${id} on bucket ${bucketName}`);
5898
5907
  });
5899
- await this.diffArrayConfigById(bucketName, previousProperties["IntelligentTieringConfigurations"], properties["IntelligentTieringConfigurations"], async (_id, cfg) => this.applyIntelligentTieringConfigurations(bucketName, [cfg]), async (id) => {
5908
+ await this.diffArrayConfigById(bucketName, previousProperties["IntelligentTieringConfigurations"], properties["IntelligentTieringConfigurations"], async (_id, cfg) => this.applyIntelligentTieringConfigurations(bucketName, [cfg], (m) => this.logger.warn(m)), async (id) => {
5900
5909
  await this.s3Client.send(new DeleteBucketIntelligentTieringConfigurationCommand({
5901
5910
  Bucket: bucketName,
5902
5911
  Id: id
@@ -5930,7 +5939,7 @@ var S3BucketProvider = class S3BucketProvider {
5930
5939
  const corsConfig = properties["CorsConfiguration"];
5931
5940
  if (corsConfig?.CorsRules && Array.isArray(corsConfig.CorsRules) && corsConfig.CorsRules.length > 0) await this.applyCorsConfiguration(bucketName, corsConfig);
5932
5941
  const lifecycleConfig = properties["LifecycleConfiguration"];
5933
- if (lifecycleConfig?.Rules && Array.isArray(lifecycleConfig.Rules) && lifecycleConfig.Rules.length > 0) await this.applyLifecycleConfiguration(bucketName, lifecycleConfig);
5942
+ if (lifecycleConfig?.Rules && Array.isArray(lifecycleConfig.Rules) && lifecycleConfig.Rules.length > 0) await this.applyLifecycleConfiguration(bucketName, lifecycleConfig, replayOnUnusable);
5934
5943
  const loggingConfig = properties["LoggingConfiguration"];
5935
5944
  if (readConfigString(loggingConfig, "DestinationBucketName", "", "AWS::S3::Bucket LoggingConfiguration") !== "") await this.applyLoggingConfiguration(bucketName, loggingConfig);
5936
5945
  const websiteConfig = properties["WebsiteConfiguration"];
@@ -5938,11 +5947,11 @@ var S3BucketProvider = class S3BucketProvider {
5938
5947
  const accelerateConfig = properties["AccelerateConfiguration"];
5939
5948
  if (accelerateConfig) await this.applyAccelerateConfiguration(bucketName, accelerateConfig);
5940
5949
  const metricsConfigs = properties["MetricsConfigurations"];
5941
- if (metricsConfigs && Array.isArray(metricsConfigs) && metricsConfigs.length > 0) await this.applyMetricsConfigurations(bucketName, metricsConfigs);
5950
+ if (metricsConfigs && Array.isArray(metricsConfigs) && metricsConfigs.length > 0) await this.applyMetricsConfigurations(bucketName, metricsConfigs, replayOnUnusable);
5942
5951
  const analyticsConfigs = properties["AnalyticsConfigurations"];
5943
5952
  if (analyticsConfigs && Array.isArray(analyticsConfigs) && analyticsConfigs.length > 0) await this.applyAnalyticsConfigurations(bucketName, analyticsConfigs, replayOnUnusable);
5944
5953
  const itConfigs = properties["IntelligentTieringConfigurations"];
5945
- if (itConfigs && Array.isArray(itConfigs) && itConfigs.length > 0) await this.applyIntelligentTieringConfigurations(bucketName, itConfigs);
5954
+ if (itConfigs && Array.isArray(itConfigs) && itConfigs.length > 0) await this.applyIntelligentTieringConfigurations(bucketName, itConfigs, replayOnUnusable);
5946
5955
  const inventoryConfigs = properties["InventoryConfigurations"];
5947
5956
  if (inventoryConfigs && Array.isArray(inventoryConfigs) && inventoryConfigs.length > 0) await this.applyInventoryConfigurations(bucketName, inventoryConfigs, replayOnUnusable);
5948
5957
  const replConfig = properties["ReplicationConfiguration"];
@@ -21772,7 +21781,11 @@ var ApiGatewayV2Provider = class {
21772
21781
  "Description",
21773
21782
  "Tags",
21774
21783
  "StageVariables",
21775
- "DefaultRouteSettings"
21784
+ "DefaultRouteSettings",
21785
+ "AccessLogSettings",
21786
+ "ClientCertificateId",
21787
+ "DeploymentId",
21788
+ "RouteSettings"
21776
21789
  ])],
21777
21790
  ["AWS::ApiGatewayV2::Integration", /* @__PURE__ */ new Set([
21778
21791
  "ApiId",
@@ -21791,7 +21804,12 @@ var ApiGatewayV2Provider = class {
21791
21804
  "AuthorizationType",
21792
21805
  "AuthorizerId",
21793
21806
  "AuthorizationScopes",
21794
- "OperationName"
21807
+ "OperationName",
21808
+ "ApiKeyRequired",
21809
+ "ModelSelectionExpression",
21810
+ "RequestModels",
21811
+ "RequestParameters",
21812
+ "RouteResponseSelectionExpression"
21795
21813
  ])],
21796
21814
  ["AWS::ApiGatewayV2::Authorizer", /* @__PURE__ */ new Set([
21797
21815
  "ApiId",
@@ -21950,6 +21968,10 @@ var ApiGatewayV2Provider = class {
21950
21968
  Description: properties["Description"],
21951
21969
  StageVariables: properties["StageVariables"],
21952
21970
  DefaultRouteSettings: properties["DefaultRouteSettings"],
21971
+ AccessLogSettings: properties["AccessLogSettings"],
21972
+ ClientCertificateId: properties["ClientCertificateId"],
21973
+ DeploymentId: properties["DeploymentId"],
21974
+ RouteSettings: properties["RouteSettings"],
21953
21975
  Tags: this.cfnTagsToRecord(properties["Tags"])
21954
21976
  }));
21955
21977
  this.logger.debug(`Successfully created API Gateway V2 Stage ${logicalId}: ${stageName}`);
@@ -22047,7 +22069,12 @@ var ApiGatewayV2Provider = class {
22047
22069
  AuthorizationType: properties["AuthorizationType"],
22048
22070
  AuthorizerId: properties["AuthorizerId"],
22049
22071
  AuthorizationScopes: properties["AuthorizationScopes"],
22050
- OperationName: properties["OperationName"]
22072
+ OperationName: properties["OperationName"],
22073
+ ApiKeyRequired: properties["ApiKeyRequired"],
22074
+ ModelSelectionExpression: properties["ModelSelectionExpression"],
22075
+ RequestModels: properties["RequestModels"],
22076
+ RequestParameters: properties["RequestParameters"],
22077
+ RouteResponseSelectionExpression: properties["RouteResponseSelectionExpression"]
22051
22078
  }))).RouteId;
22052
22079
  this.logger.debug(`Successfully created API Gateway V2 Route ${logicalId}: ${routeId}`);
22053
22080
  return {
@@ -22187,6 +22214,10 @@ var ApiGatewayV2Provider = class {
22187
22214
  result["Description"] = resp.Description ?? "";
22188
22215
  if (resp.StageVariables !== void 0) result["StageVariables"] = resp.StageVariables;
22189
22216
  if (resp.DefaultRouteSettings !== void 0) result["DefaultRouteSettings"] = resp.DefaultRouteSettings;
22217
+ if (resp.AccessLogSettings !== void 0) result["AccessLogSettings"] = resp.AccessLogSettings;
22218
+ if (resp.ClientCertificateId !== void 0) result["ClientCertificateId"] = resp.ClientCertificateId;
22219
+ if (properties?.["DeploymentId"] !== void 0 && resp.DeploymentId !== void 0) result["DeploymentId"] = resp.DeploymentId;
22220
+ if (resp.RouteSettings !== void 0) result["RouteSettings"] = resp.RouteSettings;
22190
22221
  return result;
22191
22222
  } catch (err) {
22192
22223
  if (err instanceof NotFoundException$3) return void 0;
@@ -22232,6 +22263,11 @@ var ApiGatewayV2Provider = class {
22232
22263
  result["AuthorizationScopes"] = resp.AuthorizationScopes ? [...resp.AuthorizationScopes] : [];
22233
22264
  }
22234
22265
  if (resp.OperationName !== void 0) result["OperationName"] = resp.OperationName;
22266
+ result["ApiKeyRequired"] = resp.ApiKeyRequired ?? false;
22267
+ if (resp.ModelSelectionExpression !== void 0) result["ModelSelectionExpression"] = resp.ModelSelectionExpression;
22268
+ if (resp.RequestModels !== void 0) result["RequestModels"] = resp.RequestModels;
22269
+ if (resp.RequestParameters !== void 0) result["RequestParameters"] = resp.RequestParameters;
22270
+ if (resp.RouteResponseSelectionExpression !== void 0) result["RouteResponseSelectionExpression"] = resp.RouteResponseSelectionExpression;
22235
22271
  return result;
22236
22272
  } catch (err) {
22237
22273
  if (err instanceof NotFoundException$3) return void 0;
@@ -22391,8 +22427,11 @@ var ApiGatewayV2Provider = class {
22391
22427
  * `UpdateStage` keys on `(ApiId, StageName)` — `StageName` is the
22392
22428
  * physicalId and immutable. Mutable fields cdkd manages:
22393
22429
  * `AutoDeploy` / `Description` / `StageVariables` /
22394
- * `DefaultRouteSettings`. `ApiId` is also immutable (a stage cannot be
22395
- * moved between APIs).
22430
+ * `DefaultRouteSettings` / `AccessLogSettings` / `ClientCertificateId` /
22431
+ * `DeploymentId` / `RouteSettings`. `ApiId` is also immutable (a stage
22432
+ * cannot be moved between APIs). `AccessLogSettings` and per-key
22433
+ * `RouteSettings` can only be CLEARED through their dedicated delete APIs —
22434
+ * see {@link applyStageRemovals}.
22396
22435
  */
22397
22436
  async updateStage(logicalId, physicalId, resourceType, properties, previousProperties) {
22398
22437
  const apiId = properties["ApiId"] ?? previousProperties["ApiId"];
@@ -22426,7 +22465,40 @@ var ApiGatewayV2Provider = class {
22426
22465
  input.DefaultRouteSettings = properties["DefaultRouteSettings"];
22427
22466
  changed = true;
22428
22467
  }
22468
+ if (properties["AccessLogSettings"] !== void 0 && !this.deepEqual(properties["AccessLogSettings"], previousProperties["AccessLogSettings"])) {
22469
+ input.AccessLogSettings = properties["AccessLogSettings"];
22470
+ changed = true;
22471
+ }
22472
+ const accessLogRemoved = properties["AccessLogSettings"] === void 0 && previousProperties["AccessLogSettings"] !== void 0;
22473
+ if (properties["RouteSettings"] !== void 0 && !this.deepEqual(properties["RouteSettings"], previousProperties["RouteSettings"])) {
22474
+ input.RouteSettings = properties["RouteSettings"];
22475
+ changed = true;
22476
+ }
22477
+ const droppedRouteSettingKeys = this.droppedKeys(properties["RouteSettings"], previousProperties["RouteSettings"]);
22478
+ {
22479
+ const r = this.clearableUpdate(properties["ClientCertificateId"], previousProperties["ClientCertificateId"], "");
22480
+ if (r.changed) {
22481
+ input.ClientCertificateId = r.value;
22482
+ changed = true;
22483
+ }
22484
+ }
22485
+ if (properties["DeploymentId"] !== void 0 && properties["DeploymentId"] !== previousProperties["DeploymentId"]) {
22486
+ input.DeploymentId = properties["DeploymentId"];
22487
+ changed = true;
22488
+ }
22429
22489
  if (!changed) {
22490
+ if (accessLogRemoved || droppedRouteSettingKeys.length > 0) {
22491
+ try {
22492
+ await this.applyStageRemovals(apiId, physicalId, accessLogRemoved, droppedRouteSettingKeys);
22493
+ } catch (error) {
22494
+ const cause = error instanceof Error ? error : void 0;
22495
+ throw new ProvisioningError(`Failed to update API Gateway V2 Stage ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
22496
+ }
22497
+ return {
22498
+ physicalId,
22499
+ wasReplaced: false
22500
+ };
22501
+ }
22430
22502
  this.logger.debug(`No mutable Stage fields changed for ${logicalId}; skipping UpdateStage`);
22431
22503
  return {
22432
22504
  physicalId,
@@ -22436,6 +22508,7 @@ var ApiGatewayV2Provider = class {
22436
22508
  this.logger.debug(`Updating API Gateway V2 Stage ${logicalId}: ${physicalId}`);
22437
22509
  try {
22438
22510
  await this.getClient().send(new UpdateStageCommand$1(input));
22511
+ await this.applyStageRemovals(apiId, physicalId, accessLogRemoved, droppedRouteSettingKeys);
22439
22512
  return {
22440
22513
  physicalId,
22441
22514
  wasReplaced: false
@@ -22516,7 +22589,9 @@ var ApiGatewayV2Provider = class {
22516
22589
  /**
22517
22590
  * `UpdateRoute` keys on `(ApiId, RouteId)`. Mutable fields cdkd
22518
22591
  * manages: `RouteKey` / `Target` / `AuthorizationType` /
22519
- * `AuthorizerId` / `AuthorizationScopes` / `OperationName`.
22592
+ * `AuthorizerId` / `AuthorizationScopes` / `OperationName` /
22593
+ * `ApiKeyRequired` / `RequestModels` / `RequestParameters` /
22594
+ * `ModelSelectionExpression` / `RouteResponseSelectionExpression`.
22520
22595
  */
22521
22596
  async updateRoute(logicalId, physicalId, resourceType, properties, previousProperties) {
22522
22597
  const apiId = properties["ApiId"] ?? previousProperties["ApiId"];
@@ -22563,7 +22638,46 @@ var ApiGatewayV2Provider = class {
22563
22638
  changed = true;
22564
22639
  }
22565
22640
  }
22641
+ {
22642
+ const r = this.clearableUpdate(properties["ApiKeyRequired"], previousProperties["ApiKeyRequired"], false);
22643
+ if (r.changed) {
22644
+ input.ApiKeyRequired = r.value;
22645
+ changed = true;
22646
+ }
22647
+ }
22648
+ {
22649
+ const merged = this.mapWithRemovals(properties["RequestModels"], previousProperties["RequestModels"]);
22650
+ if (merged !== void 0) {
22651
+ input.RequestModels = merged;
22652
+ changed = true;
22653
+ }
22654
+ }
22655
+ if (properties["RequestParameters"] !== void 0 && !this.deepEqual(properties["RequestParameters"], previousProperties["RequestParameters"])) {
22656
+ input.RequestParameters = properties["RequestParameters"];
22657
+ changed = true;
22658
+ }
22659
+ const droppedRequestParameterKeys = this.droppedKeys(properties["RequestParameters"], previousProperties["RequestParameters"]);
22660
+ if (properties["ModelSelectionExpression"] !== void 0 && properties["ModelSelectionExpression"] !== previousProperties["ModelSelectionExpression"]) {
22661
+ input.ModelSelectionExpression = properties["ModelSelectionExpression"];
22662
+ changed = true;
22663
+ }
22664
+ if (properties["RouteResponseSelectionExpression"] !== void 0 && properties["RouteResponseSelectionExpression"] !== previousProperties["RouteResponseSelectionExpression"]) {
22665
+ input.RouteResponseSelectionExpression = properties["RouteResponseSelectionExpression"];
22666
+ changed = true;
22667
+ }
22566
22668
  if (!changed) {
22669
+ if (droppedRequestParameterKeys.length > 0) {
22670
+ try {
22671
+ await this.deleteRouteRequestParameters(apiId, physicalId, droppedRequestParameterKeys);
22672
+ } catch (error) {
22673
+ const cause = error instanceof Error ? error : void 0;
22674
+ throw new ProvisioningError(`Failed to update API Gateway V2 Route ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
22675
+ }
22676
+ return {
22677
+ physicalId,
22678
+ wasReplaced: false
22679
+ };
22680
+ }
22567
22681
  this.logger.debug(`No mutable Route fields changed for ${logicalId}; skipping UpdateRoute`);
22568
22682
  return {
22569
22683
  physicalId,
@@ -22573,6 +22687,7 @@ var ApiGatewayV2Provider = class {
22573
22687
  this.logger.debug(`Updating API Gateway V2 Route ${logicalId}: ${physicalId}`);
22574
22688
  try {
22575
22689
  await this.getClient().send(new UpdateRouteCommand(input));
22690
+ await this.deleteRouteRequestParameters(apiId, physicalId, droppedRequestParameterKeys);
22576
22691
  return {
22577
22692
  physicalId,
22578
22693
  wasReplaced: false
@@ -22713,16 +22828,85 @@ var ApiGatewayV2Provider = class {
22713
22828
  };
22714
22829
  }
22715
22830
  /**
22716
- * Resolve a `Record<string, string>` update field (`StageVariables`,
22717
- * Integration `RequestParameters`) with per-key removal awareness.
22831
+ * Keys present in `previous` but absent from `next` — the set a
22832
+ * merge-semantics map silently keeps unless each is deleted BY NAME. A
22833
+ * whole-block removal (`next` undefined) therefore yields every previous key.
22834
+ */
22835
+ droppedKeys(next, previous) {
22836
+ if (previous == null || typeof previous !== "object" || Array.isArray(previous)) return [];
22837
+ const prevMap = previous;
22838
+ const nextMap = next != null && typeof next === "object" && !Array.isArray(next) ? next : {};
22839
+ return Object.keys(prevMap).filter((key) => !Object.prototype.hasOwnProperty.call(nextMap, key));
22840
+ }
22841
+ /**
22842
+ * Send a delete that is idempotent by intent.
22843
+ *
22844
+ * These removal deletes run AFTER the merge-Update in the same update, so a
22845
+ * partial failure (throttle on the second of two) leaves state unsaved and
22846
+ * the next deploy recomputes the SAME dropped-key set and re-issues an
22847
+ * already-applied delete. A console-side removal produces the same shape.
22848
+ * Treating NotFound as success is what keeps that from becoming a permanent
22849
+ * failure loop.
22850
+ */
22851
+ async sendTolerantOfNotFound(send) {
22852
+ try {
22853
+ await send();
22854
+ } catch (error) {
22855
+ if (error instanceof NotFoundException$3) return;
22856
+ throw error;
22857
+ }
22858
+ }
22859
+ /**
22860
+ * The two Stage members `UpdateStage` cannot clear.
22861
+ *
22862
+ * Both MERGE server-side — live-probed 2026-08-11: a stage keeps its
22863
+ * `AccessLogSettings` verbatim through an `UpdateStage` that omits the
22864
+ * member — so a removal that only omits the field is the silent no-op issue
22865
+ * #1160 tracks (access logging, and its billing, keep running). AWS ships
22866
+ * dedicated delete APIs for both; this mirrors the `DeleteCorsConfiguration`
22867
+ * path on `::Api`.
22868
+ *
22869
+ * KNOWN BOUND: `DeleteRouteSettings` removes a whole ROUTE KEY, so dropping
22870
+ * one member INSIDE a kept entry (`LoggingLevel` while `ThrottlingRateLimit`
22871
+ * stays) still merges and survives — the #1225 sub-field class, one level
22872
+ * below what this closes. Same for a partial `AccessLogSettings`.
22873
+ */
22874
+ async applyStageRemovals(apiId, stageName, accessLogRemoved, droppedRouteSettingKeys) {
22875
+ if (accessLogRemoved) await this.sendTolerantOfNotFound(() => this.getClient().send(new DeleteAccessLogSettingsCommand({
22876
+ ApiId: apiId,
22877
+ StageName: stageName
22878
+ })));
22879
+ for (const routeKey of droppedRouteSettingKeys) await this.sendTolerantOfNotFound(() => this.getClient().send(new DeleteRouteSettingsCommand({
22880
+ ApiId: apiId,
22881
+ StageName: stageName,
22882
+ RouteKey: routeKey
22883
+ })));
22884
+ }
22885
+ /**
22886
+ * `RequestParameters` on a Route is an OBJECT-valued merge map, so a dropped
22887
+ * key needs the per-key delete API (live-probed 2026-08-11:
22888
+ * `DeleteRouteRequestParameter` clears exactly one parameter).
22889
+ */
22890
+ async deleteRouteRequestParameters(apiId, routeId, droppedKeys) {
22891
+ for (const key of droppedKeys) await this.sendTolerantOfNotFound(() => this.getClient().send(new DeleteRouteRequestParameterCommand({
22892
+ ApiId: apiId,
22893
+ RouteId: routeId,
22894
+ RequestParameterKey: key
22895
+ })));
22896
+ }
22897
+ /**
22898
+ * Resolve a `Record<string, string>` update field (`StageVariables`, Route
22899
+ * `RequestModels`, Integration `RequestParameters`) with per-key removal
22900
+ * awareness.
22718
22901
  *
22719
22902
  * These maps also merge on the AWS side: sending `{}` (or a map missing
22720
22903
  * a previously-present key) does NOT delete the dropped key — it is kept
22721
- * live. Live-probed 2026-07-22: a key is cleared only by sending it with
22722
- * an empty-string value. So the resolved map is `next` plus every key
22723
- * present in `previous` but absent from `next`, set to `''`. Whole-block
22724
- * removal (next `undefined`, previous populated) therefore sends every
22725
- * old key as `''`. Returns `undefined` when nothing changed.
22904
+ * live. Live-probed 2026-07-22 (and again 2026-08-11 for `RequestModels`):
22905
+ * a key is cleared only by sending it with an empty-string value. So the
22906
+ * resolved map is `next` plus every key present in `previous` but absent
22907
+ * from `next`, set to `''`. Whole-block removal (next `undefined`, previous
22908
+ * populated) therefore sends every old key as `''`. Returns `undefined` when
22909
+ * nothing changed.
22726
22910
  */
22727
22911
  mapWithRemovals(next, previous) {
22728
22912
  if (this.deepEqual(next, previous)) return void 0;
@@ -68365,7 +68549,7 @@ function createMigrateCommand() {
68365
68549
  */
68366
68550
  function buildProgram() {
68367
68551
  const program = new Command();
68368
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.280.2");
68552
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.280.4");
68369
68553
  program.hook("preAction", (_thisCommand, actionCommand) => {
68370
68554
  const { profile } = actionCommand.optsWithGlobals();
68371
68555
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;