@go-to-k/cdkd 0.241.0 → 0.242.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
@@ -2,7 +2,7 @@
2
2
  import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, f as withSkipPrefix, i as runStackBuffered, n as getLogger, o as PATTERN_B_NAME_OPTIONS, p as withStackName, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-BzO-joNR.js";
3
3
  import { A as withErrorHandling, C as StackHasActiveImportsError, S as ResourceUpdateNotSupportedError, _ 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-q-WGWgxa.js";
4
4
  import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-B15NAPbL.js";
5
- import { $ as getDockerCmd, A as DiffCalculator, B as buildAssetRedirectMap, C as findActionableSilentDrops, Ct as resolveBucketRegion, D as refStateLookupFromResource, E as cfnRefValueFromPhysicalId, F as rebuildClientForBucketRegion, G as BOOTSTRAP_MARKER_PREFIX, H as loadPublishableAssetManifest, I as shouldRetainResource, J as parseBootstrapMarker, K as ensureAssetStorage, L as AssetPublisher, M as TemplateParser, N as LockManager, O as WAFv2WebACLProvider, P as S3StateBackend, Q as formatDockerLoginError, R as stringifyValue, S as ProviderRegistry, T as IntrinsicFunctionResolver, U as rewriteTemplateAssetReferences, V as createAssetRedirectResolver, W as AssetModeResolver, X as validateContainerRepoName, Y as validateAssetBucketName, Z as buildDockerImage, _ as green, _t as CFN_TEMPLATE_URL_LIMIT, a as withRetry, at as synthesisStatusMessage, b as IAMRoleProvider, bt as uploadCfnTemplate, c as computeImplicitDeleteEdges, ct as resolveApp, d as isStatefulRecreateTargetSync, dt as resolveSkipPrefix, et as runDockerForeground, f as renderStatefulReason, ft as resolveStateBucketWithDefault, g as gray, gt as CFN_TEMPLATE_BODY_LIMIT, h as cyan, ht as warnDeprecatedNoPrefixCliFlag, i as withResourceDeadline, it as Synthesizer, j as DagBuilder, k as applyRoleArnIfSet, l as extractDeploymentEventError, lt as resolveAutoAssetStorage, m as bold, mt as resolveUseCdkBootstrapAssets, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as AssetManifestLoader, o as isRetryableTransientError, ot as getDefaultStateBucketName, p as formatResourceLine, pt as resolveStateBucketWithDefaultAndSource, q as getBootstrapMarkerKey, r as DeployEngine, rt as getDockerImageBySourceHash, s as IMPLICIT_DELETE_DEPENDENCIES, st as getLegacyStateBucketName, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as runDockerStreaming, u as MULTI_REGION_RECREATE_BLOCKED_TYPES, ut as resolveCaptureObservedState, v as red, vt as MIGRATE_TMP_PREFIX, w as CloudControlProvider, x as collectInlinePolicyNamesManagedBySiblings, xt as AssemblyReader, y as yellow, yt as findLargeInlineResources, z as WorkGraph } from "./deploy-engine-BxXIBZoc.js";
5
+ import { $ as getDockerCmd, A as DiffCalculator, B as buildAssetRedirectMap, C as findActionableSilentDrops, Ct as resolveBucketRegion, D as refStateLookupFromResource, E as cfnRefValueFromPhysicalId, F as rebuildClientForBucketRegion, G as BOOTSTRAP_MARKER_PREFIX, H as loadPublishableAssetManifest, I as shouldRetainResource, J as parseBootstrapMarker, K as ensureAssetStorage, L as AssetPublisher, M as TemplateParser, N as LockManager, O as WAFv2WebACLProvider, P as S3StateBackend, Q as formatDockerLoginError, R as stringifyValue, S as ProviderRegistry, T as IntrinsicFunctionResolver, U as rewriteTemplateAssetReferences, V as createAssetRedirectResolver, W as AssetModeResolver, X as validateContainerRepoName, Y as validateAssetBucketName, Z as buildDockerImage, _ as green, _t as CFN_TEMPLATE_URL_LIMIT, a as withRetry, at as synthesisStatusMessage, b as IAMRoleProvider, bt as uploadCfnTemplate, c as computeImplicitDeleteEdges, ct as resolveApp, d as isStatefulRecreateTargetSync, dt as resolveSkipPrefix, et as runDockerForeground, f as renderStatefulReason, ft as resolveStateBucketWithDefault, g as gray, gt as CFN_TEMPLATE_BODY_LIMIT, h as cyan, ht as warnDeprecatedNoPrefixCliFlag, i as withResourceDeadline, it as Synthesizer, j as DagBuilder, k as applyRoleArnIfSet, l as extractDeploymentEventError, lt as resolveAutoAssetStorage, m as bold, mt as resolveUseCdkBootstrapAssets, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as AssetManifestLoader, o as isRetryableTransientError, ot as getDefaultStateBucketName, p as formatResourceLine, pt as resolveStateBucketWithDefaultAndSource, q as getBootstrapMarkerKey, r as DeployEngine, rt as getDockerImageBySourceHash, s as IMPLICIT_DELETE_DEPENDENCIES, st as getLegacyStateBucketName, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as runDockerStreaming, u as MULTI_REGION_RECREATE_BLOCKED_TYPES, ut as resolveCaptureObservedState, v as red, vt as MIGRATE_TMP_PREFIX, w as CloudControlProvider, x as collectInlinePolicyNamesManagedBySiblings, xt as AssemblyReader, y as yellow, yt as findLargeInlineResources, z as WorkGraph } from "./deploy-engine-7FfFEJkw.js";
6
6
  import { t as expectedOwnerParam } from "./expected-bucket-owner-BjEfUnkA.js";
7
7
  import { t as ASGProvider } from "./asg-provider-Dbl1_mwT.js";
8
8
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -51,21 +51,21 @@ import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, Delet
51
51
  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";
52
52
  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";
53
53
  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";
54
- 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";
55
- 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$13, UpdateApiKeyCommand, UpdateDataSourceCommand, UpdateGraphqlApiCommand, UpdateResolverCommand } from "@aws-sdk/client-appsync";
54
+ import { CreateHttpNamespaceCommand, CreatePrivateDnsNamespaceCommand, CreatePublicDnsNamespaceCommand, 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, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$13, UpdateHttpNamespaceCommand, UpdatePrivateDnsNamespaceCommand, UpdatePublicDnsNamespaceCommand, UpdateServiceAttributesCommand, UpdateServiceCommand as UpdateServiceCommand$1 } from "@aws-sdk/client-servicediscovery";
55
+ 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$14, UpdateApiKeyCommand, UpdateDataSourceCommand, UpdateGraphqlApiCommand, UpdateResolverCommand } from "@aws-sdk/client-appsync";
56
56
  import { parse, print } from "graphql";
57
57
  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";
58
- import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DescribeBudgetsCommand, DuplicateRecordException, ListTagsForResourceCommand as ListTagsForResourceCommand$16, NotFoundException as NotFoundException$5, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$14, UpdateBudgetCommand } from "@aws-sdk/client-budgets";
59
- 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$15, UpdateShardCountCommand, UpdateStreamModeCommand } from "@aws-sdk/client-kinesis";
58
+ import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DescribeBudgetsCommand, DuplicateRecordException, ListTagsForResourceCommand as ListTagsForResourceCommand$16, NotFoundException as NotFoundException$5, TagResourceCommand as TagResourceCommand$15, UntagResourceCommand as UntagResourceCommand$15, UpdateBudgetCommand } from "@aws-sdk/client-budgets";
59
+ 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$16, UntagResourceCommand as UntagResourceCommand$16, UpdateShardCountCommand, UpdateStreamModeCommand } from "@aws-sdk/client-kinesis";
60
60
  import { CreateScheduleCommand, DeleteScheduleCommand, GetScheduleCommand, ResourceNotFoundException as ResourceNotFoundException$9, SchedulerClient, UpdateScheduleCommand } from "@aws-sdk/client-scheduler";
61
61
  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";
62
62
  import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliveryStreamCommand, FirehoseClient, ListDeliveryStreamsCommand, ListTagsForDeliveryStreamCommand, ResourceNotFoundException as ResourceNotFoundException$10, TagDeliveryStreamCommand, UntagDeliveryStreamCommand, UpdateDestinationCommand } from "@aws-sdk/client-firehose";
63
63
  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";
64
64
  import { BatchGetProjectsCommand, CodeBuildClient, CreateProjectCommand, DeleteProjectCommand, ListProjectsCommand, ResourceNotFoundException as ResourceNotFoundException$11, UpdateProjectCommand } from "@aws-sdk/client-codebuild";
65
- import { CodeCommitClient, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand, ListRepositoriesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$18, RepositoryDoesNotExistException, TagResourceCommand as TagResourceCommand$16, UntagResourceCommand as UntagResourceCommand$16, UpdateRepositoryDescriptionCommand, UpdateRepositoryEncryptionKeyCommand, UpdateRepositoryNameCommand } from "@aws-sdk/client-codecommit";
66
- import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand as DeleteLifecyclePolicyCommand$1, GetLifecyclePoliciesCommand, GetLifecyclePolicyCommand as GetLifecyclePolicyCommand$1, ResourceNotFoundException as ResourceNotFoundException$12, TagResourceCommand as TagResourceCommand$17, UntagResourceCommand as UntagResourceCommand$17, UpdateLifecyclePolicyCommand } from "@aws-sdk/client-dlm";
67
- import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$19, ListVectorBucketsCommand, S3VectorsClient, TagResourceCommand as TagResourceCommand$18, UntagResourceCommand as UntagResourceCommand$18 } from "@aws-sdk/client-s3vectors";
68
- 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$20, NotFoundException as NotFoundException$6, S3TablesClient, TagResourceCommand as TagResourceCommand$19, UntagResourceCommand as UntagResourceCommand$19 } from "@aws-sdk/client-s3tables";
65
+ import { CodeCommitClient, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand, ListRepositoriesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$18, RepositoryDoesNotExistException, TagResourceCommand as TagResourceCommand$17, UntagResourceCommand as UntagResourceCommand$17, UpdateRepositoryDescriptionCommand, UpdateRepositoryEncryptionKeyCommand, UpdateRepositoryNameCommand } from "@aws-sdk/client-codecommit";
66
+ import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand as DeleteLifecyclePolicyCommand$1, GetLifecyclePoliciesCommand, GetLifecyclePolicyCommand as GetLifecyclePolicyCommand$1, ResourceNotFoundException as ResourceNotFoundException$12, TagResourceCommand as TagResourceCommand$18, UntagResourceCommand as UntagResourceCommand$18, UpdateLifecyclePolicyCommand } from "@aws-sdk/client-dlm";
67
+ import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$19, ListVectorBucketsCommand, S3VectorsClient, TagResourceCommand as TagResourceCommand$19, UntagResourceCommand as UntagResourceCommand$19 } from "@aws-sdk/client-s3vectors";
68
+ 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$20, NotFoundException as NotFoundException$6, S3TablesClient, TagResourceCommand as TagResourceCommand$20, UntagResourceCommand as UntagResourceCommand$20 } from "@aws-sdk/client-s3tables";
69
69
  import { Document, Pair, Scalar, YAMLMap, YAMLSeq, parse as parse$1, stringify } from "yaml";
70
70
  import { createLocalStartAgentCoreCommand, createLocalStartCloudFrontCommand, createLocalStateProvider, getEmbedConfig, isCfnFlagPresent, listTargets, rejectExplicitCfnStackWithMultipleStacks, resolveCfnFallbackRegion, setEmbedConfig, substituteAgainstState, substituteAgainstStateAsync, substituteEnvVarsFromState, substituteEnvVarsFromStateAsync } from "cdk-local";
71
71
  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";
@@ -1888,7 +1888,7 @@ const FLUSH_INTERVAL_MS = 2e3;
1888
1888
  const FLUSH_EVENT_THRESHOLD = 50;
1889
1889
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
1890
1890
  function getCdkdVersion() {
1891
- return "0.241.0";
1891
+ return "0.242.0";
1892
1892
  }
1893
1893
  /**
1894
1894
  * Generate a time-sortable unique run id, e.g.
@@ -27885,34 +27885,53 @@ var ElastiCacheProvider = class {
27885
27885
  *
27886
27886
  * Implements resource provisioning for:
27887
27887
  * - AWS::ServiceDiscovery::PrivateDnsNamespace
27888
+ * - AWS::ServiceDiscovery::HttpNamespace
27889
+ * - AWS::ServiceDiscovery::PublicDnsNamespace
27888
27890
  * - AWS::ServiceDiscovery::Service
27889
27891
  *
27890
- * WHY: CreatePrivateDnsNamespace is async (returns OperationId) but we handle
27891
- * the polling ourselves, avoiding the CC API's generic polling overhead and
27892
- * giving us direct control over the operation lifecycle.
27892
+ * WHY: the Create*Namespace APIs are async (they return an OperationId) but we
27893
+ * handle the polling ourselves, avoiding the CC API's generic polling overhead
27894
+ * and giving us direct control over the operation lifecycle. HttpNamespace and
27895
+ * PublicDnsNamespace are `ProvisioningType: NON_PROVISIONABLE`, so Cloud
27896
+ * Control cannot handle them at all — this SDK provider is the only route
27897
+ * (issue #1044).
27893
27898
  */
27894
- var ServiceDiscoveryProvider = class {
27899
+ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
27895
27900
  client;
27896
27901
  stsClient;
27897
27902
  providerRegion = process.env["AWS_REGION"];
27898
27903
  logger = getLogger().child("ServiceDiscoveryProvider");
27899
- handledProperties = new Map([["AWS::ServiceDiscovery::PrivateDnsNamespace", new Set([
27900
- "Name",
27901
- "Vpc",
27902
- "Description",
27903
- "Tags",
27904
- "Properties"
27905
- ])], ["AWS::ServiceDiscovery::Service", new Set([
27906
- "Name",
27907
- "NamespaceId",
27908
- "DnsConfig",
27909
- "HealthCheckCustomConfig",
27910
- "Description",
27911
- "HealthCheckConfig",
27912
- "Tags",
27913
- "Type",
27914
- "ServiceAttributes"
27915
- ])]]);
27904
+ handledProperties = new Map([
27905
+ ["AWS::ServiceDiscovery::PrivateDnsNamespace", new Set([
27906
+ "Name",
27907
+ "Vpc",
27908
+ "Description",
27909
+ "Tags",
27910
+ "Properties"
27911
+ ])],
27912
+ ["AWS::ServiceDiscovery::HttpNamespace", new Set([
27913
+ "Name",
27914
+ "Description",
27915
+ "Tags"
27916
+ ])],
27917
+ ["AWS::ServiceDiscovery::PublicDnsNamespace", new Set([
27918
+ "Name",
27919
+ "Description",
27920
+ "Tags",
27921
+ "Properties"
27922
+ ])],
27923
+ ["AWS::ServiceDiscovery::Service", new Set([
27924
+ "Name",
27925
+ "NamespaceId",
27926
+ "DnsConfig",
27927
+ "HealthCheckCustomConfig",
27928
+ "Description",
27929
+ "HealthCheckConfig",
27930
+ "Tags",
27931
+ "Type",
27932
+ "ServiceAttributes"
27933
+ ])]
27934
+ ]);
27916
27935
  getClient() {
27917
27936
  if (!this.client) this.client = new ServiceDiscoveryClient(this.providerRegion ? { region: this.providerRegion } : {});
27918
27937
  return this.client;
@@ -27924,20 +27943,26 @@ var ServiceDiscoveryProvider = class {
27924
27943
  async create(logicalId, resourceType, properties) {
27925
27944
  switch (resourceType) {
27926
27945
  case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.createNamespace(logicalId, resourceType, properties);
27946
+ case "AWS::ServiceDiscovery::HttpNamespace": return this.createHttpNamespace(logicalId, resourceType, properties);
27947
+ case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.createPublicDnsNamespace(logicalId, resourceType, properties);
27927
27948
  case "AWS::ServiceDiscovery::Service": return this.createService(logicalId, resourceType, properties);
27928
27949
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId);
27929
27950
  }
27930
27951
  }
27931
27952
  update(logicalId, physicalId, resourceType, properties, previousProperties) {
27932
27953
  switch (resourceType) {
27933
- case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.updateNamespace(logicalId, physicalId, resourceType, properties);
27954
+ case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.updateNamespace(logicalId, physicalId, resourceType, properties, previousProperties);
27955
+ case "AWS::ServiceDiscovery::HttpNamespace": return this.updateHttpNamespace(logicalId, physicalId, resourceType, properties, previousProperties);
27956
+ case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.updatePublicDnsNamespace(logicalId, physicalId, resourceType, properties, previousProperties);
27934
27957
  case "AWS::ServiceDiscovery::Service": return this.updateService(logicalId, physicalId, resourceType, properties, previousProperties);
27935
27958
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
27936
27959
  }
27937
27960
  }
27938
27961
  async delete(logicalId, physicalId, resourceType, _properties, context) {
27939
27962
  switch (resourceType) {
27940
- case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.deleteNamespace(logicalId, physicalId, resourceType, context);
27963
+ case "AWS::ServiceDiscovery::PrivateDnsNamespace":
27964
+ case "AWS::ServiceDiscovery::HttpNamespace":
27965
+ case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.deleteNamespace(logicalId, physicalId, resourceType, context);
27941
27966
  case "AWS::ServiceDiscovery::Service": return this.deleteService(logicalId, physicalId, resourceType, context);
27942
27967
  default: throw new ProvisioningError(`Unsupported resource type: ${resourceType}`, resourceType, logicalId, physicalId);
27943
27968
  }
@@ -27951,8 +27976,7 @@ var ServiceDiscoveryProvider = class {
27951
27976
  const tags = properties["Tags"];
27952
27977
  if (!name) throw new ProvisioningError(`Name is required for PrivateDnsNamespace ${logicalId}`, resourceType, logicalId);
27953
27978
  if (!vpc) throw new ProvisioningError(`Vpc is required for PrivateDnsNamespace ${logicalId}`, resourceType, logicalId);
27954
- const soa = (properties["Properties"]?.["DnsProperties"])?.["SOA"];
27955
- const inputProperties = soa?.TTL !== void 0 ? { DnsProperties: { SOA: { TTL: Number(soa.TTL) } } } : void 0;
27979
+ const inputProperties = this.extractSoaTtlProperties(properties);
27956
27980
  try {
27957
27981
  const operationId = (await client.send(new CreatePrivateDnsNamespaceCommand({
27958
27982
  Name: name,
@@ -27988,30 +28012,29 @@ var ServiceDiscoveryProvider = class {
27988
28012
  * `Name` and `Vpc` are immutable; the deploy engine's
27989
28013
  * replacement-detection layer routes those through DELETE+CREATE
27990
28014
  * before this method is ever called, so we do not validate them here.
28015
+ * Tags ride on the separate `TagResource` / `UntagResource` APIs
28016
+ * (see {@link syncNamespaceTags} — wired in with issue #1044 so a
28017
+ * Tags-only change is no longer silently dropped, the ECR #981 class).
27991
28018
  *
27992
28019
  * Empty-string Description is intentionally allowed through (`!== undefined`
27993
28020
  * gate, not truthy) so `cdkd drift --revert` can clear a console-side ADD.
27994
28021
  */
27995
- async updateNamespace(logicalId, physicalId, resourceType, properties) {
28022
+ async updateNamespace(logicalId, physicalId, resourceType, properties, previousProperties) {
27996
28023
  this.logger.debug(`Updating private DNS namespace ${logicalId}: ${physicalId}`);
27997
28024
  const client = this.getClient();
27998
28025
  const namespaceChange = {};
27999
28026
  if (properties["Description"] !== void 0) namespaceChange.Description = properties["Description"];
28000
- const soa = (properties["Properties"]?.["DnsProperties"])?.["SOA"];
28001
- if (soa?.TTL !== void 0) namespaceChange.Properties = { DnsProperties: { SOA: { TTL: Number(soa.TTL) } } };
28002
- if (Object.keys(namespaceChange).length === 0) {
28003
- this.logger.debug(`No mutable diff for PrivateDnsNamespace ${logicalId}, skipping update`);
28004
- return {
28005
- physicalId,
28006
- wasReplaced: false
28007
- };
28008
- }
28027
+ const soaProperties = this.extractSoaTtlProperties(properties);
28028
+ if (soaProperties) namespaceChange.Properties = soaProperties;
28009
28029
  try {
28010
- const operationId = (await client.send(new UpdatePrivateDnsNamespaceCommand({
28011
- Id: physicalId,
28012
- Namespace: namespaceChange
28013
- }))).OperationId;
28014
- if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
28030
+ if (Object.keys(namespaceChange).length > 0) {
28031
+ const operationId = (await client.send(new UpdatePrivateDnsNamespaceCommand({
28032
+ Id: physicalId,
28033
+ Namespace: namespaceChange
28034
+ }))).OperationId;
28035
+ if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
28036
+ } else this.logger.debug(`No mutable namespace-body diff for PrivateDnsNamespace ${logicalId}`);
28037
+ await this.syncNamespaceTags(logicalId, physicalId, properties, previousProperties);
28015
28038
  this.logger.debug(`Successfully updated private DNS namespace ${logicalId}`);
28016
28039
  return {
28017
28040
  physicalId,
@@ -28023,21 +28046,172 @@ var ServiceDiscoveryProvider = class {
28023
28046
  throw new ProvisioningError(`Failed to update private DNS namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
28024
28047
  }
28025
28048
  }
28049
+ /**
28050
+ * Delete a Cloud Map namespace (shared by PrivateDnsNamespace,
28051
+ * HttpNamespace, and PublicDnsNamespace — `DeleteNamespace` is
28052
+ * kind-agnostic and operation-based for all three).
28053
+ */
28026
28054
  async deleteNamespace(logicalId, physicalId, resourceType, context) {
28027
- this.logger.debug(`Deleting private DNS namespace ${logicalId}: ${physicalId}`);
28055
+ this.logger.debug(`Deleting Cloud Map namespace ${logicalId}: ${physicalId}`);
28028
28056
  const client = this.getClient();
28029
28057
  try {
28030
28058
  const operationId = (await client.send(new DeleteNamespaceCommand({ Id: physicalId }))).OperationId;
28031
28059
  if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
28032
- this.logger.debug(`Successfully deleted private DNS namespace ${logicalId}`);
28060
+ this.logger.debug(`Successfully deleted Cloud Map namespace ${logicalId}`);
28033
28061
  } catch (error) {
28034
28062
  if (error instanceof NamespaceNotFound) {
28035
28063
  assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
28036
28064
  this.logger.debug(`Namespace ${physicalId} does not exist, skipping deletion`);
28037
28065
  return;
28038
28066
  }
28067
+ if (error instanceof ProvisioningError) throw error;
28068
+ const cause = error instanceof Error ? error : void 0;
28069
+ throw new ProvisioningError(`Failed to delete Cloud Map namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
28070
+ }
28071
+ }
28072
+ async createHttpNamespace(logicalId, resourceType, properties) {
28073
+ this.logger.debug(`Creating HTTP namespace ${logicalId}`);
28074
+ const client = this.getClient();
28075
+ const name = properties["Name"];
28076
+ const description = properties["Description"];
28077
+ const tags = properties["Tags"];
28078
+ if (!name) throw new ProvisioningError(`Name is required for HttpNamespace ${logicalId}`, resourceType, logicalId);
28079
+ try {
28080
+ const operationId = (await client.send(new CreateHttpNamespaceCommand({
28081
+ Name: name,
28082
+ ...description && { Description: description },
28083
+ ...tags && tags.length > 0 && { Tags: tags }
28084
+ }))).OperationId;
28085
+ if (!operationId) throw new Error("CreateHttpNamespace did not return OperationId");
28086
+ const namespaceId = await this.pollOperation(operationId, logicalId, resourceType);
28087
+ const arn = await this.resolveNamespaceArn(namespaceId);
28088
+ this.logger.debug(`Successfully created HTTP namespace ${logicalId}: ${namespaceId}`);
28089
+ return {
28090
+ physicalId: namespaceId,
28091
+ attributes: {
28092
+ Id: namespaceId,
28093
+ Arn: arn
28094
+ }
28095
+ };
28096
+ } catch (error) {
28097
+ if (error instanceof ProvisioningError) throw error;
28098
+ const cause = error instanceof Error ? error : void 0;
28099
+ throw new ProvisioningError(`Failed to create HTTP namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
28100
+ }
28101
+ }
28102
+ /**
28103
+ * Update an HTTP namespace.
28104
+ *
28105
+ * `UpdateHttpNamespace` exposes exactly one mutable field: `Description`
28106
+ * (the SDK's `HttpNamespaceChange` shape). `Name` is createOnly — the
28107
+ * replacement-detection layer routes a Name change through DELETE+CREATE
28108
+ * before this method is ever called. Tags ride on the separate
28109
+ * `TagResource` / `UntagResource` APIs (see {@link syncNamespaceTags}).
28110
+ *
28111
+ * Empty-string Description is intentionally allowed through
28112
+ * (`!== undefined` gate, not truthy) so `cdkd drift --revert` can clear a
28113
+ * console-side ADD.
28114
+ */
28115
+ async updateHttpNamespace(logicalId, physicalId, resourceType, properties, previousProperties) {
28116
+ this.logger.debug(`Updating HTTP namespace ${logicalId}: ${physicalId}`);
28117
+ const client = this.getClient();
28118
+ try {
28119
+ if (properties["Description"] !== void 0) {
28120
+ const namespaceChange = { Description: properties["Description"] };
28121
+ const operationId = (await client.send(new UpdateHttpNamespaceCommand({
28122
+ Id: physicalId,
28123
+ Namespace: namespaceChange
28124
+ }))).OperationId;
28125
+ if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
28126
+ }
28127
+ await this.syncNamespaceTags(logicalId, physicalId, properties, previousProperties);
28128
+ this.logger.debug(`Successfully updated HTTP namespace ${logicalId}`);
28129
+ return {
28130
+ physicalId,
28131
+ wasReplaced: false
28132
+ };
28133
+ } catch (error) {
28134
+ if (error instanceof ProvisioningError) throw error;
28039
28135
  const cause = error instanceof Error ? error : void 0;
28040
- throw new ProvisioningError(`Failed to delete private DNS namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
28136
+ throw new ProvisioningError(`Failed to update HTTP namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
28137
+ }
28138
+ }
28139
+ async createPublicDnsNamespace(logicalId, resourceType, properties) {
28140
+ this.logger.debug(`Creating public DNS namespace ${logicalId}`);
28141
+ const client = this.getClient();
28142
+ const name = properties["Name"];
28143
+ const description = properties["Description"];
28144
+ const tags = properties["Tags"];
28145
+ if (!name) throw new ProvisioningError(`Name is required for PublicDnsNamespace ${logicalId}`, resourceType, logicalId);
28146
+ const inputProperties = this.extractSoaTtlProperties(properties);
28147
+ try {
28148
+ const operationId = (await client.send(new CreatePublicDnsNamespaceCommand({
28149
+ Name: name,
28150
+ ...description && { Description: description },
28151
+ ...tags && tags.length > 0 && { Tags: tags },
28152
+ ...inputProperties && { Properties: inputProperties }
28153
+ }))).OperationId;
28154
+ if (!operationId) throw new Error("CreatePublicDnsNamespace did not return OperationId");
28155
+ const namespaceId = await this.pollOperation(operationId, logicalId, resourceType);
28156
+ let arn;
28157
+ let hostedZoneId;
28158
+ try {
28159
+ const nsResp = await client.send(new GetNamespaceCommand({ Id: namespaceId }));
28160
+ arn = nsResp.Namespace?.Arn;
28161
+ hostedZoneId = nsResp.Namespace?.Properties?.DnsProperties?.HostedZoneId;
28162
+ } catch (err) {
28163
+ this.logger.debug(`GetNamespace(${namespaceId}) after create failed: ${err instanceof Error ? err.message : String(err)}`);
28164
+ }
28165
+ if (!arn) arn = await this.buildNamespaceArn(namespaceId);
28166
+ this.logger.debug(`Successfully created public DNS namespace ${logicalId}: ${namespaceId}`);
28167
+ return {
28168
+ physicalId: namespaceId,
28169
+ attributes: {
28170
+ Id: namespaceId,
28171
+ Arn: arn,
28172
+ ...hostedZoneId && { HostedZoneId: hostedZoneId }
28173
+ }
28174
+ };
28175
+ } catch (error) {
28176
+ if (error instanceof ProvisioningError) throw error;
28177
+ const cause = error instanceof Error ? error : void 0;
28178
+ throw new ProvisioningError(`Failed to create public DNS namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
28179
+ }
28180
+ }
28181
+ /**
28182
+ * Update a public DNS namespace.
28183
+ *
28184
+ * `UpdatePublicDnsNamespace` exposes two mutable surfaces (the SDK's
28185
+ * `PublicDnsNamespaceChange` shape): `Description` and
28186
+ * `Properties.DnsProperties.SOA.TTL`. `Name` is createOnly — replacement
28187
+ * is routed through DELETE+CREATE upstream. Tags ride on the separate
28188
+ * `TagResource` / `UntagResource` APIs (see {@link syncNamespaceTags}).
28189
+ */
28190
+ async updatePublicDnsNamespace(logicalId, physicalId, resourceType, properties, previousProperties) {
28191
+ this.logger.debug(`Updating public DNS namespace ${logicalId}: ${physicalId}`);
28192
+ const client = this.getClient();
28193
+ const namespaceChange = {};
28194
+ if (properties["Description"] !== void 0) namespaceChange.Description = properties["Description"];
28195
+ const soaProperties = this.extractSoaTtlProperties(properties);
28196
+ if (soaProperties) namespaceChange.Properties = soaProperties;
28197
+ try {
28198
+ if (Object.keys(namespaceChange).length > 0) {
28199
+ const operationId = (await client.send(new UpdatePublicDnsNamespaceCommand({
28200
+ Id: physicalId,
28201
+ Namespace: namespaceChange
28202
+ }))).OperationId;
28203
+ if (operationId) await this.pollOperation(operationId, logicalId, resourceType);
28204
+ }
28205
+ await this.syncNamespaceTags(logicalId, physicalId, properties, previousProperties);
28206
+ this.logger.debug(`Successfully updated public DNS namespace ${logicalId}`);
28207
+ return {
28208
+ physicalId,
28209
+ wasReplaced: false
28210
+ };
28211
+ } catch (error) {
28212
+ if (error instanceof ProvisioningError) throw error;
28213
+ const cause = error instanceof Error ? error : void 0;
28214
+ throw new ProvisioningError(`Failed to update public DNS namespace ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
28041
28215
  }
28042
28216
  }
28043
28217
  async createService(logicalId, resourceType, properties) {
@@ -28187,6 +28361,59 @@ var ServiceDiscoveryProvider = class {
28187
28361
  }
28188
28362
  }
28189
28363
  /**
28364
+ * Extract the CFn `Properties.DnsProperties.SOA.TTL` nested field (the only
28365
+ * mutable entry in the namespace `Properties` bag, shared by the private
28366
+ * and public DNS namespace kinds) into the SDK's input shape. Returns
28367
+ * `undefined` when the template does not set a TTL.
28368
+ */
28369
+ extractSoaTtlProperties(properties) {
28370
+ const soa = (properties["Properties"]?.["DnsProperties"])?.["SOA"];
28371
+ return soa?.TTL !== void 0 ? { DnsProperties: { SOA: { TTL: Number(soa.TTL) } } } : void 0;
28372
+ }
28373
+ /**
28374
+ * Resolve a namespace's ARN — authoritative via `GetNamespace`, with a
28375
+ * deterministic STS-based construction as fallback so a transient read
28376
+ * failure right after create does not fail the whole resource.
28377
+ */
28378
+ async resolveNamespaceArn(namespaceId) {
28379
+ try {
28380
+ const resp = await this.getClient().send(new GetNamespaceCommand({ Id: namespaceId }));
28381
+ if (resp.Namespace?.Arn) return resp.Namespace.Arn;
28382
+ } catch (err) {
28383
+ this.logger.debug(`GetNamespace(${namespaceId}) failed while resolving ARN: ${err instanceof Error ? err.message : String(err)}`);
28384
+ }
28385
+ return this.buildNamespaceArn(namespaceId);
28386
+ }
28387
+ /**
28388
+ * Diff-and-apply namespace tags via `TagResource` / `UntagResource`.
28389
+ *
28390
+ * `TagResource` is additive-only, so a tag dropped from the template
28391
+ * (partial removal) — or the entire `Tags` property removed (full removal,
28392
+ * `newTags === undefined`) — would survive on AWS unless we explicitly
28393
+ * `UntagResource` the removed keys (the ECR #981 regression class).
28394
+ * Failures THROW (never warn-swallow) so cdkd state is never written
28395
+ * as-if-applied; the next deploy retries naturally.
28396
+ */
28397
+ async syncNamespaceTags(logicalId, physicalId, properties, previousProperties) {
28398
+ const newTags = properties["Tags"];
28399
+ const oldTags = previousProperties["Tags"];
28400
+ if (JSON.stringify(newTags) === JSON.stringify(oldTags)) return;
28401
+ const newKeys = new Set((newTags ?? []).map((t) => t.Key).filter((k) => !!k));
28402
+ const removedKeys = (oldTags ?? []).map((t) => t.Key).filter((k) => !!k && !newKeys.has(k));
28403
+ const hasAdds = !!newTags && newTags.length > 0;
28404
+ if (removedKeys.length === 0 && !hasAdds) return;
28405
+ const arn = await this.resolveNamespaceArn(physicalId);
28406
+ if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$13({
28407
+ ResourceARN: arn,
28408
+ TagKeys: removedKeys
28409
+ }));
28410
+ if (hasAdds) await this.getClient().send(new TagResourceCommand$13({
28411
+ ResourceARN: arn,
28412
+ Tags: newTags
28413
+ }));
28414
+ this.logger.debug(`Updated tags for namespace ${logicalId} (${physicalId})`);
28415
+ }
28416
+ /**
28190
28417
  * Poll a Service Discovery operation until it completes.
28191
28418
  * Returns the target resource ID from the operation result.
28192
28419
  */
@@ -28209,6 +28436,44 @@ var ServiceDiscoveryProvider = class {
28209
28436
  throw new ProvisioningError(`Operation timed out for ${logicalId} (operationId: ${operationId})`, resourceType, logicalId);
28210
28437
  }
28211
28438
  /**
28439
+ * Resolve a `Fn::GetAtt` attribute live from AWS (used by `cdkd orphan`'s
28440
+ * sibling-reference rewriting and other post-deploy attribute reads).
28441
+ *
28442
+ * Namespace kinds resolve `Id` / `Arn` (plus `HostedZoneId` for the DNS
28443
+ * namespace kinds, read from `GetNamespace`'s
28444
+ * `Properties.DnsProperties.HostedZoneId`); Services resolve `Id` / `Arn` /
28445
+ * `Name` via `GetService`. Returns `undefined` for unknown attributes and
28446
+ * for gone resources.
28447
+ */
28448
+ async getAttribute(physicalId, resourceType, attributeName) {
28449
+ switch (resourceType) {
28450
+ case "AWS::ServiceDiscovery::PrivateDnsNamespace":
28451
+ case "AWS::ServiceDiscovery::HttpNamespace":
28452
+ case "AWS::ServiceDiscovery::PublicDnsNamespace":
28453
+ if (attributeName === "Id") return physicalId;
28454
+ if (attributeName !== "Arn" && attributeName !== "HostedZoneId") return void 0;
28455
+ try {
28456
+ const resp = await this.getClient().send(new GetNamespaceCommand({ Id: physicalId }));
28457
+ if (attributeName === "Arn") return resp.Namespace?.Arn;
28458
+ return resp.Namespace?.Properties?.DnsProperties?.HostedZoneId;
28459
+ } catch (err) {
28460
+ if (err instanceof NamespaceNotFound) return void 0;
28461
+ throw err;
28462
+ }
28463
+ case "AWS::ServiceDiscovery::Service":
28464
+ if (attributeName === "Id") return physicalId;
28465
+ if (attributeName !== "Arn" && attributeName !== "Name") return void 0;
28466
+ try {
28467
+ const resp = await this.getClient().send(new GetServiceCommand({ Id: physicalId }));
28468
+ return attributeName === "Arn" ? resp.Service?.Arn : resp.Service?.Name;
28469
+ } catch (err) {
28470
+ if (err instanceof ServiceNotFound) return void 0;
28471
+ throw err;
28472
+ }
28473
+ default: return;
28474
+ }
28475
+ }
28476
+ /**
28212
28477
  * Adopt an existing Cloud Map (Service Discovery) resource into cdkd state.
28213
28478
  *
28214
28479
  * - **AWS::ServiceDiscovery::PrivateDnsNamespace**: tag-based auto-lookup
@@ -28242,7 +28507,9 @@ var ServiceDiscoveryProvider = class {
28242
28507
  */
28243
28508
  async readCurrentState(physicalId, _logicalId, resourceType) {
28244
28509
  switch (resourceType) {
28245
- case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.readNamespace(physicalId);
28510
+ case "AWS::ServiceDiscovery::PrivateDnsNamespace":
28511
+ case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.readNamespace(physicalId, { includeProperties: true });
28512
+ case "AWS::ServiceDiscovery::HttpNamespace": return this.readNamespace(physicalId, { includeProperties: false });
28246
28513
  case "AWS::ServiceDiscovery::Service": return this.readService(physicalId);
28247
28514
  default: return;
28248
28515
  }
@@ -28263,7 +28530,7 @@ var ServiceDiscoveryProvider = class {
28263
28530
  if (resourceType === "AWS::ServiceDiscovery::PrivateDnsNamespace") return ["Vpc"];
28264
28531
  return [];
28265
28532
  }
28266
- async readNamespace(physicalId) {
28533
+ async readNamespace(physicalId, options) {
28267
28534
  let ns;
28268
28535
  try {
28269
28536
  ns = (await this.getClient().send(new GetNamespaceCommand({ Id: physicalId }))).Namespace;
@@ -28275,9 +28542,11 @@ var ServiceDiscoveryProvider = class {
28275
28542
  const result = {};
28276
28543
  if (ns.Name !== void 0) result["Name"] = ns.Name;
28277
28544
  result["Description"] = ns.Description ?? "";
28278
- const soa = ns.Properties?.DnsProperties?.SOA;
28279
- if (soa?.TTL !== void 0) result["Properties"] = { DnsProperties: { SOA: { TTL: soa.TTL } } };
28280
- else result["Properties"] = {};
28545
+ if (options.includeProperties) {
28546
+ const soa = ns.Properties?.DnsProperties?.SOA;
28547
+ if (soa?.TTL !== void 0) result["Properties"] = { DnsProperties: { SOA: { TTL: soa.TTL } } };
28548
+ else result["Properties"] = {};
28549
+ }
28281
28550
  if (ns.Arn) await this.attachTags(result, ns.Arn);
28282
28551
  return result;
28283
28552
  }
@@ -28333,14 +28602,32 @@ var ServiceDiscoveryProvider = class {
28333
28602
  }
28334
28603
  async import(input) {
28335
28604
  switch (input.resourceType) {
28336
- case "AWS::ServiceDiscovery::PrivateDnsNamespace": return this.importNamespaceResource(input);
28605
+ case "AWS::ServiceDiscovery::PrivateDnsNamespace":
28606
+ case "AWS::ServiceDiscovery::HttpNamespace":
28607
+ case "AWS::ServiceDiscovery::PublicDnsNamespace": return this.importNamespaceResource(input);
28337
28608
  case "AWS::ServiceDiscovery::Service": return this.importServiceResource(input);
28338
28609
  default: return null;
28339
28610
  }
28340
28611
  }
28612
+ /**
28613
+ * Map each namespace CFn type to its Cloud Map `Namespace.Type` value so
28614
+ * the import walk never adopts a same-named namespace of a different kind
28615
+ * (Cloud Map names are NOT unique across kinds; adopting the wrong one
28616
+ * would make a later destroy delete the wrong resource).
28617
+ */
28618
+ static NAMESPACE_KIND_BY_TYPE = {
28619
+ "AWS::ServiceDiscovery::PrivateDnsNamespace": "DNS_PRIVATE",
28620
+ "AWS::ServiceDiscovery::HttpNamespace": "HTTP",
28621
+ "AWS::ServiceDiscovery::PublicDnsNamespace": "DNS_PUBLIC"
28622
+ };
28341
28623
  async importNamespaceResource(input) {
28624
+ const expectedKind = ServiceDiscoveryProvider.NAMESPACE_KIND_BY_TYPE[input.resourceType];
28342
28625
  if (input.knownPhysicalId) try {
28343
- await this.getClient().send(new GetNamespaceCommand({ Id: input.knownPhysicalId }));
28626
+ const resp = await this.getClient().send(new GetNamespaceCommand({ Id: input.knownPhysicalId }));
28627
+ if (expectedKind && resp.Namespace?.Type && resp.Namespace.Type !== expectedKind) {
28628
+ this.logger.debug(`Namespace ${input.knownPhysicalId} is kind ${resp.Namespace.Type}, expected ${expectedKind} for ${input.resourceType} — refusing to adopt`);
28629
+ return null;
28630
+ }
28344
28631
  return {
28345
28632
  physicalId: input.knownPhysicalId,
28346
28633
  attributes: {}
@@ -28355,6 +28642,7 @@ var ServiceDiscoveryProvider = class {
28355
28642
  const list = await this.getClient().send(new ListNamespacesCommand({ ...token && { NextToken: token } }));
28356
28643
  for (const ns of list.Namespaces ?? []) {
28357
28644
  if (!ns.Id || !ns.Arn) continue;
28645
+ if (expectedKind && ns.Type && ns.Type !== expectedKind) continue;
28358
28646
  if (desiredName && ns.Name === desiredName) return {
28359
28647
  physicalId: ns.Id,
28360
28648
  attributes: {}
@@ -28781,7 +29069,7 @@ var AppSyncProvider = class {
28781
29069
  const tagsToAdd = {};
28782
29070
  for (const [k, v] of Object.entries(newMap)) if (oldMap[k] !== v) tagsToAdd[k] = v;
28783
29071
  if (tagKeysToRemove.length > 0) try {
28784
- await this.getClient().send(new UntagResourceCommand$13({
29072
+ await this.getClient().send(new UntagResourceCommand$14({
28785
29073
  resourceArn: arn,
28786
29074
  tagKeys: tagKeysToRemove
28787
29075
  }));
@@ -28789,7 +29077,7 @@ var AppSyncProvider = class {
28789
29077
  throw this.wrapUpdateError(error, resourceType, logicalId, apiId, "GraphqlApi (untag)");
28790
29078
  }
28791
29079
  if (Object.keys(tagsToAdd).length > 0) try {
28792
- await this.getClient().send(new TagResourceCommand$13({
29080
+ await this.getClient().send(new TagResourceCommand$14({
28793
29081
  resourceArn: arn,
28794
29082
  tags: tagsToAdd
28795
29083
  }));
@@ -31964,11 +32252,11 @@ var BudgetsBudgetProvider = class {
31964
32252
  const removedKeys = oldTags.map((t) => t.Key).filter((k) => {
31965
32253
  return typeof k === "string" && !newKeys.has(k);
31966
32254
  });
31967
- if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$14({
32255
+ if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$15({
31968
32256
  ResourceARN: arn,
31969
32257
  ResourceTagKeys: removedKeys
31970
32258
  }));
31971
- if (newTags.length > 0) await this.getClient().send(new TagResourceCommand$14({
32259
+ if (newTags.length > 0) await this.getClient().send(new TagResourceCommand$15({
31972
32260
  ResourceARN: arn,
31973
32261
  ResourceTags: newTags
31974
32262
  }));
@@ -32651,14 +32939,14 @@ var KinesisStreamConsumerProvider = class {
32651
32939
  const tagsToRemove = [];
32652
32940
  for (const k of Object.keys(oldMap)) if (!(k in newMap)) tagsToRemove.push(k);
32653
32941
  if (tagsToRemove.length > 0) {
32654
- await this.getClient().send(new UntagResourceCommand$15({
32942
+ await this.getClient().send(new UntagResourceCommand$16({
32655
32943
  ResourceARN: consumerArn,
32656
32944
  TagKeys: tagsToRemove
32657
32945
  }));
32658
32946
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from Kinesis stream consumer ${consumerArn}`);
32659
32947
  }
32660
32948
  if (Object.keys(tagsToAdd).length > 0) {
32661
- await this.getClient().send(new TagResourceCommand$15({
32949
+ await this.getClient().send(new TagResourceCommand$16({
32662
32950
  ResourceARN: consumerArn,
32663
32951
  Tags: tagsToAdd
32664
32952
  }));
@@ -35809,11 +36097,11 @@ var CodeCommitRepositoryProvider = class {
35809
36097
  const repoArn = metadata?.Arn;
35810
36098
  if (repoArn) {
35811
36099
  const removedKeys = Object.keys(oldTagMap).filter((k) => !(k in newTagMap));
35812
- if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$16({
36100
+ if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$17({
35813
36101
  resourceArn: repoArn,
35814
36102
  tagKeys: removedKeys
35815
36103
  }));
35816
- if (Object.keys(newTagMap).length > 0) await this.getClient().send(new TagResourceCommand$16({
36104
+ if (Object.keys(newTagMap).length > 0) await this.getClient().send(new TagResourceCommand$17({
35817
36105
  resourceArn: repoArn,
35818
36106
  tags: newTagMap
35819
36107
  }));
@@ -36070,7 +36358,7 @@ var DLMLifecyclePolicyProvider = class {
36070
36358
  if (tagsChanged && arn) {
36071
36359
  const removedKeys = Object.keys(oldTags).filter((k) => !(k in newTags));
36072
36360
  if (removedKeys.length > 0) {
36073
- await this.getClient().send(new UntagResourceCommand$17({
36361
+ await this.getClient().send(new UntagResourceCommand$18({
36074
36362
  ResourceArn: arn,
36075
36363
  TagKeys: removedKeys
36076
36364
  }));
@@ -36079,7 +36367,7 @@ var DLMLifecyclePolicyProvider = class {
36079
36367
  const tagsToAdd = {};
36080
36368
  for (const [k, v] of Object.entries(newTags)) if (oldTags[k] !== v) tagsToAdd[k] = v;
36081
36369
  if (Object.keys(tagsToAdd).length > 0) {
36082
- await this.getClient().send(new TagResourceCommand$17({
36370
+ await this.getClient().send(new TagResourceCommand$18({
36083
36371
  ResourceArn: arn,
36084
36372
  Tags: tagsToAdd
36085
36373
  }));
@@ -36282,11 +36570,11 @@ var S3VectorsProvider = class {
36282
36570
  }
36283
36571
  if (!resourceArn) throw new ProvisioningError(`Could not resolve ARN for S3 VectorBucket ${logicalId} (${physicalId}); cannot apply tag update.`, resourceType, logicalId, physicalId);
36284
36572
  try {
36285
- if (Object.keys(toSet).length > 0) await this.getClient().send(new TagResourceCommand$18({
36573
+ if (Object.keys(toSet).length > 0) await this.getClient().send(new TagResourceCommand$19({
36286
36574
  resourceArn,
36287
36575
  tags: toSet
36288
36576
  }));
36289
- if (toRemove.length > 0) await this.getClient().send(new UntagResourceCommand$18({
36577
+ if (toRemove.length > 0) await this.getClient().send(new UntagResourceCommand$19({
36290
36578
  resourceArn,
36291
36579
  tagKeys: toRemove
36292
36580
  }));
@@ -37277,7 +37565,7 @@ var S3TablesProvider = class {
37277
37565
  const resourceArn = await this.lookupTableArn(tableBucketARN, namespace, name);
37278
37566
  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);
37279
37567
  if (removedKeys.length > 0) try {
37280
- await this.getClient().send(new UntagResourceCommand$19({
37568
+ await this.getClient().send(new UntagResourceCommand$20({
37281
37569
  resourceArn,
37282
37570
  tagKeys: removedKeys
37283
37571
  }));
@@ -37286,7 +37574,7 @@ var S3TablesProvider = class {
37286
37574
  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);
37287
37575
  }
37288
37576
  if (Object.keys(upserts).length > 0) try {
37289
- await this.getClient().send(new TagResourceCommand$19({
37577
+ await this.getClient().send(new TagResourceCommand$20({
37290
37578
  resourceArn,
37291
37579
  tags: upserts
37292
37580
  }));
@@ -37318,7 +37606,7 @@ var S3TablesProvider = class {
37318
37606
  if (removedKeys.length === 0 && Object.keys(upserts).length === 0) return;
37319
37607
  const resourceArn = physicalId;
37320
37608
  if (removedKeys.length > 0) try {
37321
- await this.getClient().send(new UntagResourceCommand$19({
37609
+ await this.getClient().send(new UntagResourceCommand$20({
37322
37610
  resourceArn,
37323
37611
  tagKeys: removedKeys
37324
37612
  }));
@@ -37327,7 +37615,7 @@ var S3TablesProvider = class {
37327
37615
  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);
37328
37616
  }
37329
37617
  if (Object.keys(upserts).length > 0) try {
37330
- await this.getClient().send(new TagResourceCommand$19({
37618
+ await this.getClient().send(new TagResourceCommand$20({
37331
37619
  resourceArn,
37332
37620
  tags: upserts
37333
37621
  }));
@@ -38944,6 +39232,8 @@ function registerAllProviders(registry) {
38944
39232
  registry.register("AWS::ElastiCache::CacheCluster", elasticacheProvider);
38945
39233
  const serviceDiscoveryProvider = new ServiceDiscoveryProvider();
38946
39234
  registry.register("AWS::ServiceDiscovery::PrivateDnsNamespace", serviceDiscoveryProvider);
39235
+ registry.register("AWS::ServiceDiscovery::HttpNamespace", serviceDiscoveryProvider);
39236
+ registry.register("AWS::ServiceDiscovery::PublicDnsNamespace", serviceDiscoveryProvider);
38947
39237
  registry.register("AWS::ServiceDiscovery::Service", serviceDiscoveryProvider);
38948
39238
  registry.register("AWS::BedrockAgentCore::Runtime", new AgentCoreRuntimeProvider());
38949
39239
  const appSyncProvider = new AppSyncProvider();
@@ -58249,7 +58539,7 @@ function reorderArgs(argv) {
58249
58539
  async function main() {
58250
58540
  installPipeCloseHandler();
58251
58541
  const program = new Command();
58252
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.241.0");
58542
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.242.0");
58253
58543
  program.addCommand(createBootstrapCommand());
58254
58544
  program.addCommand(createSynthCommand());
58255
58545
  program.addCommand(createListCommand());