@go-to-k/cdkd 0.230.33 → 0.231.1

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,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { A as withErrorHandling, B as generateResourceName, C as StackHasActiveImportsError, F as getLiveRenderer, H as withSkipPrefix, I as PATTERN_B_NAME_OPTIONS, L as PATTERN_B_NAME_PROPERTIES, M as getLogger, P as runStackBuffered, R as PATTERN_B_RESOURCE_TYPES, S as ResourceUpdateNotSupportedError, U as withStackName, V as generateResourceNameWithFallback, _ as MissingCdkCliError, a as assertRegionMatch, b as ProvisioningError, f as LocalInvokeBuildError$1, i as resolveExplicitPhysicalId, k as normalizeAwsError, l as CdkdError, m as LocalStartServiceError, n as matchesCdkPath, o as disableInstanceApiTermination, p as LocalMigrateError, r as normalizeAwsTagsToCfn, s as isTerminationProtectionPropagationError, t as CDK_PATH_TAG, v as NestedStackChildDirectDestroyError, w as StackTerminationProtectionError, x as ResourceTimeoutError, y as PartialFailureError } from "./import-helpers-DayvBD4T.js";
2
+ import { A as withErrorHandling, B as generateResourceName, C as StackHasActiveImportsError, F as getLiveRenderer, H as withSkipPrefix, I as PATTERN_B_NAME_OPTIONS, L as PATTERN_B_NAME_PROPERTIES, M as getLogger, P as runStackBuffered, R as PATTERN_B_RESOURCE_TYPES, S as ResourceUpdateNotSupportedError, U as withStackName, V as generateResourceNameWithFallback, _ as MissingCdkCliError, a as normalizeAwsTagsToCfn, b as ProvisioningError, f as LocalInvokeBuildError$1, i as matchesCdkPath, k as normalizeAwsError, l as CdkdError, m as LocalStartServiceError, n as isTerminationProtectionPropagationError, o as resolveExplicitPhysicalId, p as LocalMigrateError, r as CDK_PATH_TAG, s as assertRegionMatch, t as disableInstanceApiTermination, v as NestedStackChildDirectDestroyError, w as StackTerminationProtectionError, x as ResourceTimeoutError, y as PartialFailureError } from "./ec2-termination-protection-uvVnteGl.js";
3
3
  import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-pjPwZz1r.js";
4
- import { $ as resolveStateBucketWithDefaultAndSource, A as TemplateParser, B as getDockerCmd, C as findActionableSilentDrops, D as applyRoleArnIfSet, E as cfnRefValueFromPhysicalId, F as AssetPublisher, G as Synthesizer, H as runDockerStreaming, I as stringifyValue, J as getLegacyStateBucketName, K as synthesisStatusMessage, L as WorkGraph, M as S3StateBackend, N as rebuildClientForBucketRegion, O as DiffCalculator, P as shouldRetainResource, Q as resolveStateBucketWithDefault, R as buildDockerImage, S as ProviderRegistry, T as IntrinsicFunctionResolver, U as AssetManifestLoader, V as runDockerForeground, W as getDockerImageBySourceHash, X as resolveCaptureObservedState, Y as resolveApp, Z as resolveSkipPrefix, _ as green, a as withRetry, at as uploadCfnTemplate, b as IAMRoleProvider, c as computeImplicitDeleteEdges, ct as resolveBucketRegion, d as isStatefulRecreateTargetSync, et as warnDeprecatedNoPrefixCliFlag, f as renderStatefulReason, g as gray, h as cyan, i as withResourceDeadline, it as findLargeInlineResources, j as LockManager, k as DagBuilder, l as extractDeploymentEventError, m as bold, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as CFN_TEMPLATE_URL_LIMIT, o as isRetryableTransientError, ot as AssemblyReader, p as formatResourceLine, q as getDefaultStateBucketName, r as DeployEngine, rt as MIGRATE_TMP_PREFIX, s as IMPLICIT_DELETE_DEPENDENCIES, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as CFN_TEMPLATE_BODY_LIMIT, u as MULTI_REGION_RECREATE_BLOCKED_TYPES, v as red, w as CloudControlProvider, x as collectInlinePolicyNamesManagedBySiblings, y as yellow, z as formatDockerLoginError } from "./deploy-engine-BEZF8ku-.js";
5
- import { t as ASGProvider } from "./asg-provider-Dgj3loIG.js";
4
+ import { $ as resolveStateBucketWithDefault, A as DagBuilder, B as formatDockerLoginError, C as findActionableSilentDrops, D as WAFv2WebACLProvider, E as cfnRefValueFromPhysicalId, F as shouldRetainResource, G as getDockerImageBySourceHash, H as runDockerForeground, I as AssetPublisher, J as getDefaultStateBucketName, K as Synthesizer, L as stringifyValue, M as LockManager, N as S3StateBackend, O as applyRoleArnIfSet, P as rebuildClientForBucketRegion, Q as resolveSkipPrefix, R as WorkGraph, S as ProviderRegistry, T as IntrinsicFunctionResolver, U as runDockerStreaming, V as getDockerCmd, W as AssetManifestLoader, X as resolveApp, Y as getLegacyStateBucketName, Z as resolveCaptureObservedState, _ as green, a as withRetry, at as findLargeInlineResources, b as IAMRoleProvider, c as computeImplicitDeleteEdges, d as isStatefulRecreateTargetSync, et as resolveStateBucketWithDefaultAndSource, f as renderStatefulReason, g as gray, h as cyan, i as withResourceDeadline, it as MIGRATE_TMP_PREFIX, j as TemplateParser, k as DiffCalculator, l as extractDeploymentEventError, lt as resolveBucketRegion, m as bold, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as CFN_TEMPLATE_BODY_LIMIT, o as isRetryableTransientError, ot as uploadCfnTemplate, p as formatResourceLine, q as synthesisStatusMessage, r as DeployEngine, rt as CFN_TEMPLATE_URL_LIMIT, s as IMPLICIT_DELETE_DEPENDENCIES, st as AssemblyReader, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as warnDeprecatedNoPrefixCliFlag, u as MULTI_REGION_RECREATE_BLOCKED_TYPES, v as red, w as CloudControlProvider, x as collectInlinePolicyNamesManagedBySiblings, y as yellow, z as buildDockerImage } from "./deploy-engine-B9NOJeGf.js";
5
+ import { t as ASGProvider } from "./asg-provider-Dd9Xze-T.js";
6
6
  import { AsyncLocalStorage } from "node:async_hooks";
7
7
  import { createHash, randomBytes, randomUUID } from "node:crypto";
8
8
  import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListBucketsCommand, ListDirectoryBucketsCommand, 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";
@@ -48,20 +48,19 @@ import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMach
48
48
  import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, ListClustersCommand, ListServicesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$11, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$12, UntagResourceCommand as UntagResourceCommand$11, UpdateClusterCommand, UpdateServiceCommand } 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";
50
50
  import { AddTagsToResourceCommand as AddTagsToResourceCommand$4, CreateDBClusterCommand as CreateDBClusterCommand$2, CreateDBInstanceCommand as CreateDBInstanceCommand$2, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$2, DeleteDBClusterCommand as DeleteDBClusterCommand$2, DeleteDBInstanceCommand as DeleteDBInstanceCommand$2, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$2, DescribeDBClustersCommand as DescribeDBClustersCommand$2, DescribeDBInstancesCommand as DescribeDBInstancesCommand$2, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$2, ListTagsForResourceCommand as ListTagsForResourceCommand$13, ModifyDBClusterCommand as ModifyDBClusterCommand$2, ModifyDBInstanceCommand as ModifyDBInstanceCommand$2, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$2, NeptuneClient, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$4 } from "@aws-sdk/client-neptune";
51
- import { CreateWebACLCommand, DeleteWebACLCommand, GetWebACLCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$14, ListWebACLsCommand, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$12, UpdateWebACLCommand, WAFNonexistentItemException, WAFV2Client } from "@aws-sdk/client-wafv2";
52
- import { AddCustomAttributesCommand, CognitoIdentityProviderClient, CreateUserPoolCommand, DeleteUserPoolCommand, DescribeUserPoolCommand, GetUserPoolMfaConfigCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$15, ListUserPoolsCommand, ResourceNotFoundException as ResourceNotFoundException$7, SetUserPoolMfaConfigCommand, UpdateUserPoolCommand } from "@aws-sdk/client-cognito-identity-provider";
53
- import { CreatePrivateDnsNamespaceCommand, CreateServiceCommand as CreateServiceCommand$1, DeleteNamespaceCommand, DeleteServiceAttributesCommand, DeleteServiceCommand as DeleteServiceCommand$1, GetNamespaceCommand, GetOperationCommand, GetServiceAttributesCommand, GetServiceCommand, ListNamespacesCommand, ListServicesCommand as ListServicesCommand$1, ListTagsForResourceCommand as ListTagsForResourceCommand$16, NamespaceNotFound, ServiceDiscoveryClient, ServiceNotFound, UpdatePrivateDnsNamespaceCommand, UpdateServiceAttributesCommand, UpdateServiceCommand as UpdateServiceCommand$1 } from "@aws-sdk/client-servicediscovery";
54
- import { AppSyncClient, CreateApiKeyCommand, CreateDataSourceCommand, CreateGraphqlApiCommand, CreateResolverCommand, DeleteApiKeyCommand, DeleteDataSourceCommand, DeleteGraphqlApiCommand, DeleteResolverCommand, GetDataSourceCommand, GetGraphqlApiCommand, GetIntrospectionSchemaCommand, GetResolverCommand, ListApiKeysCommand, ListGraphqlApisCommand, NotFoundException as NotFoundException$4, StartSchemaCreationCommand, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$13, UpdateApiKeyCommand, UpdateDataSourceCommand, UpdateGraphqlApiCommand, UpdateResolverCommand } from "@aws-sdk/client-appsync";
51
+ import { AddCustomAttributesCommand, CognitoIdentityProviderClient, CreateUserPoolCommand, DeleteUserPoolCommand, DescribeUserPoolCommand, GetUserPoolMfaConfigCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$14, ListUserPoolsCommand, ResourceNotFoundException as ResourceNotFoundException$7, SetUserPoolMfaConfigCommand, UpdateUserPoolCommand } from "@aws-sdk/client-cognito-identity-provider";
52
+ import { CreatePrivateDnsNamespaceCommand, CreateServiceCommand as CreateServiceCommand$1, DeleteNamespaceCommand, DeleteServiceAttributesCommand, DeleteServiceCommand as DeleteServiceCommand$1, GetNamespaceCommand, GetOperationCommand, GetServiceAttributesCommand, GetServiceCommand, ListNamespacesCommand, ListServicesCommand as ListServicesCommand$1, ListTagsForResourceCommand as ListTagsForResourceCommand$15, NamespaceNotFound, ServiceDiscoveryClient, ServiceNotFound, UpdatePrivateDnsNamespaceCommand, UpdateServiceAttributesCommand, UpdateServiceCommand as UpdateServiceCommand$1 } from "@aws-sdk/client-servicediscovery";
53
+ import { AppSyncClient, CreateApiKeyCommand, CreateDataSourceCommand, CreateGraphqlApiCommand, CreateResolverCommand, DeleteApiKeyCommand, DeleteDataSourceCommand, DeleteGraphqlApiCommand, DeleteResolverCommand, GetDataSourceCommand, GetGraphqlApiCommand, GetIntrospectionSchemaCommand, GetResolverCommand, ListApiKeysCommand, ListGraphqlApisCommand, NotFoundException as NotFoundException$4, StartSchemaCreationCommand, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$12, UpdateApiKeyCommand, UpdateDataSourceCommand, UpdateGraphqlApiCommand, UpdateResolverCommand } from "@aws-sdk/client-appsync";
55
54
  import { parse, print } from "graphql";
56
55
  import { CrawlerRunningException, CreateConnectionCommand, CreateCrawlerCommand, CreateDatabaseCommand, CreateJobCommand, CreateSecurityConfigurationCommand, CreateTableCommand as CreateTableCommand$1, CreateTriggerCommand, CreateWorkflowCommand, DeleteConnectionCommand, DeleteCrawlerCommand, DeleteDatabaseCommand, DeleteJobCommand, DeleteSecurityConfigurationCommand, DeleteTableCommand as DeleteTableCommand$1, DeleteTriggerCommand, DeleteWorkflowCommand, EntityNotFoundException, GetConnectionCommand, GetCrawlerCommand, GetDatabaseCommand, GetDatabasesCommand, GetJobCommand, GetSecurityConfigurationCommand, GetSecurityConfigurationsCommand, GetTableCommand, GetTablesCommand, GetTagsCommand, GetTriggerCommand, GetWorkflowCommand, GlueClient, ListWorkflowsCommand, StartCrawlerScheduleCommand, StartTriggerCommand, StopCrawlerCommand, StopCrawlerScheduleCommand, StopTriggerCommand, UpdateConnectionCommand, UpdateCrawlerCommand, UpdateDatabaseCommand, UpdateJobCommand, UpdateTableCommand as UpdateTableCommand$1, UpdateTriggerCommand, UpdateWorkflowCommand } from "@aws-sdk/client-glue";
57
- import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListStreamsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$17, ListTagsForStreamCommand, RegisterStreamConsumerCommand, RemoveTagsFromStreamCommand, ResourceNotFoundException as ResourceNotFoundException$8, StartStreamEncryptionCommand, StopStreamEncryptionCommand, TagResourceCommand as TagResourceCommand$15, UntagResourceCommand as UntagResourceCommand$14, UpdateShardCountCommand, UpdateStreamModeCommand } from "@aws-sdk/client-kinesis";
56
+ import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListStreamsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$16, ListTagsForStreamCommand, RegisterStreamConsumerCommand, RemoveTagsFromStreamCommand, ResourceNotFoundException as ResourceNotFoundException$8, StartStreamEncryptionCommand, StopStreamEncryptionCommand, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$13, UpdateShardCountCommand, UpdateStreamModeCommand } from "@aws-sdk/client-kinesis";
58
57
  import { CreateScheduleCommand, DeleteScheduleCommand, GetScheduleCommand, ResourceNotFoundException as ResourceNotFoundException$9, SchedulerClient, UpdateScheduleCommand } from "@aws-sdk/client-scheduler";
59
58
  import { AccessPointNotFound, CreateAccessPointCommand, CreateFileSystemCommand, CreateMountTargetCommand, DeleteAccessPointCommand, DeleteFileSystemCommand, DeleteMountTargetCommand, DescribeAccessPointsCommand, DescribeBackupPolicyCommand, DescribeFileSystemPolicyCommand, DescribeFileSystemsCommand, DescribeLifecycleConfigurationCommand, DescribeMountTargetSecurityGroupsCommand, DescribeMountTargetsCommand, EFSClient, FileSystemNotFound, ModifyMountTargetSecurityGroupsCommand, MountTargetNotFound, PutBackupPolicyCommand, PutFileSystemPolicyCommand, PutLifecycleConfigurationCommand, UpdateFileSystemCommand, UpdateFileSystemProtectionCommand } from "@aws-sdk/client-efs";
60
59
  import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliveryStreamCommand, FirehoseClient, ListDeliveryStreamsCommand, ListTagsForDeliveryStreamCommand, ResourceNotFoundException as ResourceNotFoundException$10, TagDeliveryStreamCommand, UntagDeliveryStreamCommand, UpdateDestinationCommand } from "@aws-sdk/client-firehose";
61
60
  import { AddTagsCommand as AddTagsCommand$1, CloudTrailClient, CreateTrailCommand, DeleteTrailCommand, GetEventSelectorsCommand, GetInsightSelectorsCommand, GetTrailCommand, GetTrailStatusCommand, ListTagsCommand as ListTagsCommand$1, ListTrailsCommand, PutEventSelectorsCommand, PutInsightSelectorsCommand, RemoveTagsCommand as RemoveTagsCommand$1, StartLoggingCommand, StopLoggingCommand, TrailNotFoundException, UpdateTrailCommand } from "@aws-sdk/client-cloudtrail";
62
61
  import { BatchGetProjectsCommand, CodeBuildClient, CreateProjectCommand, DeleteProjectCommand, ListProjectsCommand, ResourceNotFoundException as ResourceNotFoundException$11, UpdateProjectCommand } from "@aws-sdk/client-codebuild";
63
- import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$18, ListVectorBucketsCommand, S3VectorsClient, TagResourceCommand as TagResourceCommand$16, UntagResourceCommand as UntagResourceCommand$15 } from "@aws-sdk/client-s3vectors";
64
- import { CreateNamespaceCommand, CreateTableBucketCommand, CreateTableCommand as CreateTableCommand$2, DeleteNamespaceCommand as DeleteNamespaceCommand$1, DeleteTableBucketCommand, DeleteTableCommand as DeleteTableCommand$2, GetTableBucketCommand, GetTableCommand as GetTableCommand$1, ListNamespacesCommand as ListNamespacesCommand$1, ListTableBucketsCommand, ListTablesCommand as ListTablesCommand$1, ListTagsForResourceCommand as ListTagsForResourceCommand$19, NotFoundException as NotFoundException$5, S3TablesClient, TagResourceCommand as TagResourceCommand$17, UntagResourceCommand as UntagResourceCommand$16 } from "@aws-sdk/client-s3tables";
62
+ import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$17, ListVectorBucketsCommand, S3VectorsClient, TagResourceCommand as TagResourceCommand$15, UntagResourceCommand as UntagResourceCommand$14 } from "@aws-sdk/client-s3vectors";
63
+ import { CreateNamespaceCommand, CreateTableBucketCommand, CreateTableCommand as CreateTableCommand$2, DeleteNamespaceCommand as DeleteNamespaceCommand$1, DeleteTableBucketCommand, DeleteTableCommand as DeleteTableCommand$2, GetTableBucketCommand, GetTableCommand as GetTableCommand$1, ListNamespacesCommand as ListNamespacesCommand$1, ListTableBucketsCommand, ListTablesCommand as ListTablesCommand$1, ListTagsForResourceCommand as ListTagsForResourceCommand$18, NotFoundException as NotFoundException$5, S3TablesClient, TagResourceCommand as TagResourceCommand$16, UntagResourceCommand as UntagResourceCommand$15 } from "@aws-sdk/client-s3tables";
65
64
  import { Document, Pair, Scalar, YAMLMap, YAMLSeq, parse as parse$1, stringify } from "yaml";
66
65
  import { createLocalStartAgentCoreCommand, createLocalStartCloudFrontCommand, createLocalStateProvider, getEmbedConfig, isCfnFlagPresent, listTargets, rejectExplicitCfnStackWithMultipleStacks, resolveCfnFallbackRegion, setEmbedConfig, substituteAgainstState, substituteAgainstStateAsync, substituteEnvVarsFromState, substituteEnvVarsFromStateAsync } from "cdk-local";
67
66
  import { A2A_CONTAINER_PORT, A2A_PATH, AGENTCORE_A2A_PROTOCOL, AGENTCORE_AGUI_PROTOCOL, AGENTCORE_MCP_PROTOCOL, ConnectionRegistry, EcsTaskResolutionError, HOST_GATEWAY_MIN_VERSION, LocalInvokeBuildError, MCP_CONTAINER_PORT, MCP_PATH, a2aInvokeOnce, addAlbSpecificOptions, addCommonEcsServiceOptions, addStartServiceSpecificOptions, albStrategy, architectureToPlatform, attachAuthorizers, attachStageContext, availableApiIdentifiers, bufferToBody, buildAgentCoreCodeImage, buildCognitoJwksUrl, buildConnectEvent, buildContainerImage, buildCorsConfigByApiId, buildCorsConfigFromCloudFrontChain, buildDisconnectEvent, buildJwksUrlFromIssuer, buildMessageEvent, buildMgmtEndpointEnvUrl, buildStageMap, classifySourceChange, createAuthorizerCache, createFileWatcher, createFileWatcher as createFileWatcher$1, createJwksCache, createWatchPredicates, defaultCredentialsLoader, derivePseudoParametersFromRegion, discoverRoutes, discoverWebSocketApis, downloadAndExtractS3Bundle, filterRoutesByApiIdentifier, groupRoutesByServer, handleConnectionsRequest, invokeAgentCore, invokeAgentCoreWs, materializeLayerFromArn, mcpInvokeOnce, parseConnectionsPath, parseSelectionExpressionPath, pickAgentCoreCandidateStack, pickAgentCoreCandidateStack as pickAgentCoreCandidateStack$1, probeHostGatewaySupport, readMtlsMaterialsFromDisk, resolveAgentCoreTarget, resolveEnvVars, resolveHostGatewayExtraHosts, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSingleTarget, resolveWatchConfig, runEcsServiceEmulator, signAgentCoreInvocation, startApiServer, substituteImagePlaceholders, tryResolveImageFnJoin, verifyJwtViaDiscovery, waitForAgentCorePing } from "cdk-local/internal";
@@ -1446,7 +1445,7 @@ const FLUSH_INTERVAL_MS = 2e3;
1446
1445
  const FLUSH_EVENT_THRESHOLD = 50;
1447
1446
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
1448
1447
  function getCdkdVersion() {
1449
- return "0.230.33";
1448
+ return "0.231.1";
1450
1449
  }
1451
1450
  /**
1452
1451
  * Generate a time-sortable unique run id, e.g.
@@ -16603,7 +16602,8 @@ var ApiGatewayProvider = class ApiGatewayProvider {
16603
16602
  "Description",
16604
16603
  "Tags",
16605
16604
  "TracingEnabled",
16606
- "Variables"
16605
+ "Variables",
16606
+ "MethodSettings"
16607
16607
  ])],
16608
16608
  ["AWS::ApiGateway::Method", new Set([
16609
16609
  "RestApiId",
@@ -17096,6 +17096,25 @@ var ApiGatewayProvider = class ApiGatewayProvider {
17096
17096
  variables: properties["Variables"],
17097
17097
  tags: this.cfnTagsToRecord(properties["Tags"])
17098
17098
  }));
17099
+ const methodSettings = properties["MethodSettings"];
17100
+ const methodSettingsOps = buildMethodSettingsPatchOps(void 0, methodSettings);
17101
+ if (methodSettingsOps.length > 0) try {
17102
+ await this.apiGatewayClient.send(new UpdateStageCommand({
17103
+ restApiId,
17104
+ stageName,
17105
+ patchOperations: methodSettingsOps
17106
+ }));
17107
+ } catch (patchError) {
17108
+ try {
17109
+ await this.apiGatewayClient.send(new DeleteStageCommand({
17110
+ restApiId,
17111
+ stageName
17112
+ }));
17113
+ } catch (cleanupError) {
17114
+ this.logger.warn(`Failed to clean up stage ${stageName} after a MethodSettings patch failure: ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}`);
17115
+ }
17116
+ throw patchError;
17117
+ }
17099
17118
  this.logger.debug(`Successfully created API Gateway Stage ${logicalId}: ${stageName}`);
17100
17119
  return {
17101
17120
  physicalId: stageName,
@@ -17146,6 +17165,7 @@ var ApiGatewayProvider = class ApiGatewayProvider {
17146
17165
  op: "remove",
17147
17166
  path: `/variables/${key}`
17148
17167
  });
17168
+ patchOperations.push(...buildMethodSettingsPatchOps(previousProperties["MethodSettings"], properties["MethodSettings"]));
17149
17169
  try {
17150
17170
  if (patchOperations.length > 0) await this.apiGatewayClient.send(new UpdateStageCommand({
17151
17171
  restApiId,
@@ -17650,6 +17670,15 @@ var ApiGatewayProvider = class ApiGatewayProvider {
17650
17670
  result["Description"] = resp.description ?? "";
17651
17671
  if (resp.tracingEnabled !== void 0) result["TracingEnabled"] = resp.tracingEnabled;
17652
17672
  if (resp.variables !== void 0) result["Variables"] = resp.variables;
17673
+ const stateMethodSettings = properties?.["MethodSettings"];
17674
+ if (stateMethodSettings && stateMethodSettings.length > 0) result["MethodSettings"] = stateMethodSettings.map((stateEntry) => {
17675
+ const awsEntry = (resp.methodSettings ?? {})[methodSettingKey(stateEntry)];
17676
+ const entry = {};
17677
+ if (stateEntry.ResourcePath !== void 0) entry["ResourcePath"] = stateEntry.ResourcePath;
17678
+ if (stateEntry.HttpMethod !== void 0) entry["HttpMethod"] = stateEntry.HttpMethod;
17679
+ for (const { cfnKey, responseKey } of METHOD_SETTING_PATCH_FIELDS) if (stateEntry[cfnKey] !== void 0 && awsEntry?.[responseKey] !== void 0) entry[cfnKey] = awsEntry[responseKey];
17680
+ return entry;
17681
+ });
17653
17682
  return result;
17654
17683
  } catch (err) {
17655
17684
  if (err instanceof NotFoundException$1) return void 0;
@@ -17720,6 +17749,122 @@ var ApiGatewayProvider = class ApiGatewayProvider {
17720
17749
  }
17721
17750
  };
17722
17751
  /**
17752
+ * CFn MethodSetting field → UpdateStage patch-path suffix under
17753
+ * `/{method_setting_key}/`. The get-stage response field for each is the
17754
+ * camelCase of the CFn name (used by the drift readback).
17755
+ */
17756
+ const METHOD_SETTING_PATCH_FIELDS = [
17757
+ {
17758
+ cfnKey: "ThrottlingRateLimit",
17759
+ patchSuffix: "throttling/rateLimit",
17760
+ responseKey: "throttlingRateLimit"
17761
+ },
17762
+ {
17763
+ cfnKey: "ThrottlingBurstLimit",
17764
+ patchSuffix: "throttling/burstLimit",
17765
+ responseKey: "throttlingBurstLimit"
17766
+ },
17767
+ {
17768
+ cfnKey: "MetricsEnabled",
17769
+ patchSuffix: "metrics/enabled",
17770
+ responseKey: "metricsEnabled"
17771
+ },
17772
+ {
17773
+ cfnKey: "LoggingLevel",
17774
+ patchSuffix: "logging/loglevel",
17775
+ responseKey: "loggingLevel"
17776
+ },
17777
+ {
17778
+ cfnKey: "DataTraceEnabled",
17779
+ patchSuffix: "logging/dataTrace",
17780
+ responseKey: "dataTraceEnabled"
17781
+ },
17782
+ {
17783
+ cfnKey: "CachingEnabled",
17784
+ patchSuffix: "caching/enabled",
17785
+ responseKey: "cachingEnabled"
17786
+ },
17787
+ {
17788
+ cfnKey: "CacheTtlInSeconds",
17789
+ patchSuffix: "caching/ttlInSeconds",
17790
+ responseKey: "cacheTtlInSeconds"
17791
+ },
17792
+ {
17793
+ cfnKey: "CacheDataEncrypted",
17794
+ patchSuffix: "caching/dataEncrypted",
17795
+ responseKey: "cacheDataEncrypted"
17796
+ },
17797
+ {
17798
+ cfnKey: "RequireAuthorizationForCacheControl",
17799
+ patchSuffix: "caching/requireAuthorizationForCacheControl",
17800
+ responseKey: "requireAuthorizationForCacheControl"
17801
+ },
17802
+ {
17803
+ cfnKey: "UnauthorizedCacheControlHeaderStrategy",
17804
+ patchSuffix: "caching/unauthorizedCacheControlHeaderStrategy",
17805
+ responseKey: "unauthorizedCacheControlHeaderStrategy"
17806
+ }
17807
+ ];
17808
+ /**
17809
+ * The `{method_setting_key}` API Gateway keys a stage's method settings by:
17810
+ * `{resource_path}/{http_method}` with the resource path's leading slash
17811
+ * stripped — CDK's stage-level `deployOptions` (`ResourcePath: '/*',
17812
+ * HttpMethod: '*'`) keys as the star-slash-star wildcard (the get-stage
17813
+ * `methodSettings` map key and the UpdateStage patch-path segment are the
17814
+ * same string).
17815
+ */
17816
+ function methodSettingKey(setting) {
17817
+ const resourcePath = setting.ResourcePath ?? "/*";
17818
+ const httpMethod = setting.HttpMethod ?? "*";
17819
+ return `${resourcePath === "/" ? "~1" : resourcePath.replace(/^\//, "")}/${httpMethod}`;
17820
+ }
17821
+ /**
17822
+ * Build the UpdateStage patch operations that take a stage's method settings
17823
+ * from `previous` to `next` (both in the CFn `MethodSettings` list shape):
17824
+ * - an entry present only in `next`: `replace` each specified field
17825
+ * (`replace` both adds and changes a method-setting override)
17826
+ * - an entry present in both with NO fields dropped: `replace` only the
17827
+ * changed fields
17828
+ * - an entry present in both with a field DROPPED: `remove /{key}` then
17829
+ * `replace` every remaining specified field — API Gateway REJECTS a
17830
+ * field-level `remove` (`remove <key>/throttling/rateLimit` fails with
17831
+ * "Cannot remove method setting ... because there is no method setting
17832
+ * for this method"), while whole-key remove followed by field replaces
17833
+ * in the SAME UpdateStage call applies sequentially (both verified live
17834
+ * 2026-07-03), so the dropped field reverts to its default (CFn
17835
+ * absent-field semantics)
17836
+ * - an entry present only in `previous`: `remove /{key}` — drops every
17837
+ * override for that method path at once (CFn absent-entry semantics)
17838
+ * Values are rendered as strings (the UpdateStage wire format).
17839
+ */
17840
+ function buildMethodSettingsPatchOps(previous, next) {
17841
+ const ops = [];
17842
+ const prevByKey = new Map((previous ?? []).map((s) => [methodSettingKey(s), s]));
17843
+ const nextByKey = new Map((next ?? []).map((s) => [methodSettingKey(s), s]));
17844
+ for (const key of prevByKey.keys()) if (!nextByKey.has(key)) ops.push({
17845
+ op: "remove",
17846
+ path: `/${key}`
17847
+ });
17848
+ for (const [key, setting] of nextByKey) {
17849
+ const prevSetting = prevByKey.get(key);
17850
+ const fieldDropped = prevSetting !== void 0 && METHOD_SETTING_PATCH_FIELDS.some(({ cfnKey }) => prevSetting[cfnKey] !== void 0 && setting[cfnKey] === void 0);
17851
+ if (fieldDropped) ops.push({
17852
+ op: "remove",
17853
+ path: `/${key}`
17854
+ });
17855
+ for (const { cfnKey, patchSuffix } of METHOD_SETTING_PATCH_FIELDS) {
17856
+ const nextValue = setting[cfnKey];
17857
+ const prevValue = fieldDropped ? void 0 : prevSetting?.[cfnKey];
17858
+ if (nextValue !== void 0 && String(nextValue) !== String(prevValue ?? "")) ops.push({
17859
+ op: "replace",
17860
+ path: `/${key}/${patchSuffix}`,
17861
+ value: String(nextValue)
17862
+ });
17863
+ }
17864
+ }
17865
+ return ops;
17866
+ }
17867
+ /**
17723
17868
  * Append RFC 6902 patch operations describing the diff between two map-shaped
17724
17869
  * properties (e.g. API Gateway Method `RequestParameters` /
17725
17870
  * `RequestModels`). For each key:
@@ -25870,344 +26015,6 @@ var Route53Provider = class {
25870
26015
  }
25871
26016
  };
25872
26017
 
25873
- //#endregion
25874
- //#region src/provisioning/providers/wafv2-provider.ts
25875
- /**
25876
- * Translate the empty-string placeholder `readCurrentState` emits for an
25877
- * absent `Description` to `undefined` before shipping it to AWS.
25878
- *
25879
- * `readCurrentState` always-emits `Description: ''` on a WebACL with no
25880
- * description (the comparator's top-level walk is state-keys-only, so
25881
- * the placeholder is required to detect a console-side description add).
25882
- * AWS WAFv2 `CreateWebACL` / `UpdateWebACL` reject `Description: ''`
25883
- * with `Member must have length greater than or equal to 1` (min 1 / max
25884
- * 256). On `cdkd drift --revert` the placeholder would round-trip
25885
- * through `update()` and surface as a hard AWS rejection, so we sanitize
25886
- * the wire-layer payload while keeping the read-side placeholder
25887
- * intact. This is the Class 2 pattern from
25888
- * `docs/provider-development.md § 3b`.
25889
- */
25890
- function sanitizeDescription(value) {
25891
- if (value === void 0 || value === null) return void 0;
25892
- if (typeof value === "string" && value.length === 0) return void 0;
25893
- return value;
25894
- }
25895
- /**
25896
- * Parse WAFv2 WebACL ARN to extract Id, Name, and Scope.
25897
- *
25898
- * ARN format:
25899
- * arn:aws:wafv2:{region}:{account}:regional/webacl/{name}/{id}
25900
- * arn:aws:wafv2:{region}:{account}:global/webacl/{name}/{id}
25901
- */
25902
- function parseWebACLArn(arn) {
25903
- const segments = arn.split(":").slice(5).join(":").split("/");
25904
- const scopeRaw = segments[0];
25905
- const name = segments[2];
25906
- return {
25907
- id: segments[3],
25908
- name,
25909
- scope: scopeRaw === "global" ? "CLOUDFRONT" : "REGIONAL"
25910
- };
25911
- }
25912
- /**
25913
- * AWS WAFv2 WebACL Provider
25914
- *
25915
- * Implements resource provisioning for AWS::WAFv2::WebACL using the WAFv2 SDK.
25916
- * WHY: WAFv2 CreateWebACL is synchronous - the CC API adds unnecessary polling
25917
- * overhead for an operation that completes immediately.
25918
- * This SDK provider eliminates that polling and returns instantly.
25919
- */
25920
- var WAFv2WebACLProvider = class {
25921
- wafv2Client;
25922
- providerRegion = process.env["AWS_REGION"];
25923
- logger = getLogger().child("WAFv2WebACLProvider");
25924
- handledProperties = new Map([["AWS::WAFv2::WebACL", new Set([
25925
- "Name",
25926
- "Scope",
25927
- "Tags",
25928
- "DefaultAction",
25929
- "Description",
25930
- "Rules",
25931
- "VisibilityConfig",
25932
- "CustomResponseBodies",
25933
- "CaptchaConfig",
25934
- "ChallengeConfig",
25935
- "TokenDomains",
25936
- "AssociationConfig"
25937
- ])]]);
25938
- getClient() {
25939
- if (!this.wafv2Client) this.wafv2Client = new WAFV2Client(this.providerRegion ? { region: this.providerRegion } : {});
25940
- return this.wafv2Client;
25941
- }
25942
- /**
25943
- * Create a WAFv2 WebACL
25944
- */
25945
- async create(logicalId, resourceType, properties) {
25946
- this.logger.debug(`Creating WAFv2 WebACL ${logicalId}`);
25947
- const name = properties["Name"] || generateResourceName(logicalId, { maxLength: 128 });
25948
- const scope = properties["Scope"] || "REGIONAL";
25949
- try {
25950
- const tags = [];
25951
- if (properties["Tags"]) {
25952
- const tagList = properties["Tags"];
25953
- for (const tag of tagList) tags.push({
25954
- Key: tag.Key,
25955
- Value: tag.Value
25956
- });
25957
- }
25958
- const summary = (await this.getClient().send(new CreateWebACLCommand({
25959
- Name: name,
25960
- Scope: scope,
25961
- DefaultAction: properties["DefaultAction"],
25962
- Description: sanitizeDescription(properties["Description"]),
25963
- Rules: properties["Rules"] || [],
25964
- VisibilityConfig: properties["VisibilityConfig"],
25965
- ...tags.length > 0 && { Tags: tags },
25966
- CustomResponseBodies: properties["CustomResponseBodies"],
25967
- CaptchaConfig: properties["CaptchaConfig"],
25968
- ChallengeConfig: properties["ChallengeConfig"],
25969
- TokenDomains: properties["TokenDomains"],
25970
- AssociationConfig: properties["AssociationConfig"]
25971
- }))).Summary;
25972
- if (!summary?.ARN || !summary?.Id) throw new Error("CreateWebACL did not return Summary with ARN and Id");
25973
- this.logger.debug(`Successfully created WAFv2 WebACL ${logicalId}: ${summary.ARN}`);
25974
- return {
25975
- physicalId: summary.ARN,
25976
- attributes: {
25977
- Arn: summary.ARN,
25978
- Id: summary.Id,
25979
- LabelNamespace: summary["LabelNamespace"]
25980
- }
25981
- };
25982
- } catch (error) {
25983
- if (error instanceof ProvisioningError) throw error;
25984
- const cause = error instanceof Error ? error : void 0;
25985
- throw new ProvisioningError(`Failed to create WAFv2 WebACL ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
25986
- }
25987
- }
25988
- /**
25989
- * Update a WAFv2 WebACL
25990
- *
25991
- * Name and Scope are immutable - changes to those require replacement.
25992
- * UpdateWebACL requires LockToken obtained from GetWebACL.
25993
- */
25994
- async update(logicalId, physicalId, resourceType, properties, previousProperties) {
25995
- this.logger.debug(`Updating WAFv2 WebACL ${logicalId}: ${physicalId}`);
25996
- try {
25997
- const { id, name, scope } = parseWebACLArn(physicalId);
25998
- const getResponse = await this.getClient().send(new GetWebACLCommand({
25999
- Name: name,
26000
- Scope: scope,
26001
- Id: id
26002
- }));
26003
- const lockToken = getResponse.LockToken;
26004
- if (!lockToken) throw new Error("GetWebACL did not return LockToken");
26005
- await this.getClient().send(new UpdateWebACLCommand({
26006
- Name: name,
26007
- Scope: scope,
26008
- Id: id,
26009
- LockToken: lockToken,
26010
- DefaultAction: properties["DefaultAction"],
26011
- Description: sanitizeDescription(properties["Description"]),
26012
- Rules: properties["Rules"] || [],
26013
- VisibilityConfig: properties["VisibilityConfig"],
26014
- CustomResponseBodies: properties["CustomResponseBodies"],
26015
- CaptchaConfig: properties["CaptchaConfig"],
26016
- ChallengeConfig: properties["ChallengeConfig"],
26017
- TokenDomains: properties["TokenDomains"],
26018
- AssociationConfig: properties["AssociationConfig"]
26019
- }));
26020
- await this.applyTagDiff(physicalId, previousProperties["Tags"], properties["Tags"]);
26021
- this.logger.debug(`Successfully updated WAFv2 WebACL ${logicalId}`);
26022
- return {
26023
- physicalId,
26024
- wasReplaced: false,
26025
- attributes: {
26026
- Arn: physicalId,
26027
- Id: id,
26028
- LabelNamespace: getResponse.WebACL?.LabelNamespace
26029
- }
26030
- };
26031
- } catch (error) {
26032
- if (error instanceof ProvisioningError) throw error;
26033
- const cause = error instanceof Error ? error : void 0;
26034
- throw new ProvisioningError(`Failed to update WAFv2 WebACL ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
26035
- }
26036
- }
26037
- /**
26038
- * Delete a WAFv2 WebACL
26039
- *
26040
- * DeleteWebACL requires LockToken obtained from GetWebACL.
26041
- * WAFNonexistentItemException is treated as success (idempotent delete).
26042
- */
26043
- async delete(logicalId, physicalId, resourceType, _properties, context) {
26044
- this.logger.debug(`Deleting WAFv2 WebACL ${logicalId}: ${physicalId}`);
26045
- try {
26046
- const { id, name, scope } = parseWebACLArn(physicalId);
26047
- const lockToken = (await this.getClient().send(new GetWebACLCommand({
26048
- Name: name,
26049
- Scope: scope,
26050
- Id: id
26051
- }))).LockToken;
26052
- if (!lockToken) throw new Error("GetWebACL did not return LockToken");
26053
- await this.getClient().send(new DeleteWebACLCommand({
26054
- Name: name,
26055
- Scope: scope,
26056
- Id: id,
26057
- LockToken: lockToken
26058
- }));
26059
- this.logger.debug(`Successfully deleted WAFv2 WebACL ${logicalId}`);
26060
- } catch (error) {
26061
- if (error instanceof WAFNonexistentItemException) {
26062
- assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
26063
- this.logger.debug(`WAFv2 WebACL ${physicalId} does not exist, skipping deletion`);
26064
- return;
26065
- }
26066
- const cause = error instanceof Error ? error : void 0;
26067
- throw new ProvisioningError(`Failed to delete WAFv2 WebACL ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
26068
- }
26069
- }
26070
- /**
26071
- * Apply a diff between old and new CFn-shape Tags arrays via WAFv2's
26072
- * `TagResource` / `UntagResource` APIs (keyed by `ResourceARN`).
26073
- */
26074
- async applyTagDiff(arn, oldTagsRaw, newTagsRaw) {
26075
- const toMap = (tags) => {
26076
- const m = /* @__PURE__ */ new Map();
26077
- for (const t of tags ?? []) if (t.Key !== void 0 && t.Value !== void 0) m.set(t.Key, t.Value);
26078
- return m;
26079
- };
26080
- const oldMap = toMap(oldTagsRaw);
26081
- const newMap = toMap(newTagsRaw);
26082
- const tagsToAdd = [];
26083
- for (const [k, v] of newMap) if (oldMap.get(k) !== v) tagsToAdd.push({
26084
- Key: k,
26085
- Value: v
26086
- });
26087
- const tagsToRemove = [];
26088
- for (const k of oldMap.keys()) if (!newMap.has(k)) tagsToRemove.push(k);
26089
- if (tagsToRemove.length > 0) {
26090
- await this.getClient().send(new UntagResourceCommand$12({
26091
- ResourceARN: arn,
26092
- TagKeys: tagsToRemove
26093
- }));
26094
- this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from WAFv2 WebACL ${arn}`);
26095
- }
26096
- if (tagsToAdd.length > 0) {
26097
- await this.getClient().send(new TagResourceCommand$13({
26098
- ResourceARN: arn,
26099
- Tags: tagsToAdd
26100
- }));
26101
- this.logger.debug(`Added/updated ${tagsToAdd.length} tag(s) on WAFv2 WebACL ${arn}`);
26102
- }
26103
- }
26104
- /**
26105
- * Read the AWS-current WAFv2 WebACL configuration in CFn-property shape.
26106
- *
26107
- * The cdkd physicalId is the WebACL ARN; we parse it back to
26108
- * `(id, name, scope)` and call `GetWebACL`. The response holds Name,
26109
- * Description, DefaultAction, Rules, VisibilityConfig,
26110
- * CustomResponseBodies, CaptchaConfig, ChallengeConfig, TokenDomains,
26111
- * and AssociationConfig — every key cdkd state declares as
26112
- * `handledProperties`. `Scope` is recovered from the ARN parse.
26113
- *
26114
- * Tags are surfaced via a follow-up `ListTagsForResource(ResourceARN)`
26115
- * call. CDK's `aws:*` auto-tags are filtered out and the result key is
26116
- * omitted when AWS reports no user tags. Returns `undefined`
26117
- * when the ARN can't be parsed or the WebACL is gone
26118
- * (`WAFNonexistentItemException`).
26119
- */
26120
- async readCurrentState(physicalId, _logicalId, _resourceType) {
26121
- let id;
26122
- let name;
26123
- let scope;
26124
- try {
26125
- ({id, name, scope} = parseWebACLArn(physicalId));
26126
- } catch {
26127
- return;
26128
- }
26129
- let webACL;
26130
- try {
26131
- webACL = (await this.getClient().send(new GetWebACLCommand({
26132
- Id: id,
26133
- Name: name,
26134
- Scope: scope
26135
- }))).WebACL;
26136
- } catch (err) {
26137
- if (err instanceof WAFNonexistentItemException) return void 0;
26138
- throw err;
26139
- }
26140
- if (!webACL) return void 0;
26141
- const result = {};
26142
- if (webACL.Name !== void 0) result["Name"] = webACL.Name;
26143
- result["Scope"] = scope;
26144
- result["Description"] = webACL.Description ?? "";
26145
- if (webACL.DefaultAction) result["DefaultAction"] = webACL.DefaultAction;
26146
- result["Rules"] = (webACL.Rules ?? []).map((r) => r);
26147
- if (webACL.VisibilityConfig) result["VisibilityConfig"] = webACL.VisibilityConfig;
26148
- result["CustomResponseBodies"] = webACL.CustomResponseBodies ?? {};
26149
- if (webACL.CaptchaConfig) result["CaptchaConfig"] = webACL.CaptchaConfig;
26150
- if (webACL.ChallengeConfig) result["ChallengeConfig"] = webACL.ChallengeConfig;
26151
- result["TokenDomains"] = webACL.TokenDomains ? [...webACL.TokenDomains] : [];
26152
- if (webACL.AssociationConfig) result["AssociationConfig"] = webACL.AssociationConfig;
26153
- try {
26154
- result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceARN: physicalId }))).TagInfoForResource?.TagList);
26155
- } catch (err) {
26156
- this.logger.debug(`WAFv2 ListTagsForResource(${physicalId}) failed: ${err instanceof Error ? err.message : String(err)}`);
26157
- }
26158
- return result;
26159
- }
26160
- /**
26161
- * Adopt an existing WAFv2 WebACL into cdkd state.
26162
- *
26163
- * Lookup order:
26164
- * 1. `--resource <id>=<arn>` override → verify with `GetWebACL` (parses
26165
- * Name/Id/Scope back out of the ARN).
26166
- * 2. Walk `ListWebACLs(Scope)` → match `aws:cdk:path` via
26167
- * `ListTagsForResource(ResourceARN)` (returns
26168
- * `TagInfoForResource.TagList`, standard `Key`/`Value` shape).
26169
- *
26170
- * `Scope` is required by `ListWebACLs` — read from
26171
- * `Properties.Scope` (`REGIONAL` is the default).
26172
- */
26173
- async import(input) {
26174
- if (input.knownPhysicalId) try {
26175
- const { id, name, scope } = parseWebACLArn(input.knownPhysicalId);
26176
- await this.getClient().send(new GetWebACLCommand({
26177
- Id: id,
26178
- Name: name,
26179
- Scope: scope
26180
- }));
26181
- return {
26182
- physicalId: input.knownPhysicalId,
26183
- attributes: {}
26184
- };
26185
- } catch (err) {
26186
- if (err instanceof WAFNonexistentItemException) return null;
26187
- throw err;
26188
- }
26189
- if (!input.cdkPath) return null;
26190
- const scope = input.properties["Scope"] || "REGIONAL";
26191
- let nextMarker;
26192
- do {
26193
- const list = await this.getClient().send(new ListWebACLsCommand({
26194
- Scope: scope,
26195
- ...nextMarker && { NextMarker: nextMarker }
26196
- }));
26197
- for (const item of list.WebACLs ?? []) {
26198
- if (!item.ARN) continue;
26199
- const tagList = (await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceARN: item.ARN }))).TagInfoForResource?.TagList;
26200
- if (matchesCdkPath(tagList, input.cdkPath)) return {
26201
- physicalId: item.ARN,
26202
- attributes: {}
26203
- };
26204
- }
26205
- nextMarker = list.NextMarker;
26206
- } while (nextMarker);
26207
- return null;
26208
- }
26209
- };
26210
-
26211
26018
  //#endregion
26212
26019
  //#region src/provisioning/providers/cognito-provider.ts
26213
26020
  /**
@@ -26762,7 +26569,7 @@ var CognitoUserPoolProvider = class {
26762
26569
  if (input.cdkPath) try {
26763
26570
  const arn = (await this.getClient().send(new DescribeUserPoolCommand({ UserPoolId: pool.Id }))).UserPool?.Arn;
26764
26571
  if (!arn) continue;
26765
- if ((await this.getClient().send(new ListTagsForResourceCommand$15({ ResourceArn: arn }))).Tags?.["aws:cdk:path"] === input.cdkPath) return {
26572
+ if ((await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceArn: arn }))).Tags?.["aws:cdk:path"] === input.cdkPath) return {
26766
26573
  physicalId: pool.Id,
26767
26574
  attributes: {}
26768
26575
  };
@@ -27750,7 +27557,7 @@ var ServiceDiscoveryProvider = class {
27750
27557
  /** Best-effort tag fetch via `ListTagsForResource(ResourceARN)`. */
27751
27558
  async attachTags(result, arn) {
27752
27559
  try {
27753
- result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$16({ ResourceARN: arn }))).Tags);
27560
+ result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$15({ ResourceARN: arn }))).Tags);
27754
27561
  } catch (err) {
27755
27562
  this.logger.debug(`ServiceDiscovery ListTagsForResource(${arn}) failed: ${err instanceof Error ? err.message : String(err)}`);
27756
27563
  }
@@ -27784,7 +27591,7 @@ var ServiceDiscoveryProvider = class {
27784
27591
  attributes: {}
27785
27592
  };
27786
27593
  if (input.cdkPath) try {
27787
- if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$16({ ResourceARN: ns.Arn }))).Tags, input.cdkPath)) return {
27594
+ if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$15({ ResourceARN: ns.Arn }))).Tags, input.cdkPath)) return {
27788
27595
  physicalId: ns.Id,
27789
27596
  attributes: {}
27790
27597
  };
@@ -27815,7 +27622,7 @@ var ServiceDiscoveryProvider = class {
27815
27622
  for (const svc of list.Services ?? []) {
27816
27623
  if (!svc.Id || !svc.Arn) continue;
27817
27624
  try {
27818
- if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$16({ ResourceARN: svc.Arn }))).Tags, input.cdkPath)) return {
27625
+ if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$15({ ResourceARN: svc.Arn }))).Tags, input.cdkPath)) return {
27819
27626
  physicalId: svc.Id,
27820
27627
  attributes: {}
27821
27628
  };
@@ -28205,7 +28012,7 @@ var AppSyncProvider = class {
28205
28012
  const tagsToAdd = {};
28206
28013
  for (const [k, v] of Object.entries(newMap)) if (oldMap[k] !== v) tagsToAdd[k] = v;
28207
28014
  if (tagKeysToRemove.length > 0) try {
28208
- await this.getClient().send(new UntagResourceCommand$13({
28015
+ await this.getClient().send(new UntagResourceCommand$12({
28209
28016
  resourceArn: arn,
28210
28017
  tagKeys: tagKeysToRemove
28211
28018
  }));
@@ -28213,7 +28020,7 @@ var AppSyncProvider = class {
28213
28020
  throw this.wrapUpdateError(error, resourceType, logicalId, apiId, "GraphqlApi (untag)");
28214
28021
  }
28215
28022
  if (Object.keys(tagsToAdd).length > 0) try {
28216
- await this.getClient().send(new TagResourceCommand$14({
28023
+ await this.getClient().send(new TagResourceCommand$13({
28217
28024
  resourceArn: arn,
28218
28025
  tags: tagsToAdd
28219
28026
  }));
@@ -31565,7 +31372,7 @@ var KinesisStreamConsumerProvider = class {
31565
31372
  if (desc.ConsumerName !== void 0) result["ConsumerName"] = desc.ConsumerName;
31566
31373
  if (desc.StreamARN !== void 0) result["StreamARN"] = desc.StreamARN;
31567
31374
  try {
31568
- result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$17({ ResourceARN: physicalId }))).Tags);
31375
+ result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$16({ ResourceARN: physicalId }))).Tags);
31569
31376
  } catch (err) {
31570
31377
  if (err instanceof ResourceNotFoundException$8) return void 0;
31571
31378
  this.logger.debug(`ListTagsForResource(${physicalId}) failed: ${err instanceof Error ? err.message : String(err)}`);
@@ -31589,14 +31396,14 @@ var KinesisStreamConsumerProvider = class {
31589
31396
  const tagsToRemove = [];
31590
31397
  for (const k of Object.keys(oldMap)) if (!(k in newMap)) tagsToRemove.push(k);
31591
31398
  if (tagsToRemove.length > 0) {
31592
- await this.getClient().send(new UntagResourceCommand$14({
31399
+ await this.getClient().send(new UntagResourceCommand$13({
31593
31400
  ResourceARN: consumerArn,
31594
31401
  TagKeys: tagsToRemove
31595
31402
  }));
31596
31403
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from Kinesis stream consumer ${consumerArn}`);
31597
31404
  }
31598
31405
  if (Object.keys(tagsToAdd).length > 0) {
31599
- await this.getClient().send(new TagResourceCommand$15({
31406
+ await this.getClient().send(new TagResourceCommand$14({
31600
31407
  ResourceARN: consumerArn,
31601
31408
  Tags: tagsToAdd
31602
31409
  }));
@@ -34662,11 +34469,11 @@ var S3VectorsProvider = class {
34662
34469
  }
34663
34470
  if (!resourceArn) throw new ProvisioningError(`Could not resolve ARN for S3 VectorBucket ${logicalId} (${physicalId}); cannot apply tag update.`, resourceType, logicalId, physicalId);
34664
34471
  try {
34665
- if (Object.keys(toSet).length > 0) await this.getClient().send(new TagResourceCommand$16({
34472
+ if (Object.keys(toSet).length > 0) await this.getClient().send(new TagResourceCommand$15({
34666
34473
  resourceArn,
34667
34474
  tags: toSet
34668
34475
  }));
34669
- if (toRemove.length > 0) await this.getClient().send(new UntagResourceCommand$15({
34476
+ if (toRemove.length > 0) await this.getClient().send(new UntagResourceCommand$14({
34670
34477
  resourceArn,
34671
34478
  tagKeys: toRemove
34672
34479
  }));
@@ -34794,7 +34601,7 @@ var S3VectorsProvider = class {
34794
34601
  if (Object.keys(enc).length > 0) result["EncryptionConfiguration"] = enc;
34795
34602
  }
34796
34603
  if (bucket?.vectorBucketArn) try {
34797
- result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$18({ resourceArn: bucket.vectorBucketArn }))).tags);
34604
+ result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$17({ resourceArn: bucket.vectorBucketArn }))).tags);
34798
34605
  } catch (err) {
34799
34606
  this.logger.debug(`S3Vectors ListTagsForResource(${bucket.vectorBucketArn}) failed: ${err instanceof Error ? err.message : String(err)}`);
34800
34607
  result["Tags"] = [];
@@ -34830,7 +34637,7 @@ var S3VectorsProvider = class {
34830
34637
  for (const bucket of list.vectorBuckets ?? []) {
34831
34638
  if (!bucket.vectorBucketName || !bucket.vectorBucketArn) continue;
34832
34639
  try {
34833
- if ((await this.getClient().send(new ListTagsForResourceCommand$18({ resourceArn: bucket.vectorBucketArn }))).tags?.["aws:cdk:path"] === input.cdkPath) return {
34640
+ if ((await this.getClient().send(new ListTagsForResourceCommand$17({ resourceArn: bucket.vectorBucketArn }))).tags?.["aws:cdk:path"] === input.cdkPath) return {
34834
34641
  physicalId: bucket.vectorBucketName,
34835
34642
  attributes: {}
34836
34643
  };
@@ -35440,7 +35247,7 @@ var S3TablesProvider = class {
35440
35247
  attributes: {}
35441
35248
  };
35442
35249
  if (input.cdkPath) try {
35443
- if ((await this.getClient().send(new ListTagsForResourceCommand$19({ resourceArn: bucket.arn }))).tags?.["aws:cdk:path"] === input.cdkPath) return {
35250
+ if ((await this.getClient().send(new ListTagsForResourceCommand$18({ resourceArn: bucket.arn }))).tags?.["aws:cdk:path"] === input.cdkPath) return {
35444
35251
  physicalId: bucket.arn,
35445
35252
  attributes: {}
35446
35253
  };
@@ -35507,7 +35314,7 @@ var S3TablesProvider = class {
35507
35314
  for (const table of tables.tables ?? []) {
35508
35315
  if (!table.name || !table.tableARN) continue;
35509
35316
  try {
35510
- if ((await this.getClient().send(new ListTagsForResourceCommand$19({ resourceArn: table.tableARN }))).tags?.["aws:cdk:path"] === input.cdkPath) return {
35317
+ if ((await this.getClient().send(new ListTagsForResourceCommand$18({ resourceArn: table.tableARN }))).tags?.["aws:cdk:path"] === input.cdkPath) return {
35511
35318
  physicalId: `${bucket.arn}|${namespaceName}|${table.name}`,
35512
35319
  attributes: {}
35513
35320
  };
@@ -35603,7 +35410,7 @@ var S3TablesProvider = class {
35603
35410
  */
35604
35411
  async readTagsBestEffort(resourceArn) {
35605
35412
  try {
35606
- const tags = (await this.getClient().send(new ListTagsForResourceCommand$19({ resourceArn }))).tags ?? {};
35413
+ const tags = (await this.getClient().send(new ListTagsForResourceCommand$18({ resourceArn }))).tags ?? {};
35607
35414
  const out = [];
35608
35415
  for (const [Key, Value] of Object.entries(tags)) out.push({
35609
35416
  Key,
@@ -35657,7 +35464,7 @@ var S3TablesProvider = class {
35657
35464
  const resourceArn = await this.lookupTableArn(tableBucketARN, namespace, name);
35658
35465
  if (!resourceArn) throw new ProvisioningError(`applyTableTagsDiff: GetTable returned no tableARN for ${physicalId} — table is gone or state is out-of-sync. Refusing to silently drop the tag update (run 'cdkd state orphan ${logicalId}' to clean up if the table was deleted out-of-band).`, resourceType, logicalId, physicalId);
35659
35466
  if (removedKeys.length > 0) try {
35660
- await this.getClient().send(new UntagResourceCommand$16({
35467
+ await this.getClient().send(new UntagResourceCommand$15({
35661
35468
  resourceArn,
35662
35469
  tagKeys: removedKeys
35663
35470
  }));
@@ -35666,7 +35473,7 @@ var S3TablesProvider = class {
35666
35473
  throw new ProvisioningError(`applyTableTagsDiff: UntagResource failed for ${resourceArn} (keys: ${removedKeys.join(", ")}): ${err instanceof Error ? err.message : String(err)}. State has NOT been updated so the next deploy will retry the tag-diff.`, resourceType, logicalId, physicalId, cause);
35667
35474
  }
35668
35475
  if (Object.keys(upserts).length > 0) try {
35669
- await this.getClient().send(new TagResourceCommand$17({
35476
+ await this.getClient().send(new TagResourceCommand$16({
35670
35477
  resourceArn,
35671
35478
  tags: upserts
35672
35479
  }));
@@ -35698,7 +35505,7 @@ var S3TablesProvider = class {
35698
35505
  if (removedKeys.length === 0 && Object.keys(upserts).length === 0) return;
35699
35506
  const resourceArn = physicalId;
35700
35507
  if (removedKeys.length > 0) try {
35701
- await this.getClient().send(new UntagResourceCommand$16({
35508
+ await this.getClient().send(new UntagResourceCommand$15({
35702
35509
  resourceArn,
35703
35510
  tagKeys: removedKeys
35704
35511
  }));
@@ -35707,7 +35514,7 @@ var S3TablesProvider = class {
35707
35514
  throw new ProvisioningError(`applyTableBucketTagsDiff: UntagResource failed for ${resourceArn} (keys: ${removedKeys.join(", ")}): ${err instanceof Error ? err.message : String(err)}. State has NOT been updated so the next deploy will retry the tag-diff.`, resourceType, logicalId, physicalId, cause);
35708
35515
  }
35709
35516
  if (Object.keys(upserts).length > 0) try {
35710
- await this.getClient().send(new TagResourceCommand$17({
35517
+ await this.getClient().send(new TagResourceCommand$16({
35711
35518
  resourceArn,
35712
35519
  tags: upserts
35713
35520
  }));
@@ -55650,7 +55457,7 @@ function reorderArgs(argv) {
55650
55457
  async function main() {
55651
55458
  installPipeCloseHandler();
55652
55459
  const program = new Command();
55653
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.230.33");
55460
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.231.1");
55654
55461
  program.addCommand(createBootstrapCommand());
55655
55462
  program.addCommand(createSynthCommand());
55656
55463
  program.addCommand(createListCommand());