@go-to-k/cdkd 0.257.3 → 0.257.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{asg-provider-Co34HfIH.js → asg-provider-BhmMKcnJ.js} +2 -2
- package/dist/{asg-provider-Co34HfIH.js.map → asg-provider-BhmMKcnJ.js.map} +1 -1
- package/dist/cli.js +134 -1087
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-0U3bYBq4.js → deploy-engine-DMpr3qtv.js} +261 -435
- package/dist/deploy-engine-DMpr3qtv.js.map +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-0U3bYBq4.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as
|
|
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-DMpr3qtv.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-
|
|
4
|
+
import { t as ASGProvider } from "./asg-provider-BhmMKcnJ.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,
|
|
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,
|
|
9
|
-
import { CreateQueueCommand, DeleteQueueCommand, GetQueueAttributesCommand, GetQueueUrlCommand, ListQueueTagsCommand,
|
|
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,
|
|
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,
|
|
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,
|
|
18
|
-
import { CreateSecretCommand, DeleteSecretCommand, DescribeSecretCommand, GetSecretValueCommand,
|
|
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,
|
|
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,
|
|
24
|
+
import { ACMClient, AddTagsToCertificateCommand, DeleteCertificateCommand, DescribeCertificateCommand, ListTagsForCertificateCommand, RemoveTagsFromCertificateCommand, RequestCertificateCommand, ResourceNotFoundException as ResourceNotFoundException$6, UpdateCertificateOptionsCommand } from "@aws-sdk/client-acm";
|
|
25
25
|
import * as fs from "node:fs";
|
|
26
26
|
import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
27
27
|
import * as path from "node:path";
|
|
@@ -30,7 +30,7 @@ import { execFile, spawn } from "node:child_process";
|
|
|
30
30
|
import { tmpdir } from "node:os";
|
|
31
31
|
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
32
|
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,
|
|
33
|
+
import { CreateAliasCommand, CreateKeyCommand, DeleteAliasCommand, DescribeKeyCommand, DisableKeyCommand, DisableKeyRotationCommand, EnableKeyCommand, EnableKeyRotationCommand, GetKeyPolicyCommand, GetKeyRotationStatusCommand, KMSClient, ListAliasesCommand, ListResourceTagsCommand, NotFoundException as NotFoundException$2, PutKeyPolicyCommand, ScheduleKeyDeletionCommand, TagResourceCommand as TagResourceCommand$10, UntagResourceCommand as UntagResourceCommand$10, UpdateAliasCommand, UpdateKeyDescriptionCommand } from "@aws-sdk/client-kms";
|
|
34
34
|
import { join as join$1 } from "path";
|
|
35
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
36
|
import graphlib from "graphlib";
|
|
@@ -43,29 +43,29 @@ import { writeFileSync as writeFileSync$1 } from "fs";
|
|
|
43
43
|
import * as zlib from "node:zlib";
|
|
44
44
|
import { ApplicationAutoScalingClient, DeleteScalingPolicyCommand, DeregisterScalableTargetCommand, DescribeScalableTargetsCommand, DescribeScalingPoliciesCommand, PutScalingPolicyCommand, RegisterScalableTargetCommand } from "@aws-sdk/client-application-auto-scaling";
|
|
45
45
|
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,
|
|
46
|
+
import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$11, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$12, UntagResourceCommand as UntagResourceCommand$12, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
|
|
47
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";
|
|
48
48
|
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
49
|
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,
|
|
51
|
-
import { CreateHttpNamespaceCommand, CreatePrivateDnsNamespaceCommand, CreatePublicDnsNamespaceCommand, CreateServiceCommand as CreateServiceCommand$1, DeleteNamespaceCommand, DeleteServiceAttributesCommand, DeleteServiceCommand as DeleteServiceCommand$1, GetNamespaceCommand, GetOperationCommand, GetServiceAttributesCommand, GetServiceCommand, ListNamespacesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
50
|
+
import { AddCustomAttributesCommand, CognitoIdentityProviderClient, CreateUserPoolCommand, DeleteUserPoolCommand, DescribeUserPoolCommand, GetUserPoolMfaConfigCommand, 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$14, 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
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";
|
|
53
53
|
import { parse, print } from "graphql";
|
|
54
54
|
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,
|
|
56
|
-
import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient,
|
|
55
|
+
import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand, DuplicateRecordException, 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, ListTagsForResourceCommand as ListTagsForResourceCommand$15, 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
57
|
import { CreateScheduleCommand, DeleteScheduleCommand, GetScheduleCommand, ResourceNotFoundException as ResourceNotFoundException$9, SchedulerClient, UpdateScheduleCommand } from "@aws-sdk/client-scheduler";
|
|
58
58
|
import { AccessPointNotFound, CreateAccessPointCommand, CreateFileSystemCommand, CreateMountTargetCommand, DeleteAccessPointCommand, DeleteFileSystemCommand, DeleteMountTargetCommand, DescribeAccessPointsCommand, DescribeBackupPolicyCommand, DescribeFileSystemPolicyCommand, DescribeFileSystemsCommand, DescribeLifecycleConfigurationCommand, DescribeMountTargetSecurityGroupsCommand, DescribeMountTargetsCommand, EFSClient, FileSystemNotFound, ModifyMountTargetSecurityGroupsCommand, MountTargetNotFound, PutBackupPolicyCommand, PutFileSystemPolicyCommand, PutLifecycleConfigurationCommand, UpdateFileSystemCommand, UpdateFileSystemProtectionCommand } from "@aws-sdk/client-efs";
|
|
59
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,
|
|
61
|
-
import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliveryStreamCommand, FirehoseClient,
|
|
62
|
-
import { AddTagsCommand as AddTagsCommand$2, CloudTrailClient, CreateTrailCommand, DeleteTrailCommand, GetEventSelectorsCommand, GetInsightSelectorsCommand, GetTrailCommand, GetTrailStatusCommand, ListTagsCommand as ListTagsCommand$1,
|
|
60
|
+
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";
|
|
61
|
+
import { CreateDeliveryStreamCommand, DeleteDeliveryStreamCommand, DescribeDeliveryStreamCommand, FirehoseClient, 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, PutEventSelectorsCommand, PutInsightSelectorsCommand, RemoveTagsCommand as RemoveTagsCommand$2, StartLoggingCommand, StopLoggingCommand, TrailNotFoundException, UpdateTrailCommand } from "@aws-sdk/client-cloudtrail";
|
|
63
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,
|
|
64
|
+
import { CodeCommitClient, CreateCommitCommand, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$16, PutRepositoryTriggersCommand, RepositoryDoesNotExistException, TagResourceCommand as TagResourceCommand$19, UntagResourceCommand as UntagResourceCommand$19, UpdateRepositoryDescriptionCommand, UpdateRepositoryEncryptionKeyCommand, UpdateRepositoryNameCommand } from "@aws-sdk/client-codecommit";
|
|
65
65
|
import AdmZip from "adm-zip";
|
|
66
|
-
import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand as DeleteLifecyclePolicyCommand$1,
|
|
67
|
-
import { CreateVectorBucketCommand, DeleteIndexCommand, DeleteVectorBucketCommand, GetVectorBucketCommand, ListIndexesCommand, ListTagsForResourceCommand as ListTagsForResourceCommand$
|
|
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
|
|
66
|
+
import { CreateLifecyclePolicyCommand, DLMClient, DeleteLifecyclePolicyCommand as DeleteLifecyclePolicyCommand$1, 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$17, 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, ListTagsForResourceCommand as ListTagsForResourceCommand$18, NotFoundException as NotFoundException$6, S3TablesClient, TagResourceCommand as TagResourceCommand$22, UntagResourceCommand as UntagResourceCommand$22 } from "@aws-sdk/client-s3tables";
|
|
69
69
|
import { Document, Pair, Scalar, YAMLMap, YAMLSeq, parse as parse$1, stringify } from "yaml";
|
|
70
70
|
import { createLocalStartAgentCoreCommand, createLocalStartCloudFrontCommand, createLocalStateProvider, getEmbedConfig, isCfnFlagPresent, listTargets, rejectExplicitCfnStackWithMultipleStacks, resolveCfnFallbackRegion, setEmbedConfig, substituteAgainstState, substituteAgainstStateAsync, substituteEnvVarsFromState, substituteEnvVarsFromStateAsync } from "cdk-local";
|
|
71
71
|
import { A2A_CONTAINER_PORT, A2A_PATH, AGENTCORE_A2A_PROTOCOL, AGENTCORE_AGUI_PROTOCOL, AGENTCORE_MCP_PROTOCOL, ConnectionRegistry, EcsTaskResolutionError, HOST_GATEWAY_MIN_VERSION, LocalInvokeBuildError, MCP_CONTAINER_PORT, MCP_PATH, a2aInvokeOnce, addAlbSpecificOptions, addCommonEcsServiceOptions, addStartServiceSpecificOptions, albStrategy, architectureToPlatform, attachAuthorizers, attachStageContext, availableApiIdentifiers, bufferToBody, buildAgentCoreCodeImage, buildCognitoJwksUrl, buildConnectEvent, buildContainerImage, buildCorsConfigByApiId, buildCorsConfigFromCloudFrontChain, buildDisconnectEvent, buildJwksUrlFromIssuer, buildMessageEvent, buildMgmtEndpointEnvUrl, buildStageMap, classifySourceChange, createAuthorizerCache, createFileWatcher, createFileWatcher as createFileWatcher$1, createJwksCache, createWatchPredicates, defaultCredentialsLoader, derivePseudoParametersFromRegion, discoverRoutes, discoverWebSocketApis, downloadAndExtractS3Bundle, filterRoutesByApiIdentifier, groupRoutesByServer, handleConnectionsRequest, invokeAgentCore, invokeAgentCoreWs, materializeLayerFromArn, mcpInvokeOnce, parseConnectionsPath, parseSelectionExpressionPath, pickAgentCoreCandidateStack, pickAgentCoreCandidateStack as pickAgentCoreCandidateStack$1, probeHostGatewaySupport, readMtlsMaterialsFromDisk, resolveAgentCoreTarget, resolveEnvVars, resolveHostGatewayExtraHosts, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSingleTarget, resolveWatchConfig, runEcsServiceEmulator, signAgentCoreInvocation, startApiServer, substituteImagePlaceholders, tryResolveImageFnJoin, verifyJwtViaDiscovery, waitForAgentCorePing } from "cdk-local/internal";
|
|
@@ -1354,7 +1354,8 @@ async function listCommand(patterns, options) {
|
|
|
1354
1354
|
output: options.output,
|
|
1355
1355
|
...options.region && { region: options.region },
|
|
1356
1356
|
...options.profile && { profile: options.profile },
|
|
1357
|
-
...Object.keys(context).length > 0 && { context }
|
|
1357
|
+
...Object.keys(context).length > 0 && { context },
|
|
1358
|
+
deferMacroExpansion: true
|
|
1358
1359
|
};
|
|
1359
1360
|
const allStacks = (await synthesizer.synthesize(synthOptions)).stacks;
|
|
1360
1361
|
if (allStacks.length === 0) throw new Error("No stacks found in assembly");
|
|
@@ -1899,7 +1900,7 @@ const FLUSH_INTERVAL_MS = 2e3;
|
|
|
1899
1900
|
const FLUSH_EVENT_THRESHOLD = 50;
|
|
1900
1901
|
/** Build-time cdkd version, with a dev fallback for non-built contexts. */
|
|
1901
1902
|
function getCdkdVersion() {
|
|
1902
|
-
return "0.257.
|
|
1903
|
+
return "0.257.4";
|
|
1903
1904
|
}
|
|
1904
1905
|
/**
|
|
1905
1906
|
* Generate a time-sortable unique run id, e.g.
|
|
@@ -3485,8 +3486,6 @@ var IAMManagedPolicyProvider = class {
|
|
|
3485
3486
|
* Lookup order:
|
|
3486
3487
|
* 1. `--resource` override or `Properties.ManagedPolicyName` → walk
|
|
3487
3488
|
* `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
3489
|
*
|
|
3491
3490
|
* Scope is forced to `'Local'` (customer-managed policies) — adopting an
|
|
3492
3491
|
* AWS-managed policy would let cdkd delete it on next destroy, which would
|
|
@@ -3515,36 +3514,7 @@ var IAMManagedPolicyProvider = class {
|
|
|
3515
3514
|
};
|
|
3516
3515
|
return null;
|
|
3517
3516
|
}
|
|
3518
|
-
|
|
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
|
-
};
|
|
3517
|
+
return null;
|
|
3548
3518
|
}
|
|
3549
3519
|
async attachToPrincipals(policyArn, groups, roles, users) {
|
|
3550
3520
|
if (groups && Array.isArray(groups)) for (const groupName of groups) {
|
|
@@ -3945,13 +3915,6 @@ var IAMInstanceProfileProvider = class {
|
|
|
3945
3915
|
* Lookup order:
|
|
3946
3916
|
* 1. `--resource` override or `Properties.InstanceProfileName` → verify
|
|
3947
3917
|
* 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
3918
|
*/
|
|
3956
3919
|
async import(input) {
|
|
3957
3920
|
const explicit = resolveExplicitPhysicalId(input, "InstanceProfileName");
|
|
@@ -3965,32 +3928,7 @@ var IAMInstanceProfileProvider = class {
|
|
|
3965
3928
|
if (err instanceof NoSuchEntityException) return null;
|
|
3966
3929
|
throw err;
|
|
3967
3930
|
}
|
|
3968
|
-
|
|
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
|
-
};
|
|
3931
|
+
return null;
|
|
3994
3932
|
}
|
|
3995
3933
|
};
|
|
3996
3934
|
|
|
@@ -6290,8 +6228,6 @@ var S3BucketProvider = class {
|
|
|
6290
6228
|
* Lookup order:
|
|
6291
6229
|
* 1. `--resource <id>=<name>` override or `Properties.BucketName` → use directly,
|
|
6292
6230
|
* verify with `HeadBucket`.
|
|
6293
|
-
* 2. `ListBuckets` + `GetBucketTagging`, match `aws:cdk:path` against the
|
|
6294
|
-
* CDK construct path.
|
|
6295
6231
|
*
|
|
6296
6232
|
* Returns `null` when nothing matches — caller treats this as
|
|
6297
6233
|
* "not deployed yet" rather than a failure.
|
|
@@ -6309,32 +6245,7 @@ var S3BucketProvider = class {
|
|
|
6309
6245
|
if (e.name === "NotFound" || e.name === "NoSuchBucket") return null;
|
|
6310
6246
|
throw err;
|
|
6311
6247
|
}
|
|
6312
|
-
|
|
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
|
-
};
|
|
6248
|
+
return null;
|
|
6338
6249
|
}
|
|
6339
6250
|
/**
|
|
6340
6251
|
* Delete a bucket, emptying it first if not empty.
|
|
@@ -7150,7 +7061,6 @@ var SQSQueueProvider = class {
|
|
|
7150
7061
|
* Lookup order:
|
|
7151
7062
|
* 1. `--resource` override (URL) → verify via `GetQueueAttributes`.
|
|
7152
7063
|
* 2. `Properties.QueueName` → `GetQueueUrl` for direct lookup.
|
|
7153
|
-
* 3. `aws:cdk:path` tag match via `ListQueues` + `ListQueueTags`.
|
|
7154
7064
|
*/
|
|
7155
7065
|
async import(input) {
|
|
7156
7066
|
if (input.knownPhysicalId) try {
|
|
@@ -7178,34 +7088,7 @@ var SQSQueueProvider = class {
|
|
|
7178
7088
|
if (err instanceof QueueDoesNotExist) return null;
|
|
7179
7089
|
throw err;
|
|
7180
7090
|
}
|
|
7181
|
-
|
|
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
|
-
};
|
|
7091
|
+
return null;
|
|
7209
7092
|
}
|
|
7210
7093
|
};
|
|
7211
7094
|
|
|
@@ -7873,17 +7756,13 @@ var SNSTopicProvider = class {
|
|
|
7873
7756
|
*
|
|
7874
7757
|
* Lookup order:
|
|
7875
7758
|
* 1. `--resource` override → trust as ARN, verify via `GetTopicAttributes`.
|
|
7876
|
-
* 2. `Properties.TopicName` → `ListTopics` to find matching ARN.
|
|
7877
|
-
*
|
|
7878
|
-
*
|
|
7879
|
-
*
|
|
7880
|
-
*
|
|
7881
|
-
*
|
|
7882
|
-
*
|
|
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.
|
|
7759
|
+
* 2. `Properties.TopicName` → `ListTopics` to find the matching ARN.
|
|
7760
|
+
*
|
|
7761
|
+
* The `aws:cdk:path` tag match that used to ride the same `ListTopics` walk
|
|
7762
|
+
* is gone (issue #1134): AWS rejects `aws:`-prefixed tag writes, so that tag
|
|
7763
|
+
* never exists on a real resource and the walk could not match. Auto-mode
|
|
7764
|
+
* import resolves ids from CloudFormation's `DescribeStackResources` or the
|
|
7765
|
+
* template's physical name; without a `TopicName` there is nothing to match.
|
|
7887
7766
|
*/
|
|
7888
7767
|
async import(input) {
|
|
7889
7768
|
if (input.knownPhysicalId) try {
|
|
@@ -7897,40 +7776,19 @@ var SNSTopicProvider = class {
|
|
|
7897
7776
|
throw err;
|
|
7898
7777
|
}
|
|
7899
7778
|
const desiredName = typeof input.properties?.["TopicName"] === "string" ? input.properties["TopicName"] : void 0;
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
items: list.Topics,
|
|
7910
|
-
nextMarker: list.NextToken
|
|
7779
|
+
if (!desiredName) return null;
|
|
7780
|
+
let marker;
|
|
7781
|
+
do {
|
|
7782
|
+
const list = await this.snsClient.send(new ListTopicsCommand({ ...marker && { NextToken: marker } }));
|
|
7783
|
+
for (const t of list.Topics ?? []) {
|
|
7784
|
+
if (!t.TopicArn) continue;
|
|
7785
|
+
if (t.TopicArn.substring(t.TopicArn.lastIndexOf(":") + 1) === desiredName) return {
|
|
7786
|
+
physicalId: t.TopicArn,
|
|
7787
|
+
attributes: {}
|
|
7911
7788
|
};
|
|
7912
|
-
}
|
|
7913
|
-
|
|
7914
|
-
|
|
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
|
-
};
|
|
7789
|
+
}
|
|
7790
|
+
marker = list.NextToken;
|
|
7791
|
+
} while (marker);
|
|
7934
7792
|
return null;
|
|
7935
7793
|
}
|
|
7936
7794
|
};
|
|
@@ -9284,15 +9142,6 @@ var LambdaFunctionProvider = class {
|
|
|
9284
9142
|
* Lookup order:
|
|
9285
9143
|
* 1. `--resource` override or `Properties.FunctionName` → use directly,
|
|
9286
9144
|
* 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
9145
|
*/
|
|
9297
9146
|
async import(input) {
|
|
9298
9147
|
const explicit = resolveExplicitPhysicalId(input, "FunctionName");
|
|
@@ -9306,35 +9155,7 @@ var LambdaFunctionProvider = class {
|
|
|
9306
9155
|
if (err instanceof ResourceNotFoundException) return null;
|
|
9307
9156
|
throw err;
|
|
9308
9157
|
}
|
|
9309
|
-
|
|
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
|
-
};
|
|
9158
|
+
return null;
|
|
9338
9159
|
}
|
|
9339
9160
|
};
|
|
9340
9161
|
|
|
@@ -10351,15 +10172,6 @@ var LambdaLayerVersionProvider = class {
|
|
|
10351
10172
|
* `GetLayerVersionByArn`. (Note: there is no `LayerName` field that
|
|
10352
10173
|
* uniquely names a *version*; a layer name resolves to the latest
|
|
10353
10174
|
* 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
10175
|
*/
|
|
10364
10176
|
async import(input) {
|
|
10365
10177
|
if (input.knownPhysicalId) try {
|
|
@@ -10372,35 +10184,7 @@ var LambdaLayerVersionProvider = class {
|
|
|
10372
10184
|
if (err instanceof ResourceNotFoundException) return null;
|
|
10373
10185
|
throw err;
|
|
10374
10186
|
}
|
|
10375
|
-
|
|
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
|
-
};
|
|
10187
|
+
return null;
|
|
10404
10188
|
}
|
|
10405
10189
|
};
|
|
10406
10190
|
|
|
@@ -11465,11 +11249,6 @@ var DynamoDBTableProvider = class {
|
|
|
11465
11249
|
*
|
|
11466
11250
|
* Lookup order:
|
|
11467
11251
|
* 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
11252
|
*/
|
|
11474
11253
|
async import(input) {
|
|
11475
11254
|
const explicit = resolveExplicitPhysicalId(input, "TableName");
|
|
@@ -11483,33 +11262,7 @@ var DynamoDBTableProvider = class {
|
|
|
11483
11262
|
if (err instanceof ResourceNotFoundException$1) return null;
|
|
11484
11263
|
throw err;
|
|
11485
11264
|
}
|
|
11486
|
-
|
|
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
|
-
};
|
|
11265
|
+
return null;
|
|
11513
11266
|
}
|
|
11514
11267
|
};
|
|
11515
11268
|
|
|
@@ -12683,7 +12436,6 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
12683
12436
|
*
|
|
12684
12437
|
* Lookup order:
|
|
12685
12438
|
* 1. `--resource` override or `Properties.TableName` → verify via DescribeTable.
|
|
12686
|
-
* 2. `ListTables` + `ListTagsOfResource`, match `aws:cdk:path` tag.
|
|
12687
12439
|
*
|
|
12688
12440
|
* Same shape as `DynamoDBTableProvider.import()`. The provider returns
|
|
12689
12441
|
* the physical id only; cdkd's import flow does the attribute capture
|
|
@@ -12701,33 +12453,7 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
12701
12453
|
if (err instanceof ResourceNotFoundException$1) return null;
|
|
12702
12454
|
throw err;
|
|
12703
12455
|
}
|
|
12704
|
-
|
|
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
|
-
};
|
|
12456
|
+
return null;
|
|
12731
12457
|
}
|
|
12732
12458
|
async waitForTableActive(tableName, logicalId, maxAttempts = 120) {
|
|
12733
12459
|
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
@@ -13277,11 +13003,6 @@ var LogsLogGroupProvider = class {
|
|
|
13277
13003
|
* Lookup order:
|
|
13278
13004
|
* 1. `--resource` override or `Properties.LogGroupName` → verify via
|
|
13279
13005
|
* `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
13006
|
*/
|
|
13286
13007
|
async import(input) {
|
|
13287
13008
|
const explicit = resolveExplicitPhysicalId(input, "LogGroupName");
|
|
@@ -13294,36 +13015,7 @@ var LogsLogGroupProvider = class {
|
|
|
13294
13015
|
if (err instanceof ResourceNotFoundException$4) return null;
|
|
13295
13016
|
throw err;
|
|
13296
13017
|
}
|
|
13297
|
-
|
|
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
|
-
};
|
|
13018
|
+
return null;
|
|
13327
13019
|
}
|
|
13328
13020
|
};
|
|
13329
13021
|
|
|
@@ -13640,32 +13332,7 @@ var CloudWatchAlarmProvider = class {
|
|
|
13640
13332
|
if (this.isNotFound(err)) return null;
|
|
13641
13333
|
throw err;
|
|
13642
13334
|
}
|
|
13643
|
-
|
|
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
|
-
};
|
|
13335
|
+
return null;
|
|
13669
13336
|
}
|
|
13670
13337
|
isNotFound(err) {
|
|
13671
13338
|
if (!(err instanceof Error)) return false;
|
|
@@ -13919,7 +13586,6 @@ var SecretsManagerSecretProvider = class {
|
|
|
13919
13586
|
* Lookup order:
|
|
13920
13587
|
* 1. `--resource` override (ARN) → verify via `DescribeSecret`.
|
|
13921
13588
|
* 2. `Properties.Name` → `DescribeSecret` (accepts name).
|
|
13922
|
-
* 3. `aws:cdk:path` tag match via `ListSecrets` (which already returns Tags).
|
|
13923
13589
|
*/
|
|
13924
13590
|
async import(input) {
|
|
13925
13591
|
if (input.knownPhysicalId) try {
|
|
@@ -13943,24 +13609,7 @@ var SecretsManagerSecretProvider = class {
|
|
|
13943
13609
|
if (err instanceof ResourceNotFoundException$3) return null;
|
|
13944
13610
|
throw err;
|
|
13945
13611
|
}
|
|
13946
|
-
|
|
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
|
-
};
|
|
13612
|
+
return null;
|
|
13964
13613
|
}
|
|
13965
13614
|
};
|
|
13966
13615
|
|
|
@@ -14230,12 +13879,10 @@ var SSMParameterProvider = class {
|
|
|
14230
13879
|
*
|
|
14231
13880
|
* SSM physical IDs ARE the parameter names (`/foo/bar`). The CDK template
|
|
14232
13881
|
* usually carries `Properties.Name` explicitly, so the explicit-name path
|
|
14233
|
-
* covers most cases.
|
|
13882
|
+
* covers most cases.
|
|
14234
13883
|
*
|
|
14235
13884
|
* Lookup order:
|
|
14236
13885
|
* 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
13886
|
*/
|
|
14240
13887
|
async import(input) {
|
|
14241
13888
|
const explicit = resolveExplicitPhysicalId(input, "Name");
|
|
@@ -14249,35 +13896,7 @@ var SSMParameterProvider = class {
|
|
|
14249
13896
|
if (err instanceof ParameterNotFound) return null;
|
|
14250
13897
|
throw err;
|
|
14251
13898
|
}
|
|
14252
|
-
|
|
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
|
-
};
|
|
13899
|
+
return null;
|
|
14281
13900
|
}
|
|
14282
13901
|
};
|
|
14283
13902
|
|
|
@@ -14559,12 +14178,6 @@ var EventBridgeRuleProvider = class {
|
|
|
14559
14178
|
* 2. If the template carries `Properties.Name` use that as the rule
|
|
14560
14179
|
* name lookup, then verify with `DescribeRule` and return the
|
|
14561
14180
|
* 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
14181
|
*/
|
|
14569
14182
|
async import(input) {
|
|
14570
14183
|
const eventBusName = input.properties["EventBusName"];
|
|
@@ -14598,30 +14211,7 @@ var EventBridgeRuleProvider = class {
|
|
|
14598
14211
|
if (err instanceof ResourceNotFoundException$2) return null;
|
|
14599
14212
|
throw err;
|
|
14600
14213
|
}
|
|
14601
|
-
|
|
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
|
-
};
|
|
14214
|
+
return null;
|
|
14625
14215
|
}
|
|
14626
14216
|
/**
|
|
14627
14217
|
* Extract rule name from an ARN
|
|
@@ -14892,7 +14482,6 @@ var EventBridgeBusProvider = class {
|
|
|
14892
14482
|
*
|
|
14893
14483
|
* Lookup order:
|
|
14894
14484
|
* 1. `--resource` override or `Properties.Name` → verify via `DescribeEventBus`.
|
|
14895
|
-
* 2. `aws:cdk:path` tag match via `ListEventBuses` + `ListTagsForResource`.
|
|
14896
14485
|
*/
|
|
14897
14486
|
async import(input) {
|
|
14898
14487
|
const explicit = resolveExplicitPhysicalId(input, "Name");
|
|
@@ -14906,32 +14495,7 @@ var EventBridgeBusProvider = class {
|
|
|
14906
14495
|
if (err instanceof ResourceNotFoundException$2) return null;
|
|
14907
14496
|
throw err;
|
|
14908
14497
|
}
|
|
14909
|
-
|
|
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
|
-
};
|
|
14498
|
+
return null;
|
|
14935
14499
|
}
|
|
14936
14500
|
};
|
|
14937
14501
|
|
|
@@ -20419,8 +19983,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
20419
19983
|
*
|
|
20420
19984
|
* CloudFront distributions don't carry a template-supplied name
|
|
20421
19985
|
* (physical id is the AWS-generated `E...` distribution id), so the
|
|
20422
|
-
* lookup is
|
|
20423
|
-
* via `ListDistributions` + `ListTagsForResource(ARN)`.
|
|
19986
|
+
* lookup is explicit-override only.
|
|
20424
19987
|
*/
|
|
20425
19988
|
async import(input) {
|
|
20426
19989
|
if (input.knownPhysicalId) try {
|
|
@@ -20433,32 +19996,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
20433
19996
|
if (err instanceof NoSuchDistribution) return null;
|
|
20434
19997
|
throw err;
|
|
20435
19998
|
}
|
|
20436
|
-
|
|
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
|
-
};
|
|
19999
|
+
return null;
|
|
20462
20000
|
}
|
|
20463
20001
|
};
|
|
20464
20002
|
|
|
@@ -21459,10 +20997,6 @@ var StepFunctionsProvider = class {
|
|
|
21459
20997
|
*
|
|
21460
20998
|
* Lookup order:
|
|
21461
20999
|
* 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
21000
|
*
|
|
21467
21001
|
* SFN state machines do not expose a template-supplied name field
|
|
21468
21002
|
* usable as a stable physicalId — the physicalId is the ARN — so the
|
|
@@ -21480,30 +21014,7 @@ var StepFunctionsProvider = class {
|
|
|
21480
21014
|
if (err instanceof StateMachineDoesNotExist) return null;
|
|
21481
21015
|
throw err;
|
|
21482
21016
|
}
|
|
21483
|
-
|
|
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
|
-
};
|
|
21017
|
+
return null;
|
|
21507
21018
|
}
|
|
21508
21019
|
/**
|
|
21509
21020
|
* Apply a diff between old and new CFn-shape Tags arrays via SFN's
|
|
@@ -25637,11 +25148,10 @@ var DocDBProvider = class {
|
|
|
25637
25148
|
* Supported types: `AWS::DocDB::DBInstance`, `AWS::DocDB::DBCluster`,
|
|
25638
25149
|
* `AWS::DocDB::DBSubnetGroup`. Identifier name properties (`DBInstance
|
|
25639
25150
|
* Identifier` / `DBClusterIdentifier` / `DBSubnetGroupName`) are usually
|
|
25640
|
-
* present in CDK templates
|
|
25641
|
-
*
|
|
25642
|
-
*
|
|
25643
|
-
*
|
|
25644
|
-
* AWS throttles it instead of aborting the whole import.
|
|
25151
|
+
* present in CDK templates and are resolved via the corresponding
|
|
25152
|
+
* `Describe*` existence check. There is no `aws:cdk:path` tag fallback:
|
|
25153
|
+
* AWS rejects `aws:`-prefixed tag writes, so that tag never exists on a
|
|
25154
|
+
* real resource and the walk could not match (issue #1134).
|
|
25645
25155
|
*/
|
|
25646
25156
|
async import(input) {
|
|
25647
25157
|
switch (input.resourceType) {
|
|
@@ -25757,24 +25267,7 @@ var DocDBProvider = class {
|
|
|
25757
25267
|
if (err.name === "DBInstanceNotFoundFault") return null;
|
|
25758
25268
|
throw err;
|
|
25759
25269
|
}
|
|
25760
|
-
|
|
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
|
-
};
|
|
25270
|
+
return null;
|
|
25778
25271
|
}
|
|
25779
25272
|
async importDBCluster(input) {
|
|
25780
25273
|
const explicit = resolveExplicitPhysicalId(input, "DBClusterIdentifier");
|
|
@@ -25788,24 +25281,7 @@ var DocDBProvider = class {
|
|
|
25788
25281
|
if (err.name === "DBClusterNotFoundFault") return null;
|
|
25789
25282
|
throw err;
|
|
25790
25283
|
}
|
|
25791
|
-
|
|
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
|
-
};
|
|
25284
|
+
return null;
|
|
25809
25285
|
}
|
|
25810
25286
|
async importDBSubnetGroup(input) {
|
|
25811
25287
|
const explicit = resolveExplicitPhysicalId(input, "DBSubnetGroupName");
|
|
@@ -25819,33 +25295,7 @@ var DocDBProvider = class {
|
|
|
25819
25295
|
if (err.name === "DBSubnetGroupNotFoundFault") return null;
|
|
25820
25296
|
throw err;
|
|
25821
25297
|
}
|
|
25822
|
-
|
|
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 ?? [];
|
|
25298
|
+
return null;
|
|
25849
25299
|
}
|
|
25850
25300
|
};
|
|
25851
25301
|
|
|
@@ -27739,19 +27189,13 @@ var CognitoUserPoolProvider = class {
|
|
|
27739
27189
|
* 1. `--resource` override → `DescribeUserPool` to verify.
|
|
27740
27190
|
* 2. `Properties.UserPoolName` (when CDK template carries it) →
|
|
27741
27191
|
* `ListUserPools` walk + name match.
|
|
27742
|
-
*
|
|
27743
|
-
*
|
|
27744
|
-
*
|
|
27745
|
-
*
|
|
27746
|
-
*
|
|
27747
|
-
*
|
|
27748
|
-
*
|
|
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.
|
|
27192
|
+
*
|
|
27193
|
+
* The `aws:cdk:path` tag match that used to ride the same `ListUserPools`
|
|
27194
|
+
* walk is gone (issue #1134): AWS rejects `aws:`-prefixed tag writes, so
|
|
27195
|
+
* that tag never exists on a real resource and the walk could not match.
|
|
27196
|
+
* Auto-mode import resolves ids from CloudFormation's
|
|
27197
|
+
* `DescribeStackResources` or the template's physical name; without a
|
|
27198
|
+
* `UserPoolName` there is nothing to match.
|
|
27755
27199
|
*/
|
|
27756
27200
|
async import(input) {
|
|
27757
27201
|
if (input.knownPhysicalId) try {
|
|
@@ -27765,48 +27209,20 @@ var CognitoUserPoolProvider = class {
|
|
|
27765
27209
|
throw err;
|
|
27766
27210
|
}
|
|
27767
27211
|
const desiredName = typeof input.properties?.["UserPoolName"] === "string" ? input.properties["UserPoolName"] : void 0;
|
|
27768
|
-
|
|
27769
|
-
|
|
27770
|
-
|
|
27771
|
-
|
|
27772
|
-
|
|
27773
|
-
|
|
27774
|
-
|
|
27775
|
-
|
|
27776
|
-
|
|
27777
|
-
|
|
27778
|
-
|
|
27779
|
-
|
|
27780
|
-
|
|
27781
|
-
|
|
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
|
-
};
|
|
27212
|
+
if (!desiredName) return null;
|
|
27213
|
+
let marker;
|
|
27214
|
+
do {
|
|
27215
|
+
const list = await this.getClient().send(new ListUserPoolsCommand({
|
|
27216
|
+
MaxResults: 60,
|
|
27217
|
+
...marker && { NextToken: marker }
|
|
27218
|
+
}));
|
|
27219
|
+
for (const pool of list.UserPools ?? []) if (pool.Id && pool.Name === desiredName) return {
|
|
27220
|
+
physicalId: pool.Id,
|
|
27221
|
+
attributes: {}
|
|
27222
|
+
};
|
|
27223
|
+
marker = list.NextToken;
|
|
27224
|
+
} while (marker);
|
|
27225
|
+
return null;
|
|
27810
27226
|
}
|
|
27811
27227
|
};
|
|
27812
27228
|
|
|
@@ -28999,7 +28415,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
28999
28415
|
/** Best-effort tag fetch via `ListTagsForResource(ResourceARN)`. */
|
|
29000
28416
|
async attachTags(result, arn) {
|
|
29001
28417
|
try {
|
|
29002
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
28418
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceARN: arn }))).Tags);
|
|
29003
28419
|
} catch (err) {
|
|
29004
28420
|
this.logger.debug(`ServiceDiscovery ListTagsForResource(${arn}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
29005
28421
|
}
|
|
@@ -32082,8 +31498,8 @@ var KMSProvider = class {
|
|
|
32082
31498
|
* KMS keys have no `Properties.KeyName` field — physical IDs are
|
|
32083
31499
|
* AWS-generated UUIDs. So:
|
|
32084
31500
|
* - For `AWS::KMS::Key`: `--resource MyKey=<keyId>` is the only explicit
|
|
32085
|
-
* path; auto-lookup
|
|
32086
|
-
* `
|
|
31501
|
+
* path; there is no auto-lookup (a key reaching here without an explicit
|
|
31502
|
+
* id or a CloudFormation-resolved physical id returns `null`).
|
|
32087
31503
|
* - For `AWS::KMS::Alias`: `Properties.AliasName` is explicit and reliable.
|
|
32088
31504
|
*/
|
|
32089
31505
|
async import(input) {
|
|
@@ -32116,36 +31532,7 @@ var KMSProvider = class {
|
|
|
32116
31532
|
if (err instanceof NotFoundException$2) return null;
|
|
32117
31533
|
throw err;
|
|
32118
31534
|
}
|
|
32119
|
-
|
|
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
|
-
};
|
|
31535
|
+
return null;
|
|
32149
31536
|
}
|
|
32150
31537
|
};
|
|
32151
31538
|
|
|
@@ -32593,9 +31980,6 @@ var BudgetsBudgetProvider = class {
|
|
|
32593
31980
|
* Lookup order:
|
|
32594
31981
|
* 1. `--resource` override or `Properties.Budget.BudgetName` → verify via
|
|
32595
31982
|
* `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
31983
|
*/
|
|
32600
31984
|
async import(input) {
|
|
32601
31985
|
const rawBudget = input.properties["Budget"] ?? {};
|
|
@@ -32615,31 +31999,7 @@ var BudgetsBudgetProvider = class {
|
|
|
32615
31999
|
if (error instanceof NotFoundException$5) return null;
|
|
32616
32000
|
throw error;
|
|
32617
32001
|
}
|
|
32618
|
-
|
|
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
|
-
};
|
|
32002
|
+
return null;
|
|
32643
32003
|
}
|
|
32644
32004
|
};
|
|
32645
32005
|
|
|
@@ -32893,14 +32253,6 @@ var KinesisStreamProvider = class {
|
|
|
32893
32253
|
* Lookup order:
|
|
32894
32254
|
* 1. `--resource <id>=<name>` override or `Properties.Name` → verify
|
|
32895
32255
|
* 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
32256
|
*/
|
|
32905
32257
|
/**
|
|
32906
32258
|
* Read the AWS-current Kinesis stream configuration in CFn-property shape.
|
|
@@ -32964,25 +32316,7 @@ var KinesisStreamProvider = class {
|
|
|
32964
32316
|
if (err instanceof ResourceNotFoundException$8) return null;
|
|
32965
32317
|
throw err;
|
|
32966
32318
|
}
|
|
32967
|
-
|
|
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
|
-
};
|
|
32319
|
+
return null;
|
|
32986
32320
|
}
|
|
32987
32321
|
/**
|
|
32988
32322
|
* Poll DescribeStream until the stream reaches ACTIVE status
|
|
@@ -33212,7 +32546,7 @@ var KinesisStreamConsumerProvider = class {
|
|
|
33212
32546
|
if (desc.ConsumerName !== void 0) result["ConsumerName"] = desc.ConsumerName;
|
|
33213
32547
|
if (desc.StreamARN !== void 0) result["StreamARN"] = desc.StreamARN;
|
|
33214
32548
|
try {
|
|
33215
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
32549
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$15({ ResourceARN: physicalId }))).Tags);
|
|
33216
32550
|
} catch (err) {
|
|
33217
32551
|
if (err instanceof ResourceNotFoundException$8) return void 0;
|
|
33218
32552
|
this.logger.debug(`ListTagsForResource(${physicalId}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -34129,19 +33463,6 @@ var EFSProvider = class {
|
|
|
34129
33463
|
if (err instanceof FileSystemNotFound) return null;
|
|
34130
33464
|
throw err;
|
|
34131
33465
|
}
|
|
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
33466
|
return null;
|
|
34146
33467
|
}
|
|
34147
33468
|
async importAccessPoint(input) {
|
|
@@ -34155,23 +33476,6 @@ var EFSProvider = class {
|
|
|
34155
33476
|
if (err instanceof AccessPointNotFound) return null;
|
|
34156
33477
|
throw err;
|
|
34157
33478
|
}
|
|
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
33479
|
return null;
|
|
34176
33480
|
}
|
|
34177
33481
|
};
|
|
@@ -35322,18 +34626,6 @@ const CREATE_READY_STATES = /* @__PURE__ */ new Set(["WAITING", "RUNNING"]);
|
|
|
35322
34626
|
*/
|
|
35323
34627
|
const TERMINAL_STATES = /* @__PURE__ */ new Set(["TERMINATED", "TERMINATED_WITH_ERRORS"]);
|
|
35324
34628
|
/**
|
|
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
34629
|
* Top-level CFn properties that map to a MUTABLE EMR API surface. Every other
|
|
35338
34630
|
* property is either registry-createOnly (routed through DELETE+CREATE by the
|
|
35339
34631
|
* replacement-detection layer) or lives inside the `Instances` block (handled
|
|
@@ -35842,12 +35134,6 @@ var EMRClusterProvider = class {
|
|
|
35842
35134
|
* the physical id — a cluster's id (`j-...`) is service-generated, while
|
|
35843
35135
|
* the template `Name` is only the display name — so no name fallback
|
|
35844
35136
|
* 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
35137
|
*/
|
|
35852
35138
|
async import(input) {
|
|
35853
35139
|
const explicit = resolveExplicitPhysicalId(input, null);
|
|
@@ -35859,42 +35145,20 @@ var EMRClusterProvider = class {
|
|
|
35859
35145
|
attributes: this.buildAttributes(cluster)
|
|
35860
35146
|
};
|
|
35861
35147
|
}
|
|
35862
|
-
|
|
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
|
-
};
|
|
35148
|
+
return null;
|
|
35883
35149
|
}
|
|
35884
35150
|
/**
|
|
35885
35151
|
* `DescribeCluster` that maps a not-found (`InvalidRequestException` — the
|
|
35886
35152
|
* cluster id is unknown in this region / aged out of Describe) to
|
|
35887
35153
|
* `undefined` instead of throwing, so `import()` can treat it as "no match"
|
|
35888
|
-
* rather than aborting the whole adoption run.
|
|
35154
|
+
* rather than aborting the whole adoption run. Also consumed by
|
|
35155
|
+
* `readCurrentState` for the same gone-cluster tolerance.
|
|
35889
35156
|
*
|
|
35890
|
-
*
|
|
35891
|
-
*
|
|
35892
|
-
*
|
|
35893
|
-
*
|
|
35894
|
-
*
|
|
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.
|
|
35157
|
+
* Note the mapping is BROAD — `InvalidRequestException` covers more than
|
|
35158
|
+
* not-found, so a genuine failure here degrades to "no match" and a
|
|
35159
|
+
* subsequent deploy would CREATE a duplicate cluster rather than adopt the
|
|
35160
|
+
* existing one. Narrowing the mapping needs a message/code-level
|
|
35161
|
+
* discriminator AWS does not currently document.
|
|
35898
35162
|
*/
|
|
35899
35163
|
async describeClusterOrUndefined(clusterId) {
|
|
35900
35164
|
try {
|
|
@@ -37826,25 +37090,7 @@ var FirehoseProvider = class {
|
|
|
37826
37090
|
if (err instanceof ResourceNotFoundException$10) return null;
|
|
37827
37091
|
throw err;
|
|
37828
37092
|
}
|
|
37829
|
-
|
|
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
|
-
};
|
|
37093
|
+
return null;
|
|
37848
37094
|
}
|
|
37849
37095
|
/**
|
|
37850
37096
|
* Wait for a delivery stream to become ACTIVE.
|
|
@@ -38350,32 +37596,7 @@ var CloudTrailProvider = class {
|
|
|
38350
37596
|
if (err instanceof TrailNotFoundException) return null;
|
|
38351
37597
|
throw err;
|
|
38352
37598
|
}
|
|
38353
|
-
|
|
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
|
-
};
|
|
37599
|
+
return null;
|
|
38379
37600
|
}
|
|
38380
37601
|
};
|
|
38381
37602
|
|
|
@@ -39180,7 +38401,7 @@ var CodeCommitRepositoryProvider = class {
|
|
|
39180
38401
|
if (!metadata) return void 0;
|
|
39181
38402
|
let tags = [];
|
|
39182
38403
|
if (metadata.Arn) try {
|
|
39183
|
-
tags = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
38404
|
+
tags = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$16({ resourceArn: metadata.Arn }))).tags);
|
|
39184
38405
|
} catch (err) {
|
|
39185
38406
|
if (err instanceof RepositoryDoesNotExistException) return void 0;
|
|
39186
38407
|
throw err;
|
|
@@ -39215,9 +38436,6 @@ var CodeCommitRepositoryProvider = class {
|
|
|
39215
38436
|
* Lookup order:
|
|
39216
38437
|
* 1. `--resource` override or `Properties.RepositoryName` → verify via
|
|
39217
38438
|
* `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
38439
|
*/
|
|
39222
38440
|
async import(input) {
|
|
39223
38441
|
const explicit = resolveExplicitPhysicalId(input, "RepositoryName");
|
|
@@ -39231,42 +38449,7 @@ var CodeCommitRepositoryProvider = class {
|
|
|
39231
38449
|
if (err instanceof RepositoryDoesNotExistException) return null;
|
|
39232
38450
|
throw err;
|
|
39233
38451
|
}
|
|
39234
|
-
|
|
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
|
-
};
|
|
38452
|
+
return null;
|
|
39270
38453
|
}
|
|
39271
38454
|
/**
|
|
39272
38455
|
* Seed the repository's initial commit from the CFn `Code` property.
|
|
@@ -39581,9 +38764,6 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
39581
38764
|
* 1. `--resource` override (`knownPhysicalId`) -> verify via
|
|
39582
38765
|
* GetLifecyclePolicy. There is no template name property — the policy
|
|
39583
38766
|
* 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
38767
|
*/
|
|
39588
38768
|
async import(input) {
|
|
39589
38769
|
if (input.knownPhysicalId) try {
|
|
@@ -39596,23 +38776,7 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
39596
38776
|
if (err instanceof ResourceNotFoundException$12) return null;
|
|
39597
38777
|
throw err;
|
|
39598
38778
|
}
|
|
39599
|
-
|
|
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
|
-
};
|
|
38779
|
+
return null;
|
|
39616
38780
|
}
|
|
39617
38781
|
};
|
|
39618
38782
|
|
|
@@ -39821,7 +38985,7 @@ var S3VectorsProvider = class {
|
|
|
39821
38985
|
if (Object.keys(enc).length > 0) result["EncryptionConfiguration"] = enc;
|
|
39822
38986
|
}
|
|
39823
38987
|
if (bucket?.vectorBucketArn) try {
|
|
39824
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
38988
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$17({ resourceArn: bucket.vectorBucketArn }))).tags);
|
|
39825
38989
|
} catch (err) {
|
|
39826
38990
|
this.logger.debug(`S3Vectors ListTagsForResource(${bucket.vectorBucketArn}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
39827
38991
|
result["Tags"] = [];
|
|
@@ -39835,8 +38999,6 @@ var S3VectorsProvider = class {
|
|
|
39835
38999
|
* Lookup order:
|
|
39836
39000
|
* 1. `--resource <id>=<name>` override or `Properties.VectorBucketName`
|
|
39837
39001
|
* → 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
39002
|
*/
|
|
39841
39003
|
async import(input) {
|
|
39842
39004
|
const explicit = input.knownPhysicalId ?? (typeof input.properties?.["VectorBucketName"] === "string" && input.properties["VectorBucketName"].length > 0 ? input.properties["VectorBucketName"] : void 0);
|
|
@@ -39850,35 +39012,7 @@ var S3VectorsProvider = class {
|
|
|
39850
39012
|
if (this.isNotFoundError(err)) return null;
|
|
39851
39013
|
throw err;
|
|
39852
39014
|
}
|
|
39853
|
-
|
|
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
|
-
};
|
|
39015
|
+
return null;
|
|
39882
39016
|
}
|
|
39883
39017
|
isNotFoundError(error) {
|
|
39884
39018
|
if (error instanceof Error) {
|
|
@@ -40091,10 +39225,6 @@ var S3DirectoryBucketProvider = class {
|
|
|
40091
39225
|
* Lookup order:
|
|
40092
39226
|
* 1. `--resource <id>=<name>` override or `Properties.BucketName` →
|
|
40093
39227
|
* 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
39228
|
*/
|
|
40099
39229
|
async import(input) {
|
|
40100
39230
|
const explicit = resolveExplicitPhysicalId(input, "BucketName");
|
|
@@ -40109,33 +39239,7 @@ var S3DirectoryBucketProvider = class {
|
|
|
40109
39239
|
if (e.name === "NotFound" || e.name === "NoSuchBucket") return null;
|
|
40110
39240
|
throw err;
|
|
40111
39241
|
}
|
|
40112
|
-
|
|
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
|
-
};
|
|
39242
|
+
return null;
|
|
40139
39243
|
}
|
|
40140
39244
|
};
|
|
40141
39245
|
|
|
@@ -40251,7 +39355,7 @@ var S3TablesProvider = class {
|
|
|
40251
39355
|
if (!namespaceName) continue;
|
|
40252
39356
|
let tableContinuationToken;
|
|
40253
39357
|
do {
|
|
40254
|
-
const tablesResult = await this.getClient().send(new ListTablesCommand
|
|
39358
|
+
const tablesResult = await this.getClient().send(new ListTablesCommand({
|
|
40255
39359
|
tableBucketARN,
|
|
40256
39360
|
namespace: namespaceName,
|
|
40257
39361
|
continuationToken: tableContinuationToken
|
|
@@ -40591,7 +39695,7 @@ var S3TablesProvider = class {
|
|
|
40591
39695
|
*/
|
|
40592
39696
|
async readTagsBestEffort(resourceArn) {
|
|
40593
39697
|
try {
|
|
40594
|
-
const tags = (await this.getClient().send(new ListTagsForResourceCommand$
|
|
39698
|
+
const tags = (await this.getClient().send(new ListTagsForResourceCommand$18({ resourceArn }))).tags ?? {};
|
|
40595
39699
|
const out = [];
|
|
40596
39700
|
for (const [Key, Value] of Object.entries(tags)) out.push({
|
|
40597
39701
|
Key,
|
|
@@ -40993,8 +40097,6 @@ var ECRProvider = class {
|
|
|
40993
40097
|
* Lookup order:
|
|
40994
40098
|
* 1. `--resource` override or `Properties.RepositoryName` → verify via
|
|
40995
40099
|
* `DescribeRepositories`.
|
|
40996
|
-
* 2. `DescribeRepositories` paginated, then `ListTagsForResource(arn)`
|
|
40997
|
-
* per repository to match `aws:cdk:path` (`Tag[]` array shape).
|
|
40998
40100
|
*/
|
|
40999
40101
|
async import(input) {
|
|
41000
40102
|
const explicit = resolveExplicitPhysicalId(input, "RepositoryName");
|
|
@@ -41007,32 +40109,7 @@ var ECRProvider = class {
|
|
|
41007
40109
|
if (err instanceof RepositoryNotFoundException) return null;
|
|
41008
40110
|
throw err;
|
|
41009
40111
|
}
|
|
41010
|
-
|
|
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
|
-
};
|
|
40112
|
+
return null;
|
|
41036
40113
|
}
|
|
41037
40114
|
};
|
|
41038
40115
|
|
|
@@ -42090,10 +41167,6 @@ var ACMCertificateProvider = class {
|
|
|
42090
41167
|
*
|
|
42091
41168
|
* Lookup order:
|
|
42092
41169
|
* 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
41170
|
*/
|
|
42098
41171
|
async import(input) {
|
|
42099
41172
|
if (input.knownPhysicalId) {
|
|
@@ -42113,36 +41186,7 @@ var ACMCertificateProvider = class {
|
|
|
42113
41186
|
throw err;
|
|
42114
41187
|
}
|
|
42115
41188
|
}
|
|
42116
|
-
|
|
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
|
-
};
|
|
41189
|
+
return null;
|
|
42146
41190
|
}
|
|
42147
41191
|
/**
|
|
42148
41192
|
* Poll `DescribeCertificate` until status === `ISSUED`. On the FIRST poll
|
|
@@ -42572,15 +41616,17 @@ async function deployCommand(stacks, options) {
|
|
|
42572
41616
|
logger.info(cyan(synthesisStatusMessage(app, "Synthesizing CDK app...")));
|
|
42573
41617
|
const synthesizer = new Synthesizer();
|
|
42574
41618
|
const context = parseContextOptions(options.context);
|
|
42575
|
-
const
|
|
41619
|
+
const synthOptions = {
|
|
42576
41620
|
app: options.app,
|
|
42577
41621
|
output: options.output,
|
|
42578
41622
|
...options.region && { region: options.region },
|
|
42579
41623
|
...options.profile && { profile: options.profile },
|
|
42580
41624
|
...Object.keys(context).length > 0 && { context },
|
|
42581
41625
|
stateBucket,
|
|
42582
|
-
...options.profile && { macroExpandS3ClientOpts: { profile: options.profile } }
|
|
42583
|
-
|
|
41626
|
+
...options.profile && { macroExpandS3ClientOpts: { profile: options.profile } },
|
|
41627
|
+
deferMacroExpansion: true
|
|
41628
|
+
};
|
|
41629
|
+
const { stacks: allStacks } = await synthesizer.synthesize(synthOptions);
|
|
42584
41630
|
logger.debug(`Found ${allStacks.length} stack(s) in assembly`);
|
|
42585
41631
|
const stackPatterns = stacks.length > 0 ? stacks : options.stack ? [options.stack] : [];
|
|
42586
41632
|
let targetStacks;
|
|
@@ -42619,6 +41665,7 @@ async function deployCommand(stacks, options) {
|
|
|
42619
41665
|
};
|
|
42620
41666
|
for (const stack of [...targetStacks]) addDependencies(stack.stackName);
|
|
42621
41667
|
}
|
|
41668
|
+
await synthesizer.expandMacrosForStacks(targetStacks, synthOptions);
|
|
42622
41669
|
const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
|
|
42623
41670
|
const stsClient = new STSClient({ region: options.region || process.env["AWS_REGION"] || "us-east-1" });
|
|
42624
41671
|
const accountId = (await stsClient.send(new GetCallerIdentityCommand({}))).Account;
|
|
@@ -44279,15 +43326,17 @@ async function diffCommand(stacks, options) {
|
|
|
44279
43326
|
logger.info(synthesisStatusMessage(app, "Synthesizing CDK app..."));
|
|
44280
43327
|
const synthesizer = new Synthesizer();
|
|
44281
43328
|
const context = parseContextOptions(options.context);
|
|
44282
|
-
const
|
|
43329
|
+
const synthOptions = {
|
|
44283
43330
|
app: options.app,
|
|
44284
43331
|
output: options.output,
|
|
44285
43332
|
...options.region && { region: options.region },
|
|
44286
43333
|
...options.profile && { profile: options.profile },
|
|
44287
43334
|
...Object.keys(context).length > 0 && { context },
|
|
44288
43335
|
stateBucket,
|
|
44289
|
-
...options.profile && { macroExpandS3ClientOpts: { profile: options.profile } }
|
|
44290
|
-
|
|
43336
|
+
...options.profile && { macroExpandS3ClientOpts: { profile: options.profile } },
|
|
43337
|
+
deferMacroExpansion: true
|
|
43338
|
+
};
|
|
43339
|
+
const { stacks: allStacks } = await synthesizer.synthesize(synthOptions);
|
|
44291
43340
|
logger.info(`Found ${allStacks.length} stack(s) in assembly`);
|
|
44292
43341
|
const stackPatterns = stacks.length > 0 ? stacks : options.stack ? [options.stack] : [];
|
|
44293
43342
|
let targetStacks;
|
|
@@ -44296,6 +43345,7 @@ async function diffCommand(stacks, options) {
|
|
|
44296
43345
|
else if (allStacks.length === 1) targetStacks = allStacks;
|
|
44297
43346
|
else throw new Error(`Multiple stacks found: ${allStacks.map(describeStack).join(", ")}. Specify stack name(s) or use --all`);
|
|
44298
43347
|
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");
|
|
43348
|
+
await synthesizer.expandMacrosForStacks(targetStacks, synthOptions);
|
|
44299
43349
|
const stateConfig = {
|
|
44300
43350
|
bucket: stateBucket,
|
|
44301
43351
|
prefix: options.statePrefix
|
|
@@ -45524,8 +44574,7 @@ async function destroyCommand(stackArgs, options) {
|
|
|
45524
44574
|
app: appCmd,
|
|
45525
44575
|
output: options.output || "cdk.out",
|
|
45526
44576
|
...Object.keys(context).length > 0 && { context },
|
|
45527
|
-
|
|
45528
|
-
...options.profile && { macroExpandS3ClientOpts: { profile: options.profile } }
|
|
44577
|
+
deferMacroExpansion: true
|
|
45529
44578
|
});
|
|
45530
44579
|
appStacks = result.stacks.map((s) => ({
|
|
45531
44580
|
stackName: s.stackName,
|
|
@@ -51728,12 +50777,10 @@ async function importOne(task) {
|
|
|
51728
50777
|
outcome: "skipped-no-impl",
|
|
51729
50778
|
reason: `provider does not implement import (yet)`
|
|
51730
50779
|
};
|
|
51731
|
-
const cdkPath = readCdkPath(resource);
|
|
51732
50780
|
const properties = substituteOverrideRefs(resource.Properties ?? {}, overrides);
|
|
51733
50781
|
const input = {
|
|
51734
50782
|
logicalId,
|
|
51735
50783
|
resourceType: resource.Type,
|
|
51736
|
-
cdkPath,
|
|
51737
50784
|
stackName,
|
|
51738
50785
|
region,
|
|
51739
50786
|
properties,
|
|
@@ -51745,7 +50792,7 @@ async function importOne(task) {
|
|
|
51745
50792
|
logicalId,
|
|
51746
50793
|
resourceType: resource.Type,
|
|
51747
50794
|
outcome: "skipped-not-found",
|
|
51748
|
-
reason:
|
|
50795
|
+
reason: `no matching AWS resource — pass --resource ${logicalId}=<physicalId> to adopt it explicitly`
|
|
51749
50796
|
};
|
|
51750
50797
|
return {
|
|
51751
50798
|
logicalId,
|
|
@@ -61823,7 +60870,7 @@ function createMigrateCommand() {
|
|
|
61823
60870
|
*/
|
|
61824
60871
|
function buildProgram() {
|
|
61825
60872
|
const program = new Command();
|
|
61826
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.257.
|
|
60873
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.257.4");
|
|
61827
60874
|
program.addCommand(createBootstrapCommand());
|
|
61828
60875
|
program.addCommand(createSynthCommand());
|
|
61829
60876
|
program.addCommand(createListCommand());
|