@go-to-k/cdkd 0.257.3 → 0.258.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,27 +1,28 @@
1
1
  #!/usr/bin/env node
2
- import { $ as AssetModeResolver, $t as StackTerminationProtectionError, A as importTagWalk, At as expectedOwnerParam, B as DagBuilder, C as slowCcOperationTimeoutMs, Ct as resolveUseCdkBootstrapAssets, D as cfnRefValueFromPhysicalId, Dt as MIGRATE_TMP_PREFIX, E as IntrinsicFunctionResolver, Et as CFN_TEMPLATE_URL_LIMIT, F as normalizeAwsTagsToCfn, Ft as getAwsClients, G as shouldRetainResource, H as LockManager, Ht as LocalInvokeBuildError$1, I as resolveExplicitPhysicalId, It as resetAwsClients, J as WorkGraph, Jt as PartialFailureError, K as AssetPublisher, Kt as MissingCdkCliError, L as assertRegionMatch, Lt as setAwsClients, M as isRetryableTransientError, N as CDK_PATH_TAG, Nt as resolveBucketRegion, O as refStateLookupFromResource, Ot as findLargeInlineResources, P as matchesCdkPath, Pt as AwsClients, Q as rewriteTemplateAssetReferences, Qt as StackHasActiveImportsError, R as applyRoleArnIfSet, S as CloudControlProvider, St as resolveStateBucketWithDefaultAndSource, T as isTerminationProtectionPropagationError, Tt as CFN_TEMPLATE_BODY_LIMIT, U as S3StateBackend, Ut as LocalMigrateError, V as TemplateParser, W as rebuildClientForBucketRegion, Wt as LocalStartServiceError, X as createAssetRedirectResolver, Xt as ResourceTimeoutError, Y as buildAssetRedirectMap, Yt as ProvisioningError, Z as loadPublishableAssetManifest, Zt as ResourceUpdateNotSupportedError, _ as yellow, _t as resolveApp, a as IMPLICIT_DELETE_DEPENDENCIES, an as withErrorHandling, at as validateContainerRepoName, b as ProviderRegistry, bt as resolveSkipPrefix, c as MULTI_REGION_RECREATE_BLOCKED_TYPES, ct as getDockerCmd, d as formatResourceLine, dt as AssetManifestLoader, et as BOOTSTRAP_MARKER_PREFIX, f as bold, ft as getDockerImageBySourceHash, g as red, gt as getLegacyStateBucketName, h as green, ht as getDefaultStateBucketName, i as withResourceDeadline, in as normalizeAwsError, it as validateAssetBucketName, j as withRetry, jt as AssemblyReader, k as WAFv2WebACLProvider, kt as uploadCfnTemplate, l as isStatefulRecreateTargetSync, lt as runDockerForeground, m as gray, mt as synthesisStatusMessage, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as getBootstrapMarkerKey, o as computeImplicitDeleteEdges, ot as buildDockerImage, p as cyan, pt as Synthesizer, q as stringifyValue, qt as NestedStackChildDirectDestroyError, r as DeployEngine, rt as parseBootstrapMarker, s as extractDeploymentEventError, st as formatDockerLoginError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as ensureAssetStorage, u as renderStatefulReason, ut as runDockerStreaming, v as IAMRoleProvider, vt as resolveAutoAssetStorage, w as disableInstanceApiTermination, wt as warnDeprecatedNoPrefixCliFlag, x as findActionableSilentDrops, xt as resolveStateBucketWithDefault, y as collectInlinePolicyNamesManagedBySiblings, yt as resolveCaptureObservedState, z as DiffCalculator, zt as CdkdError } from "./deploy-engine-0U3bYBq4.js";
2
+ import { $ as getBootstrapMarkerKey, A as refStateLookupFromResource, At as resolveBucketRegion, B as S3StateBackend, Bt as LocalMigrateError, C as findActionableSilentDrops, Ct as CFN_TEMPLATE_URL_LIMIT, D as isTerminationProtectionPropagationError, Dt as expectedOwnerParam, E as disableInstanceApiTermination, Et as uploadCfnTemplate, F as applyRoleArnIfSet, G as WorkGraph, Gt as PartialFailureError, H as shouldRetainResource, I as DiffCalculator, It as CdkdError, J as loadPublishableAssetManifest, Jt as ResourceUpdateNotSupportedError, K as buildAssetRedirectMap, Kt as ProvisioningError, L as DagBuilder, M as normalizeAwsTagsToCfn, Mt as getAwsClients, N as resolveExplicitPhysicalId, Nt as resetAwsClients, O as IntrinsicFunctionResolver, Ot as AssemblyReader, P as assertRegionMatch, Pt as setAwsClients, Q as ensureAssetStorage, R as TemplateParser, S as ProviderRegistry, St as CFN_TEMPLATE_BODY_LIMIT, T as slowCcOperationTimeoutMs, Tt as findLargeInlineResources, U as AssetPublisher, Ut as MissingCdkCliError, V as rebuildClientForBucketRegion, Vt as LocalStartServiceError, W as stringifyValue, Wt as NestedStackChildDirectDestroyError, X as AssetModeResolver, Xt as StackTerminationProtectionError, Y as rewriteTemplateAssetReferences, Yt as StackHasActiveImportsError, Z as BOOTSTRAP_MARKER_PREFIX, _ as green, _t as resolveSkipPrefix, a as withRetry, at as getDockerCmd, b as IAMRoleProvider, bt as resolveUseCdkBootstrapAssets, c as computeImplicitDeleteEdges, ct as AssetManifestLoader, d as isStatefulRecreateTargetSync, dt as synthesisStatusMessage, et as parseBootstrapMarker, f as renderStatefulReason, ft as getDefaultStateBucketName, g as gray, gt as resolveCaptureObservedState, h as cyan, ht as resolveAutoAssetStorage, i as withResourceDeadline, it as formatDockerLoginError, j as WAFv2WebACLProvider, jt as AwsClients, k as cfnRefValueFromPhysicalId, l as extractDeploymentEventError, lt as getDockerImageBySourceHash, m as bold, mt as resolveApp, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as withErrorHandling, nt as validateContainerRepoName, o as isRetryableTransientError, ot as runDockerForeground, p as formatResourceLine, pt as getLegacyStateBucketName, q as createAssetRedirectResolver, qt as ResourceTimeoutError, r as DeployEngine, rt as buildDockerImage, s as IMPLICIT_DELETE_DEPENDENCIES, st as runDockerStreaming, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as normalizeAwsError, tt as validateAssetBucketName, u as MULTI_REGION_RECREATE_BLOCKED_TYPES, ut as Synthesizer, v as red, vt as resolveStateBucketWithDefault, w as CloudControlProvider, wt as MIGRATE_TMP_PREFIX, x as collectInlinePolicyNamesManagedBySiblings, xt as warnDeprecatedNoPrefixCliFlag, y as yellow, yt as resolveStateBucketWithDefaultAndSource, z as LockManager, zt as LocalInvokeBuildError$1 } from "./deploy-engine-Dg51mHCV.js";
3
3
  import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, f as withSkipPrefix, i as runStackBuffered, n as getLogger, o as PATTERN_B_NAME_OPTIONS, p as withStackName, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-BYMEE-BS.js";
4
- import { t as ASGProvider } from "./asg-provider-Co34HfIH.js";
4
+ import { t as ASGProvider } from "./asg-provider-rcNqhfPS.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { createHash, randomBytes, randomUUID } from "node:crypto";
7
- 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";
8
- import { AddRoleToInstanceProfileCommand, AddUserToGroupCommand, AttachGroupPolicyCommand, AttachRolePolicyCommand, AttachUserPolicyCommand, CreateGroupCommand, CreateInstanceProfileCommand, CreateLoginProfileCommand, CreatePolicyCommand, CreatePolicyVersionCommand, CreateUserCommand, DeleteAccessKeyCommand, DeleteGroupCommand, DeleteGroupPolicyCommand, DeleteInstanceProfileCommand, DeleteLoginProfileCommand, DeletePolicyCommand, DeletePolicyVersionCommand, DeleteRolePolicyCommand, DeleteUserCommand, DeleteUserPermissionsBoundaryCommand, DeleteUserPolicyCommand, DetachGroupPolicyCommand, DetachRolePolicyCommand, DetachUserPolicyCommand, GetGroupCommand, GetGroupPolicyCommand, GetInstanceProfileCommand, GetPolicyCommand, GetPolicyVersionCommand, GetRolePolicyCommand, GetUserCommand, GetUserPolicyCommand, IAMClient, ListAccessKeysCommand, ListAttachedGroupPoliciesCommand, ListAttachedUserPoliciesCommand, ListEntitiesForPolicyCommand, ListGroupPoliciesCommand, ListGroupsForUserCommand, ListInstanceProfilesCommand, ListPoliciesCommand, ListPolicyTagsCommand, ListPolicyVersionsCommand, ListUserPoliciesCommand, NoSuchEntityException, PutGroupPolicyCommand, PutRolePolicyCommand, PutUserPermissionsBoundaryCommand, PutUserPolicyCommand, RemoveRoleFromInstanceProfileCommand, RemoveUserFromGroupCommand, TagPolicyCommand, TagUserCommand, UntagPolicyCommand, UntagUserCommand, UpdateLoginProfileCommand } from "@aws-sdk/client-iam";
9
- import { CreateQueueCommand, DeleteQueueCommand, GetQueueAttributesCommand, GetQueueUrlCommand, ListQueueTagsCommand, ListQueuesCommand, QueueDoesNotExist, SQSClient, SetQueueAttributesCommand, TagQueueCommand, UntagQueueCommand } from "@aws-sdk/client-sqs";
7
+ 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, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
8
+ import { AddRoleToInstanceProfileCommand, AddUserToGroupCommand, AttachGroupPolicyCommand, AttachRolePolicyCommand, AttachUserPolicyCommand, CreateGroupCommand, CreateInstanceProfileCommand, CreateLoginProfileCommand, CreatePolicyCommand, CreatePolicyVersionCommand, CreateUserCommand, DeleteAccessKeyCommand, DeleteGroupCommand, DeleteGroupPolicyCommand, DeleteInstanceProfileCommand, DeleteLoginProfileCommand, DeletePolicyCommand, DeletePolicyVersionCommand, DeleteRolePolicyCommand, DeleteUserCommand, DeleteUserPermissionsBoundaryCommand, DeleteUserPolicyCommand, DetachGroupPolicyCommand, DetachRolePolicyCommand, DetachUserPolicyCommand, GetGroupCommand, GetGroupPolicyCommand, GetInstanceProfileCommand, GetPolicyCommand, GetPolicyVersionCommand, GetRolePolicyCommand, GetUserCommand, GetUserPolicyCommand, IAMClient, ListAccessKeysCommand, ListAttachedGroupPoliciesCommand, ListAttachedUserPoliciesCommand, ListEntitiesForPolicyCommand, ListGroupPoliciesCommand, ListGroupsForUserCommand, ListPoliciesCommand, ListPolicyTagsCommand, ListPolicyVersionsCommand, ListUserPoliciesCommand, NoSuchEntityException, PutGroupPolicyCommand, PutRolePolicyCommand, PutUserPermissionsBoundaryCommand, PutUserPolicyCommand, RemoveRoleFromInstanceProfileCommand, RemoveUserFromGroupCommand, TagPolicyCommand, TagUserCommand, UntagPolicyCommand, UntagUserCommand, UpdateLoginProfileCommand } from "@aws-sdk/client-iam";
9
+ import { CreateQueueCommand, DeleteQueueCommand, GetQueueAttributesCommand, GetQueueUrlCommand, ListQueueTagsCommand, QueueDoesNotExist, SQSClient, SetQueueAttributesCommand, TagQueueCommand, UntagQueueCommand } from "@aws-sdk/client-sqs";
10
10
  import { CreateTopicCommand, DeleteTopicCommand, GetSubscriptionAttributesCommand, GetTopicAttributesCommand, ListSubscriptionsByTopicCommand, ListTagsForResourceCommand, ListTopicsCommand, NotFoundException, SNSClient, SetTopicAttributesCommand, SubscribeCommand, TagResourceCommand, UnsubscribeCommand, UntagResourceCommand } from "@aws-sdk/client-sns";
11
- import { AddPermissionCommand, CreateEventSourceMappingCommand, CreateFunctionCommand, CreateFunctionUrlConfigCommand, DeleteEventSourceMappingCommand, DeleteFunctionCommand, DeleteFunctionConcurrencyCommand, DeleteFunctionEventInvokeConfigCommand, DeleteFunctionUrlConfigCommand, DeleteLayerVersionCommand, GetEventSourceMappingCommand, GetFunctionCommand, GetFunctionConcurrencyCommand, GetFunctionEventInvokeConfigCommand, GetFunctionRecursionConfigCommand, GetFunctionUrlConfigCommand, GetLayerVersionByArnCommand, GetPolicyCommand as GetPolicyCommand$1, LambdaClient, ListFunctionsCommand, ListLayersCommand, ListTagsCommand, PublishLayerVersionCommand, PutFunctionConcurrencyCommand, PutFunctionEventInvokeConfigCommand, PutFunctionRecursionConfigCommand, RemovePermissionCommand, ResourceNotFoundException, TagResourceCommand as TagResourceCommand$1, UntagResourceCommand as UntagResourceCommand$1, UpdateEventSourceMappingCommand, UpdateFunctionCodeCommand, UpdateFunctionConfigurationCommand, UpdateFunctionUrlConfigCommand, waitUntilFunctionUpdatedV2 } from "@aws-sdk/client-lambda";
11
+ import { AddPermissionCommand, CreateEventSourceMappingCommand, CreateFunctionCommand, CreateFunctionUrlConfigCommand, DeleteEventSourceMappingCommand, DeleteFunctionCommand, DeleteFunctionConcurrencyCommand, DeleteFunctionEventInvokeConfigCommand, DeleteFunctionUrlConfigCommand, DeleteLayerVersionCommand, GetEventSourceMappingCommand, GetFunctionCommand, GetFunctionConcurrencyCommand, GetFunctionEventInvokeConfigCommand, GetFunctionRecursionConfigCommand, GetFunctionUrlConfigCommand, GetLayerVersionByArnCommand, GetPolicyCommand as GetPolicyCommand$1, LambdaClient, ListTagsCommand, PublishLayerVersionCommand, PutFunctionConcurrencyCommand, PutFunctionEventInvokeConfigCommand, PutFunctionRecursionConfigCommand, RemovePermissionCommand, ResourceNotFoundException, TagResourceCommand as TagResourceCommand$1, UntagResourceCommand as UntagResourceCommand$1, UpdateEventSourceMappingCommand, UpdateFunctionCodeCommand, UpdateFunctionConfigurationCommand, UpdateFunctionUrlConfigCommand, waitUntilFunctionUpdatedV2 } from "@aws-sdk/client-lambda";
12
12
  import { AssumeRoleCommand, GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
13
13
  import { AssociateIamInstanceProfileCommand, AssociateRouteTableCommand, AttachInternetGatewayCommand, AuthorizeSecurityGroupEgressCommand, AuthorizeSecurityGroupIngressCommand, CreateInternetGatewayCommand, CreateNatGatewayCommand, CreateNetworkAclCommand, CreateNetworkAclEntryCommand, CreateRouteCommand, CreateRouteTableCommand, CreateSecurityGroupCommand, CreateSubnetCommand, CreateTagsCommand, CreateVpcCommand, DeleteInternetGatewayCommand, DeleteNatGatewayCommand, DeleteNetworkAclCommand, DeleteNetworkAclEntryCommand, DeleteNetworkInterfaceCommand, DeleteRouteCommand, DeleteRouteTableCommand, DeleteSecurityGroupCommand, DeleteSubnetCommand, DeleteTagsCommand, DeleteVpcCommand, DescribeAvailabilityZonesCommand, DescribeIamInstanceProfileAssociationsCommand, DescribeInstanceAttributeCommand, DescribeInstanceCreditSpecificationsCommand, DescribeInstancesCommand, DescribeInternetGatewaysCommand, DescribeNatGatewaysCommand, DescribeNetworkAclsCommand, DescribeNetworkInterfacesCommand, DescribeRouteTablesCommand, DescribeSecurityGroupsCommand, DescribeSubnetsCommand, DescribeVolumesCommand, DescribeVpcAttributeCommand, DescribeVpcsCommand, DetachInternetGatewayCommand, DisassociateRouteTableCommand, EC2Client, ModifyInstanceAttributeCommand, ModifyInstanceCreditSpecificationCommand, ModifyInstanceMetadataOptionsCommand, ModifySubnetAttributeCommand, ModifyVpcAttributeCommand, MonitorInstancesCommand, ReplaceNetworkAclAssociationCommand, RevokeSecurityGroupEgressCommand, RevokeSecurityGroupIngressCommand, RunInstancesCommand, TerminateInstancesCommand, UnmonitorInstancesCommand, waitUntilInstanceRunning, waitUntilInstanceTerminated, waitUntilNatGatewayAvailable, waitUntilNatGatewayDeleted } from "@aws-sdk/client-ec2";
14
- import { CreateTableCommand, DeleteResourcePolicyCommand, DeleteTableCommand, DescribeContinuousBackupsCommand, DescribeContributorInsightsCommand, DescribeKinesisStreamingDestinationCommand, DescribeTableCommand, DescribeTimeToLiveCommand, DisableKinesisStreamingDestinationCommand, DynamoDBClient, EnableKinesisStreamingDestinationCommand, GetResourcePolicyCommand, ListTablesCommand, ListTagsOfResourceCommand, PutResourcePolicyCommand, ResourceNotFoundException as ResourceNotFoundException$1, TagResourceCommand as TagResourceCommand$2, UntagResourceCommand as UntagResourceCommand$2, UpdateContinuousBackupsCommand, UpdateContributorInsightsCommand, UpdateTableCommand, UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
14
+ import { CreateTableCommand, DeleteResourcePolicyCommand, DeleteTableCommand, DescribeContinuousBackupsCommand, DescribeContributorInsightsCommand, DescribeKinesisStreamingDestinationCommand, DescribeTableCommand, DescribeTimeToLiveCommand, DisableKinesisStreamingDestinationCommand, DynamoDBClient, EnableKinesisStreamingDestinationCommand, GetResourcePolicyCommand, ListTagsOfResourceCommand, PutResourcePolicyCommand, ResourceNotFoundException as ResourceNotFoundException$1, TagResourceCommand as TagResourceCommand$2, UntagResourceCommand as UntagResourceCommand$2, UpdateContinuousBackupsCommand, UpdateContributorInsightsCommand, UpdateTableCommand, UpdateTimeToLiveCommand } from "@aws-sdk/client-dynamodb";
15
15
  import { CloudFormationClient, CreateChangeSetCommand, DeleteChangeSetCommand, DeleteStackCommand, DescribeChangeSetCommand, DescribeStackEventsCommand, DescribeStackResourcesCommand, DescribeStacksCommand, DescribeTypeCommand, ExecuteChangeSetCommand, GetTemplateCommand, UpdateStackCommand, waitUntilChangeSetCreateComplete, waitUntilStackDeleteComplete, waitUntilStackImportComplete, waitUntilStackUpdateComplete } from "@aws-sdk/client-cloudformation";
16
16
  import { APIGatewayClient, CreateAuthorizerCommand, CreateDeploymentCommand, CreateResourceCommand, CreateStageCommand, DeleteAuthorizerCommand, DeleteDeploymentCommand, DeleteMethodCommand, DeleteResourceCommand, DeleteStageCommand, GetAccountCommand, GetAuthorizerCommand, GetDeploymentCommand, GetMethodCommand, GetResourceCommand, GetStageCommand, NotFoundException as NotFoundException$1, PutIntegrationCommand, PutIntegrationResponseCommand, PutMethodCommand, PutMethodResponseCommand, TagResourceCommand as TagResourceCommand$3, UntagResourceCommand as UntagResourceCommand$3, UpdateAccountCommand, UpdateAuthorizerCommand, UpdateMethodCommand, UpdateStageCommand } from "@aws-sdk/client-api-gateway";
17
- 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";
18
- 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";
17
+ import { CreateEventBusCommand, DeleteEventBusCommand, DeleteRuleCommand, DescribeEventBusCommand, DescribeRuleCommand, EventBridgeClient, 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";
18
+ import { CreateSecretCommand, DeleteSecretCommand, DescribeSecretCommand, GetSecretValueCommand, RemoveRegionsFromReplicationCommand, ReplicateSecretToRegionsCommand, ResourceNotFoundException as ResourceNotFoundException$3, SecretsManagerClient, TagResourceCommand as TagResourceCommand$5, UntagResourceCommand as UntagResourceCommand$5, UpdateSecretCommand } from "@aws-sdk/client-secrets-manager";
19
19
  import { AddTagsToResourceCommand, DeleteParameterCommand, DescribeParametersCommand, GetParameterCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$2, ParameterNotFound, PutParameterCommand, RemoveTagsFromResourceCommand, SSMClient } from "@aws-sdk/client-ssm";
20
- 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 { CloudFrontClient, CreateCloudFrontOriginAccessIdentityCommand, CreateDistributionCommand, CreateDistributionWithTagsCommand, DeleteCloudFrontOriginAccessIdentityCommand, DeleteDistributionCommand, GetCloudFrontOriginAccessIdentityCommand, GetDistributionCommand, GetDistributionConfigCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$3, NoSuchCloudFrontOriginAccessIdentity, NoSuchDistribution, TagResourceCommand as TagResourceCommand$6, UntagResourceCommand as UntagResourceCommand$6, UpdateCloudFrontOriginAccessIdentityCommand, UpdateDistributionCommand } from "@aws-sdk/client-cloudfront";
21
21
  import { CloudWatchClient, DeleteAlarmsCommand, DescribeAlarmsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$4, PutMetricAlarmCommand, TagResourceCommand as TagResourceCommand$7, UntagResourceCommand as UntagResourceCommand$7 } from "@aws-sdk/client-cloudwatch";
22
22
  import { AssociateKmsKeyCommand, CloudWatchLogsClient, CreateLogGroupCommand, DeleteDataProtectionPolicyCommand, DeleteIndexPolicyCommand, DeleteLogGroupCommand, DeleteRetentionPolicyCommand, DescribeIndexPoliciesCommand, DescribeLogGroupsCommand, DisassociateKmsKeyCommand, 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";
23
23
  import { BedrockAgentCoreControlClient, CreateAgentRuntimeCommand, CreateEvaluatorCommand, DeleteAgentRuntimeCommand, DeleteEvaluatorCommand, GetAgentRuntimeCommand, GetBrowserCommand, GetCodeInterpreterCommand, GetEvaluatorCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$6, ResourceNotFoundException as ResourceNotFoundException$5, TagResourceCommand as TagResourceCommand$9, UntagResourceCommand as UntagResourceCommand$9, UpdateAgentRuntimeCommand, UpdateEvaluatorCommand } from "@aws-sdk/client-bedrock-agentcore-control";
24
- import { ACMClient, AddTagsToCertificateCommand, DeleteCertificateCommand, DescribeCertificateCommand, ListCertificatesCommand, ListTagsForCertificateCommand, RemoveTagsFromCertificateCommand, RequestCertificateCommand, ResourceNotFoundException as ResourceNotFoundException$6, UpdateCertificateOptionsCommand } from "@aws-sdk/client-acm";
24
+ import { ACMClient, AddTagsToCertificateCommand, DeleteCertificateCommand, DescribeCertificateCommand, ListTagsForCertificateCommand, RemoveTagsFromCertificateCommand, RequestCertificateCommand, ResourceNotFoundException as ResourceNotFoundException$6, UpdateCertificateOptionsCommand } from "@aws-sdk/client-acm";
25
+ import { CreateMicrovmImageCommand, DeleteMicrovmImageCommand, GetMicrovmImageCommand, LambdaMicrovmsClient, ResourceNotFoundException as ResourceNotFoundException$7, TagResourceCommand as TagResourceCommand$10, UntagResourceCommand as UntagResourceCommand$10, UpdateMicrovmImageCommand } from "@aws-sdk/client-lambda-microvms";
25
26
  import * as fs from "node:fs";
26
27
  import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
27
28
  import * as path from "node:path";
@@ -30,9 +31,9 @@ import { execFile, spawn } from "node:child_process";
30
31
  import { tmpdir } from "node:os";
31
32
  import { AssociateVPCWithHostedZoneCommand, ChangeResourceRecordSetsCommand, ChangeTagsForResourceCommand, CreateHostedZoneCommand, CreateQueryLoggingConfigCommand, DeleteHostedZoneCommand, DeleteQueryLoggingConfigCommand, DisassociateVPCFromHostedZoneCommand, GetHostedZoneCommand, ListHostedZonesByNameCommand, ListQueryLoggingConfigsCommand, ListResourceRecordSetsCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$7, Route53Client, UpdateHostedZoneCommentCommand, UpdateHostedZoneFeaturesCommand } from "@aws-sdk/client-route-53";
32
33
  import { AddTagsCommand, CreateListenerCommand, CreateLoadBalancerCommand, CreateTargetGroupCommand, DeleteListenerCommand, DeleteLoadBalancerCommand, DeleteTargetGroupCommand, DescribeListenerAttributesCommand, DescribeListenersCommand, DescribeLoadBalancerAttributesCommand, DescribeLoadBalancersCommand, DescribeTagsCommand, DescribeTargetGroupsCommand, ElasticLoadBalancingV2Client, ModifyListenerAttributesCommand, ModifyListenerCommand, ModifyLoadBalancerAttributesCommand, ModifyTargetGroupCommand, RemoveTagsCommand, SetIpAddressTypeCommand, SetSecurityGroupsCommand, SetSubnetsCommand } from "@aws-sdk/client-elastic-load-balancing-v2";
33
- import { CreateAliasCommand, CreateKeyCommand, DeleteAliasCommand, DescribeKeyCommand, DisableKeyCommand, DisableKeyRotationCommand, EnableKeyCommand, EnableKeyRotationCommand, GetKeyPolicyCommand, GetKeyRotationStatusCommand, KMSClient, ListAliasesCommand, ListKeysCommand, ListResourceTagsCommand, NotFoundException as NotFoundException$2, PutKeyPolicyCommand, ScheduleKeyDeletionCommand, TagResourceCommand as TagResourceCommand$10, UntagResourceCommand as UntagResourceCommand$10, UpdateAliasCommand, UpdateKeyDescriptionCommand } from "@aws-sdk/client-kms";
34
+ import { CreateAliasCommand, CreateKeyCommand, DeleteAliasCommand, DescribeKeyCommand, DisableKeyCommand, DisableKeyRotationCommand, EnableKeyCommand, EnableKeyRotationCommand, GetKeyPolicyCommand, GetKeyRotationStatusCommand, KMSClient, ListAliasesCommand, ListResourceTagsCommand, NotFoundException as NotFoundException$2, PutKeyPolicyCommand, ScheduleKeyDeletionCommand, TagResourceCommand as TagResourceCommand$11, UntagResourceCommand as UntagResourceCommand$11, UpdateAliasCommand, UpdateKeyDescriptionCommand } from "@aws-sdk/client-kms";
34
35
  import { join as join$1 } from "path";
35
- import { BatchDeleteImageCommand, CreateRepositoryCommand, DeleteLifecyclePolicyCommand, DeleteRepositoryCommand, DeleteRepositoryPolicyCommand, DescribeImagesCommand as DescribeImagesCommand$1, DescribeRepositoriesCommand, ECRClient, GetAuthorizationTokenCommand, GetLifecyclePolicyCommand, LifecyclePolicyNotFoundException, ListTagsForResourceCommand as ListTagsForResourceCommand$8, PutImageScanningConfigurationCommand, PutImageTagMutabilityCommand, PutLifecyclePolicyCommand, RepositoryNotFoundException, SetRepositoryPolicyCommand, TagResourceCommand as TagResourceCommand$11, UntagResourceCommand as UntagResourceCommand$11 } from "@aws-sdk/client-ecr";
36
+ import { BatchDeleteImageCommand, CreateRepositoryCommand, DeleteLifecyclePolicyCommand, DeleteRepositoryCommand, DeleteRepositoryPolicyCommand, DescribeImagesCommand as DescribeImagesCommand$1, DescribeRepositoriesCommand, ECRClient, GetAuthorizationTokenCommand, GetLifecyclePolicyCommand, LifecyclePolicyNotFoundException, ListTagsForResourceCommand as ListTagsForResourceCommand$8, PutImageScanningConfigurationCommand, PutImageTagMutabilityCommand, PutLifecyclePolicyCommand, RepositoryNotFoundException, SetRepositoryPolicyCommand, TagResourceCommand as TagResourceCommand$12, UntagResourceCommand as UntagResourceCommand$12 } from "@aws-sdk/client-ecr";
36
37
  import graphlib from "graphlib";
37
38
  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$9, ModifyDBClusterCommand, ModifyDBInstanceCommand, ModifyDBProxyCommand, ModifyDBProxyEndpointCommand, ModifyDBProxyTargetGroupCommand, ModifyDBSubnetGroupCommand, RDSClient, RegisterDBProxyTargetsCommand, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$1 } from "@aws-sdk/client-rds";
38
39
  import { AddTagsToResourceCommand as AddTagsToResourceCommand$2, CreateCacheClusterCommand, CreateCacheSubnetGroupCommand, DeleteCacheClusterCommand, DeleteCacheSubnetGroupCommand, DescribeCacheClustersCommand, DescribeCacheSubnetGroupsCommand, ElastiCacheClient, ListTagsForResourceCommand as ListTagsForResourceCommand$10, ModifyCacheClusterCommand, ModifyCacheSubnetGroupCommand, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$2 } from "@aws-sdk/client-elasticache";
@@ -43,29 +44,29 @@ import { writeFileSync as writeFileSync$1 } from "fs";
43
44
  import * as zlib from "node:zlib";
44
45
  import { ApplicationAutoScalingClient, DeleteScalingPolicyCommand, DeregisterScalableTargetCommand, DescribeScalableTargetsCommand, DescribeScalingPoliciesCommand, PutScalingPolicyCommand, RegisterScalableTargetCommand } from "@aws-sdk/client-application-auto-scaling";
45
46
  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, GetAuthorizerCommand as GetAuthorizerCommand$1, GetIntegrationCommand, GetRouteCommand, GetStageCommand as GetStageCommand$1, NotFoundException as NotFoundException$3, UpdateApiCommand, UpdateAuthorizerCommand as UpdateAuthorizerCommand$1, UpdateIntegrationCommand, UpdateRouteCommand, UpdateStageCommand as UpdateStageCommand$1 } from "@aws-sdk/client-apigatewayv2";
46
- import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListStateMachinesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$11, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$12, UntagResourceCommand as UntagResourceCommand$12, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
47
- import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$13, UpdateClusterCommand, UpdateServiceCommand } from "@aws-sdk/client-ecs";
47
+ import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$11, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$13, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
48
+ import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$14, UpdateClusterCommand, UpdateServiceCommand } from "@aws-sdk/client-ecs";
48
49
  import { AddTagsToResourceCommand as AddTagsToResourceCommand$3, CreateDBClusterCommand as CreateDBClusterCommand$1, CreateDBInstanceCommand as CreateDBInstanceCommand$1, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$1, DeleteDBClusterCommand as DeleteDBClusterCommand$1, DeleteDBInstanceCommand as DeleteDBInstanceCommand$1, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$1, DescribeDBClustersCommand as DescribeDBClustersCommand$1, DescribeDBInstancesCommand as DescribeDBInstancesCommand$1, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$1, DocDBClient, ListTagsForResourceCommand as ListTagsForResourceCommand$12, ModifyDBClusterCommand as ModifyDBClusterCommand$1, ModifyDBInstanceCommand as ModifyDBInstanceCommand$1, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$1, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$3 } from "@aws-sdk/client-docdb";
49
50
  import { AddTagsToResourceCommand as AddTagsToResourceCommand$4, CreateDBClusterCommand as CreateDBClusterCommand$2, CreateDBInstanceCommand as CreateDBInstanceCommand$2, CreateDBSubnetGroupCommand as CreateDBSubnetGroupCommand$2, DeleteDBClusterCommand as DeleteDBClusterCommand$2, DeleteDBInstanceCommand as DeleteDBInstanceCommand$2, DeleteDBSubnetGroupCommand as DeleteDBSubnetGroupCommand$2, DescribeDBClustersCommand as DescribeDBClustersCommand$2, DescribeDBInstancesCommand as DescribeDBInstancesCommand$2, DescribeDBSubnetGroupsCommand as DescribeDBSubnetGroupsCommand$2, ListTagsForResourceCommand as ListTagsForResourceCommand$13, ModifyDBClusterCommand as ModifyDBClusterCommand$2, ModifyDBInstanceCommand as ModifyDBInstanceCommand$2, ModifyDBSubnetGroupCommand as ModifyDBSubnetGroupCommand$2, NeptuneClient, RemoveTagsFromResourceCommand as RemoveTagsFromResourceCommand$4 } from "@aws-sdk/client-neptune";
50
- 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";
51
- import { CreateHttpNamespaceCommand, CreatePrivateDnsNamespaceCommand, CreatePublicDnsNamespaceCommand, CreateServiceCommand as CreateServiceCommand$1, DeleteNamespaceCommand, DeleteServiceAttributesCommand, DeleteServiceCommand as DeleteServiceCommand$1, GetNamespaceCommand, GetOperationCommand, GetServiceAttributesCommand, GetServiceCommand, ListNamespacesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$15, NamespaceNotFound, ServiceDiscoveryClient, ServiceNotFound, TagResourceCommand as TagResourceCommand$14, UntagResourceCommand as UntagResourceCommand$14, UpdateHttpNamespaceCommand, UpdatePrivateDnsNamespaceCommand, UpdatePublicDnsNamespaceCommand, UpdateServiceAttributesCommand, 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, NotFoundException as NotFoundException$4, StartSchemaCreationCommand, TagResourceCommand as TagResourceCommand$15, UntagResourceCommand as UntagResourceCommand$15, UpdateApiKeyCommand, UpdateDataSourceCommand, UpdateGraphqlApiCommand, UpdateResolverCommand } from "@aws-sdk/client-appsync";
51
+ import { AddCustomAttributesCommand, CognitoIdentityProviderClient, CreateUserPoolCommand, DeleteUserPoolCommand, DescribeUserPoolCommand, GetUserPoolMfaConfigCommand, ListUserPoolsCommand, ResourceNotFoundException as ResourceNotFoundException$8, SetUserPoolMfaConfigCommand, UpdateUserPoolCommand } from "@aws-sdk/client-cognito-identity-provider";
52
+ import { CreateHttpNamespaceCommand, CreatePrivateDnsNamespaceCommand, CreatePublicDnsNamespaceCommand, CreateServiceCommand as CreateServiceCommand$1, DeleteNamespaceCommand, DeleteServiceAttributesCommand, DeleteServiceCommand as DeleteServiceCommand$1, GetNamespaceCommand, GetOperationCommand, GetServiceAttributesCommand, GetServiceCommand, ListNamespacesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$14, NamespaceNotFound, ServiceDiscoveryClient, ServiceNotFound, TagResourceCommand as TagResourceCommand$15, UntagResourceCommand as UntagResourceCommand$15, UpdateHttpNamespaceCommand, UpdatePrivateDnsNamespaceCommand, UpdatePublicDnsNamespaceCommand, UpdateServiceAttributesCommand, UpdateServiceCommand as UpdateServiceCommand$1 } from "@aws-sdk/client-servicediscovery";
53
+ import { AppSyncClient, CreateApiKeyCommand, CreateDataSourceCommand, CreateGraphqlApiCommand, CreateResolverCommand, DeleteApiKeyCommand, DeleteDataSourceCommand, DeleteGraphqlApiCommand, DeleteResolverCommand, GetDataSourceCommand, GetGraphqlApiCommand, GetIntrospectionSchemaCommand, GetResolverCommand, ListApiKeysCommand, NotFoundException as NotFoundException$4, StartSchemaCreationCommand, TagResourceCommand as TagResourceCommand$16, UntagResourceCommand as UntagResourceCommand$16, UpdateApiKeyCommand, UpdateDataSourceCommand, UpdateGraphqlApiCommand, UpdateResolverCommand } from "@aws-sdk/client-appsync";
53
54
  import { parse, print } from "graphql";
54
55
  import { CrawlerRunningException, CreateConnectionCommand, CreateCrawlerCommand, CreateDatabaseCommand, CreateJobCommand, CreateSecurityConfigurationCommand, CreateTableCommand as CreateTableCommand$1, CreateTriggerCommand, CreateWorkflowCommand, DeleteConnectionCommand, DeleteCrawlerCommand, DeleteDatabaseCommand, DeleteJobCommand, DeleteSecurityConfigurationCommand, DeleteTableCommand as DeleteTableCommand$1, DeleteTriggerCommand, DeleteWorkflowCommand, EntityNotFoundException, GetConnectionCommand, GetCrawlerCommand, GetDatabaseCommand, GetJobCommand, GetSecurityConfigurationCommand, GetTableCommand, GetTagsCommand, GetTriggerCommand, GetWorkflowCommand, GlueClient, StartCrawlerScheduleCommand, StartTriggerCommand, StopCrawlerCommand, StopCrawlerScheduleCommand, StopTriggerCommand, UpdateConnectionCommand, UpdateCrawlerCommand, UpdateDatabaseCommand, UpdateJobCommand, UpdateTableCommand as UpdateTableCommand$1, UpdateTriggerCommand, UpdateWorkflowCommand } from "@aws-sdk/client-glue";
55
- import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DescribeBudgetsCommand, DuplicateRecordException, ListTagsForResourceCommand as ListTagsForResourceCommand$16, NotFoundException as NotFoundException$5, TagResourceCommand as TagResourceCommand$16, UntagResourceCommand as UntagResourceCommand$16, UpdateBudgetCommand } from "@aws-sdk/client-budgets";
56
- 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$17, UntagResourceCommand as UntagResourceCommand$17, UpdateShardCountCommand, UpdateStreamModeCommand } from "@aws-sdk/client-kinesis";
57
- import { CreateScheduleCommand, DeleteScheduleCommand, GetScheduleCommand, ResourceNotFoundException as ResourceNotFoundException$9, SchedulerClient, UpdateScheduleCommand } from "@aws-sdk/client-scheduler";
56
+ import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DuplicateRecordException, NotFoundException as NotFoundException$5, TagResourceCommand as TagResourceCommand$17, UntagResourceCommand as UntagResourceCommand$17, UpdateBudgetCommand } from "@aws-sdk/client-budgets";
57
+ import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient, ListTagsForResourceCommand as ListTagsForResourceCommand$15, ListTagsForStreamCommand, RegisterStreamConsumerCommand, RemoveTagsFromStreamCommand, ResourceNotFoundException as ResourceNotFoundException$9, StartStreamEncryptionCommand, StopStreamEncryptionCommand, TagResourceCommand as TagResourceCommand$18, UntagResourceCommand as UntagResourceCommand$18, UpdateShardCountCommand, UpdateStreamModeCommand } from "@aws-sdk/client-kinesis";
58
+ import { CreateScheduleCommand, DeleteScheduleCommand, GetScheduleCommand, ResourceNotFoundException as ResourceNotFoundException$10, SchedulerClient, UpdateScheduleCommand } from "@aws-sdk/client-scheduler";
58
59
  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";
59
- import { CreateFileSystemCommand as CreateFileSystemCommand$1, CreateFileSystemFromBackupCommand, DeleteFileSystemCommand as DeleteFileSystemCommand$1, DescribeFileSystemsCommand as DescribeFileSystemsCommand$1, FSxClient, FileSystemNotFound as FileSystemNotFound$1, TagResourceCommand as TagResourceCommand$18, UntagResourceCommand as UntagResourceCommand$18, UpdateFileSystemCommand as UpdateFileSystemCommand$1 } from "@aws-sdk/client-fsx";
60
- import { AddInstanceFleetCommand, AddInstanceGroupsCommand, AddTagsCommand as AddTagsCommand$1, DescribeClusterCommand, EMRClient, InvalidRequestException, ListClustersCommand, ListInstanceFleetsCommand, ListInstanceGroupsCommand, ModifyClusterCommand, ModifyInstanceFleetCommand, ModifyInstanceGroupsCommand, PutAutoScalingPolicyCommand, PutAutoTerminationPolicyCommand, PutManagedScalingPolicyCommand, RemoveAutoScalingPolicyCommand, RemoveAutoTerminationPolicyCommand, RemoveManagedScalingPolicyCommand, RemoveTagsCommand as RemoveTagsCommand$1, RunJobFlowCommand, SetTerminationProtectionCommand, SetVisibleToAllUsersCommand, TerminateJobFlowsCommand } from "@aws-sdk/client-emr";
61
- import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliveryStreamCommand, FirehoseClient, ListDeliveryStreamsCommand, ListTagsForDeliveryStreamCommand, ResourceNotFoundException as ResourceNotFoundException$10, TagDeliveryStreamCommand, UntagDeliveryStreamCommand, UpdateDestinationCommand } from "@aws-sdk/client-firehose";
62
- import { AddTagsCommand as AddTagsCommand$2, CloudTrailClient, CreateTrailCommand, DeleteTrailCommand, GetEventSelectorsCommand, GetInsightSelectorsCommand, GetTrailCommand, GetTrailStatusCommand, ListTagsCommand as ListTagsCommand$1, ListTrailsCommand, PutEventSelectorsCommand, PutInsightSelectorsCommand, RemoveTagsCommand as RemoveTagsCommand$2, StartLoggingCommand, StopLoggingCommand, TrailNotFoundException, UpdateTrailCommand } from "@aws-sdk/client-cloudtrail";
63
- import { BatchGetProjectsCommand, CodeBuildClient, CreateProjectCommand, DeleteProjectCommand, ResourceNotFoundException as ResourceNotFoundException$11, UpdateProjectCommand } from "@aws-sdk/client-codebuild";
64
- import { CodeCommitClient, CreateCommitCommand, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand, ListRepositoriesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$18, PutRepositoryTriggersCommand, RepositoryDoesNotExistException, TagResourceCommand as TagResourceCommand$19, UntagResourceCommand as UntagResourceCommand$19, UpdateRepositoryDescriptionCommand, UpdateRepositoryEncryptionKeyCommand, UpdateRepositoryNameCommand } from "@aws-sdk/client-codecommit";
60
+ import { CreateFileSystemCommand as CreateFileSystemCommand$1, CreateFileSystemFromBackupCommand, DeleteFileSystemCommand as DeleteFileSystemCommand$1, DescribeFileSystemsCommand as DescribeFileSystemsCommand$1, FSxClient, FileSystemNotFound as FileSystemNotFound$1, TagResourceCommand as TagResourceCommand$19, UntagResourceCommand as UntagResourceCommand$19, UpdateFileSystemCommand as UpdateFileSystemCommand$1 } from "@aws-sdk/client-fsx";
61
+ import { AddInstanceFleetCommand, AddInstanceGroupsCommand, AddTagsCommand as AddTagsCommand$1, DescribeClusterCommand, EMRClient, InvalidRequestException, ListInstanceFleetsCommand, ListInstanceGroupsCommand, ModifyClusterCommand, ModifyInstanceFleetCommand, ModifyInstanceGroupsCommand, PutAutoScalingPolicyCommand, PutAutoTerminationPolicyCommand, PutManagedScalingPolicyCommand, RemoveAutoScalingPolicyCommand, RemoveAutoTerminationPolicyCommand, RemoveManagedScalingPolicyCommand, RemoveTagsCommand as RemoveTagsCommand$1, RunJobFlowCommand, SetTerminationProtectionCommand, SetVisibleToAllUsersCommand, TerminateJobFlowsCommand } from "@aws-sdk/client-emr";
62
+ import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliveryStreamCommand, FirehoseClient, ListTagsForDeliveryStreamCommand, ResourceNotFoundException as ResourceNotFoundException$11, TagDeliveryStreamCommand, UntagDeliveryStreamCommand, UpdateDestinationCommand } from "@aws-sdk/client-firehose";
63
+ import { AddTagsCommand as AddTagsCommand$2, CloudTrailClient, CreateTrailCommand, DeleteTrailCommand, GetEventSelectorsCommand, GetInsightSelectorsCommand, GetTrailCommand, GetTrailStatusCommand, ListTagsCommand as ListTagsCommand$1, PutEventSelectorsCommand, PutInsightSelectorsCommand, RemoveTagsCommand as RemoveTagsCommand$2, StartLoggingCommand, StopLoggingCommand, TrailNotFoundException, UpdateTrailCommand } from "@aws-sdk/client-cloudtrail";
64
+ import { BatchGetProjectsCommand, CodeBuildClient, CreateProjectCommand, DeleteProjectCommand, ResourceNotFoundException as ResourceNotFoundException$12, UpdateProjectCommand } from "@aws-sdk/client-codebuild";
65
+ import { CodeCommitClient, CreateCommitCommand, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$16, PutRepositoryTriggersCommand, RepositoryDoesNotExistException, TagResourceCommand as TagResourceCommand$20, UntagResourceCommand as UntagResourceCommand$20, UpdateRepositoryDescriptionCommand, UpdateRepositoryEncryptionKeyCommand, UpdateRepositoryNameCommand } from "@aws-sdk/client-codecommit";
65
66
  import AdmZip from "adm-zip";
66
- import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand as DeleteLifecyclePolicyCommand$1, GetLifecyclePoliciesCommand, GetLifecyclePolicyCommand as GetLifecyclePolicyCommand$1, ResourceNotFoundException as ResourceNotFoundException$12, TagResourceCommand as TagResourceCommand$20, UntagResourceCommand as UntagResourceCommand$20, UpdateLifecyclePolicyCommand } from "@aws-sdk/client-dlm";
67
- import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$19, ListVectorBucketsCommand, S3VectorsClient, TagResourceCommand as TagResourceCommand$21, UntagResourceCommand as UntagResourceCommand$21 } 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$22, UntagResourceCommand as UntagResourceCommand$22 } from "@aws-sdk/client-s3tables";
67
+ import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand as DeleteLifecyclePolicyCommand$1, GetLifecyclePolicyCommand as GetLifecyclePolicyCommand$1, ResourceNotFoundException as ResourceNotFoundException$13, TagResourceCommand as TagResourceCommand$21, UntagResourceCommand as UntagResourceCommand$21, UpdateLifecyclePolicyCommand } from "@aws-sdk/client-dlm";
68
+ import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$17, S3VectorsClient, TagResourceCommand as TagResourceCommand$22, UntagResourceCommand as UntagResourceCommand$22 } from "@aws-sdk/client-s3vectors";
69
+ 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, ListTagsForResourceCommand as ListTagsForResourceCommand$18, NotFoundException as NotFoundException$6, S3TablesClient, TagResourceCommand as TagResourceCommand$23, UntagResourceCommand as UntagResourceCommand$23 } from "@aws-sdk/client-s3tables";
69
70
  import { Document, Pair, Scalar, YAMLMap, YAMLSeq, parse as parse$1, stringify } from "yaml";
70
71
  import { createLocalStartAgentCoreCommand, createLocalStartCloudFrontCommand, createLocalStateProvider, getEmbedConfig, isCfnFlagPresent, listTargets, rejectExplicitCfnStackWithMultipleStacks, resolveCfnFallbackRegion, setEmbedConfig, substituteAgainstState, substituteAgainstStateAsync, substituteEnvVarsFromState, substituteEnvVarsFromStateAsync } from "cdk-local";
71
72
  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";
@@ -1354,7 +1355,8 @@ async function listCommand(patterns, options) {
1354
1355
  output: options.output,
1355
1356
  ...options.region && { region: options.region },
1356
1357
  ...options.profile && { profile: options.profile },
1357
- ...Object.keys(context).length > 0 && { context }
1358
+ ...Object.keys(context).length > 0 && { context },
1359
+ deferMacroExpansion: true
1358
1360
  };
1359
1361
  const allStacks = (await synthesizer.synthesize(synthOptions)).stacks;
1360
1362
  if (allStacks.length === 0) throw new Error("No stacks found in assembly");
@@ -1899,7 +1901,7 @@ const FLUSH_INTERVAL_MS = 2e3;
1899
1901
  const FLUSH_EVENT_THRESHOLD = 50;
1900
1902
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
1901
1903
  function getCdkdVersion() {
1902
- return "0.257.3";
1904
+ return "0.258.0";
1903
1905
  }
1904
1906
  /**
1905
1907
  * Generate a time-sortable unique run id, e.g.
@@ -3485,8 +3487,6 @@ var IAMManagedPolicyProvider = class {
3485
3487
  * Lookup order:
3486
3488
  * 1. `--resource` override or `Properties.ManagedPolicyName` → walk
3487
3489
  * `ListPolicies(Scope: 'Local')` to find the matching ARN.
3488
- * 2. `ListPolicies(Scope: 'Local')` → for each candidate, `ListPolicyTags`
3489
- * and match against `aws:cdk:path`.
3490
3490
  *
3491
3491
  * Scope is forced to `'Local'` (customer-managed policies) — adopting an
3492
3492
  * AWS-managed policy would let cdkd delete it on next destroy, which would
@@ -3515,36 +3515,7 @@ var IAMManagedPolicyProvider = class {
3515
3515
  };
3516
3516
  return null;
3517
3517
  }
3518
- const match = await importTagWalk({
3519
- cdkPath: input.cdkPath,
3520
- logicalId: input.logicalId,
3521
- listPage: async (marker) => {
3522
- const list = await this.iamClient.send(new ListPoliciesCommand({
3523
- Scope: "Local",
3524
- ...marker ? { Marker: marker } : {}
3525
- }));
3526
- return {
3527
- items: list.Policies,
3528
- nextMarker: list.IsTruncated ? list.Marker : void 0
3529
- };
3530
- },
3531
- describe: async (policy) => {
3532
- if (!policy.Arn) return void 0;
3533
- try {
3534
- return await this.iamClient.send(new ListPolicyTagsCommand({ PolicyArn: policy.Arn }));
3535
- } catch (err) {
3536
- if (err instanceof NoSuchEntityException) return void 0;
3537
- throw err;
3538
- }
3539
- },
3540
- tagsOf: (tags) => tags.Tags
3541
- });
3542
- if (!match) return null;
3543
- const arn = match.summary.Arn;
3544
- return {
3545
- physicalId: arn,
3546
- attributes: { PolicyArn: arn }
3547
- };
3518
+ return null;
3548
3519
  }
3549
3520
  async attachToPrincipals(policyArn, groups, roles, users) {
3550
3521
  if (groups && Array.isArray(groups)) for (const groupName of groups) {
@@ -3945,13 +3916,6 @@ var IAMInstanceProfileProvider = class {
3945
3916
  * Lookup order:
3946
3917
  * 1. `--resource` override or `Properties.InstanceProfileName` → verify
3947
3918
  * via `GetInstanceProfile`.
3948
- * 2. `ListInstanceProfiles` paginator + a per-candidate `GetInstanceProfile`
3949
- * to read the tags, matched against `aws:cdk:path`. The list API does
3950
- * NOT return tags (AWS documents this on the command) even though the
3951
- * `InstanceProfile` type declares `Tags?`, so reading them off the
3952
- * summary typechecks and never matches.
3953
- *
3954
- * IAM is global; this walks every instance profile in the account once.
3955
3919
  */
3956
3920
  async import(input) {
3957
3921
  const explicit = resolveExplicitPhysicalId(input, "InstanceProfileName");
@@ -3965,32 +3929,7 @@ var IAMInstanceProfileProvider = class {
3965
3929
  if (err instanceof NoSuchEntityException) return null;
3966
3930
  throw err;
3967
3931
  }
3968
- const match = await importTagWalk({
3969
- cdkPath: input.cdkPath,
3970
- logicalId: input.logicalId,
3971
- listPage: async (marker) => {
3972
- const list = await this.iamClient.send(new ListInstanceProfilesCommand({ ...marker && { Marker: marker } }));
3973
- return {
3974
- items: list.InstanceProfiles,
3975
- nextMarker: list.IsTruncated ? list.Marker : void 0
3976
- };
3977
- },
3978
- describe: async (profile) => {
3979
- if (!profile.InstanceProfileName) return void 0;
3980
- try {
3981
- return (await this.iamClient.send(new GetInstanceProfileCommand({ InstanceProfileName: profile.InstanceProfileName }))).InstanceProfile;
3982
- } catch (err) {
3983
- if (err instanceof NoSuchEntityException) return void 0;
3984
- throw err;
3985
- }
3986
- },
3987
- tagsOf: (detail) => detail?.Tags
3988
- });
3989
- if (!match) return null;
3990
- return {
3991
- physicalId: match.summary.InstanceProfileName,
3992
- attributes: {}
3993
- };
3932
+ return null;
3994
3933
  }
3995
3934
  };
3996
3935
 
@@ -6290,8 +6229,6 @@ var S3BucketProvider = class {
6290
6229
  * Lookup order:
6291
6230
  * 1. `--resource <id>=<name>` override or `Properties.BucketName` → use directly,
6292
6231
  * verify with `HeadBucket`.
6293
- * 2. `ListBuckets` + `GetBucketTagging`, match `aws:cdk:path` against the
6294
- * CDK construct path.
6295
6232
  *
6296
6233
  * Returns `null` when nothing matches — caller treats this as
6297
6234
  * "not deployed yet" rather than a failure.
@@ -6309,32 +6246,7 @@ var S3BucketProvider = class {
6309
6246
  if (e.name === "NotFound" || e.name === "NoSuchBucket") return null;
6310
6247
  throw err;
6311
6248
  }
6312
- const match = await importTagWalk({
6313
- cdkPath: input.cdkPath,
6314
- logicalId: input.logicalId,
6315
- listPage: async () => {
6316
- return {
6317
- items: (await this.s3Client.send(new ListBucketsCommand({}))).Buckets,
6318
- nextMarker: void 0
6319
- };
6320
- },
6321
- describe: async (b) => {
6322
- if (!b.Name) return void 0;
6323
- try {
6324
- return await this.s3Client.send(new GetBucketTaggingCommand({ Bucket: b.Name }));
6325
- } catch (err) {
6326
- const e = err;
6327
- if (e.name === "NoSuchTagSet" || e.name === "AccessDenied" || e.$metadata?.httpStatusCode === 301) return;
6328
- throw err;
6329
- }
6330
- },
6331
- tagsOf: (tagging) => tagging.TagSet
6332
- });
6333
- if (!match) return null;
6334
- return {
6335
- physicalId: match.summary.Name,
6336
- attributes: {}
6337
- };
6249
+ return null;
6338
6250
  }
6339
6251
  /**
6340
6252
  * Delete a bucket, emptying it first if not empty.
@@ -7150,7 +7062,6 @@ var SQSQueueProvider = class {
7150
7062
  * Lookup order:
7151
7063
  * 1. `--resource` override (URL) → verify via `GetQueueAttributes`.
7152
7064
  * 2. `Properties.QueueName` → `GetQueueUrl` for direct lookup.
7153
- * 3. `aws:cdk:path` tag match via `ListQueues` + `ListQueueTags`.
7154
7065
  */
7155
7066
  async import(input) {
7156
7067
  if (input.knownPhysicalId) try {
@@ -7178,34 +7089,7 @@ var SQSQueueProvider = class {
7178
7089
  if (err instanceof QueueDoesNotExist) return null;
7179
7090
  throw err;
7180
7091
  }
7181
- const match = await importTagWalk({
7182
- cdkPath: input.cdkPath,
7183
- logicalId: input.logicalId,
7184
- listPage: async (marker) => {
7185
- const list = await this.sqsClient.send(new ListQueuesCommand({ ...marker && { NextToken: marker } }));
7186
- return {
7187
- items: list.QueueUrls,
7188
- nextMarker: list.NextToken
7189
- };
7190
- },
7191
- describe: async (url) => {
7192
- try {
7193
- return await this.sqsClient.send(new ListQueueTagsCommand({ QueueUrl: url }));
7194
- } catch (err) {
7195
- if (err instanceof QueueDoesNotExist) return void 0;
7196
- throw err;
7197
- }
7198
- },
7199
- tagsOf: (tagsResp) => Object.entries(tagsResp.Tags ?? {}).map(([Key, Value]) => ({
7200
- Key,
7201
- Value
7202
- }))
7203
- });
7204
- if (!match) return null;
7205
- return {
7206
- physicalId: match.summary,
7207
- attributes: {}
7208
- };
7092
+ return null;
7209
7093
  }
7210
7094
  };
7211
7095
 
@@ -7873,17 +7757,13 @@ var SNSTopicProvider = class {
7873
7757
  *
7874
7758
  * Lookup order:
7875
7759
  * 1. `--resource` override → trust as ARN, verify via `GetTopicAttributes`.
7876
- * 2. `Properties.TopicName` → `ListTopics` to find matching ARN.
7877
- * 3. `aws:cdk:path` tag match via `ListTopics` + `ListTagsForResource`.
7878
- *
7879
- * Steps 2 and 3 share ONE `ListTopics` walk (per candidate: name check
7880
- * first, then the tag read only when a `cdkPath` is present), which runs
7881
- * through the shared `importTagWalk` helper so the N+1 `ListTagsForResource`
7882
- * burst is retried with exponential backoff when AWS throttles it instead
7883
- * of aborting the whole import. The name match is expressed to the walk as
7884
- * a synthetic `aws:cdk:path` tag carrying the walk's own lookup key, so a
7885
- * name-only template (no CDK path metadata) still resolves without any tag
7886
- * API call — matching the previous inline loop.
7760
+ * 2. `Properties.TopicName` → `ListTopics` to find the matching ARN.
7761
+ *
7762
+ * The `aws:cdk:path` tag match that used to ride the same `ListTopics` walk
7763
+ * is gone (issue #1134): AWS rejects `aws:`-prefixed tag writes, so that tag
7764
+ * never exists on a real resource and the walk could not match. Auto-mode
7765
+ * import resolves ids from CloudFormation's `DescribeStackResources` or the
7766
+ * template's physical name; without a `TopicName` there is nothing to match.
7887
7767
  */
7888
7768
  async import(input) {
7889
7769
  if (input.knownPhysicalId) try {
@@ -7897,40 +7777,19 @@ var SNSTopicProvider = class {
7897
7777
  throw err;
7898
7778
  }
7899
7779
  const desiredName = typeof input.properties?.["TopicName"] === "string" ? input.properties["TopicName"] : void 0;
7900
- const walkCdkPath = input.cdkPath || (desiredName ? `cdkd:sns-topic-name:${desiredName}` : void 0);
7901
- /** Sentinel detail for a candidate matched by its ARN-tail topic name. */
7902
- const NAME_MATCH = { nameMatch: true };
7903
- const match = await importTagWalk({
7904
- cdkPath: walkCdkPath,
7905
- logicalId: input.logicalId,
7906
- listPage: async (marker) => {
7907
- const list = await this.snsClient.send(new ListTopicsCommand({ ...marker && { NextToken: marker } }));
7908
- return {
7909
- items: list.Topics,
7910
- nextMarker: list.NextToken
7780
+ if (!desiredName) return null;
7781
+ let marker;
7782
+ do {
7783
+ const list = await this.snsClient.send(new ListTopicsCommand({ ...marker && { NextToken: marker } }));
7784
+ for (const t of list.Topics ?? []) {
7785
+ if (!t.TopicArn) continue;
7786
+ if (t.TopicArn.substring(t.TopicArn.lastIndexOf(":") + 1) === desiredName) return {
7787
+ physicalId: t.TopicArn,
7788
+ attributes: {}
7911
7789
  };
7912
- },
7913
- describe: async (t) => {
7914
- if (!t.TopicArn) return void 0;
7915
- const arnTail = t.TopicArn.substring(t.TopicArn.lastIndexOf(":") + 1);
7916
- if (desiredName && arnTail === desiredName) return NAME_MATCH;
7917
- if (!input.cdkPath) return void 0;
7918
- try {
7919
- return await this.snsClient.send(new ListTagsForResourceCommand({ ResourceArn: t.TopicArn }));
7920
- } catch (err) {
7921
- if (err instanceof NotFoundException) return void 0;
7922
- throw err;
7923
- }
7924
- },
7925
- tagsOf: (detail) => "nameMatch" in detail ? [{
7926
- Key: CDK_PATH_TAG,
7927
- Value: walkCdkPath
7928
- }] : detail.Tags
7929
- });
7930
- if (match?.summary.TopicArn) return {
7931
- physicalId: match.summary.TopicArn,
7932
- attributes: {}
7933
- };
7790
+ }
7791
+ marker = list.NextToken;
7792
+ } while (marker);
7934
7793
  return null;
7935
7794
  }
7936
7795
  };
@@ -9284,15 +9143,6 @@ var LambdaFunctionProvider = class {
9284
9143
  * Lookup order:
9285
9144
  * 1. `--resource` override or `Properties.FunctionName` → use directly,
9286
9145
  * verify via `GetFunction`.
9287
- * 2. `ListFunctions` + `ListTags`, match `aws:cdk:path` tag.
9288
- *
9289
- * Lambda's `ListTags` returns a `Tags` map keyed by tag name (unlike
9290
- * EC2/S3 which return an array of `{Key, Value}`), so the map is re-shaped
9291
- * to `{Key, Value}` entries for the walk's matcher.
9292
- *
9293
- * The tag walk runs through the shared `importTagWalk` helper, so the N+1
9294
- * `ListTags` burst is retried with exponential backoff when AWS throttles
9295
- * it instead of aborting the whole import.
9296
9146
  */
9297
9147
  async import(input) {
9298
9148
  const explicit = resolveExplicitPhysicalId(input, "FunctionName");
@@ -9306,35 +9156,7 @@ var LambdaFunctionProvider = class {
9306
9156
  if (err instanceof ResourceNotFoundException) return null;
9307
9157
  throw err;
9308
9158
  }
9309
- const match = await importTagWalk({
9310
- cdkPath: input.cdkPath,
9311
- logicalId: input.logicalId,
9312
- listPage: async (marker) => {
9313
- const list = await this.lambdaClient.send(new ListFunctionsCommand({ ...marker && { Marker: marker } }));
9314
- return {
9315
- items: list.Functions,
9316
- nextMarker: list.NextMarker
9317
- };
9318
- },
9319
- describe: async (fn) => {
9320
- if (!fn.FunctionArn || !fn.FunctionName) return void 0;
9321
- try {
9322
- return await this.lambdaClient.send(new ListTagsCommand({ Resource: fn.FunctionArn }));
9323
- } catch (err) {
9324
- if (err instanceof ResourceNotFoundException) return void 0;
9325
- throw err;
9326
- }
9327
- },
9328
- tagsOf: (tagsResp) => Object.entries(tagsResp.Tags ?? {}).map(([Key, Value]) => ({
9329
- Key,
9330
- Value
9331
- }))
9332
- });
9333
- if (!match) return null;
9334
- return {
9335
- physicalId: match.summary.FunctionName,
9336
- attributes: {}
9337
- };
9159
+ return null;
9338
9160
  }
9339
9161
  };
9340
9162
 
@@ -10351,15 +10173,6 @@ var LambdaLayerVersionProvider = class {
10351
10173
  * `GetLayerVersionByArn`. (Note: there is no `LayerName` field that
10352
10174
  * uniquely names a *version*; a layer name resolves to the latest
10353
10175
  * version, so an explicit ARN is the only unambiguous override.)
10354
- * 2. `ListLayers` paginator + `ListTags(Resource: layerArn)` (which
10355
- * returns a `Tags: Record<string,string>` map keyed by tag name).
10356
- * Match `aws:cdk:path` and adopt `LatestMatchingVersion.LayerVersionArn`.
10357
- *
10358
- * **Caveat**: Lambda layer versions are immutable, so auto-lookup adopts
10359
- * the LATEST version of the named layer that carries the matching CDK
10360
- * path tag. If the user's CDK app has since published newer versions
10361
- * outside cdkd's tracking, the adopted physical id may be stale; pass
10362
- * `--resource <id>=<arn>` to pin a specific version.
10363
10176
  */
10364
10177
  async import(input) {
10365
10178
  if (input.knownPhysicalId) try {
@@ -10372,35 +10185,7 @@ var LambdaLayerVersionProvider = class {
10372
10185
  if (err instanceof ResourceNotFoundException) return null;
10373
10186
  throw err;
10374
10187
  }
10375
- const match = await importTagWalk({
10376
- cdkPath: input.cdkPath,
10377
- logicalId: input.logicalId,
10378
- listPage: async (marker) => {
10379
- const list = await this.lambdaClient.send(new ListLayersCommand({ ...marker && { Marker: marker } }));
10380
- return {
10381
- items: list.Layers,
10382
- nextMarker: list.NextMarker
10383
- };
10384
- },
10385
- describe: async (layer) => {
10386
- if (!layer.LayerArn || !layer.LatestMatchingVersion?.LayerVersionArn) return void 0;
10387
- try {
10388
- return await this.lambdaClient.send(new ListTagsCommand({ Resource: layer.LayerArn }));
10389
- } catch (err) {
10390
- if (err instanceof ResourceNotFoundException) return void 0;
10391
- throw err;
10392
- }
10393
- },
10394
- tagsOf: (tagsResp) => Object.entries(tagsResp.Tags ?? {}).map(([Key, Value]) => ({
10395
- Key,
10396
- Value
10397
- }))
10398
- });
10399
- if (!match) return null;
10400
- return {
10401
- physicalId: match.summary.LatestMatchingVersion.LayerVersionArn,
10402
- attributes: {}
10403
- };
10188
+ return null;
10404
10189
  }
10405
10190
  };
10406
10191
 
@@ -10608,6 +10393,394 @@ var LambdaEventInvokeConfigProvider = class {
10608
10393
  }
10609
10394
  };
10610
10395
 
10396
+ //#endregion
10397
+ //#region src/provisioning/providers/lambda-microvm-image-provider.ts
10398
+ /**
10399
+ * AWS Lambda MicroVM Image Provider
10400
+ *
10401
+ * Implements `AWS::Lambda::MicrovmImage` using the dedicated `lambda-microvms`
10402
+ * service SDK (`@aws-sdk/client-lambda-microvms`) — NOT `@aws-sdk/client-lambda`.
10403
+ * The MicroVM image APIs (`CreateMicrovmImage` / `GetMicrovmImage` /
10404
+ * `UpdateMicrovmImage` / `DeleteMicrovmImage`) live in their own service model.
10405
+ *
10406
+ * **The build is asynchronous.** `CreateMicrovmImage` returns immediately with
10407
+ * the image in `CREATING` state; Lambda then downloads the code artifact zip
10408
+ * from S3, runs the Dockerfile, starts the application, and captures a
10409
+ * Firecracker snapshot. The image reaches `CREATED` on success or
10410
+ * `CREATE_FAILED` on failure (build logs land in CloudWatch under
10411
+ * `/aws/lambda/microvms/<name>`). `create()` polls `GetMicrovmImage` until the
10412
+ * image reaches `CREATED`. `UpdateMicrovmImage` triggers the same async rebuild
10413
+ * (`UPDATING` -> `UPDATED` / `UPDATE_FAILED`).
10414
+ *
10415
+ * `CDKD_NO_WAIT=true` (or `cdkd deploy --no-wait`) short-circuits the create /
10416
+ * update poll and returns immediately with the image ARN. The build continues
10417
+ * asynchronously on the AWS side — cdkd will NOT observe a later
10418
+ * `CREATE_FAILED`, and an immediate `destroy` may race the in-flight build.
10419
+ * The Cloud Control fallback path does NOT honor `--no-wait` (it always polls
10420
+ * its request token to a terminal state), so this SDK provider is what makes
10421
+ * `--no-wait` effective for this resource type.
10422
+ *
10423
+ * **Physical id is the image ARN** (`primaryIdentifier` = `/properties/ImageArn`,
10424
+ * an AWS-assigned read-only attribute). CFn `Ref` returns the ARN. `Name` is a
10425
+ * create-only property, so a `Name` change is routed to REPLACEMENT by cdkd's
10426
+ * create-only detection (`getCreateOnlyPropertyPaths`) and never reaches
10427
+ * `update()`.
10428
+ *
10429
+ * **CFn <-> SDK shape translation.** The template carries CloudFormation-schema
10430
+ * PascalCase properties (e.g. `CodeArtifact: { Uri }`, `Tags: [{Key, Value}]`,
10431
+ * `Logging: { Disabled: true }`); the SDK expects camelCase with different
10432
+ * container shapes (`codeArtifact: { uri }`, `tags: Record<string,string>`,
10433
+ * `logging: { disabled: {} }`). The mapping helpers below translate each field
10434
+ * explicitly so this provider accepts the exact same template the Cloud Control
10435
+ * fallback would.
10436
+ *
10437
+ * **Tags update out-of-band.** `Tags` is `tagUpdatable` but is NOT a field on
10438
+ * `UpdateMicrovmImage`, so `update()` reconciles tag changes via `TagResource`
10439
+ * / `UntagResource` (no rebuild). A change limited to `Tags` skips the
10440
+ * `UpdateMicrovmImage` rebuild entirely; only a build-affecting property change
10441
+ * ({@link BUILD_AFFECTING_CFN_KEYS}) issues the async rebuild.
10442
+ */
10443
+ var LambdaMicrovmImageProvider = class {
10444
+ client;
10445
+ logger = getLogger().child("LambdaMicrovmImageProvider");
10446
+ maxPollAttempts = Number(process.env["CDKD_MICROVM_IMAGE_POLL_ATTEMPTS"] ?? 180);
10447
+ pollIntervalMs = Number(process.env["CDKD_MICROVM_IMAGE_POLL_INTERVAL_MS"] ?? 1e4);
10448
+ constructor() {
10449
+ this.client = getAwsClients().lambdaMicrovms;
10450
+ }
10451
+ handledProperties = /* @__PURE__ */ new Map([["AWS::Lambda::MicrovmImage", /* @__PURE__ */ new Set([
10452
+ "Name",
10453
+ "BaseImageArn",
10454
+ "BaseImageVersion",
10455
+ "BuildRoleArn",
10456
+ "Description",
10457
+ "CodeArtifact",
10458
+ "Logging",
10459
+ "EgressNetworkConnectors",
10460
+ "CpuConfigurations",
10461
+ "Resources",
10462
+ "AdditionalOsCapabilities",
10463
+ "Hooks",
10464
+ "EnvironmentVariables",
10465
+ "Tags"
10466
+ ])]]);
10467
+ unhandledByDesign = /* @__PURE__ */ new Map([["AWS::Lambda::MicrovmImage", /* @__PURE__ */ new Map([
10468
+ ["ImageArn", "AWS-managed read-only attribute (primaryIdentifier / physical id)"],
10469
+ ["State", "AWS-managed read-only attribute"],
10470
+ ["LatestActiveImageVersion", "AWS-managed read-only attribute"],
10471
+ ["LatestFailedImageVersion", "AWS-managed read-only attribute"],
10472
+ ["CreatedAt", "AWS-managed read-only attribute"],
10473
+ ["UpdatedAt", "AWS-managed read-only attribute"]
10474
+ ])]]);
10475
+ getMinResourceTimeoutMs() {
10476
+ return this.maxPollAttempts * this.pollIntervalMs;
10477
+ }
10478
+ async create(logicalId, resourceType, properties) {
10479
+ this.logger.debug(`Creating MicroVM image ${logicalId}`);
10480
+ const name = properties["Name"];
10481
+ const baseImageArn = properties["BaseImageArn"];
10482
+ const buildRoleArn = properties["BuildRoleArn"];
10483
+ const codeArtifact = mapCodeArtifact(properties["CodeArtifact"]);
10484
+ const missing = [
10485
+ !name && "Name",
10486
+ !baseImageArn && "BaseImageArn",
10487
+ !buildRoleArn && "BuildRoleArn",
10488
+ !codeArtifact && "CodeArtifact.Uri"
10489
+ ].filter(Boolean);
10490
+ if (missing.length > 0) throw new ProvisioningError(`${missing.join(", ")} ${missing.length === 1 ? "is" : "are"} required for MicroVM image ${logicalId}`, resourceType, logicalId);
10491
+ const input = {
10492
+ name,
10493
+ baseImageArn,
10494
+ buildRoleArn,
10495
+ codeArtifact,
10496
+ ...buildCommonImageInput(properties)
10497
+ };
10498
+ const tags = mapKeyValueListToRecord(properties["Tags"]);
10499
+ if (tags) input.tags = tags;
10500
+ try {
10501
+ const response = await this.client.send(new CreateMicrovmImageCommand(input));
10502
+ const imageArn = response.imageArn;
10503
+ if (!imageArn) throw new ProvisioningError(`CreateMicrovmImage succeeded but no imageArn returned for ${logicalId}`, resourceType, logicalId);
10504
+ this.logger.debug(`Created MicroVM image ${logicalId}: ${imageArn} (state=${response.state})`);
10505
+ const noWait = process.env["CDKD_NO_WAIT"] === "true";
10506
+ let latest = {
10507
+ state: response.state,
10508
+ latestActiveImageVersion: response.latestActiveImageVersion,
10509
+ latestFailedImageVersion: response.latestFailedImageVersion,
10510
+ createdAt: response.createdAt,
10511
+ updatedAt: response.updatedAt
10512
+ };
10513
+ if (!noWait) latest = await this.waitForTerminalState(imageArn, logicalId, "create");
10514
+ else this.logger.warn(`Skipping wait for MicroVM image ${logicalId} (CDKD_NO_WAIT=true). The build continues asynchronously; a CREATE_FAILED will not be observed here.`);
10515
+ return {
10516
+ physicalId: imageArn,
10517
+ attributes: this.buildAttributes(imageArn, latest.state, {
10518
+ latestActiveImageVersion: latest.latestActiveImageVersion,
10519
+ latestFailedImageVersion: latest.latestFailedImageVersion,
10520
+ createdAt: latest.createdAt,
10521
+ updatedAt: latest.updatedAt
10522
+ })
10523
+ };
10524
+ } catch (error) {
10525
+ throw this.wrapError("create", logicalId, resourceType, void 0, error);
10526
+ }
10527
+ }
10528
+ async update(logicalId, physicalId, resourceType, properties, previousProperties) {
10529
+ this.logger.debug(`Updating MicroVM image ${logicalId}: ${physicalId}`);
10530
+ if (properties["Name"] !== previousProperties["Name"]) throw new ProvisioningError(`MicroVM image ${logicalId} Name is create-only and cannot be changed in place (${String(previousProperties["Name"])} -> ${String(properties["Name"])}); this requires replacement.`, resourceType, logicalId, physicalId);
10531
+ try {
10532
+ await this.reconcileTags(physicalId, properties["Tags"], previousProperties["Tags"]);
10533
+ if (!BUILD_AFFECTING_CFN_KEYS.some((key) => JSON.stringify(properties[key]) !== JSON.stringify(previousProperties[key]))) {
10534
+ this.logger.debug(`MicroVM image ${logicalId}: only tags changed, skipping UpdateMicrovmImage rebuild`);
10535
+ const current = await this.client.send(new GetMicrovmImageCommand({ imageIdentifier: physicalId }));
10536
+ return {
10537
+ physicalId,
10538
+ wasReplaced: false,
10539
+ attributes: this.buildAttributes(physicalId, current.state, current)
10540
+ };
10541
+ }
10542
+ const baseImageArn = properties["BaseImageArn"];
10543
+ const buildRoleArn = properties["BuildRoleArn"];
10544
+ const codeArtifact = mapCodeArtifact(properties["CodeArtifact"]);
10545
+ if (!baseImageArn || !buildRoleArn || !codeArtifact) throw new ProvisioningError(`BaseImageArn, BuildRoleArn, and CodeArtifact.Uri are required to update MicroVM image ${logicalId}`, resourceType, logicalId, physicalId);
10546
+ const input = {
10547
+ imageIdentifier: physicalId,
10548
+ baseImageArn,
10549
+ buildRoleArn,
10550
+ codeArtifact,
10551
+ ...buildCommonImageInput(properties),
10552
+ environmentVariables: mapKeyValueListToRecord(properties["EnvironmentVariables"]) ?? {}
10553
+ };
10554
+ await this.client.send(new UpdateMicrovmImageCommand(input));
10555
+ const noWait = process.env["CDKD_NO_WAIT"] === "true";
10556
+ let latest;
10557
+ if (!noWait) latest = await this.waitForTerminalState(physicalId, logicalId, "update");
10558
+ else this.logger.warn(`Skipping wait for MicroVM image ${logicalId} update (CDKD_NO_WAIT=true). The rebuild continues asynchronously.`);
10559
+ return {
10560
+ physicalId,
10561
+ wasReplaced: false,
10562
+ attributes: this.buildAttributes(physicalId, latest?.state, {
10563
+ latestActiveImageVersion: latest?.latestActiveImageVersion,
10564
+ latestFailedImageVersion: latest?.latestFailedImageVersion,
10565
+ createdAt: latest?.createdAt,
10566
+ updatedAt: latest?.updatedAt
10567
+ })
10568
+ };
10569
+ } catch (error) {
10570
+ throw this.wrapError("update", logicalId, resourceType, physicalId, error);
10571
+ }
10572
+ }
10573
+ async delete(logicalId, physicalId, resourceType, _properties, context) {
10574
+ this.logger.debug(`Deleting MicroVM image ${logicalId}: ${physicalId}`);
10575
+ try {
10576
+ try {
10577
+ await this.client.send(new DeleteMicrovmImageCommand({ imageIdentifier: physicalId }));
10578
+ } catch (error) {
10579
+ if (error instanceof ResourceNotFoundException$7) {
10580
+ assertRegionMatch(await this.client.config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
10581
+ this.logger.debug(`MicroVM image ${physicalId} does not exist, skipping deletion`);
10582
+ return;
10583
+ }
10584
+ throw error;
10585
+ }
10586
+ await this.waitForDeleted(physicalId, logicalId);
10587
+ this.logger.debug(`Successfully deleted MicroVM image ${logicalId}`);
10588
+ } catch (error) {
10589
+ throw this.wrapError("delete", logicalId, resourceType, physicalId, error);
10590
+ }
10591
+ }
10592
+ async getAttribute(physicalId, _resourceType, attributeName) {
10593
+ if (attributeName === "ImageArn") return physicalId;
10594
+ const resp = await this.client.send(new GetMicrovmImageCommand({ imageIdentifier: physicalId }));
10595
+ switch (attributeName) {
10596
+ case "State": return resp.state;
10597
+ case "LatestActiveImageVersion": return resp.latestActiveImageVersion;
10598
+ case "LatestFailedImageVersion": return resp.latestFailedImageVersion;
10599
+ case "CreatedAt": return resp.createdAt?.toISOString();
10600
+ case "UpdatedAt": return resp.updatedAt?.toISOString();
10601
+ default: return;
10602
+ }
10603
+ }
10604
+ buildAttributes(imageArn, state, extra) {
10605
+ const attributes = { ImageArn: imageArn };
10606
+ if (state !== void 0) attributes["State"] = state;
10607
+ if (extra.latestActiveImageVersion !== void 0) attributes["LatestActiveImageVersion"] = extra.latestActiveImageVersion;
10608
+ if (extra.latestFailedImageVersion !== void 0) attributes["LatestFailedImageVersion"] = extra.latestFailedImageVersion;
10609
+ if (extra.createdAt !== void 0) attributes["CreatedAt"] = extra.createdAt.toISOString();
10610
+ if (extra.updatedAt !== void 0) attributes["UpdatedAt"] = extra.updatedAt.toISOString();
10611
+ return attributes;
10612
+ }
10613
+ /**
10614
+ * Poll `GetMicrovmImage` until the image reaches a terminal success state
10615
+ * (`CREATED` after create, `CREATED` / `UPDATED` after update). Throws on the
10616
+ * matching failure state (`CREATE_FAILED` / `UPDATE_FAILED`) or on
10617
+ * poll-cap exhaustion.
10618
+ */
10619
+ async waitForTerminalState(imageArn, logicalId, operation) {
10620
+ this.logger.debug(`Waiting for MicroVM image ${imageArn} to finish ${operation}...`);
10621
+ for (let attempt = 1; attempt <= this.maxPollAttempts; attempt++) {
10622
+ const resp = await this.client.send(new GetMicrovmImageCommand({ imageIdentifier: imageArn }));
10623
+ const state = resp.state;
10624
+ if (state === "CREATED" || state === "UPDATED") {
10625
+ this.logger.debug(`MicroVM image ${imageArn} reached ${state}`);
10626
+ return resp;
10627
+ }
10628
+ if (state === "CREATE_FAILED" || state === "UPDATE_FAILED") throw new Error(`MicroVM image ${logicalId} (${imageArn}) entered ${state} during ${operation}. Check the build logs in CloudWatch under /aws/lambda/microvms/ to diagnose.`);
10629
+ this.logger.debug(`MicroVM image ${imageArn} state: ${state} (attempt ${attempt}/${this.maxPollAttempts})`);
10630
+ await sleep$2(this.pollIntervalMs);
10631
+ }
10632
+ throw new Error(`MicroVM image ${logicalId} (${imageArn}) did not finish ${operation} within ${this.maxPollAttempts * this.pollIntervalMs / 1e3}s. Increase --resource-timeout AWS::Lambda::MicrovmImage=<duration> or set CDKD_NO_WAIT=true.`);
10633
+ }
10634
+ /**
10635
+ * Poll `GetMicrovmImage` until it 404s (image fully deleted). Throws on
10636
+ * `DELETE_FAILED` or poll-cap exhaustion.
10637
+ */
10638
+ async waitForDeleted(imageArn, logicalId) {
10639
+ for (let attempt = 1; attempt <= this.maxPollAttempts; attempt++) {
10640
+ let resp;
10641
+ try {
10642
+ resp = await this.client.send(new GetMicrovmImageCommand({ imageIdentifier: imageArn }));
10643
+ } catch (error) {
10644
+ if (error instanceof ResourceNotFoundException$7) return;
10645
+ throw error;
10646
+ }
10647
+ if (resp.state === "DELETE_FAILED") throw new Error(`MicroVM image ${logicalId} (${imageArn}) entered DELETE_FAILED. Check the CloudWatch build logs under /aws/lambda/microvms/ to diagnose.`);
10648
+ this.logger.debug(`MicroVM image ${imageArn} state: ${resp.state} (delete attempt ${attempt}/${this.maxPollAttempts})`);
10649
+ await sleep$2(this.pollIntervalMs);
10650
+ }
10651
+ throw new Error(`MicroVM image ${logicalId} (${imageArn}) was not fully deleted within ${this.maxPollAttempts * this.pollIntervalMs / 1e3}s.`);
10652
+ }
10653
+ /**
10654
+ * Reconcile the resource's tags to the desired set via TagResource /
10655
+ * UntagResource (diff of the CFn `Tags` list, old vs new). Tags are NOT a
10656
+ * field on UpdateMicrovmImage, so this is the only way a tag change reaches
10657
+ * AWS on update — and it applies without an image rebuild.
10658
+ */
10659
+ async reconcileTags(physicalId, newTags, oldTags) {
10660
+ const newMap = mapKeyValueListToRecord(newTags) ?? {};
10661
+ const oldMap = mapKeyValueListToRecord(oldTags) ?? {};
10662
+ const keysToRemove = Object.keys(oldMap).filter((k) => !(k in newMap));
10663
+ const tagsToAdd = {};
10664
+ for (const [k, v] of Object.entries(newMap)) if (oldMap[k] !== v) tagsToAdd[k] = v;
10665
+ if (keysToRemove.length > 0) await this.client.send(new UntagResourceCommand$10({
10666
+ Resource: physicalId,
10667
+ TagKeys: keysToRemove
10668
+ }));
10669
+ if (Object.keys(tagsToAdd).length > 0) await this.client.send(new TagResourceCommand$10({
10670
+ Resource: physicalId,
10671
+ Tags: tagsToAdd
10672
+ }));
10673
+ }
10674
+ wrapError(operation, logicalId, resourceType, physicalId, error) {
10675
+ if (error instanceof ProvisioningError) return error;
10676
+ const cause = error instanceof Error ? error : void 0;
10677
+ return new ProvisioningError(`Failed to ${operation} MicroVM image ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, physicalId, cause);
10678
+ }
10679
+ };
10680
+ /**
10681
+ * CFn property names whose change requires an UpdateMicrovmImage call (an async
10682
+ * image rebuild). Everything the SDK's UpdateMicrovmImage accepts EXCEPT tags
10683
+ * (which reconcile out-of-band via TagResource / UntagResource) and Name
10684
+ * (create-only). A change limited to `Tags` skips the rebuild.
10685
+ */
10686
+ const BUILD_AFFECTING_CFN_KEYS = [
10687
+ "BaseImageArn",
10688
+ "BaseImageVersion",
10689
+ "BuildRoleArn",
10690
+ "Description",
10691
+ "CodeArtifact",
10692
+ "Logging",
10693
+ "EgressNetworkConnectors",
10694
+ "CpuConfigurations",
10695
+ "Resources",
10696
+ "AdditionalOsCapabilities",
10697
+ "Hooks",
10698
+ "EnvironmentVariables"
10699
+ ];
10700
+ function sleep$2(ms) {
10701
+ return new Promise((resolve) => setTimeout(resolve, ms));
10702
+ }
10703
+ /**
10704
+ * Build the optional create/update input fields shared by both operations,
10705
+ * translating each from its CloudFormation-schema shape to the SDK shape.
10706
+ * Only defined fields are included so the request never carries `undefined`.
10707
+ */
10708
+ function buildCommonImageInput(properties) {
10709
+ const input = {};
10710
+ if (typeof properties["BaseImageVersion"] === "string") input.baseImageVersion = properties["BaseImageVersion"];
10711
+ if (typeof properties["Description"] === "string") input.description = properties["Description"];
10712
+ const logging = mapLogging(properties["Logging"]);
10713
+ if (logging) input.logging = logging;
10714
+ if (Array.isArray(properties["EgressNetworkConnectors"])) input.egressNetworkConnectors = properties["EgressNetworkConnectors"];
10715
+ const cpuConfigurations = mapCpuConfigurations(properties["CpuConfigurations"]);
10716
+ if (cpuConfigurations) input.cpuConfigurations = cpuConfigurations;
10717
+ const resources = mapResources(properties["Resources"]);
10718
+ if (resources) input.resources = resources;
10719
+ if (Array.isArray(properties["AdditionalOsCapabilities"])) input.additionalOsCapabilities = properties["AdditionalOsCapabilities"];
10720
+ const hooks = mapHooks(properties["Hooks"]);
10721
+ if (hooks) input.hooks = hooks;
10722
+ const environmentVariables = mapKeyValueListToRecord(properties["EnvironmentVariables"]);
10723
+ if (environmentVariables) input.environmentVariables = environmentVariables;
10724
+ return input;
10725
+ }
10726
+ function mapCodeArtifact(value) {
10727
+ if (!isRecord(value)) return void 0;
10728
+ const uri = value["Uri"];
10729
+ return typeof uri === "string" ? { uri } : void 0;
10730
+ }
10731
+ function mapLogging(value) {
10732
+ if (!isRecord(value)) return void 0;
10733
+ if (value["Disabled"] === true) return { disabled: {} };
10734
+ const cloudWatch = value["CloudWatch"];
10735
+ if (isRecord(cloudWatch)) {
10736
+ const cw = {};
10737
+ if (typeof cloudWatch["LogGroup"] === "string") cw.logGroup = cloudWatch["LogGroup"];
10738
+ if (typeof cloudWatch["LogStream"] === "string") cw.logStream = cloudWatch["LogStream"];
10739
+ return { cloudWatch: cw };
10740
+ }
10741
+ }
10742
+ function mapCpuConfigurations(value) {
10743
+ if (!Array.isArray(value)) return void 0;
10744
+ return value.filter(isRecord).map((c) => ({ architecture: c["Architecture"] }));
10745
+ }
10746
+ function mapResources(value) {
10747
+ if (!Array.isArray(value)) return void 0;
10748
+ return value.filter(isRecord).map((r) => Number(r["MinimumMemoryInMiB"])).filter((n) => Number.isFinite(n)).map((minimumMemoryInMiB) => ({ minimumMemoryInMiB }));
10749
+ }
10750
+ /**
10751
+ * Translate the CFn `Hooks` structure (PascalCase keys throughout, all leaf
10752
+ * values are strings/numbers) to the SDK `hooks` shape (camelCase keys). Safe
10753
+ * to lower-case the first character of every key recursively because Hooks
10754
+ * carries no tagged unions and no array-of-record members.
10755
+ */
10756
+ function mapHooks(value) {
10757
+ if (!isRecord(value)) return void 0;
10758
+ return lowerFirstKeysDeep(value);
10759
+ }
10760
+ /**
10761
+ * Convert a CFn `[{Key, Value}]` list (used by both `Tags` and
10762
+ * `EnvironmentVariables`) to the SDK `Record<string, string>` shape. Returns
10763
+ * `undefined` for an empty / absent list so the request omits the field.
10764
+ */
10765
+ function mapKeyValueListToRecord(value) {
10766
+ if (!Array.isArray(value)) return void 0;
10767
+ const out = {};
10768
+ for (const entry of value) if (isRecord(entry) && typeof entry["Key"] === "string") out[entry["Key"]] = typeof entry["Value"] === "string" ? entry["Value"] : "";
10769
+ return Object.keys(out).length > 0 ? out : void 0;
10770
+ }
10771
+ function lowerFirstKeysDeep(value) {
10772
+ if (Array.isArray(value)) return value.map(lowerFirstKeysDeep);
10773
+ if (isRecord(value)) {
10774
+ const out = {};
10775
+ for (const [k, v] of Object.entries(value)) out[k.charAt(0).toLowerCase() + k.slice(1)] = lowerFirstKeysDeep(v);
10776
+ return out;
10777
+ }
10778
+ return value;
10779
+ }
10780
+ function isRecord(value) {
10781
+ return typeof value === "object" && value !== null && !Array.isArray(value);
10782
+ }
10783
+
10611
10784
  //#endregion
10612
10785
  //#region src/provisioning/providers/dynamodb-table-provider.ts
10613
10786
  /**
@@ -11465,11 +11638,6 @@ var DynamoDBTableProvider = class {
11465
11638
  *
11466
11639
  * Lookup order:
11467
11640
  * 1. `--resource` override or `Properties.TableName` → verify via `DescribeTable`.
11468
- * 2. `ListTables` + `ListTagsOfResource`, match `aws:cdk:path` tag.
11469
- *
11470
- * Tags require the table ARN, which `DescribeTable` provides; the loop
11471
- * therefore costs one `DescribeTable` per table just to read the ARN.
11472
- * Acceptable for typical DynamoDB cardinalities.
11473
11641
  */
11474
11642
  async import(input) {
11475
11643
  const explicit = resolveExplicitPhysicalId(input, "TableName");
@@ -11483,33 +11651,7 @@ var DynamoDBTableProvider = class {
11483
11651
  if (err instanceof ResourceNotFoundException$1) return null;
11484
11652
  throw err;
11485
11653
  }
11486
- const match = await importTagWalk({
11487
- cdkPath: input.cdkPath,
11488
- logicalId: input.logicalId,
11489
- listPage: async (marker) => {
11490
- const list = await this.dynamoDBClient.send(new ListTablesCommand({ ...marker && { ExclusiveStartTableName: marker } }));
11491
- return {
11492
- items: list.TableNames,
11493
- nextMarker: list.LastEvaluatedTableName
11494
- };
11495
- },
11496
- describe: async (name) => {
11497
- try {
11498
- const arn = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: name }))).Table?.TableArn;
11499
- if (!arn) return void 0;
11500
- return await this.dynamoDBClient.send(new ListTagsOfResourceCommand({ ResourceArn: arn }));
11501
- } catch (err) {
11502
- if (err instanceof ResourceNotFoundException$1) return void 0;
11503
- throw err;
11504
- }
11505
- },
11506
- tagsOf: (tagsResp) => tagsResp.Tags
11507
- });
11508
- if (!match) return null;
11509
- return {
11510
- physicalId: match.summary,
11511
- attributes: {}
11512
- };
11654
+ return null;
11513
11655
  }
11514
11656
  };
11515
11657
 
@@ -12683,7 +12825,6 @@ var DynamoDBGlobalTableProvider = class {
12683
12825
  *
12684
12826
  * Lookup order:
12685
12827
  * 1. `--resource` override or `Properties.TableName` → verify via DescribeTable.
12686
- * 2. `ListTables` + `ListTagsOfResource`, match `aws:cdk:path` tag.
12687
12828
  *
12688
12829
  * Same shape as `DynamoDBTableProvider.import()`. The provider returns
12689
12830
  * the physical id only; cdkd's import flow does the attribute capture
@@ -12701,33 +12842,7 @@ var DynamoDBGlobalTableProvider = class {
12701
12842
  if (err instanceof ResourceNotFoundException$1) return null;
12702
12843
  throw err;
12703
12844
  }
12704
- const match = await importTagWalk({
12705
- cdkPath: input.cdkPath,
12706
- logicalId: input.logicalId,
12707
- listPage: async (marker) => {
12708
- const list = await this.dynamoDBClient.send(new ListTablesCommand({ ...marker && { ExclusiveStartTableName: marker } }));
12709
- return {
12710
- items: list.TableNames,
12711
- nextMarker: list.LastEvaluatedTableName
12712
- };
12713
- },
12714
- describe: async (name) => {
12715
- try {
12716
- const arn = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: name }))).Table?.TableArn;
12717
- if (!arn) return void 0;
12718
- return await this.dynamoDBClient.send(new ListTagsOfResourceCommand({ ResourceArn: arn }));
12719
- } catch (err) {
12720
- if (err instanceof ResourceNotFoundException$1) return void 0;
12721
- throw err;
12722
- }
12723
- },
12724
- tagsOf: (tagsResp) => tagsResp.Tags
12725
- });
12726
- if (!match) return null;
12727
- return {
12728
- physicalId: match.summary,
12729
- attributes: {}
12730
- };
12845
+ return null;
12731
12846
  }
12732
12847
  async waitForTableActive(tableName, logicalId, maxAttempts = 120) {
12733
12848
  for (let attempt = 1; attempt <= maxAttempts; attempt++) {
@@ -13277,11 +13392,6 @@ var LogsLogGroupProvider = class {
13277
13392
  * Lookup order:
13278
13393
  * 1. `--resource` override or `Properties.LogGroupName` → verify via
13279
13394
  * `DescribeLogGroups` (filtered by name prefix).
13280
- * 2. `aws:cdk:path` tag match via `DescribeLogGroups` + `ListTagsForResource`.
13281
- *
13282
- * `ListTagsForResource` for log groups uses the log-group ARN. The
13283
- * `DescribeLogGroups` response includes the ARN, so no extra round-trip
13284
- * is needed beyond the per-group tag lookup.
13285
13395
  */
13286
13396
  async import(input) {
13287
13397
  const explicit = resolveExplicitPhysicalId(input, "LogGroupName");
@@ -13294,36 +13404,7 @@ var LogsLogGroupProvider = class {
13294
13404
  if (err instanceof ResourceNotFoundException$4) return null;
13295
13405
  throw err;
13296
13406
  }
13297
- const match = await importTagWalk({
13298
- cdkPath: input.cdkPath,
13299
- logicalId: input.logicalId,
13300
- listPage: async (marker) => {
13301
- const list = await this.logsClient.send(new DescribeLogGroupsCommand({ ...marker && { nextToken: marker } }));
13302
- return {
13303
- items: list.logGroups,
13304
- nextMarker: list.nextToken
13305
- };
13306
- },
13307
- describe: async (g) => {
13308
- if (!g.logGroupName || !g.arn) return void 0;
13309
- const arnForTags = g.arn.replace(/:\*$/, "");
13310
- try {
13311
- return await this.logsClient.send(new ListTagsForResourceCommand$5({ resourceArn: arnForTags }));
13312
- } catch (err) {
13313
- if (err instanceof ResourceNotFoundException$4) return void 0;
13314
- throw err;
13315
- }
13316
- },
13317
- tagsOf: (tagsResp) => Object.entries(tagsResp.tags ?? {}).map(([Key, Value]) => ({
13318
- Key,
13319
- Value
13320
- }))
13321
- });
13322
- if (!match) return null;
13323
- return {
13324
- physicalId: match.summary.logGroupName,
13325
- attributes: {}
13326
- };
13407
+ return null;
13327
13408
  }
13328
13409
  };
13329
13410
 
@@ -13640,32 +13721,7 @@ var CloudWatchAlarmProvider = class {
13640
13721
  if (this.isNotFound(err)) return null;
13641
13722
  throw err;
13642
13723
  }
13643
- const match = await importTagWalk({
13644
- cdkPath: input.cdkPath,
13645
- logicalId: input.logicalId,
13646
- listPage: async (marker) => {
13647
- const list = await this.cloudWatchClient.send(new DescribeAlarmsCommand({ ...marker && { NextToken: marker } }));
13648
- return {
13649
- items: [...list.MetricAlarms ?? [], ...list.CompositeAlarms ?? []],
13650
- nextMarker: list.NextToken
13651
- };
13652
- },
13653
- describe: async (a) => {
13654
- if (!a.AlarmArn || !a.AlarmName) return void 0;
13655
- try {
13656
- return await this.cloudWatchClient.send(new ListTagsForResourceCommand$4({ ResourceARN: a.AlarmArn }));
13657
- } catch (err) {
13658
- if (this.isNotFound(err)) return void 0;
13659
- throw err;
13660
- }
13661
- },
13662
- tagsOf: (tagsResp) => tagsResp.Tags
13663
- });
13664
- if (!match) return null;
13665
- return {
13666
- physicalId: match.summary.AlarmName,
13667
- attributes: {}
13668
- };
13724
+ return null;
13669
13725
  }
13670
13726
  isNotFound(err) {
13671
13727
  if (!(err instanceof Error)) return false;
@@ -13919,7 +13975,6 @@ var SecretsManagerSecretProvider = class {
13919
13975
  * Lookup order:
13920
13976
  * 1. `--resource` override (ARN) → verify via `DescribeSecret`.
13921
13977
  * 2. `Properties.Name` → `DescribeSecret` (accepts name).
13922
- * 3. `aws:cdk:path` tag match via `ListSecrets` (which already returns Tags).
13923
13978
  */
13924
13979
  async import(input) {
13925
13980
  if (input.knownPhysicalId) try {
@@ -13943,24 +13998,7 @@ var SecretsManagerSecretProvider = class {
13943
13998
  if (err instanceof ResourceNotFoundException$3) return null;
13944
13999
  throw err;
13945
14000
  }
13946
- const match = await importTagWalk({
13947
- cdkPath: input.cdkPath,
13948
- logicalId: input.logicalId,
13949
- listPage: async (marker) => {
13950
- const list = await this.smClient.send(new ListSecretsCommand({ ...marker && { NextToken: marker } }));
13951
- return {
13952
- items: list.SecretList,
13953
- nextMarker: list.NextToken
13954
- };
13955
- },
13956
- describe: async (secret) => secret.ARN ? secret : void 0,
13957
- tagsOf: (secret) => secret.Tags
13958
- });
13959
- if (!match) return null;
13960
- return {
13961
- physicalId: match.summary.ARN,
13962
- attributes: {}
13963
- };
14001
+ return null;
13964
14002
  }
13965
14003
  };
13966
14004
 
@@ -14230,12 +14268,10 @@ var SSMParameterProvider = class {
14230
14268
  *
14231
14269
  * SSM physical IDs ARE the parameter names (`/foo/bar`). The CDK template
14232
14270
  * usually carries `Properties.Name` explicitly, so the explicit-name path
14233
- * covers most cases. The tag-based fallback is rarely needed.
14271
+ * covers most cases.
14234
14272
  *
14235
14273
  * Lookup order:
14236
14274
  * 1. `--resource` override or `Properties.Name` → verify via `GetParameter`.
14237
- * 2. `aws:cdk:path` tag match via `DescribeParameters` + `ListTagsForResource`
14238
- * (`ResourceType: 'Parameter'`, `ResourceId: <name>`).
14239
14275
  */
14240
14276
  async import(input) {
14241
14277
  const explicit = resolveExplicitPhysicalId(input, "Name");
@@ -14249,35 +14285,7 @@ var SSMParameterProvider = class {
14249
14285
  if (err instanceof ParameterNotFound) return null;
14250
14286
  throw err;
14251
14287
  }
14252
- const match = await importTagWalk({
14253
- cdkPath: input.cdkPath,
14254
- logicalId: input.logicalId,
14255
- listPage: async (marker) => {
14256
- const list = await this.ssmClient.send(new DescribeParametersCommand({ ...marker && { NextToken: marker } }));
14257
- return {
14258
- items: list.Parameters,
14259
- nextMarker: list.NextToken
14260
- };
14261
- },
14262
- describe: async (p) => {
14263
- if (!p.Name) return void 0;
14264
- try {
14265
- return await this.ssmClient.send(new ListTagsForResourceCommand$2({
14266
- ResourceType: "Parameter",
14267
- ResourceId: p.Name
14268
- }));
14269
- } catch (err) {
14270
- if (err instanceof ParameterNotFound) return void 0;
14271
- throw err;
14272
- }
14273
- },
14274
- tagsOf: (tagsResp) => tagsResp.TagList
14275
- });
14276
- if (!match) return null;
14277
- return {
14278
- physicalId: match.summary.Name,
14279
- attributes: {}
14280
- };
14288
+ return null;
14281
14289
  }
14282
14290
  };
14283
14291
 
@@ -14559,12 +14567,6 @@ var EventBridgeRuleProvider = class {
14559
14567
  * 2. If the template carries `Properties.Name` use that as the rule
14560
14568
  * name lookup, then verify with `DescribeRule` and return the
14561
14569
  * rule's ARN as physicalId.
14562
- * 3. Walk `ListRules(EventBusName?)` and match `aws:cdk:path` via
14563
- * `ListTagsForResource(ResourceARN=rule.Arn)`. Returns the rule
14564
- * ARN as physicalId — same shape that `create` returns.
14565
- *
14566
- * EventBridge tags use the standard `Tag[]` array shape
14567
- * (`Key`/`Value`).
14568
14570
  */
14569
14571
  async import(input) {
14570
14572
  const eventBusName = input.properties["EventBusName"];
@@ -14598,30 +14600,7 @@ var EventBridgeRuleProvider = class {
14598
14600
  if (err instanceof ResourceNotFoundException$2) return null;
14599
14601
  throw err;
14600
14602
  }
14601
- const match = await importTagWalk({
14602
- cdkPath: input.cdkPath,
14603
- logicalId: input.logicalId,
14604
- listPage: async (marker) => {
14605
- const list = await this.eventBridgeClient.send(new ListRulesCommand({
14606
- ...eventBusName && { EventBusName: eventBusName },
14607
- ...marker && { NextToken: marker }
14608
- }));
14609
- return {
14610
- items: list.Rules,
14611
- nextMarker: list.NextToken
14612
- };
14613
- },
14614
- describe: async (rule) => {
14615
- if (!rule.Arn) return void 0;
14616
- return await this.eventBridgeClient.send(new ListTagsForResourceCommand$1({ ResourceARN: rule.Arn }));
14617
- },
14618
- tagsOf: (tagsResp) => tagsResp.Tags
14619
- });
14620
- if (!match) return null;
14621
- return {
14622
- physicalId: match.summary.Arn,
14623
- attributes: {}
14624
- };
14603
+ return null;
14625
14604
  }
14626
14605
  /**
14627
14606
  * Extract rule name from an ARN
@@ -14892,7 +14871,6 @@ var EventBridgeBusProvider = class {
14892
14871
  *
14893
14872
  * Lookup order:
14894
14873
  * 1. `--resource` override or `Properties.Name` → verify via `DescribeEventBus`.
14895
- * 2. `aws:cdk:path` tag match via `ListEventBuses` + `ListTagsForResource`.
14896
14874
  */
14897
14875
  async import(input) {
14898
14876
  const explicit = resolveExplicitPhysicalId(input, "Name");
@@ -14906,32 +14884,7 @@ var EventBridgeBusProvider = class {
14906
14884
  if (err instanceof ResourceNotFoundException$2) return null;
14907
14885
  throw err;
14908
14886
  }
14909
- const match = await importTagWalk({
14910
- cdkPath: input.cdkPath,
14911
- logicalId: input.logicalId,
14912
- listPage: async (marker) => {
14913
- const list = await this.eventBridgeClient.send(new ListEventBusesCommand({ ...marker && { NextToken: marker } }));
14914
- return {
14915
- items: list.EventBuses,
14916
- nextMarker: list.NextToken
14917
- };
14918
- },
14919
- describe: async (bus) => {
14920
- if (!bus.Name || !bus.Arn) return void 0;
14921
- try {
14922
- return await this.eventBridgeClient.send(new ListTagsForResourceCommand$1({ ResourceARN: bus.Arn }));
14923
- } catch (err) {
14924
- if (err instanceof ResourceNotFoundException$2) return void 0;
14925
- throw err;
14926
- }
14927
- },
14928
- tagsOf: (tagsResp) => tagsResp.Tags
14929
- });
14930
- if (!match) return null;
14931
- return {
14932
- physicalId: match.summary.Name,
14933
- attributes: {}
14934
- };
14887
+ return null;
14935
14888
  }
14936
14889
  };
14937
14890
 
@@ -20419,8 +20372,7 @@ var CloudFrontDistributionProvider = class {
20419
20372
  *
20420
20373
  * CloudFront distributions don't carry a template-supplied name
20421
20374
  * (physical id is the AWS-generated `E...` distribution id), so the
20422
- * lookup is either explicit-override or `aws:cdk:path` tag match
20423
- * via `ListDistributions` + `ListTagsForResource(ARN)`.
20375
+ * lookup is explicit-override only.
20424
20376
  */
20425
20377
  async import(input) {
20426
20378
  if (input.knownPhysicalId) try {
@@ -20433,32 +20385,7 @@ var CloudFrontDistributionProvider = class {
20433
20385
  if (err instanceof NoSuchDistribution) return null;
20434
20386
  throw err;
20435
20387
  }
20436
- const match = await importTagWalk({
20437
- cdkPath: input.cdkPath,
20438
- logicalId: input.logicalId,
20439
- listPage: async (marker) => {
20440
- const list = await this.cloudFrontClient.send(new ListDistributionsCommand({ ...marker && { Marker: marker } }));
20441
- return {
20442
- items: list.DistributionList?.Items,
20443
- nextMarker: list.DistributionList?.IsTruncated ? list.DistributionList?.NextMarker : void 0
20444
- };
20445
- },
20446
- describe: async (d) => {
20447
- if (!d.Id || !d.ARN) return void 0;
20448
- try {
20449
- return await this.cloudFrontClient.send(new ListTagsForResourceCommand$3({ Resource: d.ARN }));
20450
- } catch (err) {
20451
- if (err instanceof NoSuchDistribution) return void 0;
20452
- throw err;
20453
- }
20454
- },
20455
- tagsOf: (tagsResp) => tagsResp.Tags?.Items
20456
- });
20457
- if (!match) return null;
20458
- return {
20459
- physicalId: match.summary.Id,
20460
- attributes: {}
20461
- };
20388
+ return null;
20462
20389
  }
20463
20390
  };
20464
20391
 
@@ -21459,10 +21386,6 @@ var StepFunctionsProvider = class {
21459
21386
  *
21460
21387
  * Lookup order:
21461
21388
  * 1. `--resource <id>=<arn>` override → verify with `DescribeStateMachine`.
21462
- * 2. Walk `ListStateMachines` → `ListTagsForResource(arn)` via the shared
21463
- * `importTagWalk` helper. SFN returns lowercase `key`/`value` tags, so
21464
- * `tagsOf` maps them to the `Key`/`Value` shape the walk's
21465
- * `aws:cdk:path` matcher expects.
21466
21389
  *
21467
21390
  * SFN state machines do not expose a template-supplied name field
21468
21391
  * usable as a stable physicalId — the physicalId is the ARN — so the
@@ -21480,30 +21403,7 @@ var StepFunctionsProvider = class {
21480
21403
  if (err instanceof StateMachineDoesNotExist) return null;
21481
21404
  throw err;
21482
21405
  }
21483
- const match = await importTagWalk({
21484
- cdkPath: input.cdkPath,
21485
- logicalId: input.logicalId,
21486
- listPage: async (marker) => {
21487
- const list = await this.getClient().send(new ListStateMachinesCommand({ ...marker && { nextToken: marker } }));
21488
- return {
21489
- items: list.stateMachines,
21490
- nextMarker: list.nextToken
21491
- };
21492
- },
21493
- describe: async (sm) => {
21494
- if (!sm.stateMachineArn) return void 0;
21495
- return await this.getClient().send(new ListTagsForResourceCommand$11({ resourceArn: sm.stateMachineArn }));
21496
- },
21497
- tagsOf: (tagsResp) => (tagsResp.tags ?? []).map((t) => ({
21498
- Key: t.key,
21499
- Value: t.value
21500
- }))
21501
- });
21502
- if (!match) return null;
21503
- return {
21504
- physicalId: match.summary.stateMachineArn,
21505
- attributes: {}
21506
- };
21406
+ return null;
21507
21407
  }
21508
21408
  /**
21509
21409
  * Apply a diff between old and new CFn-shape Tags arrays via SFN's
@@ -21526,14 +21426,14 @@ var StepFunctionsProvider = class {
21526
21426
  const tagsToRemove = [];
21527
21427
  for (const k of oldMap.keys()) if (!newMap.has(k)) tagsToRemove.push(k);
21528
21428
  if (tagsToRemove.length > 0) {
21529
- await this.getClient().send(new UntagResourceCommand$12({
21429
+ await this.getClient().send(new UntagResourceCommand$13({
21530
21430
  resourceArn: stateMachineArn,
21531
21431
  tagKeys: tagsToRemove
21532
21432
  }));
21533
21433
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from SFN state machine ${stateMachineArn}`);
21534
21434
  }
21535
21435
  if (tagsToAdd.length > 0) {
21536
- await this.getClient().send(new TagResourceCommand$12({
21436
+ await this.getClient().send(new TagResourceCommand$13({
21537
21437
  resourceArn: stateMachineArn,
21538
21438
  tags: tagsToAdd
21539
21439
  }));
@@ -22145,14 +22045,14 @@ var ECSProvider = class {
22145
22045
  const tagsToRemove = [];
22146
22046
  for (const k of oldMap.keys()) if (!newMap.has(k)) tagsToRemove.push(k);
22147
22047
  if (tagsToRemove.length > 0) {
22148
- await this.getClient().send(new UntagResourceCommand$13({
22048
+ await this.getClient().send(new UntagResourceCommand$14({
22149
22049
  resourceArn,
22150
22050
  tagKeys: tagsToRemove
22151
22051
  }));
22152
22052
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from ECS resource ${resourceArn}`);
22153
22053
  }
22154
22054
  if (tagsToAdd.length > 0) {
22155
- await this.getClient().send(new TagResourceCommand$13({
22055
+ await this.getClient().send(new TagResourceCommand$14({
22156
22056
  resourceArn,
22157
22057
  tags: tagsToAdd
22158
22058
  }));
@@ -25637,11 +25537,10 @@ var DocDBProvider = class {
25637
25537
  * Supported types: `AWS::DocDB::DBInstance`, `AWS::DocDB::DBCluster`,
25638
25538
  * `AWS::DocDB::DBSubnetGroup`. Identifier name properties (`DBInstance
25639
25539
  * Identifier` / `DBClusterIdentifier` / `DBSubnetGroupName`) are usually
25640
- * present in CDK templates; fall back to `aws:cdk:path` tag lookup via
25641
- * the corresponding `Describe*` + `ListTagsForResource` pair otherwise.
25642
- * The fallback walk runs through the shared `importTagWalk` helper, so the
25643
- * N+1 `ListTagsForResource` burst is retried with exponential backoff when
25644
- * AWS throttles it instead of aborting the whole import.
25540
+ * present in CDK templates and are resolved via the corresponding
25541
+ * `Describe*` existence check. There is no `aws:cdk:path` tag fallback:
25542
+ * AWS rejects `aws:`-prefixed tag writes, so that tag never exists on a
25543
+ * real resource and the walk could not match (issue #1134).
25645
25544
  */
25646
25545
  async import(input) {
25647
25546
  switch (input.resourceType) {
@@ -25757,24 +25656,7 @@ var DocDBProvider = class {
25757
25656
  if (err.name === "DBInstanceNotFoundFault") return null;
25758
25657
  throw err;
25759
25658
  }
25760
- const match = await importTagWalk({
25761
- cdkPath: input.cdkPath,
25762
- logicalId: input.logicalId,
25763
- listPage: async (marker) => {
25764
- const list = await this.getClient().send(new DescribeDBInstancesCommand$1({ ...marker && { Marker: marker } }));
25765
- return {
25766
- items: list.DBInstances,
25767
- nextMarker: list.Marker
25768
- };
25769
- },
25770
- describe: async (inst) => inst.DBInstanceIdentifier && inst.DBInstanceArn ? await this.listTagsForResource(inst.DBInstanceArn) : void 0,
25771
- tagsOf: (tags) => tags
25772
- });
25773
- if (!match) return null;
25774
- return {
25775
- physicalId: match.summary.DBInstanceIdentifier,
25776
- attributes: {}
25777
- };
25659
+ return null;
25778
25660
  }
25779
25661
  async importDBCluster(input) {
25780
25662
  const explicit = resolveExplicitPhysicalId(input, "DBClusterIdentifier");
@@ -25788,24 +25670,7 @@ var DocDBProvider = class {
25788
25670
  if (err.name === "DBClusterNotFoundFault") return null;
25789
25671
  throw err;
25790
25672
  }
25791
- const match = await importTagWalk({
25792
- cdkPath: input.cdkPath,
25793
- logicalId: input.logicalId,
25794
- listPage: async (marker) => {
25795
- const list = await this.getClient().send(new DescribeDBClustersCommand$1({ ...marker && { Marker: marker } }));
25796
- return {
25797
- items: list.DBClusters,
25798
- nextMarker: list.Marker
25799
- };
25800
- },
25801
- describe: async (c) => c.DBClusterIdentifier && c.DBClusterArn ? await this.listTagsForResource(c.DBClusterArn) : void 0,
25802
- tagsOf: (tags) => tags
25803
- });
25804
- if (!match) return null;
25805
- return {
25806
- physicalId: match.summary.DBClusterIdentifier,
25807
- attributes: {}
25808
- };
25673
+ return null;
25809
25674
  }
25810
25675
  async importDBSubnetGroup(input) {
25811
25676
  const explicit = resolveExplicitPhysicalId(input, "DBSubnetGroupName");
@@ -25819,33 +25684,7 @@ var DocDBProvider = class {
25819
25684
  if (err.name === "DBSubnetGroupNotFoundFault") return null;
25820
25685
  throw err;
25821
25686
  }
25822
- const match = await importTagWalk({
25823
- cdkPath: input.cdkPath,
25824
- logicalId: input.logicalId,
25825
- listPage: async (marker) => {
25826
- const list = await this.getClient().send(new DescribeDBSubnetGroupsCommand$1({ ...marker && { Marker: marker } }));
25827
- return {
25828
- items: list.DBSubnetGroups,
25829
- nextMarker: list.Marker
25830
- };
25831
- },
25832
- describe: async (sg) => sg.DBSubnetGroupName && sg.DBSubnetGroupArn ? await this.listTagsForResource(sg.DBSubnetGroupArn) : void 0,
25833
- tagsOf: (tags) => tags
25834
- });
25835
- if (!match) return null;
25836
- return {
25837
- physicalId: match.summary.DBSubnetGroupName,
25838
- attributes: {}
25839
- };
25840
- }
25841
- /**
25842
- * `ListTagsForResource` for the tag-walk import path. Returns the tag list
25843
- * (possibly empty) so `importTagWalk` can match `aws:cdk:path` against it;
25844
- * `undefined` is reserved for "skip this candidate", which the callers signal
25845
- * before calling this.
25846
- */
25847
- async listTagsForResource(resourceArn) {
25848
- return (await this.getClient().send(new ListTagsForResourceCommand$12({ ResourceName: resourceArn }))).TagList ?? [];
25687
+ return null;
25849
25688
  }
25850
25689
  };
25851
25690
 
@@ -27625,7 +27464,7 @@ var CognitoUserPoolProvider = class {
27625
27464
  if (!templatedActive) try {
27626
27465
  needsFlip = (await this.getClient().send(new DescribeUserPoolCommand({ UserPoolId: physicalId }))).UserPool?.DeletionProtection === "ACTIVE";
27627
27466
  } catch (descError) {
27628
- if (descError instanceof ResourceNotFoundException$7) {
27467
+ if (descError instanceof ResourceNotFoundException$8) {
27629
27468
  assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
27630
27469
  this.logger.debug(`Cognito User Pool ${physicalId} does not exist, skipping deletion`);
27631
27470
  return;
@@ -27648,7 +27487,7 @@ var CognitoUserPoolProvider = class {
27648
27487
  await this.getClient().send(new DeleteUserPoolCommand({ UserPoolId: physicalId }));
27649
27488
  this.logger.debug(`Successfully deleted Cognito User Pool ${logicalId}`);
27650
27489
  } catch (error) {
27651
- if (error instanceof ResourceNotFoundException$7) {
27490
+ if (error instanceof ResourceNotFoundException$8) {
27652
27491
  assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
27653
27492
  this.logger.debug(`Cognito User Pool ${physicalId} does not exist, skipping deletion`);
27654
27493
  return;
@@ -27681,7 +27520,7 @@ var CognitoUserPoolProvider = class {
27681
27520
  try {
27682
27521
  resp = await this.getClient().send(new DescribeUserPoolCommand({ UserPoolId: physicalId }));
27683
27522
  } catch (err) {
27684
- if (err instanceof ResourceNotFoundException$7) return void 0;
27523
+ if (err instanceof ResourceNotFoundException$8) return void 0;
27685
27524
  throw err;
27686
27525
  }
27687
27526
  const pool = resp.UserPool;
@@ -27739,19 +27578,13 @@ var CognitoUserPoolProvider = class {
27739
27578
  * 1. `--resource` override → `DescribeUserPool` to verify.
27740
27579
  * 2. `Properties.UserPoolName` (when CDK template carries it) →
27741
27580
  * `ListUserPools` walk + name match.
27742
- * 3. `aws:cdk:path` tag match via `ListUserPools` +
27743
- * `ListTagsForResource(<arn>)`. Cognito's tag map uses the same
27744
- * `Tags: { [key]: value }` shape as Lambda.
27745
- *
27746
- * Steps 2 and 3 share ONE `ListUserPools` walk (per candidate: name check
27747
- * first, then the two tag reads, only when a `cdkPath` is present), which
27748
- * runs through the shared `importTagWalk` helper so the N+1 read burst
27749
- * (DescribeUserPool for the ARN, then ListTagsForResource) is retried with
27750
- * exponential backoff when AWS throttles it instead of aborting the whole
27751
- * import. The name match is expressed to the walk as a synthetic
27752
- * `aws:cdk:path` tag carrying the walk's own lookup key, so a name-only
27753
- * template (no CDK path metadata) still resolves without any per-candidate
27754
- * API call, matching the previous inline loop.
27581
+ *
27582
+ * The `aws:cdk:path` tag match that used to ride the same `ListUserPools`
27583
+ * walk is gone (issue #1134): AWS rejects `aws:`-prefixed tag writes, so
27584
+ * that tag never exists on a real resource and the walk could not match.
27585
+ * Auto-mode import resolves ids from CloudFormation's
27586
+ * `DescribeStackResources` or the template's physical name; without a
27587
+ * `UserPoolName` there is nothing to match.
27755
27588
  */
27756
27589
  async import(input) {
27757
27590
  if (input.knownPhysicalId) try {
@@ -27761,52 +27594,24 @@ var CognitoUserPoolProvider = class {
27761
27594
  attributes: {}
27762
27595
  };
27763
27596
  } catch (err) {
27764
- if (err instanceof ResourceNotFoundException$7) return null;
27597
+ if (err instanceof ResourceNotFoundException$8) return null;
27765
27598
  throw err;
27766
27599
  }
27767
27600
  const desiredName = typeof input.properties?.["UserPoolName"] === "string" ? input.properties["UserPoolName"] : void 0;
27768
- const walkCdkPath = input.cdkPath || (desiredName ? `cdkd:cognito-user-pool-name:${desiredName}` : void 0);
27769
- /** Sentinel detail for a candidate matched by its user pool name. */
27770
- const NAME_MATCH = { nameMatch: true };
27771
- const match = await importTagWalk({
27772
- cdkPath: walkCdkPath,
27773
- logicalId: input.logicalId,
27774
- listPage: async (marker) => {
27775
- const list = await this.getClient().send(new ListUserPoolsCommand({
27776
- MaxResults: 60,
27777
- ...marker && { NextToken: marker }
27778
- }));
27779
- return {
27780
- items: list.UserPools,
27781
- nextMarker: list.NextToken
27782
- };
27783
- },
27784
- describe: async (pool) => {
27785
- if (!pool.Id) return void 0;
27786
- if (desiredName && pool.Name === desiredName) return NAME_MATCH;
27787
- if (!input.cdkPath) return void 0;
27788
- try {
27789
- const arn = (await this.getClient().send(new DescribeUserPoolCommand({ UserPoolId: pool.Id }))).UserPool?.Arn;
27790
- if (!arn) return void 0;
27791
- return await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceArn: arn }));
27792
- } catch (err) {
27793
- if (err instanceof ResourceNotFoundException$7) return void 0;
27794
- throw err;
27795
- }
27796
- },
27797
- tagsOf: (detail) => "nameMatch" in detail ? [{
27798
- Key: CDK_PATH_TAG,
27799
- Value: walkCdkPath
27800
- }] : Object.entries(detail.Tags ?? {}).map(([Key, Value]) => ({
27801
- Key,
27802
- Value
27803
- }))
27804
- });
27805
- if (!match) return null;
27806
- return {
27807
- physicalId: match.summary.Id,
27808
- attributes: {}
27809
- };
27601
+ if (!desiredName) return null;
27602
+ let marker;
27603
+ do {
27604
+ const list = await this.getClient().send(new ListUserPoolsCommand({
27605
+ MaxResults: 60,
27606
+ ...marker && { NextToken: marker }
27607
+ }));
27608
+ for (const pool of list.UserPools ?? []) if (pool.Id && pool.Name === desiredName) return {
27609
+ physicalId: pool.Id,
27610
+ attributes: {}
27611
+ };
27612
+ marker = list.NextToken;
27613
+ } while (marker);
27614
+ return null;
27810
27615
  }
27811
27616
  };
27812
27617
 
@@ -28807,11 +28612,11 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
28807
28612
  const hasAdds = !!newTags && newTags.length > 0;
28808
28613
  if (removedKeys.length === 0 && !hasAdds) return;
28809
28614
  const arn = await this.resolveNamespaceArn(physicalId);
28810
- if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$14({
28615
+ if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$15({
28811
28616
  ResourceARN: arn,
28812
28617
  TagKeys: removedKeys
28813
28618
  }));
28814
- if (hasAdds) await this.getClient().send(new TagResourceCommand$14({
28619
+ if (hasAdds) await this.getClient().send(new TagResourceCommand$15({
28815
28620
  ResourceARN: arn,
28816
28621
  Tags: newTags
28817
28622
  }));
@@ -28999,7 +28804,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
28999
28804
  /** Best-effort tag fetch via `ListTagsForResource(ResourceARN)`. */
29000
28805
  async attachTags(result, arn) {
29001
28806
  try {
29002
- result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$15({ ResourceARN: arn }))).Tags);
28807
+ result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceARN: arn }))).Tags);
29003
28808
  } catch (err) {
29004
28809
  this.logger.debug(`ServiceDiscovery ListTagsForResource(${arn}) failed: ${err instanceof Error ? err.message : String(err)}`);
29005
28810
  }
@@ -29447,7 +29252,7 @@ var AppSyncProvider = class {
29447
29252
  const tagsToAdd = {};
29448
29253
  for (const [k, v] of Object.entries(newMap)) if (oldMap[k] !== v) tagsToAdd[k] = v;
29449
29254
  if (tagKeysToRemove.length > 0) try {
29450
- await this.getClient().send(new UntagResourceCommand$15({
29255
+ await this.getClient().send(new UntagResourceCommand$16({
29451
29256
  resourceArn: arn,
29452
29257
  tagKeys: tagKeysToRemove
29453
29258
  }));
@@ -29455,7 +29260,7 @@ var AppSyncProvider = class {
29455
29260
  throw this.wrapUpdateError(error, resourceType, logicalId, apiId, "GraphqlApi (untag)");
29456
29261
  }
29457
29262
  if (Object.keys(tagsToAdd).length > 0) try {
29458
- await this.getClient().send(new TagResourceCommand$15({
29263
+ await this.getClient().send(new TagResourceCommand$16({
29459
29264
  resourceArn: arn,
29460
29265
  tags: tagsToAdd
29461
29266
  }));
@@ -31900,14 +31705,14 @@ var KMSProvider = class {
31900
31705
  const tagsToRemove = [];
31901
31706
  for (const k of oldMap.keys()) if (!newMap.has(k)) tagsToRemove.push(k);
31902
31707
  if (tagsToRemove.length > 0) {
31903
- await this.getClient().send(new UntagResourceCommand$10({
31708
+ await this.getClient().send(new UntagResourceCommand$11({
31904
31709
  KeyId: keyId,
31905
31710
  TagKeys: tagsToRemove
31906
31711
  }));
31907
31712
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from KMS Key ${keyId}`);
31908
31713
  }
31909
31714
  if (tagsToAdd.length > 0) {
31910
- await this.getClient().send(new TagResourceCommand$10({
31715
+ await this.getClient().send(new TagResourceCommand$11({
31911
31716
  KeyId: keyId,
31912
31717
  Tags: tagsToAdd
31913
31718
  }));
@@ -32082,8 +31887,8 @@ var KMSProvider = class {
32082
31887
  * KMS keys have no `Properties.KeyName` field — physical IDs are
32083
31888
  * AWS-generated UUIDs. So:
32084
31889
  * - For `AWS::KMS::Key`: `--resource MyKey=<keyId>` is the only explicit
32085
- * path; auto-lookup walks `ListKeys` + `ListResourceTags` matching
32086
- * `aws:cdk:path`.
31890
+ * path; there is no auto-lookup (a key reaching here without an explicit
31891
+ * id or a CloudFormation-resolved physical id returns `null`).
32087
31892
  * - For `AWS::KMS::Alias`: `Properties.AliasName` is explicit and reliable.
32088
31893
  */
32089
31894
  async import(input) {
@@ -32116,36 +31921,7 @@ var KMSProvider = class {
32116
31921
  if (err instanceof NotFoundException$2) return null;
32117
31922
  throw err;
32118
31923
  }
32119
- if (!input.cdkPath) return null;
32120
- const match = await importTagWalk({
32121
- cdkPath: input.cdkPath,
32122
- logicalId: input.logicalId,
32123
- listPage: async (marker) => {
32124
- const list = await this.getClient().send(new ListKeysCommand({ ...marker && { Marker: marker } }));
32125
- return {
32126
- items: list.Keys,
32127
- nextMarker: list.NextMarker
32128
- };
32129
- },
32130
- describe: async (key) => {
32131
- if (!key.KeyId) return void 0;
32132
- try {
32133
- return await this.getClient().send(new ListResourceTagsCommand({ KeyId: key.KeyId }));
32134
- } catch (err) {
32135
- if (err.name === "AccessDeniedException" || err instanceof NotFoundException$2) return void 0;
32136
- throw err;
32137
- }
32138
- },
32139
- tagsOf: (tagsResp) => (tagsResp.Tags ?? []).map((t) => ({
32140
- Key: t.TagKey,
32141
- Value: t.TagValue
32142
- }))
32143
- });
32144
- if (!match) return null;
32145
- return {
32146
- physicalId: match.summary.KeyId,
32147
- attributes: {}
32148
- };
31924
+ return null;
32149
31925
  }
32150
31926
  };
32151
31927
 
@@ -32532,11 +32308,11 @@ var BudgetsBudgetProvider = class {
32532
32308
  const removedKeys = oldTags.map((t) => t.Key).filter((k) => {
32533
32309
  return typeof k === "string" && !newKeys.has(k);
32534
32310
  });
32535
- if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$16({
32311
+ if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$17({
32536
32312
  ResourceARN: arn,
32537
32313
  ResourceTagKeys: removedKeys
32538
32314
  }));
32539
- if (newTags.length > 0) await this.getClient().send(new TagResourceCommand$16({
32315
+ if (newTags.length > 0) await this.getClient().send(new TagResourceCommand$17({
32540
32316
  ResourceARN: arn,
32541
32317
  ResourceTags: newTags
32542
32318
  }));
@@ -32593,9 +32369,6 @@ var BudgetsBudgetProvider = class {
32593
32369
  * Lookup order:
32594
32370
  * 1. `--resource` override or `Properties.Budget.BudgetName` → verify via
32595
32371
  * `DescribeBudget`.
32596
- * 2. `aws:cdk:path` tag match: walk `DescribeBudgets` and check each
32597
- * budget's tags via `ListTagsForResource` (budget ARNs are
32598
- * region-free, so the lookup works from any deploy region).
32599
32372
  */
32600
32373
  async import(input) {
32601
32374
  const rawBudget = input.properties["Budget"] ?? {};
@@ -32615,31 +32388,7 @@ var BudgetsBudgetProvider = class {
32615
32388
  if (error instanceof NotFoundException$5) return null;
32616
32389
  throw error;
32617
32390
  }
32618
- const match = await importTagWalk({
32619
- cdkPath: input.cdkPath,
32620
- logicalId: input.logicalId,
32621
- listPage: async (marker) => {
32622
- const list = await client.send(new DescribeBudgetsCommand({
32623
- AccountId: accountId,
32624
- ...marker && { NextToken: marker }
32625
- }));
32626
- return {
32627
- items: list.Budgets,
32628
- nextMarker: list.NextToken
32629
- };
32630
- },
32631
- describe: async (budget) => {
32632
- if (!budget.BudgetName) return void 0;
32633
- return await client.send(new ListTagsForResourceCommand$16({ ResourceARN: this.budgetArn(accountId, budget.BudgetName) }));
32634
- },
32635
- tagsOf: (tags) => tags.ResourceTags
32636
- });
32637
- if (!match) return null;
32638
- const budgetName = match.summary.BudgetName;
32639
- return {
32640
- physicalId: budgetName,
32641
- attributes: { Arn: this.budgetArn(accountId, budgetName) }
32642
- };
32391
+ return null;
32643
32392
  }
32644
32393
  };
32645
32394
 
@@ -32846,7 +32595,7 @@ var KinesisStreamProvider = class {
32846
32595
  }));
32847
32596
  this.logger.debug(`Successfully deleted Kinesis stream ${logicalId}`);
32848
32597
  } catch (error) {
32849
- if (error instanceof ResourceNotFoundException$8) {
32598
+ if (error instanceof ResourceNotFoundException$9) {
32850
32599
  assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
32851
32600
  this.logger.debug(`Kinesis stream ${physicalId} does not exist, skipping deletion`);
32852
32601
  return;
@@ -32893,14 +32642,6 @@ var KinesisStreamProvider = class {
32893
32642
  * Lookup order:
32894
32643
  * 1. `--resource <id>=<name>` override or `Properties.Name` → verify
32895
32644
  * with `DescribeStream`.
32896
- * 2. Walk `ListStreams` (paged via `ExclusiveStartStreamName`) and
32897
- * match the `aws:cdk:path` tag via `ListTagsForStream(StreamName)`.
32898
- * The walk runs through the shared `importTagWalk` helper, so the N+1
32899
- * tag-read burst is retried with exponential backoff when AWS
32900
- * throttles it instead of aborting the whole import.
32901
- *
32902
- * Kinesis tags use the standard `Tag[]` array shape (`Key`/`Value`),
32903
- * so the walk's `matchesCdkPath` matcher applies directly.
32904
32645
  */
32905
32646
  /**
32906
32647
  * Read the AWS-current Kinesis stream configuration in CFn-property shape.
@@ -32929,7 +32670,7 @@ var KinesisStreamProvider = class {
32929
32670
  try {
32930
32671
  stream = (await this.getClient().send(new DescribeStreamCommand({ StreamName: physicalId }))).StreamDescription;
32931
32672
  } catch (err) {
32932
- if (err instanceof ResourceNotFoundException$8) return void 0;
32673
+ if (err instanceof ResourceNotFoundException$9) return void 0;
32933
32674
  throw err;
32934
32675
  }
32935
32676
  if (!stream) return void 0;
@@ -32947,7 +32688,7 @@ var KinesisStreamProvider = class {
32947
32688
  try {
32948
32689
  result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForStreamCommand({ StreamName: physicalId }))).Tags);
32949
32690
  } catch (err) {
32950
- if (err instanceof ResourceNotFoundException$8) return void 0;
32691
+ if (err instanceof ResourceNotFoundException$9) return void 0;
32951
32692
  this.logger.debug(`Kinesis ListTagsForStream(${physicalId}) failed: ${err instanceof Error ? err.message : String(err)}`);
32952
32693
  }
32953
32694
  return result;
@@ -32961,28 +32702,10 @@ var KinesisStreamProvider = class {
32961
32702
  attributes: {}
32962
32703
  };
32963
32704
  } catch (err) {
32964
- if (err instanceof ResourceNotFoundException$8) return null;
32705
+ if (err instanceof ResourceNotFoundException$9) return null;
32965
32706
  throw err;
32966
32707
  }
32967
- const match = await importTagWalk({
32968
- cdkPath: input.cdkPath,
32969
- logicalId: input.logicalId,
32970
- listPage: async (marker) => {
32971
- const list = await this.getClient().send(new ListStreamsCommand({ ...marker && { ExclusiveStartStreamName: marker } }));
32972
- const names = list.StreamNames ?? [];
32973
- return {
32974
- items: names,
32975
- nextMarker: list.HasMoreStreams && names.length > 0 ? names[names.length - 1] : void 0
32976
- };
32977
- },
32978
- describe: async (streamName) => await this.getClient().send(new ListTagsForStreamCommand({ StreamName: streamName })),
32979
- tagsOf: (tagsResp) => tagsResp.Tags
32980
- });
32981
- if (!match) return null;
32982
- return {
32983
- physicalId: match.summary,
32984
- attributes: {}
32985
- };
32708
+ return null;
32986
32709
  }
32987
32710
  /**
32988
32711
  * Poll DescribeStream until the stream reaches ACTIVE status
@@ -33158,7 +32881,7 @@ var KinesisStreamConsumerProvider = class {
33158
32881
  await this.getClient().send(new DeregisterStreamConsumerCommand({ ConsumerARN: physicalId }));
33159
32882
  this.logger.debug(`Successfully deregistered Kinesis stream consumer ${logicalId}`);
33160
32883
  } catch (error) {
33161
- if (error instanceof ResourceNotFoundException$8) {
32884
+ if (error instanceof ResourceNotFoundException$9) {
33162
32885
  assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
33163
32886
  this.logger.debug(`Kinesis stream consumer ${physicalId} not found, skipping`);
33164
32887
  return;
@@ -33204,7 +32927,7 @@ var KinesisStreamConsumerProvider = class {
33204
32927
  try {
33205
32928
  desc = (await this.getClient().send(new DescribeStreamConsumerCommand({ ConsumerARN: physicalId }))).ConsumerDescription;
33206
32929
  } catch (err) {
33207
- if (err instanceof ResourceNotFoundException$8) return void 0;
32930
+ if (err instanceof ResourceNotFoundException$9) return void 0;
33208
32931
  throw err;
33209
32932
  }
33210
32933
  if (!desc) return void 0;
@@ -33212,9 +32935,9 @@ var KinesisStreamConsumerProvider = class {
33212
32935
  if (desc.ConsumerName !== void 0) result["ConsumerName"] = desc.ConsumerName;
33213
32936
  if (desc.StreamARN !== void 0) result["StreamARN"] = desc.StreamARN;
33214
32937
  try {
33215
- result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$17({ ResourceARN: physicalId }))).Tags);
32938
+ result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$15({ ResourceARN: physicalId }))).Tags);
33216
32939
  } catch (err) {
33217
- if (err instanceof ResourceNotFoundException$8) return void 0;
32940
+ if (err instanceof ResourceNotFoundException$9) return void 0;
33218
32941
  this.logger.debug(`ListTagsForResource(${physicalId}) failed: ${err instanceof Error ? err.message : String(err)}`);
33219
32942
  result["Tags"] = [];
33220
32943
  }
@@ -33236,14 +32959,14 @@ var KinesisStreamConsumerProvider = class {
33236
32959
  const tagsToRemove = [];
33237
32960
  for (const k of Object.keys(oldMap)) if (!(k in newMap)) tagsToRemove.push(k);
33238
32961
  if (tagsToRemove.length > 0) {
33239
- await this.getClient().send(new UntagResourceCommand$17({
32962
+ await this.getClient().send(new UntagResourceCommand$18({
33240
32963
  ResourceARN: consumerArn,
33241
32964
  TagKeys: tagsToRemove
33242
32965
  }));
33243
32966
  this.logger.debug(`Removed ${tagsToRemove.length} tag(s) from Kinesis stream consumer ${consumerArn}`);
33244
32967
  }
33245
32968
  if (Object.keys(tagsToAdd).length > 0) {
33246
- await this.getClient().send(new TagResourceCommand$17({
32969
+ await this.getClient().send(new TagResourceCommand$18({
33247
32970
  ResourceARN: consumerArn,
33248
32971
  Tags: tagsToAdd
33249
32972
  }));
@@ -33420,7 +33143,7 @@ var SchedulerScheduleProvider = class {
33420
33143
  }));
33421
33144
  this.logger.debug(`Deleted Schedule ${logicalId}`);
33422
33145
  } catch (error) {
33423
- if (error instanceof ResourceNotFoundException$9) {
33146
+ if (error instanceof ResourceNotFoundException$10) {
33424
33147
  assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
33425
33148
  this.logger.debug(`Schedule ${logicalId} already deleted (not found), treating as success`);
33426
33149
  return;
@@ -33442,7 +33165,7 @@ var SchedulerScheduleProvider = class {
33442
33165
  return (await this.getClient().send(new GetScheduleCommand({ Name: physicalId }))).Arn;
33443
33166
  } catch (error) {
33444
33167
  const cause = error instanceof Error ? error : void 0;
33445
- const customGroupHint = error instanceof ResourceNotFoundException$9 ? " Schedules in a custom group cannot be looked up by bare name; the Arn is normally served from cdkd state attributes." : "";
33168
+ const customGroupHint = error instanceof ResourceNotFoundException$10 ? " Schedules in a custom group cannot be looked up by bare name; the Arn is normally served from cdkd state attributes." : "";
33446
33169
  throw new ProvisioningError(`Failed to resolve Arn for Schedule ${physicalId}: ${cause?.message ?? String(error)}.${customGroupHint}`, resourceType, physicalId, physicalId, cause);
33447
33170
  }
33448
33171
  }
@@ -33472,7 +33195,7 @@ var SchedulerScheduleProvider = class {
33472
33195
  ...response.Target !== void 0 && { Target: response.Target }
33473
33196
  };
33474
33197
  } catch (error) {
33475
- if (error instanceof ResourceNotFoundException$9) return;
33198
+ if (error instanceof ResourceNotFoundException$10) return;
33476
33199
  throw error;
33477
33200
  }
33478
33201
  }
@@ -33498,7 +33221,7 @@ var SchedulerScheduleProvider = class {
33498
33221
  attributes: response.Arn ? { Arn: response.Arn } : {}
33499
33222
  };
33500
33223
  } catch (error) {
33501
- if (error instanceof ResourceNotFoundException$9) return null;
33224
+ if (error instanceof ResourceNotFoundException$10) return null;
33502
33225
  throw error;
33503
33226
  }
33504
33227
  }
@@ -34129,19 +33852,6 @@ var EFSProvider = class {
34129
33852
  if (err instanceof FileSystemNotFound) return null;
34130
33853
  throw err;
34131
33854
  }
34132
- if (!input.cdkPath) return null;
34133
- let marker;
34134
- do {
34135
- const list = await this.getClient().send(new DescribeFileSystemsCommand({ ...marker && { Marker: marker } }));
34136
- for (const fs of list.FileSystems ?? []) {
34137
- if (!fs.FileSystemId) continue;
34138
- if (matchesCdkPath(fs.Tags, input.cdkPath)) return {
34139
- physicalId: fs.FileSystemId,
34140
- attributes: {}
34141
- };
34142
- }
34143
- marker = list.NextMarker;
34144
- } while (marker);
34145
33855
  return null;
34146
33856
  }
34147
33857
  async importAccessPoint(input) {
@@ -34155,23 +33865,6 @@ var EFSProvider = class {
34155
33865
  if (err instanceof AccessPointNotFound) return null;
34156
33866
  throw err;
34157
33867
  }
34158
- if (!input.cdkPath) return null;
34159
- const fileSystemId = input.properties["FileSystemId"];
34160
- let nextToken;
34161
- do {
34162
- const list = await this.getClient().send(new DescribeAccessPointsCommand({
34163
- ...nextToken && { NextToken: nextToken },
34164
- ...fileSystemId && { FileSystemId: fileSystemId }
34165
- }));
34166
- for (const ap of list.AccessPoints ?? []) {
34167
- if (!ap.AccessPointId) continue;
34168
- if (matchesCdkPath(ap.Tags, input.cdkPath)) return {
34169
- physicalId: ap.AccessPointId,
34170
- attributes: {}
34171
- };
34172
- }
34173
- nextToken = list.NextToken;
34174
- } while (nextToken);
34175
33868
  return null;
34176
33869
  }
34177
33870
  };
@@ -34890,11 +34583,11 @@ var FSxFileSystemProvider = class {
34890
34583
  }
34891
34584
  const toRemove = [];
34892
34585
  for (const key of prev.keys()) if (key !== void 0 && !next.has(key)) toRemove.push(key);
34893
- if (toSet.length > 0) await this.getClient().send(new TagResourceCommand$18({
34586
+ if (toSet.length > 0) await this.getClient().send(new TagResourceCommand$19({
34894
34587
  ResourceARN: arn,
34895
34588
  Tags: toSet
34896
34589
  }));
34897
- if (toRemove.length > 0) await this.getClient().send(new UntagResourceCommand$18({
34590
+ if (toRemove.length > 0) await this.getClient().send(new UntagResourceCommand$19({
34898
34591
  ResourceARN: arn,
34899
34592
  TagKeys: toRemove
34900
34593
  }));
@@ -35322,18 +35015,6 @@ const CREATE_READY_STATES = /* @__PURE__ */ new Set(["WAITING", "RUNNING"]);
35322
35015
  */
35323
35016
  const TERMINAL_STATES = /* @__PURE__ */ new Set(["TERMINATED", "TERMINATED_WITH_ERRORS"]);
35324
35017
  /**
35325
- * Cluster states that mean "the cluster is alive" — the `ListClusters` filter
35326
- * used by `import()` discovery so a long-gone `TERMINATED*` cluster is never
35327
- * adopted. Everything except the two `TERMINAL_STATES`.
35328
- */
35329
- const NON_TERMINATED_STATES = [
35330
- "STARTING",
35331
- "BOOTSTRAPPING",
35332
- "RUNNING",
35333
- "WAITING",
35334
- "TERMINATING"
35335
- ];
35336
- /**
35337
35018
  * Top-level CFn properties that map to a MUTABLE EMR API surface. Every other
35338
35019
  * property is either registry-createOnly (routed through DELETE+CREATE by the
35339
35020
  * replacement-detection layer) or lives inside the `Instances` block (handled
@@ -35842,12 +35523,6 @@ var EMRClusterProvider = class {
35842
35523
  * the physical id — a cluster's id (`j-...`) is service-generated, while
35843
35524
  * the template `Name` is only the display name — so no name fallback
35844
35525
  * applies (`resolveExplicitPhysicalId(..., null)`).
35845
- * 2. Tag-based lookup: `ListClusters` filtered to the non-terminated states
35846
- * (a `TERMINATED*` cluster is gone and must never be adopted), then a
35847
- * `DescribeCluster` per candidate to read `Tags` (the list summaries do
35848
- * NOT carry tags) and match `aws:cdk:path`. The walk runs through the
35849
- * shared `importTagWalk` helper, so each list page / describe is retried
35850
- * with exponential backoff when AWS throttles the N+1 read burst.
35851
35526
  */
35852
35527
  async import(input) {
35853
35528
  const explicit = resolveExplicitPhysicalId(input, null);
@@ -35859,42 +35534,20 @@ var EMRClusterProvider = class {
35859
35534
  attributes: this.buildAttributes(cluster)
35860
35535
  };
35861
35536
  }
35862
- const match = await importTagWalk({
35863
- cdkPath: input.cdkPath,
35864
- logicalId: input.logicalId,
35865
- listPage: async (marker) => {
35866
- const list = await this.getClient().send(new ListClustersCommand({
35867
- ClusterStates: [...NON_TERMINATED_STATES],
35868
- ...marker && { Marker: marker }
35869
- }));
35870
- return {
35871
- items: list.Clusters,
35872
- nextMarker: list.Marker
35873
- };
35874
- },
35875
- describe: async (summary) => summary.Id ? await this.describeClusterOrUndefined(summary.Id) : void 0,
35876
- tagsOf: (cluster) => cluster.Tags
35877
- });
35878
- if (!match) return null;
35879
- return {
35880
- physicalId: match.summary.Id,
35881
- attributes: this.buildAttributes(match.detail)
35882
- };
35537
+ return null;
35883
35538
  }
35884
35539
  /**
35885
35540
  * `DescribeCluster` that maps a not-found (`InvalidRequestException` — the
35886
35541
  * cluster id is unknown in this region / aged out of Describe) to
35887
35542
  * `undefined` instead of throwing, so `import()` can treat it as "no match"
35888
- * rather than aborting the whole adoption run.
35543
+ * rather than aborting the whole adoption run. Also consumed by
35544
+ * `readCurrentState` for the same gone-cluster tolerance.
35889
35545
  *
35890
- * `undefined`, NOT `null`, is load-bearing: `importTagWalk` skips a candidate
35891
- * on `detail === undefined`, and an actual `null` would flow into `tagsOf`
35892
- * and `TypeError`. Also note the mapping is BROAD `InvalidRequestException`
35893
- * covers more than not-found, so a genuine failure here degrades to "no
35894
- * match" and a subsequent deploy would CREATE a duplicate cluster rather than
35895
- * adopt the existing one. The walk logs each skip at debug so the case is at
35896
- * least visible under `--verbose`; narrowing the mapping needs a
35897
- * message/code-level discriminator AWS does not currently document.
35546
+ * Note the mapping is BROAD `InvalidRequestException` covers more than
35547
+ * not-found, so a genuine failure here degrades to "no match" and a
35548
+ * subsequent deploy would CREATE a duplicate cluster rather than adopt the
35549
+ * existing one. Narrowing the mapping needs a message/code-level
35550
+ * discriminator AWS does not currently document.
35898
35551
  */
35899
35552
  async describeClusterOrUndefined(clusterId) {
35900
35553
  try {
@@ -37218,7 +36871,7 @@ var FirehoseProvider = class {
37218
36871
  await this.getClient().send(new DeleteDeliveryStreamCommand({ DeliveryStreamName: physicalId }));
37219
36872
  this.logger.debug(`Successfully deleted Firehose delivery stream ${logicalId}`);
37220
36873
  } catch (error) {
37221
- if (error instanceof ResourceNotFoundException$10) {
36874
+ if (error instanceof ResourceNotFoundException$11) {
37222
36875
  assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
37223
36876
  this.logger.debug(`Firehose delivery stream ${physicalId} does not exist, skipping deletion`);
37224
36877
  return;
@@ -37755,7 +37408,7 @@ var FirehoseProvider = class {
37755
37408
  try {
37756
37409
  desc = (await this.getClient().send(new DescribeDeliveryStreamCommand({ DeliveryStreamName: physicalId }))).DeliveryStreamDescription;
37757
37410
  } catch (err) {
37758
- if (err instanceof ResourceNotFoundException$10) return void 0;
37411
+ if (err instanceof ResourceNotFoundException$11) return void 0;
37759
37412
  throw err;
37760
37413
  }
37761
37414
  if (!desc) return void 0;
@@ -37786,7 +37439,7 @@ var FirehoseProvider = class {
37786
37439
  try {
37787
37440
  result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForDeliveryStreamCommand({ DeliveryStreamName: physicalId }))).Tags);
37788
37441
  } catch (err) {
37789
- if (err instanceof ResourceNotFoundException$10) return void 0;
37442
+ if (err instanceof ResourceNotFoundException$11) return void 0;
37790
37443
  this.logger.debug(`Firehose ListTagsForDeliveryStream(${physicalId}) failed: ${err instanceof Error ? err.message : String(err)}`);
37791
37444
  result["Tags"] = [];
37792
37445
  }
@@ -37823,28 +37476,10 @@ var FirehoseProvider = class {
37823
37476
  attributes: {}
37824
37477
  };
37825
37478
  } catch (err) {
37826
- if (err instanceof ResourceNotFoundException$10) return null;
37479
+ if (err instanceof ResourceNotFoundException$11) return null;
37827
37480
  throw err;
37828
37481
  }
37829
- const match = await importTagWalk({
37830
- cdkPath: input.cdkPath,
37831
- logicalId: input.logicalId,
37832
- listPage: async (marker) => {
37833
- const list = await this.getClient().send(new ListDeliveryStreamsCommand({ ...marker && { ExclusiveStartDeliveryStreamName: marker } }));
37834
- const names = list.DeliveryStreamNames ?? [];
37835
- return {
37836
- items: names,
37837
- nextMarker: list.HasMoreDeliveryStreams && names.length > 0 ? names[names.length - 1] : void 0
37838
- };
37839
- },
37840
- describe: async (name) => await this.getClient().send(new ListTagsForDeliveryStreamCommand({ DeliveryStreamName: name })),
37841
- tagsOf: (tagsResp) => tagsResp.Tags
37842
- });
37843
- if (!match) return null;
37844
- return {
37845
- physicalId: match.summary,
37846
- attributes: {}
37847
- };
37482
+ return null;
37848
37483
  }
37849
37484
  /**
37850
37485
  * Wait for a delivery stream to become ACTIVE.
@@ -38350,32 +37985,7 @@ var CloudTrailProvider = class {
38350
37985
  if (err instanceof TrailNotFoundException) return null;
38351
37986
  throw err;
38352
37987
  }
38353
- const match = await importTagWalk({
38354
- cdkPath: input.cdkPath,
38355
- logicalId: input.logicalId,
38356
- listPage: async (marker) => {
38357
- const list = await this.getClient().send(new ListTrailsCommand({ ...marker && { NextToken: marker } }));
38358
- return {
38359
- items: list.Trails,
38360
- nextMarker: list.NextToken
38361
- };
38362
- },
38363
- describe: async (trail) => {
38364
- if (!trail.TrailARN || !trail.Name) return void 0;
38365
- try {
38366
- return await this.getClient().send(new ListTagsCommand$1({ ResourceIdList: [trail.TrailARN] }));
38367
- } catch (err) {
38368
- if (err instanceof TrailNotFoundException) return void 0;
38369
- throw err;
38370
- }
38371
- },
38372
- tagsOf: (tagsResp) => tagsResp.ResourceTagList?.[0]?.TagsList
38373
- });
38374
- if (!match) return null;
38375
- return {
38376
- physicalId: match.summary.Name,
38377
- attributes: {}
38378
- };
37988
+ return null;
38379
37989
  }
38380
37990
  };
38381
37991
 
@@ -38608,7 +38218,7 @@ var CodeBuildProvider = class {
38608
38218
  await this.getClient().send(new DeleteProjectCommand({ name: physicalId }));
38609
38219
  this.logger.debug(`Successfully deleted CodeBuild Project ${logicalId}`);
38610
38220
  } catch (error) {
38611
- if (error instanceof ResourceNotFoundException$11) {
38221
+ if (error instanceof ResourceNotFoundException$12) {
38612
38222
  assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
38613
38223
  this.logger.debug(`CodeBuild Project ${physicalId} does not exist, skipping deletion`);
38614
38224
  return;
@@ -38663,7 +38273,7 @@ var CodeBuildProvider = class {
38663
38273
  try {
38664
38274
  project = (await this.getClient().send(new BatchGetProjectsCommand({ names: [physicalId] }))).projects?.[0];
38665
38275
  } catch (err) {
38666
- if (err instanceof ResourceNotFoundException$11) return void 0;
38276
+ if (err instanceof ResourceNotFoundException$12) return void 0;
38667
38277
  throw err;
38668
38278
  }
38669
38279
  if (!project) return void 0;
@@ -38808,7 +38418,7 @@ var CodeBuildProvider = class {
38808
38418
  attributes: {}
38809
38419
  } : null;
38810
38420
  } catch (err) {
38811
- if (err instanceof ResourceNotFoundException$11) return null;
38421
+ if (err instanceof ResourceNotFoundException$12) return null;
38812
38422
  throw err;
38813
38423
  }
38814
38424
  return null;
@@ -39048,11 +38658,11 @@ var CodeCommitRepositoryProvider = class {
39048
38658
  const repoArn = metadata?.Arn;
39049
38659
  if (repoArn) {
39050
38660
  const removedKeys = Object.keys(oldTagMap).filter((k) => !(k in newTagMap));
39051
- if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$19({
38661
+ if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$20({
39052
38662
  resourceArn: repoArn,
39053
38663
  tagKeys: removedKeys
39054
38664
  }));
39055
- if (Object.keys(newTagMap).length > 0) await this.getClient().send(new TagResourceCommand$19({
38665
+ if (Object.keys(newTagMap).length > 0) await this.getClient().send(new TagResourceCommand$20({
39056
38666
  resourceArn: repoArn,
39057
38667
  tags: newTagMap
39058
38668
  }));
@@ -39180,7 +38790,7 @@ var CodeCommitRepositoryProvider = class {
39180
38790
  if (!metadata) return void 0;
39181
38791
  let tags = [];
39182
38792
  if (metadata.Arn) try {
39183
- tags = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$18({ resourceArn: metadata.Arn }))).tags);
38793
+ tags = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$16({ resourceArn: metadata.Arn }))).tags);
39184
38794
  } catch (err) {
39185
38795
  if (err instanceof RepositoryDoesNotExistException) return void 0;
39186
38796
  throw err;
@@ -39215,9 +38825,6 @@ var CodeCommitRepositoryProvider = class {
39215
38825
  * Lookup order:
39216
38826
  * 1. `--resource` override or `Properties.RepositoryName` → verify via
39217
38827
  * `GetRepository`.
39218
- * 2. `ListRepositories` paginated, then `ListTagsForResource(arn)` per
39219
- * repository to match `aws:cdk:path` (CodeCommit uses the
39220
- * `Record<string, string>` tag-map shape).
39221
38828
  */
39222
38829
  async import(input) {
39223
38830
  const explicit = resolveExplicitPhysicalId(input, "RepositoryName");
@@ -39231,42 +38838,7 @@ var CodeCommitRepositoryProvider = class {
39231
38838
  if (err instanceof RepositoryDoesNotExistException) return null;
39232
38839
  throw err;
39233
38840
  }
39234
- const match = await importTagWalk({
39235
- cdkPath: input.cdkPath,
39236
- logicalId: input.logicalId,
39237
- listPage: async (marker) => {
39238
- const list = await this.getClient().send(new ListRepositoriesCommand({ ...marker && { nextToken: marker } }));
39239
- return {
39240
- items: list.repositories,
39241
- nextMarker: list.nextToken
39242
- };
39243
- },
39244
- describe: async (repo) => {
39245
- if (!repo.repositoryName) return void 0;
39246
- let metadata;
39247
- try {
39248
- metadata = await this.getRepositoryMetadata(repo.repositoryName);
39249
- } catch (err) {
39250
- if (err instanceof RepositoryDoesNotExistException) return void 0;
39251
- throw err;
39252
- }
39253
- if (!metadata?.Arn) return void 0;
39254
- const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$18({ resourceArn: metadata.Arn }));
39255
- return {
39256
- metadata,
39257
- tags: tagsResp.tags
39258
- };
39259
- },
39260
- tagsOf: (detail) => Object.entries(detail.tags ?? {}).map(([Key, Value]) => ({
39261
- Key,
39262
- Value
39263
- }))
39264
- });
39265
- if (!match) return null;
39266
- return {
39267
- physicalId: match.summary.repositoryName,
39268
- attributes: this.toAttributes(match.detail.metadata)
39269
- };
38841
+ return null;
39270
38842
  }
39271
38843
  /**
39272
38844
  * Seed the repository's initial commit from the CFn `Code` property.
@@ -39470,7 +39042,7 @@ var DLMLifecyclePolicyProvider = class {
39470
39042
  if (tagsChanged && arn) {
39471
39043
  const removedKeys = Object.keys(oldTags).filter((k) => !(k in newTags));
39472
39044
  if (removedKeys.length > 0) {
39473
- await this.getClient().send(new UntagResourceCommand$20({
39045
+ await this.getClient().send(new UntagResourceCommand$21({
39474
39046
  ResourceArn: arn,
39475
39047
  TagKeys: removedKeys
39476
39048
  }));
@@ -39479,7 +39051,7 @@ var DLMLifecyclePolicyProvider = class {
39479
39051
  const tagsToAdd = {};
39480
39052
  for (const [k, v] of Object.entries(newTags)) if (oldTags[k] !== v) tagsToAdd[k] = v;
39481
39053
  if (Object.keys(tagsToAdd).length > 0) {
39482
- await this.getClient().send(new TagResourceCommand$20({
39054
+ await this.getClient().send(new TagResourceCommand$21({
39483
39055
  ResourceArn: arn,
39484
39056
  Tags: tagsToAdd
39485
39057
  }));
@@ -39503,7 +39075,7 @@ var DLMLifecyclePolicyProvider = class {
39503
39075
  await this.getClient().send(new DeleteLifecyclePolicyCommand$1({ PolicyId: physicalId }));
39504
39076
  this.logger.debug(`Successfully deleted DLM Lifecycle Policy ${logicalId}`);
39505
39077
  } catch (error) {
39506
- if (error instanceof ResourceNotFoundException$12) {
39078
+ if (error instanceof ResourceNotFoundException$13) {
39507
39079
  assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
39508
39080
  this.logger.debug(`DLM Lifecycle Policy ${physicalId} does not exist, skipping deletion`);
39509
39081
  return;
@@ -39554,7 +39126,7 @@ var DLMLifecyclePolicyProvider = class {
39554
39126
  Tags: normalizeAwsTagsToCfn(policy.Tags)
39555
39127
  };
39556
39128
  } catch (error) {
39557
- if (error instanceof ResourceNotFoundException$12) return;
39129
+ if (error instanceof ResourceNotFoundException$13) return;
39558
39130
  throw error;
39559
39131
  }
39560
39132
  }
@@ -39581,9 +39153,6 @@ var DLMLifecyclePolicyProvider = class {
39581
39153
  * 1. `--resource` override (`knownPhysicalId`) -> verify via
39582
39154
  * GetLifecyclePolicy. There is no template name property — the policy
39583
39155
  * id is service-generated — so no name fallback applies.
39584
- * 2. Tag-based lookup: GetLifecyclePolicies returns every policy summary
39585
- * WITH its tag map in a single unpaginated call, so the `aws:cdk:path`
39586
- * match needs no per-policy follow-up.
39587
39156
  */
39588
39157
  async import(input) {
39589
39158
  if (input.knownPhysicalId) try {
@@ -39593,26 +39162,10 @@ var DLMLifecyclePolicyProvider = class {
39593
39162
  attributes: response.Policy.PolicyArn ? { Arn: response.Policy.PolicyArn } : {}
39594
39163
  } : null;
39595
39164
  } catch (err) {
39596
- if (err instanceof ResourceNotFoundException$12) return null;
39165
+ if (err instanceof ResourceNotFoundException$13) return null;
39597
39166
  throw err;
39598
39167
  }
39599
- const match = await importTagWalk({
39600
- cdkPath: input.cdkPath,
39601
- logicalId: input.logicalId,
39602
- listPage: async () => {
39603
- return { items: (await this.getClient().send(new GetLifecyclePoliciesCommand({}))).Policies };
39604
- },
39605
- describe: async (policy) => policy.PolicyId ? policy : void 0,
39606
- tagsOf: (policy) => Object.entries(policy.Tags ?? {}).map(([Key, Value]) => ({
39607
- Key,
39608
- Value
39609
- }))
39610
- });
39611
- if (!match) return null;
39612
- return {
39613
- physicalId: match.summary.PolicyId,
39614
- attributes: {}
39615
- };
39168
+ return null;
39616
39169
  }
39617
39170
  };
39618
39171
 
@@ -39689,11 +39242,11 @@ var S3VectorsProvider = class {
39689
39242
  }
39690
39243
  if (!resourceArn) throw new ProvisioningError(`Could not resolve ARN for S3 VectorBucket ${logicalId} (${physicalId}); cannot apply tag update.`, resourceType, logicalId, physicalId);
39691
39244
  try {
39692
- if (Object.keys(toSet).length > 0) await this.getClient().send(new TagResourceCommand$21({
39245
+ if (Object.keys(toSet).length > 0) await this.getClient().send(new TagResourceCommand$22({
39693
39246
  resourceArn,
39694
39247
  tags: toSet
39695
39248
  }));
39696
- if (toRemove.length > 0) await this.getClient().send(new UntagResourceCommand$21({
39249
+ if (toRemove.length > 0) await this.getClient().send(new UntagResourceCommand$22({
39697
39250
  resourceArn,
39698
39251
  tagKeys: toRemove
39699
39252
  }));
@@ -39821,7 +39374,7 @@ var S3VectorsProvider = class {
39821
39374
  if (Object.keys(enc).length > 0) result["EncryptionConfiguration"] = enc;
39822
39375
  }
39823
39376
  if (bucket?.vectorBucketArn) try {
39824
- result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$19({ resourceArn: bucket.vectorBucketArn }))).tags);
39377
+ result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$17({ resourceArn: bucket.vectorBucketArn }))).tags);
39825
39378
  } catch (err) {
39826
39379
  this.logger.debug(`S3Vectors ListTagsForResource(${bucket.vectorBucketArn}) failed: ${err instanceof Error ? err.message : String(err)}`);
39827
39380
  result["Tags"] = [];
@@ -39835,8 +39388,6 @@ var S3VectorsProvider = class {
39835
39388
  * Lookup order:
39836
39389
  * 1. `--resource <id>=<name>` override or `Properties.VectorBucketName`
39837
39390
  * → verify via `GetVectorBucket`. The physical id is the bucket name.
39838
- * 2. `ListVectorBuckets` paginator + `ListTagsForResource(resourceArn)`
39839
- * (tags map keyed by tag name) and match `aws:cdk:path`.
39840
39391
  */
39841
39392
  async import(input) {
39842
39393
  const explicit = input.knownPhysicalId ?? (typeof input.properties?.["VectorBucketName"] === "string" && input.properties["VectorBucketName"].length > 0 ? input.properties["VectorBucketName"] : void 0);
@@ -39850,35 +39401,7 @@ var S3VectorsProvider = class {
39850
39401
  if (this.isNotFoundError(err)) return null;
39851
39402
  throw err;
39852
39403
  }
39853
- const match = await importTagWalk({
39854
- cdkPath: input.cdkPath,
39855
- logicalId: input.logicalId,
39856
- listPage: async (marker) => {
39857
- const list = await this.getClient().send(new ListVectorBucketsCommand({ ...marker && { nextToken: marker } }));
39858
- return {
39859
- items: list.vectorBuckets,
39860
- nextMarker: list.nextToken
39861
- };
39862
- },
39863
- describe: async (bucket) => {
39864
- if (!bucket.vectorBucketName || !bucket.vectorBucketArn) return void 0;
39865
- try {
39866
- return await this.getClient().send(new ListTagsForResourceCommand$19({ resourceArn: bucket.vectorBucketArn }));
39867
- } catch (err) {
39868
- if (this.isNotFoundError(err)) return void 0;
39869
- throw err;
39870
- }
39871
- },
39872
- tagsOf: (tagsResp) => Object.entries(tagsResp.tags ?? {}).map(([Key, Value]) => ({
39873
- Key,
39874
- Value
39875
- }))
39876
- });
39877
- if (!match) return null;
39878
- return {
39879
- physicalId: match.summary.vectorBucketName,
39880
- attributes: {}
39881
- };
39404
+ return null;
39882
39405
  }
39883
39406
  isNotFoundError(error) {
39884
39407
  if (error instanceof Error) {
@@ -40091,10 +39614,6 @@ var S3DirectoryBucketProvider = class {
40091
39614
  * Lookup order:
40092
39615
  * 1. `--resource <id>=<name>` override or `Properties.BucketName` →
40093
39616
  * verify via `HeadBucket`.
40094
- * 2. `ListDirectoryBuckets` paginator + `GetBucketTagging` (TagSet:
40095
- * Tag[]) and match `aws:cdk:path`. `GetBucketTagging` may surface
40096
- * `NoSuchTagSet` / `AccessDenied` per-bucket — those are skipped
40097
- * rather than fatal.
40098
39617
  */
40099
39618
  async import(input) {
40100
39619
  const explicit = resolveExplicitPhysicalId(input, "BucketName");
@@ -40109,33 +39628,7 @@ var S3DirectoryBucketProvider = class {
40109
39628
  if (e.name === "NotFound" || e.name === "NoSuchBucket") return null;
40110
39629
  throw err;
40111
39630
  }
40112
- const match = await importTagWalk({
40113
- cdkPath: input.cdkPath,
40114
- logicalId: input.logicalId,
40115
- listPage: async (token) => {
40116
- const list = await this.s3Client.send(new ListDirectoryBucketsCommand({ ...token && { ContinuationToken: token } }));
40117
- return {
40118
- items: list.Buckets,
40119
- nextMarker: list.ContinuationToken
40120
- };
40121
- },
40122
- describe: async (b) => {
40123
- if (!b.Name) return void 0;
40124
- try {
40125
- return await this.s3Client.send(new GetBucketTaggingCommand({ Bucket: b.Name }));
40126
- } catch (err) {
40127
- const e = err;
40128
- if (e.name === "NoSuchTagSet" || e.name === "AccessDenied") return void 0;
40129
- throw err;
40130
- }
40131
- },
40132
- tagsOf: (tagging) => tagging.TagSet
40133
- });
40134
- if (!match) return null;
40135
- return {
40136
- physicalId: match.summary.Name,
40137
- attributes: {}
40138
- };
39631
+ return null;
40139
39632
  }
40140
39633
  };
40141
39634
 
@@ -40251,7 +39744,7 @@ var S3TablesProvider = class {
40251
39744
  if (!namespaceName) continue;
40252
39745
  let tableContinuationToken;
40253
39746
  do {
40254
- const tablesResult = await this.getClient().send(new ListTablesCommand$1({
39747
+ const tablesResult = await this.getClient().send(new ListTablesCommand({
40255
39748
  tableBucketARN,
40256
39749
  namespace: namespaceName,
40257
39750
  continuationToken: tableContinuationToken
@@ -40591,7 +40084,7 @@ var S3TablesProvider = class {
40591
40084
  */
40592
40085
  async readTagsBestEffort(resourceArn) {
40593
40086
  try {
40594
- const tags = (await this.getClient().send(new ListTagsForResourceCommand$20({ resourceArn }))).tags ?? {};
40087
+ const tags = (await this.getClient().send(new ListTagsForResourceCommand$18({ resourceArn }))).tags ?? {};
40595
40088
  const out = [];
40596
40089
  for (const [Key, Value] of Object.entries(tags)) out.push({
40597
40090
  Key,
@@ -40645,7 +40138,7 @@ var S3TablesProvider = class {
40645
40138
  const resourceArn = await this.lookupTableArn(tableBucketARN, namespace, name);
40646
40139
  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);
40647
40140
  if (removedKeys.length > 0) try {
40648
- await this.getClient().send(new UntagResourceCommand$22({
40141
+ await this.getClient().send(new UntagResourceCommand$23({
40649
40142
  resourceArn,
40650
40143
  tagKeys: removedKeys
40651
40144
  }));
@@ -40654,7 +40147,7 @@ var S3TablesProvider = class {
40654
40147
  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);
40655
40148
  }
40656
40149
  if (Object.keys(upserts).length > 0) try {
40657
- await this.getClient().send(new TagResourceCommand$22({
40150
+ await this.getClient().send(new TagResourceCommand$23({
40658
40151
  resourceArn,
40659
40152
  tags: upserts
40660
40153
  }));
@@ -40686,7 +40179,7 @@ var S3TablesProvider = class {
40686
40179
  if (removedKeys.length === 0 && Object.keys(upserts).length === 0) return;
40687
40180
  const resourceArn = physicalId;
40688
40181
  if (removedKeys.length > 0) try {
40689
- await this.getClient().send(new UntagResourceCommand$22({
40182
+ await this.getClient().send(new UntagResourceCommand$23({
40690
40183
  resourceArn,
40691
40184
  tagKeys: removedKeys
40692
40185
  }));
@@ -40695,7 +40188,7 @@ var S3TablesProvider = class {
40695
40188
  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);
40696
40189
  }
40697
40190
  if (Object.keys(upserts).length > 0) try {
40698
- await this.getClient().send(new TagResourceCommand$22({
40191
+ await this.getClient().send(new TagResourceCommand$23({
40699
40192
  resourceArn,
40700
40193
  tags: upserts
40701
40194
  }));
@@ -40878,11 +40371,11 @@ var ECRProvider = class {
40878
40371
  if (repoArn) {
40879
40372
  const newKeys = new Set((newTags ?? []).map((t) => t.Key).filter((k) => !!k));
40880
40373
  const removedKeys = (oldTags ?? []).map((t) => t.Key).filter((k) => !!k && !newKeys.has(k));
40881
- if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$11({
40374
+ if (removedKeys.length > 0) await this.getClient().send(new UntagResourceCommand$12({
40882
40375
  resourceArn: repoArn,
40883
40376
  tagKeys: removedKeys
40884
40377
  }));
40885
- if (newTags && newTags.length > 0) await this.getClient().send(new TagResourceCommand$11({
40378
+ if (newTags && newTags.length > 0) await this.getClient().send(new TagResourceCommand$12({
40886
40379
  resourceArn: repoArn,
40887
40380
  tags: newTags
40888
40381
  }));
@@ -40993,8 +40486,6 @@ var ECRProvider = class {
40993
40486
  * Lookup order:
40994
40487
  * 1. `--resource` override or `Properties.RepositoryName` → verify via
40995
40488
  * `DescribeRepositories`.
40996
- * 2. `DescribeRepositories` paginated, then `ListTagsForResource(arn)`
40997
- * per repository to match `aws:cdk:path` (`Tag[]` array shape).
40998
40489
  */
40999
40490
  async import(input) {
41000
40491
  const explicit = resolveExplicitPhysicalId(input, "RepositoryName");
@@ -41007,32 +40498,7 @@ var ECRProvider = class {
41007
40498
  if (err instanceof RepositoryNotFoundException) return null;
41008
40499
  throw err;
41009
40500
  }
41010
- const match = await importTagWalk({
41011
- cdkPath: input.cdkPath,
41012
- logicalId: input.logicalId,
41013
- listPage: async (marker) => {
41014
- const list = await this.getClient().send(new DescribeRepositoriesCommand({ ...marker && { nextToken: marker } }));
41015
- return {
41016
- items: list.repositories,
41017
- nextMarker: list.nextToken
41018
- };
41019
- },
41020
- describe: async (repo) => {
41021
- if (!repo.repositoryArn || !repo.repositoryName) return void 0;
41022
- try {
41023
- return await this.getClient().send(new ListTagsForResourceCommand$8({ resourceArn: repo.repositoryArn }));
41024
- } catch (err) {
41025
- if (err instanceof RepositoryNotFoundException) return void 0;
41026
- throw err;
41027
- }
41028
- },
41029
- tagsOf: (tagsResp) => tagsResp.tags
41030
- });
41031
- if (!match) return null;
41032
- return {
41033
- physicalId: match.summary.repositoryName,
41034
- attributes: {}
41035
- };
40501
+ return null;
41036
40502
  }
41037
40503
  };
41038
40504
 
@@ -42090,10 +41556,6 @@ var ACMCertificateProvider = class {
42090
41556
  *
42091
41557
  * Lookup order:
42092
41558
  * 1. `--resource` override (must be an ARN — ACM has no other unique id).
42093
- * 2. Tag-based `aws:cdk:path` match across `ListCertificates` +
42094
- * `ListTagsForCertificate`. NOTE: ACM has no `Scope: Local` filter —
42095
- * `ListCertificates` returns customer-managed certs only (AWS-managed
42096
- * certs are not surfaced via this API), so no extra guard is needed.
42097
41559
  */
42098
41560
  async import(input) {
42099
41561
  if (input.knownPhysicalId) {
@@ -42113,36 +41575,7 @@ var ACMCertificateProvider = class {
42113
41575
  throw err;
42114
41576
  }
42115
41577
  }
42116
- const match = await importTagWalk({
42117
- cdkPath: input.cdkPath,
42118
- logicalId: input.logicalId,
42119
- listPage: async (marker) => {
42120
- const list = await this.acmClient.send(new ListCertificatesCommand({ ...marker && { NextToken: marker } }));
42121
- return {
42122
- items: list.CertificateSummaryList,
42123
- nextMarker: list.NextToken
42124
- };
42125
- },
42126
- describe: async (summary) => {
42127
- if (!summary.CertificateArn) return void 0;
42128
- try {
42129
- return await this.acmClient.send(new ListTagsForCertificateCommand({ CertificateArn: summary.CertificateArn }));
42130
- } catch (err) {
42131
- if (err instanceof ResourceNotFoundException$6) return void 0;
42132
- throw err;
42133
- }
42134
- },
42135
- tagsOf: (tagsResp) => tagsResp.Tags
42136
- });
42137
- if (!match) return null;
42138
- const arn = match.summary.CertificateArn;
42139
- return {
42140
- physicalId: arn,
42141
- attributes: {
42142
- Arn: arn,
42143
- CertificateArn: arn
42144
- }
42145
- };
41578
+ return null;
42146
41579
  }
42147
41580
  /**
42148
41581
  * Poll `DescribeCertificate` until status === `ISSUED`. On the FIRST poll
@@ -42255,6 +41688,7 @@ function registerAllProviders(registry) {
42255
41688
  registry.register("AWS::Lambda::EventSourceMapping", new LambdaEventSourceMappingProvider());
42256
41689
  registry.register("AWS::Lambda::LayerVersion", new LambdaLayerVersionProvider());
42257
41690
  registry.register("AWS::Lambda::EventInvokeConfig", new LambdaEventInvokeConfigProvider());
41691
+ registry.register("AWS::Lambda::MicrovmImage", new LambdaMicrovmImageProvider());
42258
41692
  registry.register("AWS::DynamoDB::Table", new DynamoDBTableProvider());
42259
41693
  registry.register("AWS::DynamoDB::GlobalTable", new DynamoDBGlobalTableProvider());
42260
41694
  registry.register("AWS::Logs::LogGroup", new LogsLogGroupProvider());
@@ -42572,15 +42006,17 @@ async function deployCommand(stacks, options) {
42572
42006
  logger.info(cyan(synthesisStatusMessage(app, "Synthesizing CDK app...")));
42573
42007
  const synthesizer = new Synthesizer();
42574
42008
  const context = parseContextOptions(options.context);
42575
- const { stacks: allStacks } = await synthesizer.synthesize({
42009
+ const synthOptions = {
42576
42010
  app: options.app,
42577
42011
  output: options.output,
42578
42012
  ...options.region && { region: options.region },
42579
42013
  ...options.profile && { profile: options.profile },
42580
42014
  ...Object.keys(context).length > 0 && { context },
42581
42015
  stateBucket,
42582
- ...options.profile && { macroExpandS3ClientOpts: { profile: options.profile } }
42583
- });
42016
+ ...options.profile && { macroExpandS3ClientOpts: { profile: options.profile } },
42017
+ deferMacroExpansion: true
42018
+ };
42019
+ const { stacks: allStacks } = await synthesizer.synthesize(synthOptions);
42584
42020
  logger.debug(`Found ${allStacks.length} stack(s) in assembly`);
42585
42021
  const stackPatterns = stacks.length > 0 ? stacks : options.stack ? [options.stack] : [];
42586
42022
  let targetStacks;
@@ -42619,6 +42055,7 @@ async function deployCommand(stacks, options) {
42619
42055
  };
42620
42056
  for (const stack of [...targetStacks]) addDependencies(stack.stackName);
42621
42057
  }
42058
+ await synthesizer.expandMacrosForStacks(targetStacks, synthOptions);
42622
42059
  const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
42623
42060
  const stsClient = new STSClient({ region: options.region || process.env["AWS_REGION"] || "us-east-1" });
42624
42061
  const accountId = (await stsClient.send(new GetCallerIdentityCommand({}))).Account;
@@ -44279,15 +43716,17 @@ async function diffCommand(stacks, options) {
44279
43716
  logger.info(synthesisStatusMessage(app, "Synthesizing CDK app..."));
44280
43717
  const synthesizer = new Synthesizer();
44281
43718
  const context = parseContextOptions(options.context);
44282
- const { stacks: allStacks } = await synthesizer.synthesize({
43719
+ const synthOptions = {
44283
43720
  app: options.app,
44284
43721
  output: options.output,
44285
43722
  ...options.region && { region: options.region },
44286
43723
  ...options.profile && { profile: options.profile },
44287
43724
  ...Object.keys(context).length > 0 && { context },
44288
43725
  stateBucket,
44289
- ...options.profile && { macroExpandS3ClientOpts: { profile: options.profile } }
44290
- });
43726
+ ...options.profile && { macroExpandS3ClientOpts: { profile: options.profile } },
43727
+ deferMacroExpansion: true
43728
+ };
43729
+ const { stacks: allStacks } = await synthesizer.synthesize(synthOptions);
44291
43730
  logger.info(`Found ${allStacks.length} stack(s) in assembly`);
44292
43731
  const stackPatterns = stacks.length > 0 ? stacks : options.stack ? [options.stack] : [];
44293
43732
  let targetStacks;
@@ -44296,6 +43735,7 @@ async function diffCommand(stacks, options) {
44296
43735
  else if (allStacks.length === 1) targetStacks = allStacks;
44297
43736
  else throw new Error(`Multiple stacks found: ${allStacks.map(describeStack).join(", ")}. Specify stack name(s) or use --all`);
44298
43737
  if (targetStacks.length === 0) throw new Error(stackPatterns.length > 0 ? `No stacks matching ${stackPatterns.join(", ")} found in assembly. Available: ${allStacks.map(describeStack).join(", ")}` : "No stacks found in assembly");
43738
+ await synthesizer.expandMacrosForStacks(targetStacks, synthOptions);
44299
43739
  const stateConfig = {
44300
43740
  bucket: stateBucket,
44301
43741
  prefix: options.statePrefix
@@ -45524,8 +44964,7 @@ async function destroyCommand(stackArgs, options) {
45524
44964
  app: appCmd,
45525
44965
  output: options.output || "cdk.out",
45526
44966
  ...Object.keys(context).length > 0 && { context },
45527
- stateBucket,
45528
- ...options.profile && { macroExpandS3ClientOpts: { profile: options.profile } }
44967
+ deferMacroExpansion: true
45529
44968
  });
45530
44969
  appStacks = result.stacks.map((s) => ({
45531
44970
  stackName: s.stackName,
@@ -51728,12 +51167,10 @@ async function importOne(task) {
51728
51167
  outcome: "skipped-no-impl",
51729
51168
  reason: `provider does not implement import (yet)`
51730
51169
  };
51731
- const cdkPath = readCdkPath(resource);
51732
51170
  const properties = substituteOverrideRefs(resource.Properties ?? {}, overrides);
51733
51171
  const input = {
51734
51172
  logicalId,
51735
51173
  resourceType: resource.Type,
51736
- cdkPath,
51737
51174
  stackName,
51738
51175
  region,
51739
51176
  properties,
@@ -51745,7 +51182,7 @@ async function importOne(task) {
51745
51182
  logicalId,
51746
51183
  resourceType: resource.Type,
51747
51184
  outcome: "skipped-not-found",
51748
- reason: "no matching AWS resource"
51185
+ reason: `no matching AWS resource — pass --resource ${logicalId}=<physicalId> to adopt it explicitly`
51749
51186
  };
51750
51187
  return {
51751
51188
  logicalId,
@@ -61823,7 +61260,7 @@ function createMigrateCommand() {
61823
61260
  */
61824
61261
  function buildProgram() {
61825
61262
  const program = new Command();
61826
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.257.3");
61263
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.258.0");
61827
61264
  program.addCommand(createBootstrapCommand());
61828
61265
  program.addCommand(createSynthCommand());
61829
61266
  program.addCommand(createListCommand());