@go-to-k/cdkd 0.197.0 → 0.199.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-DWUnLza1.js";
3
- import { $ as uploadCfnTemplate, A as S3StateBackend, At as PATTERN_B_NAME_PROPERTIES, B as Synthesizer, C as assertRegionMatch, Ct as normalizeAwsError, D as DagBuilder, E as DiffCalculator, Et as getLogger, F as buildDockerImage, Ft as withStackName, G as resolveSkipPrefix, H as getLegacyStateBucketName, I as formatDockerLoginError, J as warnDeprecatedNoPrefixCliFlag, K as resolveStateBucketWithDefault, L as getDockerCmd, M as AssetPublisher, Mt as generateResourceName, N as stringifyValue, Nt as generateResourceNameWithFallback, O as TemplateParser, Ot as runStackBuffered, P as WorkGraph, Pt as withSkipPrefix, Q as findLargeInlineResources, R as runDockerForeground, S as CloudControlProvider, T as applyRoleArnIfSet, U as resolveApp, V as getDefaultStateBucketName, W as resolveCaptureObservedState, X as CFN_TEMPLATE_URL_LIMIT, Y as CFN_TEMPLATE_BODY_LIMIT, Z as MIGRATE_TMP_PREFIX, _ as matchesCdkPath, _t as StackHasActiveImportsError, a as withRetry, b as ProviderRegistry, c as bold, ct as LocalMigrateError, d as green, dt as MissingCdkCliError, et as AssemblyReader, f as red, ft as NestedStackChildDirectDestroyError, g as CDK_PATH_TAG, gt as ResourceUpdateNotSupportedError, h as collectInlinePolicyNamesManagedBySiblings, ht as ResourceTimeoutError, i as withResourceDeadline, it as CdkdError, j as shouldRetainResource, jt as PATTERN_B_RESOURCE_TYPES, k as LockManager, kt as getLiveRenderer, l as cyan, lt as LocalStartServiceError, m as IAMRoleProvider, mt as ProvisioningError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as resolveBucketRegion, o as IMPLICIT_DELETE_DEPENDENCIES, p as yellow, pt as PartialFailureError, q as resolveStateBucketWithDefaultAndSource, r as DeployEngine, s as formatResourceLine, st as LocalInvokeBuildError$1, t as DEFAULT_RESOURCE_TIMEOUT_MS, u as gray, v as normalizeAwsTagsToCfn, vt as StackTerminationProtectionError, w as IntrinsicFunctionResolver, wt as withErrorHandling, x as findActionableSilentDrops, y as resolveExplicitPhysicalId, z as runDockerStreaming } from "./deploy-engine-z5g_l5ER.js";
3
+ import { $ as uploadCfnTemplate, A as S3StateBackend, At as PATTERN_B_NAME_PROPERTIES, B as Synthesizer, C as assertRegionMatch, Ct as normalizeAwsError, D as DagBuilder, E as DiffCalculator, Et as getLogger, F as buildDockerImage, Ft as withStackName, G as resolveSkipPrefix, H as getLegacyStateBucketName, I as formatDockerLoginError, J as warnDeprecatedNoPrefixCliFlag, K as resolveStateBucketWithDefault, L as getDockerCmd, M as AssetPublisher, Mt as generateResourceName, N as stringifyValue, Nt as generateResourceNameWithFallback, O as TemplateParser, Ot as runStackBuffered, P as WorkGraph, Pt as withSkipPrefix, Q as findLargeInlineResources, R as runDockerForeground, S as CloudControlProvider, T as applyRoleArnIfSet, U as resolveApp, V as getDefaultStateBucketName, W as resolveCaptureObservedState, X as CFN_TEMPLATE_URL_LIMIT, Y as CFN_TEMPLATE_BODY_LIMIT, Z as MIGRATE_TMP_PREFIX, _ as matchesCdkPath, _t as StackHasActiveImportsError, a as withRetry, b as ProviderRegistry, c as bold, ct as LocalMigrateError, d as green, dt as MissingCdkCliError, et as AssemblyReader, f as red, ft as NestedStackChildDirectDestroyError, g as CDK_PATH_TAG, gt as ResourceUpdateNotSupportedError, h as collectInlinePolicyNamesManagedBySiblings, ht as ResourceTimeoutError, i as withResourceDeadline, it as CdkdError, j as shouldRetainResource, jt as PATTERN_B_RESOURCE_TYPES, k as LockManager, kt as getLiveRenderer, l as cyan, lt as LocalStartServiceError, m as IAMRoleProvider, mt as ProvisioningError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as resolveBucketRegion, o as IMPLICIT_DELETE_DEPENDENCIES, p as yellow, pt as PartialFailureError, q as resolveStateBucketWithDefaultAndSource, r as DeployEngine, s as formatResourceLine, st as LocalInvokeBuildError$1, t as DEFAULT_RESOURCE_TIMEOUT_MS, u as gray, v as normalizeAwsTagsToCfn, vt as StackTerminationProtectionError, w as IntrinsicFunctionResolver, wt as withErrorHandling, x as findActionableSilentDrops, y as resolveExplicitPhysicalId, z as runDockerStreaming } from "./deploy-engine-DGQOHJpW.js";
4
4
  import { AsyncLocalStorage } from "node:async_hooks";
5
5
  import { randomBytes, randomUUID } from "node:crypto";
6
6
  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";
@@ -16,9 +16,9 @@ import { APIGatewayClient, CreateAuthorizerCommand, CreateDeploymentCommand, Cre
16
16
  import { CreateEventBusCommand, DeleteEventBusCommand, DeleteRuleCommand, DescribeEventBusCommand, DescribeRuleCommand, EventBridgeClient, ListEventBusesCommand, ListRulesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$1, ListTargetsByRuleCommand, PutRuleCommand, PutTargetsCommand, RemoveTargetsCommand, ResourceNotFoundException as ResourceNotFoundException$2, TagResourceCommand as TagResourceCommand$4, UntagResourceCommand as UntagResourceCommand$4, UpdateEventBusCommand } from "@aws-sdk/client-eventbridge";
17
17
  import { CreateSecretCommand, DeleteSecretCommand, DescribeSecretCommand, GetSecretValueCommand, ListSecretsCommand, RemoveRegionsFromReplicationCommand, ReplicateSecretToRegionsCommand, ResourceNotFoundException as ResourceNotFoundException$3, SecretsManagerClient, TagResourceCommand as TagResourceCommand$5, UntagResourceCommand as UntagResourceCommand$5, UpdateSecretCommand } from "@aws-sdk/client-secrets-manager";
18
18
  import { AddTagsToResourceCommand, DeleteParameterCommand, DescribeParametersCommand, GetParameterCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$2, ParameterNotFound, PutParameterCommand, RemoveTagsFromResourceCommand, SSMClient } from "@aws-sdk/client-ssm";
19
- import { CloudFrontClient, CreateCloudFrontOriginAccessIdentityCommand, CreateDistributionCommand, DeleteCloudFrontOriginAccessIdentityCommand, DeleteDistributionCommand, GetCloudFrontOriginAccessIdentityCommand, GetDistributionCommand, GetDistributionConfigCommand, ListDistributionsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$3, NoSuchCloudFrontOriginAccessIdentity, NoSuchDistribution, UpdateCloudFrontOriginAccessIdentityCommand, UpdateDistributionCommand } from "@aws-sdk/client-cloudfront";
20
- import { CloudWatchClient, DeleteAlarmsCommand, DescribeAlarmsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$4, PutMetricAlarmCommand, TagResourceCommand as TagResourceCommand$6, UntagResourceCommand as UntagResourceCommand$6 } from "@aws-sdk/client-cloudwatch";
21
- import { CloudWatchLogsClient, CreateLogGroupCommand, DeleteDataProtectionPolicyCommand, DeleteIndexPolicyCommand, DeleteLogGroupCommand, DeleteRetentionPolicyCommand, DescribeIndexPoliciesCommand, DescribeLogGroupsCommand, GetDataProtectionPolicyCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$5, PutBearerTokenAuthenticationCommand, PutDataProtectionPolicyCommand, PutIndexPolicyCommand, PutLogGroupDeletionProtectionCommand, PutRetentionPolicyCommand, ResourceAlreadyExistsException, ResourceNotFoundException as ResourceNotFoundException$4, TagResourceCommand as TagResourceCommand$7, UntagResourceCommand as UntagResourceCommand$7 } from "@aws-sdk/client-cloudwatch-logs";
19
+ import { CloudFrontClient, CreateCloudFrontOriginAccessIdentityCommand, CreateDistributionCommand, CreateDistributionWithTagsCommand, DeleteCloudFrontOriginAccessIdentityCommand, DeleteDistributionCommand, GetCloudFrontOriginAccessIdentityCommand, GetDistributionCommand, GetDistributionConfigCommand, ListDistributionsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$3, NoSuchCloudFrontOriginAccessIdentity, NoSuchDistribution, TagResourceCommand as TagResourceCommand$6, UntagResourceCommand as UntagResourceCommand$6, UpdateCloudFrontOriginAccessIdentityCommand, UpdateDistributionCommand } from "@aws-sdk/client-cloudfront";
20
+ import { CloudWatchClient, DeleteAlarmsCommand, DescribeAlarmsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$4, PutMetricAlarmCommand, TagResourceCommand as TagResourceCommand$7, UntagResourceCommand as UntagResourceCommand$7 } from "@aws-sdk/client-cloudwatch";
21
+ import { CloudWatchLogsClient, CreateLogGroupCommand, DeleteDataProtectionPolicyCommand, DeleteIndexPolicyCommand, DeleteLogGroupCommand, DeleteRetentionPolicyCommand, DescribeIndexPoliciesCommand, DescribeLogGroupsCommand, GetDataProtectionPolicyCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$5, PutBearerTokenAuthenticationCommand, PutDataProtectionPolicyCommand, PutIndexPolicyCommand, PutLogGroupDeletionProtectionCommand, PutRetentionPolicyCommand, ResourceAlreadyExistsException, ResourceNotFoundException as ResourceNotFoundException$4, TagResourceCommand as TagResourceCommand$8, UntagResourceCommand as UntagResourceCommand$8 } from "@aws-sdk/client-cloudwatch-logs";
22
22
  import { BedrockAgentCoreControlClient, CreateAgentRuntimeCommand, DeleteAgentRuntimeCommand, GetAgentRuntimeCommand, ResourceNotFoundException as ResourceNotFoundException$5, UpdateAgentRuntimeCommand } from "@aws-sdk/client-bedrock-agentcore-control";
23
23
  import { ACMClient, AddTagsToCertificateCommand, DeleteCertificateCommand, DescribeCertificateCommand, ListCertificatesCommand, ListTagsForCertificateCommand, RemoveTagsFromCertificateCommand, RequestCertificateCommand, ResourceNotFoundException as ResourceNotFoundException$6, UpdateCertificateOptionsCommand } from "@aws-sdk/client-acm";
24
24
  import * as fs from "node:fs";
@@ -29,8 +29,8 @@ import { execFile, spawn } from "node:child_process";
29
29
  import { tmpdir } from "node:os";
30
30
  import { AssociateVPCWithHostedZoneCommand, ChangeResourceRecordSetsCommand, ChangeTagsForResourceCommand, CreateHostedZoneCommand, CreateQueryLoggingConfigCommand, DeleteHostedZoneCommand, DeleteQueryLoggingConfigCommand, DisassociateVPCFromHostedZoneCommand, GetHostedZoneCommand, ListHostedZonesByNameCommand, ListHostedZonesCommand, ListQueryLoggingConfigsCommand, ListResourceRecordSetsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$6, Route53Client, UpdateHostedZoneCommentCommand, UpdateHostedZoneFeaturesCommand } from "@aws-sdk/client-route-53";
31
31
  import { AddTagsCommand, CreateListenerCommand, CreateLoadBalancerCommand, CreateTargetGroupCommand, DeleteListenerCommand, DeleteLoadBalancerCommand, DeleteTargetGroupCommand, DescribeListenersCommand, DescribeLoadBalancerAttributesCommand, DescribeLoadBalancersCommand, DescribeTagsCommand, DescribeTargetGroupsCommand, ElasticLoadBalancingV2Client, ModifyListenerCommand, ModifyLoadBalancerAttributesCommand, ModifyTargetGroupCommand, RemoveTagsCommand, SetIpAddressTypeCommand, SetSecurityGroupsCommand, SetSubnetsCommand } from "@aws-sdk/client-elastic-load-balancing-v2";
32
- import { CreateAliasCommand, CreateKeyCommand, DeleteAliasCommand, DescribeKeyCommand, DisableKeyCommand, DisableKeyRotationCommand, EnableKeyCommand, EnableKeyRotationCommand, GetKeyPolicyCommand, GetKeyRotationStatusCommand, KMSClient, ListAliasesCommand, ListKeysCommand, ListResourceTagsCommand, NotFoundException as NotFoundException$2, PutKeyPolicyCommand, ScheduleKeyDeletionCommand, TagResourceCommand as TagResourceCommand$8, UntagResourceCommand as UntagResourceCommand$8, UpdateAliasCommand, UpdateKeyDescriptionCommand } from "@aws-sdk/client-kms";
33
- import { CreateRepositoryCommand, DeleteLifecyclePolicyCommand, DeleteRepositoryCommand, DeleteRepositoryPolicyCommand, DescribeRepositoriesCommand, ECRClient, GetAuthorizationTokenCommand, GetLifecyclePolicyCommand, LifecyclePolicyNotFoundException, ListTagsForResourceCommand as ListTagsForResourceCommand$7, PutImageScanningConfigurationCommand, PutImageTagMutabilityCommand, PutLifecyclePolicyCommand, RepositoryNotFoundException, SetRepositoryPolicyCommand, TagResourceCommand as TagResourceCommand$9 } from "@aws-sdk/client-ecr";
32
+ import { CreateAliasCommand, CreateKeyCommand, DeleteAliasCommand, DescribeKeyCommand, DisableKeyCommand, DisableKeyRotationCommand, EnableKeyCommand, EnableKeyRotationCommand, GetKeyPolicyCommand, GetKeyRotationStatusCommand, KMSClient, ListAliasesCommand, ListKeysCommand, ListResourceTagsCommand, NotFoundException as NotFoundException$2, PutKeyPolicyCommand, ScheduleKeyDeletionCommand, TagResourceCommand as TagResourceCommand$9, UntagResourceCommand as UntagResourceCommand$9, UpdateAliasCommand, UpdateKeyDescriptionCommand } from "@aws-sdk/client-kms";
33
+ import { CreateRepositoryCommand, DeleteLifecyclePolicyCommand, DeleteRepositoryCommand, DeleteRepositoryPolicyCommand, DescribeRepositoriesCommand, ECRClient, GetAuthorizationTokenCommand, GetLifecyclePolicyCommand, LifecyclePolicyNotFoundException, ListTagsForResourceCommand as ListTagsForResourceCommand$7, PutImageScanningConfigurationCommand, PutImageTagMutabilityCommand, PutLifecyclePolicyCommand, RepositoryNotFoundException, SetRepositoryPolicyCommand, TagResourceCommand as TagResourceCommand$10 } from "@aws-sdk/client-ecr";
34
34
  import graphlib from "graphlib";
35
35
  import { AddTagsToResourceCommand as AddTagsToResourceCommand$1, CreateDBClusterCommand, CreateDBInstanceCommand, CreateDBProxyCommand, CreateDBProxyEndpointCommand, CreateDBSubnetGroupCommand, DBProxyEndpointNotFoundFault, DBProxyNotFoundFault, DBProxyTargetGroupNotFoundFault, DBProxyTargetNotFoundFault, DeleteDBClusterCommand, DeleteDBInstanceCommand, DeleteDBProxyCommand, DeleteDBProxyEndpointCommand, DeleteDBSubnetGroupCommand, DeregisterDBProxyTargetsCommand, DescribeDBClustersCommand, DescribeDBInstancesCommand, DescribeDBProxiesCommand, DescribeDBProxyEndpointsCommand, DescribeDBProxyTargetGroupsCommand, DescribeDBProxyTargetsCommand, DescribeDBSubnetGroupsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$8, ModifyDBClusterCommand, ModifyDBInstanceCommand, ModifyDBProxyCommand, ModifyDBProxyEndpointCommand, ModifyDBProxyTargetGroupCommand, ModifyDBSubnetGroupCommand, RDSClient, RegisterDBProxyTargetsCommand, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$1 } from "@aws-sdk/client-rds";
36
36
  import { Command, Option } from "commander";
@@ -41,18 +41,18 @@ import readline from "node:readline/promises";
41
41
  import * as zlib from "node:zlib";
42
42
  import { ApplicationAutoScalingClient, DeleteScalingPolicyCommand, DeregisterScalableTargetCommand, DescribeScalableTargetsCommand, DescribeScalingPoliciesCommand, PutScalingPolicyCommand, RegisterScalableTargetCommand } from "@aws-sdk/client-application-auto-scaling";
43
43
  import { ApiGatewayV2Client, CreateApiCommand, CreateAuthorizerCommand as CreateAuthorizerCommand$1, CreateIntegrationCommand, CreateRouteCommand as CreateRouteCommand$1, CreateStageCommand as CreateStageCommand$1, DeleteApiCommand, DeleteAuthorizerCommand as DeleteAuthorizerCommand$1, DeleteIntegrationCommand, DeleteRouteCommand as DeleteRouteCommand$1, DeleteStageCommand as DeleteStageCommand$1, GetApiCommand, GetApisCommand, 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";
44
- import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListStateMachinesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$9, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$10, UntagResourceCommand as UntagResourceCommand$9, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
45
- import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, ListClustersCommand, ListServicesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$10, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$11, UntagResourceCommand as UntagResourceCommand$10, UpdateClusterCommand, UpdateServiceCommand } from "@aws-sdk/client-ecs";
44
+ import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListStateMachinesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$9, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$11, UntagResourceCommand as UntagResourceCommand$10, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
45
+ import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, ListClustersCommand, ListServicesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$10, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$12, UntagResourceCommand as UntagResourceCommand$11, UpdateClusterCommand, UpdateServiceCommand } from "@aws-sdk/client-ecs";
46
46
  import { AddTagsToResourceCommand as AddTagsToResourceCommand$2, 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$11, ModifyDBClusterCommand as ModifyDBClusterCommand$1, ModifyDBInstanceCommand as ModifyDBInstanceCommand$1, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$1, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$2 } from "@aws-sdk/client-docdb";
47
47
  import { AddTagsToResourceCommand as AddTagsToResourceCommand$3, 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$12, ModifyDBClusterCommand as ModifyDBClusterCommand$2, ModifyDBInstanceCommand as ModifyDBInstanceCommand$2, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$2, NeptuneClient, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$3 } from "@aws-sdk/client-neptune";
48
- import { CreateWebACLCommand, DeleteWebACLCommand, GetWebACLCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$13, ListWebACLsCommand, TagResourceCommand as TagResourceCommand$12, UntagResourceCommand as UntagResourceCommand$11, UpdateWebACLCommand, WAFNonexistentItemException, WAFV2Client } from "@aws-sdk/client-wafv2";
48
+ import { CreateWebACLCommand, DeleteWebACLCommand, GetWebACLCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$13, ListWebACLsCommand, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$12, UpdateWebACLCommand, WAFNonexistentItemException, WAFV2Client } from "@aws-sdk/client-wafv2";
49
49
  import { CognitoIdentityProviderClient, CreateUserPoolCommand, DeleteUserPoolCommand, DescribeUserPoolCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$14, ListUserPoolsCommand, ResourceNotFoundException as ResourceNotFoundException$7, UpdateUserPoolCommand } from "@aws-sdk/client-cognito-identity-provider";
50
50
  import { AddTagsToResourceCommand as AddTagsToResourceCommand$4, CreateCacheClusterCommand, CreateCacheSubnetGroupCommand, DeleteCacheClusterCommand, DeleteCacheSubnetGroupCommand, DescribeCacheClustersCommand, DescribeCacheSubnetGroupsCommand, ElastiCacheClient, ListTagsForResourceCommand as ListTagsForResourceCommand$15, ModifyCacheClusterCommand, ModifyCacheSubnetGroupCommand, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$4 } from "@aws-sdk/client-elasticache";
51
51
  import { CreatePrivateDnsNamespaceCommand, CreateServiceCommand as CreateServiceCommand$1, DeleteNamespaceCommand, DeleteServiceCommand as DeleteServiceCommand$1, GetNamespaceCommand, GetOperationCommand, GetServiceCommand, ListNamespacesCommand, ListServicesCommand as ListServicesCommand$1, ListTagsForResourceCommand as ListTagsForResourceCommand$16, NamespaceNotFound, ServiceDiscoveryClient, ServiceNotFound, UpdatePrivateDnsNamespaceCommand, UpdateServiceCommand as UpdateServiceCommand$1 } from "@aws-sdk/client-servicediscovery";
52
- 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";
52
+ 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";
53
53
  import { parse, print } from "graphql";
54
54
  import { 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, StopCrawlerScheduleCommand, StopTriggerCommand, UpdateConnectionCommand, UpdateCrawlerCommand, UpdateDatabaseCommand, UpdateJobCommand, UpdateTableCommand as UpdateTableCommand$1, UpdateTriggerCommand, UpdateWorkflowCommand } from "@aws-sdk/client-glue";
55
- import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListStreamsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$17, ListTagsForStreamCommand, RegisterStreamConsumerCommand, RemoveTagsFromStreamCommand, ResourceNotFoundException as ResourceNotFoundException$8, StartStreamEncryptionCommand, StopStreamEncryptionCommand, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$13, UpdateShardCountCommand } from "@aws-sdk/client-kinesis";
55
+ import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, 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 } from "@aws-sdk/client-kinesis";
56
56
  import { AccessPointNotFound, CreateAccessPointCommand, CreateFileSystemCommand, CreateMountTargetCommand, DeleteAccessPointCommand, DeleteFileSystemCommand, DeleteMountTargetCommand, DescribeAccessPointsCommand, DescribeBackupPolicyCommand, DescribeFileSystemsCommand, DescribeLifecycleConfigurationCommand, DescribeMountTargetSecurityGroupsCommand, DescribeMountTargetsCommand, EFSClient, FileSystemNotFound, ModifyMountTargetSecurityGroupsCommand, MountTargetNotFound, UpdateFileSystemCommand } from "@aws-sdk/client-efs";
57
57
  import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliveryStreamCommand, FirehoseClient, ListDeliveryStreamsCommand, ListTagsForDeliveryStreamCommand, ResourceNotFoundException as ResourceNotFoundException$9, TagDeliveryStreamCommand, UntagDeliveryStreamCommand, UpdateDestinationCommand } from "@aws-sdk/client-firehose";
58
58
  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";
@@ -8360,7 +8360,14 @@ var LambdaEventSourceMappingProvider = class {
8360
8360
  "AmazonManagedKafkaEventSourceConfig",
8361
8361
  "DocumentDBEventSourceConfig",
8362
8362
  "ScalingConfig",
8363
- "Tags"
8363
+ "Tags",
8364
+ "KmsKeyArn",
8365
+ "LoggingConfig",
8366
+ "MetricsConfig",
8367
+ "ProvisionedPollerConfig",
8368
+ "Queues",
8369
+ "Topics",
8370
+ "StartingPositionTimestamp"
8364
8371
  ])]]);
8365
8372
  constructor() {
8366
8373
  const awsClients = getAwsClients();
@@ -8398,6 +8405,16 @@ var LambdaEventSourceMappingProvider = class {
8398
8405
  const cfnTags = properties["Tags"];
8399
8406
  params.Tags = Object.fromEntries(cfnTags.map((t) => [t.Key, t.Value]));
8400
8407
  }
8408
+ if (properties["KmsKeyArn"] !== void 0) params.KMSKeyArn = properties["KmsKeyArn"];
8409
+ if (properties["LoggingConfig"] !== void 0) params.LoggingConfig = properties["LoggingConfig"];
8410
+ if (properties["MetricsConfig"] !== void 0) params.MetricsConfig = properties["MetricsConfig"];
8411
+ if (properties["ProvisionedPollerConfig"] !== void 0) params.ProvisionedPollerConfig = properties["ProvisionedPollerConfig"];
8412
+ if (properties["Queues"]) params.Queues = properties["Queues"];
8413
+ if (properties["Topics"]) params.Topics = properties["Topics"];
8414
+ if (properties["StartingPositionTimestamp"] !== void 0) {
8415
+ const raw = properties["StartingPositionTimestamp"];
8416
+ params.StartingPositionTimestamp = typeof raw === "number" ? /* @__PURE__ */ new Date(raw * 1e3) : raw instanceof Date ? raw : new Date(raw);
8417
+ }
8401
8418
  const uuid = (await this.lambdaClient.send(new CreateEventSourceMappingCommand(params))).UUID;
8402
8419
  if (!uuid) throw new Error("CreateEventSourceMapping did not return UUID");
8403
8420
  this.logger.debug(`Successfully created event source mapping ${logicalId}: ${uuid}`);
@@ -8433,6 +8450,10 @@ var LambdaEventSourceMappingProvider = class {
8433
8450
  if (properties["SourceAccessConfigurations"] !== void 0) updateParams.SourceAccessConfigurations = properties["SourceAccessConfigurations"];
8434
8451
  if (properties["ScalingConfig"] !== void 0) updateParams.ScalingConfig = properties["ScalingConfig"];
8435
8452
  if (properties["DocumentDBEventSourceConfig"] !== void 0) updateParams.DocumentDBEventSourceConfig = properties["DocumentDBEventSourceConfig"];
8453
+ if (properties["KmsKeyArn"] !== void 0) updateParams.KMSKeyArn = properties["KmsKeyArn"];
8454
+ if (properties["LoggingConfig"] !== void 0) updateParams.LoggingConfig = properties["LoggingConfig"];
8455
+ if (properties["MetricsConfig"] !== void 0) updateParams.MetricsConfig = properties["MetricsConfig"];
8456
+ if (properties["ProvisionedPollerConfig"] !== void 0) updateParams.ProvisionedPollerConfig = properties["ProvisionedPollerConfig"];
8436
8457
  const eventSourceMappingArn = (await this.lambdaClient.send(new UpdateEventSourceMappingCommand(updateParams))).EventSourceMappingArn;
8437
8458
  if (eventSourceMappingArn) await this.applyTagDiff(eventSourceMappingArn, previousProperties["Tags"], properties["Tags"]);
8438
8459
  this.logger.debug(`Successfully updated event source mapping ${logicalId}`);
@@ -8565,6 +8586,17 @@ var LambdaEventSourceMappingProvider = class {
8565
8586
  if (resp.AmazonManagedKafkaEventSourceConfig !== void 0) result["AmazonManagedKafkaEventSourceConfig"] = resp.AmazonManagedKafkaEventSourceConfig;
8566
8587
  if (resp.DocumentDBEventSourceConfig !== void 0) result["DocumentDBEventSourceConfig"] = resp.DocumentDBEventSourceConfig;
8567
8588
  if (resp.ScalingConfig !== void 0) result["ScalingConfig"] = resp.ScalingConfig;
8589
+ if (resp.KMSKeyArn !== void 0) result["KmsKeyArn"] = resp.KMSKeyArn;
8590
+ if (resp.LoggingConfig !== void 0) result["LoggingConfig"] = resp.LoggingConfig;
8591
+ if (resp.MetricsConfig !== void 0) result["MetricsConfig"] = resp.MetricsConfig;
8592
+ if (resp.ProvisionedPollerConfig !== void 0) result["ProvisionedPollerConfig"] = resp.ProvisionedPollerConfig;
8593
+ if (resp.Queues !== void 0) result["Queues"] = [...resp.Queues];
8594
+ if (resp.Topics !== void 0) result["Topics"] = [...resp.Topics];
8595
+ if (resp.StartingPositionTimestamp !== void 0) {
8596
+ const raw = resp.StartingPositionTimestamp;
8597
+ const date = raw instanceof Date ? raw : new Date(raw);
8598
+ result["StartingPositionTimestamp"] = Math.floor(date.getTime() / 1e3);
8599
+ }
8568
8600
  if (resp.State !== void 0) result["Enabled"] = resp.State === "Enabled" || resp.State === "Enabling" || resp.State === "Updating";
8569
8601
  let tags = [];
8570
8602
  if (resp.EventSourceMappingArn) try {
@@ -10894,14 +10926,14 @@ var LogsLogGroupProvider = class {
10894
10926
  const arn = await this.buildArn(physicalId);
10895
10927
  if (oldTags && oldTags.length > 0) {
10896
10928
  const oldTagKeys = oldTags.map((t) => t.Key);
10897
- await this.logsClient.send(new UntagResourceCommand$7({
10929
+ await this.logsClient.send(new UntagResourceCommand$8({
10898
10930
  resourceArn: arn,
10899
10931
  tagKeys: oldTagKeys
10900
10932
  }));
10901
10933
  }
10902
10934
  if (newTags && newTags.length > 0) {
10903
10935
  const tagsMap = Object.fromEntries(newTags.map((t) => [t.Key, t.Value]));
10904
- await this.logsClient.send(new TagResourceCommand$7({
10936
+ await this.logsClient.send(new TagResourceCommand$8({
10905
10937
  resourceArn: arn,
10906
10938
  tags: tagsMap
10907
10939
  }));
@@ -11257,14 +11289,14 @@ var CloudWatchAlarmProvider = class {
11257
11289
  const tagsToRemove = [];
11258
11290
  for (const k of oldMap.keys()) if (!newMap.has(k)) tagsToRemove.push(k);
11259
11291
  if (tagsToRemove.length > 0) {
11260
- await this.cloudWatchClient.send(new UntagResourceCommand$6({
11292
+ await this.cloudWatchClient.send(new UntagResourceCommand$7({
11261
11293
  ResourceARN: resourceArn,
11262
11294
  TagKeys: tagsToRemove
11263
11295
  }));
11264
11296
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from alarm ${resourceArn}`);
11265
11297
  }
11266
11298
  if (tagsToAdd.length > 0) {
11267
- await this.cloudWatchClient.send(new TagResourceCommand$6({
11299
+ await this.cloudWatchClient.send(new TagResourceCommand$7({
11268
11300
  ResourceARN: resourceArn,
11269
11301
  Tags: tagsToAdd
11270
11302
  }));
@@ -17138,7 +17170,7 @@ const CACHE_BEHAVIOR_QUANTITY_FIELDS = [
17138
17170
  var CloudFrontDistributionProvider = class {
17139
17171
  cloudFrontClient;
17140
17172
  logger = getLogger().child("CloudFrontDistributionProvider");
17141
- handledProperties = new Map([["AWS::CloudFront::Distribution", new Set(["DistributionConfig"])]]);
17173
+ handledProperties = new Map([["AWS::CloudFront::Distribution", new Set(["DistributionConfig", "Tags"])]]);
17142
17174
  constructor() {
17143
17175
  const awsClients = getAwsClients();
17144
17176
  this.cloudFrontClient = awsClients.cloudFront;
@@ -17154,7 +17186,11 @@ var CloudFrontDistributionProvider = class {
17154
17186
  ...distributionConfig,
17155
17187
  CallerReference: `${Date.now()}-${logicalId}-${Math.random().toString(36).slice(2, 8)}`
17156
17188
  });
17157
- const distribution = (await this.cloudFrontClient.send(new CreateDistributionCommand({ DistributionConfig: sdkConfig }))).Distribution;
17189
+ const sdkTags = this.toSdkTags(properties["Tags"]);
17190
+ const distribution = (sdkTags ? await this.cloudFrontClient.send(new CreateDistributionWithTagsCommand({ DistributionConfigWithTags: {
17191
+ DistributionConfig: sdkConfig,
17192
+ Tags: { Items: sdkTags }
17193
+ } })) : await this.cloudFrontClient.send(new CreateDistributionCommand({ DistributionConfig: sdkConfig }))).Distribution;
17158
17194
  const distributionId = distribution.Id;
17159
17195
  const domainName = distribution.DomainName;
17160
17196
  this.logger.debug(`Created CloudFront Distribution: ${distributionId} (${domainName})`);
@@ -17181,7 +17217,7 @@ var CloudFrontDistributionProvider = class {
17181
17217
  * Gets the current config via GetDistributionConfigCommand, merges new properties,
17182
17218
  * then calls UpdateDistributionCommand with the required IfMatch ETag.
17183
17219
  */
17184
- async update(logicalId, physicalId, resourceType, properties, _previousProperties) {
17220
+ async update(logicalId, physicalId, resourceType, properties, previousProperties) {
17185
17221
  this.logger.debug(`Updating CloudFront Distribution ${logicalId}: ${physicalId}`);
17186
17222
  try {
17187
17223
  const getConfigResponse = await this.cloudFrontClient.send(new GetDistributionConfigCommand({ Id: physicalId }));
@@ -17197,7 +17233,10 @@ var CloudFrontDistributionProvider = class {
17197
17233
  IfMatch: etag,
17198
17234
  DistributionConfig: sdkConfig
17199
17235
  }));
17200
- const domainName = (await this.cloudFrontClient.send(new GetDistributionCommand({ Id: physicalId }))).Distribution?.DomainName ?? "";
17236
+ const getResponse = await this.cloudFrontClient.send(new GetDistributionCommand({ Id: physicalId }));
17237
+ const domainName = getResponse.Distribution?.DomainName ?? "";
17238
+ const arn = getResponse.Distribution?.ARN;
17239
+ await this.tryApplyTagDiff(arn, previousProperties["Tags"], properties["Tags"], physicalId);
17201
17240
  this.logger.debug(`Updated CloudFront Distribution ${physicalId}`);
17202
17241
  return {
17203
17242
  physicalId,
@@ -17411,6 +17450,107 @@ var CloudFrontDistributionProvider = class {
17411
17450
  }
17412
17451
  }
17413
17452
  /**
17453
+ * Convert CFn `Tags: [{ Key, Value }]` to the CloudFront SDK's `Tag[]`
17454
+ * shape (which happens to be the same `{ Key, Value }` per-entry shape),
17455
+ * dropping entries missing a Key and normalizing missing-Value to `''`
17456
+ * (matching `tagsArrayToMap`'s shape so the create-path and update-diff-
17457
+ * path agree on what counts as "the same tag"). Returns `undefined`
17458
+ * when the input is absent or empty so the caller can route to
17459
+ * `CreateDistributionCommand` instead of `CreateDistributionWithTagsCommand`
17460
+ * — passing an empty `Tags.Items: []` to the latter is a silent no-op
17461
+ * but uses the tags-enabled control-plane path for nothing.
17462
+ */
17463
+ toSdkTags(value) {
17464
+ const map = this.tagsArrayToMap(value);
17465
+ if (map.size === 0) return void 0;
17466
+ return [...map.entries()].map(([Key, Value]) => ({
17467
+ Key,
17468
+ Value
17469
+ }));
17470
+ }
17471
+ /**
17472
+ * Compute the (removed-keys, upserted-tags) diff between two CFn `Tags`
17473
+ * snapshots. Pure function — does NOT touch AWS, so the caller can
17474
+ * decide on the basis of the result whether the ARN is actually needed
17475
+ * (no diff = no ARN required).
17476
+ */
17477
+ computeTagDiff(previousTags, newTags) {
17478
+ const prev = this.tagsArrayToMap(previousTags);
17479
+ const next = this.tagsArrayToMap(newTags);
17480
+ const removed = [...prev.keys()].filter((k) => !next.has(k));
17481
+ const upserts = [];
17482
+ for (const [k, v] of next.entries()) if (prev.get(k) !== v) upserts.push({
17483
+ Key: k,
17484
+ Value: v
17485
+ });
17486
+ return {
17487
+ removed,
17488
+ upserts
17489
+ };
17490
+ }
17491
+ /**
17492
+ * Apply a tag diff to a distribution, best-effort.
17493
+ *
17494
+ * CloudFront has no atomic overlay API for tags — `TagResource` adds /
17495
+ * overwrites and `UntagResource` removes. Run the removal first, then
17496
+ * the upsert, so a same-key value rewrite (which lands in `upserts`)
17497
+ * is not accidentally cleared by a stale Untag.
17498
+ *
17499
+ * Errors are logged but not rethrown — `update()` already succeeded
17500
+ * the `UpdateDistribution` call before this is invoked, so propagating
17501
+ * a tag-side error would flip a successful config update into a deploy
17502
+ * failure that triggers an idempotent retry. A `warn` surfaces the
17503
+ * unapplied delta to the operator without breaking the deploy.
17504
+ *
17505
+ * The ARN is unexpectedly absent only on a hypothetical SDK regression
17506
+ * (`GetDistribution` returns ARN as a required string in every SDK
17507
+ * shape verified so far). When that happens AND a tag delta exists,
17508
+ * log a warn so the silent-drop this PR is closing does not silently
17509
+ * resurface; when no delta exists, return without needing ARN.
17510
+ */
17511
+ async tryApplyTagDiff(arn, previousTags, newTags, physicalId) {
17512
+ const { removed, upserts } = this.computeTagDiff(previousTags, newTags);
17513
+ if (removed.length === 0 && upserts.length === 0) return;
17514
+ if (!arn) {
17515
+ this.logger.warn(`CloudFront Distribution ${physicalId}: GetDistribution returned no ARN; skipping tag diff (removed=${removed.length}, upserts=${upserts.length}). Tags on AWS may drift from the template.`);
17516
+ return;
17517
+ }
17518
+ try {
17519
+ if (removed.length > 0) {
17520
+ this.logger.debug(`Untagging CloudFront Distribution ${arn}: ${removed.join(", ")}`);
17521
+ await this.cloudFrontClient.send(new UntagResourceCommand$6({
17522
+ Resource: arn,
17523
+ TagKeys: { Items: removed }
17524
+ }));
17525
+ }
17526
+ if (upserts.length > 0) {
17527
+ this.logger.debug(`Tagging CloudFront Distribution ${arn}: ${upserts.map((t) => t.Key).join(", ")}`);
17528
+ await this.cloudFrontClient.send(new TagResourceCommand$6({
17529
+ Resource: arn,
17530
+ Tags: { Items: upserts }
17531
+ }));
17532
+ }
17533
+ } catch (err) {
17534
+ this.logger.warn(`CloudFront Distribution ${physicalId}: tag diff failed (removed=${removed.length}, upserts=${upserts.length}): ${err instanceof Error ? err.message : String(err)}. UpdateDistribution itself succeeded; tags on AWS may drift from the template until the next deploy.`);
17535
+ }
17536
+ }
17537
+ /**
17538
+ * Convert a CFn `Tags: [{ Key, Value }]` array to a plain map. Entries
17539
+ * missing a `Key` are dropped; a missing `Value` becomes `''` so the
17540
+ * diff treats `{ Key: 'k' }` and `{ Key: 'k', Value: '' }` the same.
17541
+ */
17542
+ tagsArrayToMap(value) {
17543
+ const map = /* @__PURE__ */ new Map();
17544
+ if (!Array.isArray(value)) return map;
17545
+ for (const entry of value) {
17546
+ const key = entry["Key"];
17547
+ if (typeof key !== "string") continue;
17548
+ const val = entry["Value"];
17549
+ map.set(key, typeof val === "string" ? val : "");
17550
+ }
17551
+ return map;
17552
+ }
17553
+ /**
17414
17554
  * Adopt an existing CloudFront distribution into cdkd state.
17415
17555
  *
17416
17556
  * CloudFront distributions don't carry a template-supplied name
@@ -17974,14 +18114,14 @@ var StepFunctionsProvider = class {
17974
18114
  const tagsToRemove = [];
17975
18115
  for (const k of oldMap.keys()) if (!newMap.has(k)) tagsToRemove.push(k);
17976
18116
  if (tagsToRemove.length > 0) {
17977
- await this.getClient().send(new UntagResourceCommand$9({
18117
+ await this.getClient().send(new UntagResourceCommand$10({
17978
18118
  resourceArn: stateMachineArn,
17979
18119
  tagKeys: tagsToRemove
17980
18120
  }));
17981
18121
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from SFN state machine ${stateMachineArn}`);
17982
18122
  }
17983
18123
  if (tagsToAdd.length > 0) {
17984
- await this.getClient().send(new TagResourceCommand$10({
18124
+ await this.getClient().send(new TagResourceCommand$11({
17985
18125
  resourceArn: stateMachineArn,
17986
18126
  tags: tagsToAdd
17987
18127
  }));
@@ -18489,14 +18629,14 @@ var ECSProvider = class {
18489
18629
  const tagsToRemove = [];
18490
18630
  for (const k of oldMap.keys()) if (!newMap.has(k)) tagsToRemove.push(k);
18491
18631
  if (tagsToRemove.length > 0) {
18492
- await this.getClient().send(new UntagResourceCommand$10({
18632
+ await this.getClient().send(new UntagResourceCommand$11({
18493
18633
  resourceArn,
18494
18634
  tagKeys: tagsToRemove
18495
18635
  }));
18496
18636
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from ECS resource ${resourceArn}`);
18497
18637
  }
18498
18638
  if (tagsToAdd.length > 0) {
18499
- await this.getClient().send(new TagResourceCommand$11({
18639
+ await this.getClient().send(new TagResourceCommand$12({
18500
18640
  resourceArn,
18501
18641
  tags: tagsToAdd
18502
18642
  }));
@@ -23632,14 +23772,14 @@ var WAFv2WebACLProvider = class {
23632
23772
  const tagsToRemove = [];
23633
23773
  for (const k of oldMap.keys()) if (!newMap.has(k)) tagsToRemove.push(k);
23634
23774
  if (tagsToRemove.length > 0) {
23635
- await this.getClient().send(new UntagResourceCommand$11({
23775
+ await this.getClient().send(new UntagResourceCommand$12({
23636
23776
  ResourceARN: arn,
23637
23777
  TagKeys: tagsToRemove
23638
23778
  }));
23639
23779
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from WAFv2 WebACL ${arn}`);
23640
23780
  }
23641
23781
  if (tagsToAdd.length > 0) {
23642
- await this.getClient().send(new TagResourceCommand$12({
23782
+ await this.getClient().send(new TagResourceCommand$13({
23643
23783
  ResourceARN: arn,
23644
23784
  Tags: tagsToAdd
23645
23785
  }));
@@ -25459,7 +25599,7 @@ var AppSyncProvider = class {
25459
25599
  const tagsToAdd = {};
25460
25600
  for (const [k, v] of Object.entries(newMap)) if (oldMap[k] !== v) tagsToAdd[k] = v;
25461
25601
  if (tagKeysToRemove.length > 0) try {
25462
- await this.getClient().send(new UntagResourceCommand$12({
25602
+ await this.getClient().send(new UntagResourceCommand$13({
25463
25603
  resourceArn: arn,
25464
25604
  tagKeys: tagKeysToRemove
25465
25605
  }));
@@ -25467,7 +25607,7 @@ var AppSyncProvider = class {
25467
25607
  throw this.wrapUpdateError(error, resourceType, logicalId, apiId, "GraphqlApi (untag)");
25468
25608
  }
25469
25609
  if (Object.keys(tagsToAdd).length > 0) try {
25470
- await this.getClient().send(new TagResourceCommand$13({
25610
+ await this.getClient().send(new TagResourceCommand$14({
25471
25611
  resourceArn: arn,
25472
25612
  tags: tagsToAdd
25473
25613
  }));
@@ -27921,14 +28061,14 @@ var KMSProvider = class {
27921
28061
  const tagsToRemove = [];
27922
28062
  for (const k of oldMap.keys()) if (!newMap.has(k)) tagsToRemove.push(k);
27923
28063
  if (tagsToRemove.length > 0) {
27924
- await this.getClient().send(new UntagResourceCommand$8({
28064
+ await this.getClient().send(new UntagResourceCommand$9({
27925
28065
  KeyId: keyId,
27926
28066
  TagKeys: tagsToRemove
27927
28067
  }));
27928
28068
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from KMS Key ${keyId}`);
27929
28069
  }
27930
28070
  if (tagsToAdd.length > 0) {
27931
- await this.getClient().send(new TagResourceCommand$8({
28071
+ await this.getClient().send(new TagResourceCommand$9({
27932
28072
  KeyId: keyId,
27933
28073
  Tags: tagsToAdd
27934
28074
  }));
@@ -28710,14 +28850,14 @@ var KinesisStreamConsumerProvider = class {
28710
28850
  const tagsToRemove = [];
28711
28851
  for (const k of Object.keys(oldMap)) if (!(k in newMap)) tagsToRemove.push(k);
28712
28852
  if (tagsToRemove.length > 0) {
28713
- await this.getClient().send(new UntagResourceCommand$13({
28853
+ await this.getClient().send(new UntagResourceCommand$14({
28714
28854
  ResourceARN: consumerArn,
28715
28855
  TagKeys: tagsToRemove
28716
28856
  }));
28717
28857
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from Kinesis stream consumer ${consumerArn}`);
28718
28858
  }
28719
28859
  if (Object.keys(tagsToAdd).length > 0) {
28720
- await this.getClient().send(new TagResourceCommand$14({
28860
+ await this.getClient().send(new TagResourceCommand$15({
28721
28861
  ResourceARN: consumerArn,
28722
28862
  Tags: tagsToAdd
28723
28863
  }));
@@ -32384,7 +32524,7 @@ var ECRProvider = class {
32384
32524
  if (JSON.stringify(newTags) !== JSON.stringify(oldTags)) {
32385
32525
  const repoArn = (await this.getClient().send(new DescribeRepositoriesCommand({ repositoryNames: [physicalId] }))).repositories?.[0]?.repositoryArn;
32386
32526
  if (repoArn && newTags) {
32387
- await this.getClient().send(new TagResourceCommand$9({
32527
+ await this.getClient().send(new TagResourceCommand$10({
32388
32528
  resourceArn: repoArn,
32389
32529
  tags: newTags
32390
32530
  }));
@@ -51716,7 +51856,7 @@ function reorderArgs(argv) {
51716
51856
  */
51717
51857
  async function main() {
51718
51858
  const program = new Command();
51719
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.197.0");
51859
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.199.0");
51720
51860
  program.addCommand(createBootstrapCommand());
51721
51861
  program.addCommand(createSynthCommand());
51722
51862
  program.addCommand(createListCommand());