@go-to-k/cdkd 0.257.2 → 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-4KjJhMTY.js → asg-provider-BhmMKcnJ.js} +2 -2
- package/dist/{asg-provider-4KjJhMTY.js.map → asg-provider-BhmMKcnJ.js.map} +1 -1
- package/dist/cli.js +209 -1715
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-wmvXbyoB.js → deploy-engine-DMpr3qtv.js} +263 -437
- 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-wmvXbyoB.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
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";
|
|
28
28
|
import { basename, dirname, isAbsolute, join, resolve } from "node:path";
|
|
29
29
|
import { execFile, spawn } from "node:child_process";
|
|
30
30
|
import { tmpdir } from "node:os";
|
|
31
|
-
import { AssociateVPCWithHostedZoneCommand, ChangeResourceRecordSetsCommand, ChangeTagsForResourceCommand, CreateHostedZoneCommand, CreateQueryLoggingConfigCommand, DeleteHostedZoneCommand, DeleteQueryLoggingConfigCommand, DisassociateVPCFromHostedZoneCommand, GetHostedZoneCommand, ListHostedZonesByNameCommand,
|
|
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";
|
|
@@ -42,30 +42,30 @@ import readline from "node:readline/promises";
|
|
|
42
42
|
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
|
-
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,
|
|
46
|
-
import { CreateStateMachineCommand, DeleteStateMachineCommand, DescribeStateMachineCommand,
|
|
47
|
-
import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient,
|
|
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$
|
|
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$
|
|
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,
|
|
52
|
-
import { AppSyncClient, CreateApiKeyCommand, CreateDataSourceCommand, CreateGraphqlApiCommand, CreateResolverCommand, DeleteApiKeyCommand, DeleteDataSourceCommand, DeleteGraphqlApiCommand, DeleteResolverCommand, GetDataSourceCommand, GetGraphqlApiCommand, GetIntrospectionSchemaCommand, GetResolverCommand, ListApiKeysCommand,
|
|
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, ListTagsForResourceCommand as ListTagsForResourceCommand$11, SFNClient, StateMachineDoesNotExist, TagResourceCommand as TagResourceCommand$12, UntagResourceCommand as UntagResourceCommand$12, UpdateStateMachineCommand } from "@aws-sdk/client-sfn";
|
|
47
|
+
import { CreateClusterCommand, CreateServiceCommand, DeleteClusterCommand, DeleteServiceCommand, DeregisterTaskDefinitionCommand, DescribeClustersCommand, DescribeServicesCommand, DescribeTaskDefinitionCommand, ECSClient, PutClusterCapacityProvidersCommand, RegisterTaskDefinitionCommand, TagResourceCommand as TagResourceCommand$13, UntagResourceCommand as UntagResourceCommand$13, UpdateClusterCommand, UpdateServiceCommand } from "@aws-sdk/client-ecs";
|
|
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
|
+
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, 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
|
+
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
|
-
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,
|
|
55
|
-
import { BudgetsClient, CreateBudgetCommand, CreateNotificationCommand, CreateSubscriberCommand, DeleteBudgetCommand, DeleteNotificationCommand, DeleteSubscriberCommand, DescribeBudgetCommand,
|
|
56
|
-
import { AddTagsToStreamCommand, CreateStreamCommand, DecreaseStreamRetentionPeriodCommand, DeleteStreamCommand, DeregisterStreamConsumerCommand, DescribeStreamCommand, DescribeStreamConsumerCommand, DescribeStreamSummaryCommand, IncreaseStreamRetentionPeriodCommand, KinesisClient,
|
|
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, 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,
|
|
63
|
-
import { BatchGetProjectsCommand, CodeBuildClient, CreateProjectCommand, DeleteProjectCommand,
|
|
64
|
-
import { CodeCommitClient, CreateCommitCommand, CreateRepositoryCommand as CreateRepositoryCommand$1, DeleteRepositoryCommand as DeleteRepositoryCommand$1, GetRepositoryCommand,
|
|
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
|
+
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, 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
|
|
|
@@ -4825,13 +4763,10 @@ var IAMUserGroupProvider = class {
|
|
|
4825
4763
|
/**
|
|
4826
4764
|
* Adopt an existing IAM user / group / user-to-group addition into cdkd state.
|
|
4827
4765
|
*
|
|
4828
|
-
* - **AWS::IAM::User**:
|
|
4829
|
-
*
|
|
4830
|
-
*
|
|
4831
|
-
*
|
|
4832
|
-
* taggable (no `ListGroupTags` API), so tag-based auto-lookup is not
|
|
4833
|
-
* possible. Caller can still pass `Properties.GroupName` or
|
|
4834
|
-
* `--resource` to verify and adopt by name.
|
|
4766
|
+
* - **AWS::IAM::User**: `--resource` override or `Properties.UserName`,
|
|
4767
|
+
* verified via `GetUser`.
|
|
4768
|
+
* - **AWS::IAM::Group**: `--resource` override or `Properties.GroupName`,
|
|
4769
|
+
* verified via `GetGroup`.
|
|
4835
4770
|
* - **AWS::IAM::UserToGroupAddition**: explicit-override only. Has no
|
|
4836
4771
|
* AWS-side identity beyond the (group, users) attachment itself.
|
|
4837
4772
|
*/
|
|
@@ -4855,24 +4790,6 @@ var IAMUserGroupProvider = class {
|
|
|
4855
4790
|
if (err instanceof NoSuchEntityException) return null;
|
|
4856
4791
|
throw err;
|
|
4857
4792
|
}
|
|
4858
|
-
if (!input.cdkPath) return null;
|
|
4859
|
-
let marker;
|
|
4860
|
-
do {
|
|
4861
|
-
const list = await this.iamClient.send(new ListUsersCommand({ ...marker && { Marker: marker } }));
|
|
4862
|
-
for (const user of list.Users ?? []) {
|
|
4863
|
-
if (!user.UserName) continue;
|
|
4864
|
-
try {
|
|
4865
|
-
if (matchesCdkPath((await this.iamClient.send(new ListUserTagsCommand({ UserName: user.UserName }))).Tags, input.cdkPath)) return {
|
|
4866
|
-
physicalId: user.UserName,
|
|
4867
|
-
attributes: {}
|
|
4868
|
-
};
|
|
4869
|
-
} catch (err) {
|
|
4870
|
-
if (err instanceof NoSuchEntityException) continue;
|
|
4871
|
-
throw err;
|
|
4872
|
-
}
|
|
4873
|
-
}
|
|
4874
|
-
marker = list.IsTruncated ? list.Marker : void 0;
|
|
4875
|
-
} while (marker);
|
|
4876
4793
|
return null;
|
|
4877
4794
|
}
|
|
4878
4795
|
async importGroup(input) {
|
|
@@ -6311,8 +6228,6 @@ var S3BucketProvider = class {
|
|
|
6311
6228
|
* Lookup order:
|
|
6312
6229
|
* 1. `--resource <id>=<name>` override or `Properties.BucketName` → use directly,
|
|
6313
6230
|
* verify with `HeadBucket`.
|
|
6314
|
-
* 2. `ListBuckets` + `GetBucketTagging`, match `aws:cdk:path` against the
|
|
6315
|
-
* CDK construct path.
|
|
6316
6231
|
*
|
|
6317
6232
|
* Returns `null` when nothing matches — caller treats this as
|
|
6318
6233
|
* "not deployed yet" rather than a failure.
|
|
@@ -6330,32 +6245,7 @@ var S3BucketProvider = class {
|
|
|
6330
6245
|
if (e.name === "NotFound" || e.name === "NoSuchBucket") return null;
|
|
6331
6246
|
throw err;
|
|
6332
6247
|
}
|
|
6333
|
-
|
|
6334
|
-
cdkPath: input.cdkPath,
|
|
6335
|
-
logicalId: input.logicalId,
|
|
6336
|
-
listPage: async () => {
|
|
6337
|
-
return {
|
|
6338
|
-
items: (await this.s3Client.send(new ListBucketsCommand({}))).Buckets,
|
|
6339
|
-
nextMarker: void 0
|
|
6340
|
-
};
|
|
6341
|
-
},
|
|
6342
|
-
describe: async (b) => {
|
|
6343
|
-
if (!b.Name) return void 0;
|
|
6344
|
-
try {
|
|
6345
|
-
return await this.s3Client.send(new GetBucketTaggingCommand({ Bucket: b.Name }));
|
|
6346
|
-
} catch (err) {
|
|
6347
|
-
const e = err;
|
|
6348
|
-
if (e.name === "NoSuchTagSet" || e.name === "AccessDenied" || e.$metadata?.httpStatusCode === 301) return;
|
|
6349
|
-
throw err;
|
|
6350
|
-
}
|
|
6351
|
-
},
|
|
6352
|
-
tagsOf: (tagging) => tagging.TagSet
|
|
6353
|
-
});
|
|
6354
|
-
if (!match) return null;
|
|
6355
|
-
return {
|
|
6356
|
-
physicalId: match.summary.Name,
|
|
6357
|
-
attributes: {}
|
|
6358
|
-
};
|
|
6248
|
+
return null;
|
|
6359
6249
|
}
|
|
6360
6250
|
/**
|
|
6361
6251
|
* Delete a bucket, emptying it first if not empty.
|
|
@@ -7171,7 +7061,6 @@ var SQSQueueProvider = class {
|
|
|
7171
7061
|
* Lookup order:
|
|
7172
7062
|
* 1. `--resource` override (URL) → verify via `GetQueueAttributes`.
|
|
7173
7063
|
* 2. `Properties.QueueName` → `GetQueueUrl` for direct lookup.
|
|
7174
|
-
* 3. `aws:cdk:path` tag match via `ListQueues` + `ListQueueTags`.
|
|
7175
7064
|
*/
|
|
7176
7065
|
async import(input) {
|
|
7177
7066
|
if (input.knownPhysicalId) try {
|
|
@@ -7199,34 +7088,7 @@ var SQSQueueProvider = class {
|
|
|
7199
7088
|
if (err instanceof QueueDoesNotExist) return null;
|
|
7200
7089
|
throw err;
|
|
7201
7090
|
}
|
|
7202
|
-
|
|
7203
|
-
cdkPath: input.cdkPath,
|
|
7204
|
-
logicalId: input.logicalId,
|
|
7205
|
-
listPage: async (marker) => {
|
|
7206
|
-
const list = await this.sqsClient.send(new ListQueuesCommand({ ...marker && { NextToken: marker } }));
|
|
7207
|
-
return {
|
|
7208
|
-
items: list.QueueUrls,
|
|
7209
|
-
nextMarker: list.NextToken
|
|
7210
|
-
};
|
|
7211
|
-
},
|
|
7212
|
-
describe: async (url) => {
|
|
7213
|
-
try {
|
|
7214
|
-
return await this.sqsClient.send(new ListQueueTagsCommand({ QueueUrl: url }));
|
|
7215
|
-
} catch (err) {
|
|
7216
|
-
if (err instanceof QueueDoesNotExist) return void 0;
|
|
7217
|
-
throw err;
|
|
7218
|
-
}
|
|
7219
|
-
},
|
|
7220
|
-
tagsOf: (tagsResp) => Object.entries(tagsResp.Tags ?? {}).map(([Key, Value]) => ({
|
|
7221
|
-
Key,
|
|
7222
|
-
Value
|
|
7223
|
-
}))
|
|
7224
|
-
});
|
|
7225
|
-
if (!match) return null;
|
|
7226
|
-
return {
|
|
7227
|
-
physicalId: match.summary,
|
|
7228
|
-
attributes: {}
|
|
7229
|
-
};
|
|
7091
|
+
return null;
|
|
7230
7092
|
}
|
|
7231
7093
|
};
|
|
7232
7094
|
|
|
@@ -7894,17 +7756,13 @@ var SNSTopicProvider = class {
|
|
|
7894
7756
|
*
|
|
7895
7757
|
* Lookup order:
|
|
7896
7758
|
* 1. `--resource` override → trust as ARN, verify via `GetTopicAttributes`.
|
|
7897
|
-
* 2. `Properties.TopicName` → `ListTopics` to find matching ARN.
|
|
7898
|
-
*
|
|
7899
|
-
*
|
|
7900
|
-
*
|
|
7901
|
-
*
|
|
7902
|
-
*
|
|
7903
|
-
*
|
|
7904
|
-
* of aborting the whole import. The name match is expressed to the walk as
|
|
7905
|
-
* a synthetic `aws:cdk:path` tag carrying the walk's own lookup key, so a
|
|
7906
|
-
* name-only template (no CDK path metadata) still resolves without any tag
|
|
7907
|
-
* 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.
|
|
7908
7766
|
*/
|
|
7909
7767
|
async import(input) {
|
|
7910
7768
|
if (input.knownPhysicalId) try {
|
|
@@ -7918,40 +7776,19 @@ var SNSTopicProvider = class {
|
|
|
7918
7776
|
throw err;
|
|
7919
7777
|
}
|
|
7920
7778
|
const desiredName = typeof input.properties?.["TopicName"] === "string" ? input.properties["TopicName"] : void 0;
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
items: list.Topics,
|
|
7931
|
-
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: {}
|
|
7932
7788
|
};
|
|
7933
|
-
}
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
const arnTail = t.TopicArn.substring(t.TopicArn.lastIndexOf(":") + 1);
|
|
7937
|
-
if (desiredName && arnTail === desiredName) return NAME_MATCH;
|
|
7938
|
-
if (!input.cdkPath) return void 0;
|
|
7939
|
-
try {
|
|
7940
|
-
return await this.snsClient.send(new ListTagsForResourceCommand({ ResourceArn: t.TopicArn }));
|
|
7941
|
-
} catch (err) {
|
|
7942
|
-
if (err instanceof NotFoundException) return void 0;
|
|
7943
|
-
throw err;
|
|
7944
|
-
}
|
|
7945
|
-
},
|
|
7946
|
-
tagsOf: (detail) => "nameMatch" in detail ? [{
|
|
7947
|
-
Key: CDK_PATH_TAG,
|
|
7948
|
-
Value: walkCdkPath
|
|
7949
|
-
}] : detail.Tags
|
|
7950
|
-
});
|
|
7951
|
-
if (match?.summary.TopicArn) return {
|
|
7952
|
-
physicalId: match.summary.TopicArn,
|
|
7953
|
-
attributes: {}
|
|
7954
|
-
};
|
|
7789
|
+
}
|
|
7790
|
+
marker = list.NextToken;
|
|
7791
|
+
} while (marker);
|
|
7955
7792
|
return null;
|
|
7956
7793
|
}
|
|
7957
7794
|
};
|
|
@@ -9305,15 +9142,6 @@ var LambdaFunctionProvider = class {
|
|
|
9305
9142
|
* Lookup order:
|
|
9306
9143
|
* 1. `--resource` override or `Properties.FunctionName` → use directly,
|
|
9307
9144
|
* verify via `GetFunction`.
|
|
9308
|
-
* 2. `ListFunctions` + `ListTags`, match `aws:cdk:path` tag.
|
|
9309
|
-
*
|
|
9310
|
-
* Lambda's `ListTags` returns a `Tags` map keyed by tag name (unlike
|
|
9311
|
-
* EC2/S3 which return an array of `{Key, Value}`), so the map is re-shaped
|
|
9312
|
-
* to `{Key, Value}` entries for the walk's matcher.
|
|
9313
|
-
*
|
|
9314
|
-
* The tag walk runs through the shared `importTagWalk` helper, so the N+1
|
|
9315
|
-
* `ListTags` burst is retried with exponential backoff when AWS throttles
|
|
9316
|
-
* it instead of aborting the whole import.
|
|
9317
9145
|
*/
|
|
9318
9146
|
async import(input) {
|
|
9319
9147
|
const explicit = resolveExplicitPhysicalId(input, "FunctionName");
|
|
@@ -9327,35 +9155,7 @@ var LambdaFunctionProvider = class {
|
|
|
9327
9155
|
if (err instanceof ResourceNotFoundException) return null;
|
|
9328
9156
|
throw err;
|
|
9329
9157
|
}
|
|
9330
|
-
|
|
9331
|
-
cdkPath: input.cdkPath,
|
|
9332
|
-
logicalId: input.logicalId,
|
|
9333
|
-
listPage: async (marker) => {
|
|
9334
|
-
const list = await this.lambdaClient.send(new ListFunctionsCommand({ ...marker && { Marker: marker } }));
|
|
9335
|
-
return {
|
|
9336
|
-
items: list.Functions,
|
|
9337
|
-
nextMarker: list.NextMarker
|
|
9338
|
-
};
|
|
9339
|
-
},
|
|
9340
|
-
describe: async (fn) => {
|
|
9341
|
-
if (!fn.FunctionArn || !fn.FunctionName) return void 0;
|
|
9342
|
-
try {
|
|
9343
|
-
return await this.lambdaClient.send(new ListTagsCommand({ Resource: fn.FunctionArn }));
|
|
9344
|
-
} catch (err) {
|
|
9345
|
-
if (err instanceof ResourceNotFoundException) return void 0;
|
|
9346
|
-
throw err;
|
|
9347
|
-
}
|
|
9348
|
-
},
|
|
9349
|
-
tagsOf: (tagsResp) => Object.entries(tagsResp.Tags ?? {}).map(([Key, Value]) => ({
|
|
9350
|
-
Key,
|
|
9351
|
-
Value
|
|
9352
|
-
}))
|
|
9353
|
-
});
|
|
9354
|
-
if (!match) return null;
|
|
9355
|
-
return {
|
|
9356
|
-
physicalId: match.summary.FunctionName,
|
|
9357
|
-
attributes: {}
|
|
9358
|
-
};
|
|
9158
|
+
return null;
|
|
9359
9159
|
}
|
|
9360
9160
|
};
|
|
9361
9161
|
|
|
@@ -10372,15 +10172,6 @@ var LambdaLayerVersionProvider = class {
|
|
|
10372
10172
|
* `GetLayerVersionByArn`. (Note: there is no `LayerName` field that
|
|
10373
10173
|
* uniquely names a *version*; a layer name resolves to the latest
|
|
10374
10174
|
* version, so an explicit ARN is the only unambiguous override.)
|
|
10375
|
-
* 2. `ListLayers` paginator + `ListTags(Resource: layerArn)` (which
|
|
10376
|
-
* returns a `Tags: Record<string,string>` map keyed by tag name).
|
|
10377
|
-
* Match `aws:cdk:path` and adopt `LatestMatchingVersion.LayerVersionArn`.
|
|
10378
|
-
*
|
|
10379
|
-
* **Caveat**: Lambda layer versions are immutable, so auto-lookup adopts
|
|
10380
|
-
* the LATEST version of the named layer that carries the matching CDK
|
|
10381
|
-
* path tag. If the user's CDK app has since published newer versions
|
|
10382
|
-
* outside cdkd's tracking, the adopted physical id may be stale; pass
|
|
10383
|
-
* `--resource <id>=<arn>` to pin a specific version.
|
|
10384
10175
|
*/
|
|
10385
10176
|
async import(input) {
|
|
10386
10177
|
if (input.knownPhysicalId) try {
|
|
@@ -10393,35 +10184,7 @@ var LambdaLayerVersionProvider = class {
|
|
|
10393
10184
|
if (err instanceof ResourceNotFoundException) return null;
|
|
10394
10185
|
throw err;
|
|
10395
10186
|
}
|
|
10396
|
-
|
|
10397
|
-
cdkPath: input.cdkPath,
|
|
10398
|
-
logicalId: input.logicalId,
|
|
10399
|
-
listPage: async (marker) => {
|
|
10400
|
-
const list = await this.lambdaClient.send(new ListLayersCommand({ ...marker && { Marker: marker } }));
|
|
10401
|
-
return {
|
|
10402
|
-
items: list.Layers,
|
|
10403
|
-
nextMarker: list.NextMarker
|
|
10404
|
-
};
|
|
10405
|
-
},
|
|
10406
|
-
describe: async (layer) => {
|
|
10407
|
-
if (!layer.LayerArn || !layer.LatestMatchingVersion?.LayerVersionArn) return void 0;
|
|
10408
|
-
try {
|
|
10409
|
-
return await this.lambdaClient.send(new ListTagsCommand({ Resource: layer.LayerArn }));
|
|
10410
|
-
} catch (err) {
|
|
10411
|
-
if (err instanceof ResourceNotFoundException) return void 0;
|
|
10412
|
-
throw err;
|
|
10413
|
-
}
|
|
10414
|
-
},
|
|
10415
|
-
tagsOf: (tagsResp) => Object.entries(tagsResp.Tags ?? {}).map(([Key, Value]) => ({
|
|
10416
|
-
Key,
|
|
10417
|
-
Value
|
|
10418
|
-
}))
|
|
10419
|
-
});
|
|
10420
|
-
if (!match) return null;
|
|
10421
|
-
return {
|
|
10422
|
-
physicalId: match.summary.LatestMatchingVersion.LayerVersionArn,
|
|
10423
|
-
attributes: {}
|
|
10424
|
-
};
|
|
10187
|
+
return null;
|
|
10425
10188
|
}
|
|
10426
10189
|
};
|
|
10427
10190
|
|
|
@@ -11486,11 +11249,6 @@ var DynamoDBTableProvider = class {
|
|
|
11486
11249
|
*
|
|
11487
11250
|
* Lookup order:
|
|
11488
11251
|
* 1. `--resource` override or `Properties.TableName` → verify via `DescribeTable`.
|
|
11489
|
-
* 2. `ListTables` + `ListTagsOfResource`, match `aws:cdk:path` tag.
|
|
11490
|
-
*
|
|
11491
|
-
* Tags require the table ARN, which `DescribeTable` provides; the loop
|
|
11492
|
-
* therefore costs one `DescribeTable` per table just to read the ARN.
|
|
11493
|
-
* Acceptable for typical DynamoDB cardinalities.
|
|
11494
11252
|
*/
|
|
11495
11253
|
async import(input) {
|
|
11496
11254
|
const explicit = resolveExplicitPhysicalId(input, "TableName");
|
|
@@ -11504,33 +11262,7 @@ var DynamoDBTableProvider = class {
|
|
|
11504
11262
|
if (err instanceof ResourceNotFoundException$1) return null;
|
|
11505
11263
|
throw err;
|
|
11506
11264
|
}
|
|
11507
|
-
|
|
11508
|
-
cdkPath: input.cdkPath,
|
|
11509
|
-
logicalId: input.logicalId,
|
|
11510
|
-
listPage: async (marker) => {
|
|
11511
|
-
const list = await this.dynamoDBClient.send(new ListTablesCommand({ ...marker && { ExclusiveStartTableName: marker } }));
|
|
11512
|
-
return {
|
|
11513
|
-
items: list.TableNames,
|
|
11514
|
-
nextMarker: list.LastEvaluatedTableName
|
|
11515
|
-
};
|
|
11516
|
-
},
|
|
11517
|
-
describe: async (name) => {
|
|
11518
|
-
try {
|
|
11519
|
-
const arn = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: name }))).Table?.TableArn;
|
|
11520
|
-
if (!arn) return void 0;
|
|
11521
|
-
return await this.dynamoDBClient.send(new ListTagsOfResourceCommand({ ResourceArn: arn }));
|
|
11522
|
-
} catch (err) {
|
|
11523
|
-
if (err instanceof ResourceNotFoundException$1) return void 0;
|
|
11524
|
-
throw err;
|
|
11525
|
-
}
|
|
11526
|
-
},
|
|
11527
|
-
tagsOf: (tagsResp) => tagsResp.Tags
|
|
11528
|
-
});
|
|
11529
|
-
if (!match) return null;
|
|
11530
|
-
return {
|
|
11531
|
-
physicalId: match.summary,
|
|
11532
|
-
attributes: {}
|
|
11533
|
-
};
|
|
11265
|
+
return null;
|
|
11534
11266
|
}
|
|
11535
11267
|
};
|
|
11536
11268
|
|
|
@@ -12704,7 +12436,6 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
12704
12436
|
*
|
|
12705
12437
|
* Lookup order:
|
|
12706
12438
|
* 1. `--resource` override or `Properties.TableName` → verify via DescribeTable.
|
|
12707
|
-
* 2. `ListTables` + `ListTagsOfResource`, match `aws:cdk:path` tag.
|
|
12708
12439
|
*
|
|
12709
12440
|
* Same shape as `DynamoDBTableProvider.import()`. The provider returns
|
|
12710
12441
|
* the physical id only; cdkd's import flow does the attribute capture
|
|
@@ -12722,33 +12453,7 @@ var DynamoDBGlobalTableProvider = class {
|
|
|
12722
12453
|
if (err instanceof ResourceNotFoundException$1) return null;
|
|
12723
12454
|
throw err;
|
|
12724
12455
|
}
|
|
12725
|
-
|
|
12726
|
-
cdkPath: input.cdkPath,
|
|
12727
|
-
logicalId: input.logicalId,
|
|
12728
|
-
listPage: async (marker) => {
|
|
12729
|
-
const list = await this.dynamoDBClient.send(new ListTablesCommand({ ...marker && { ExclusiveStartTableName: marker } }));
|
|
12730
|
-
return {
|
|
12731
|
-
items: list.TableNames,
|
|
12732
|
-
nextMarker: list.LastEvaluatedTableName
|
|
12733
|
-
};
|
|
12734
|
-
},
|
|
12735
|
-
describe: async (name) => {
|
|
12736
|
-
try {
|
|
12737
|
-
const arn = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: name }))).Table?.TableArn;
|
|
12738
|
-
if (!arn) return void 0;
|
|
12739
|
-
return await this.dynamoDBClient.send(new ListTagsOfResourceCommand({ ResourceArn: arn }));
|
|
12740
|
-
} catch (err) {
|
|
12741
|
-
if (err instanceof ResourceNotFoundException$1) return void 0;
|
|
12742
|
-
throw err;
|
|
12743
|
-
}
|
|
12744
|
-
},
|
|
12745
|
-
tagsOf: (tagsResp) => tagsResp.Tags
|
|
12746
|
-
});
|
|
12747
|
-
if (!match) return null;
|
|
12748
|
-
return {
|
|
12749
|
-
physicalId: match.summary,
|
|
12750
|
-
attributes: {}
|
|
12751
|
-
};
|
|
12456
|
+
return null;
|
|
12752
12457
|
}
|
|
12753
12458
|
async waitForTableActive(tableName, logicalId, maxAttempts = 120) {
|
|
12754
12459
|
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
@@ -13298,11 +13003,6 @@ var LogsLogGroupProvider = class {
|
|
|
13298
13003
|
* Lookup order:
|
|
13299
13004
|
* 1. `--resource` override or `Properties.LogGroupName` → verify via
|
|
13300
13005
|
* `DescribeLogGroups` (filtered by name prefix).
|
|
13301
|
-
* 2. `aws:cdk:path` tag match via `DescribeLogGroups` + `ListTagsForResource`.
|
|
13302
|
-
*
|
|
13303
|
-
* `ListTagsForResource` for log groups uses the log-group ARN. The
|
|
13304
|
-
* `DescribeLogGroups` response includes the ARN, so no extra round-trip
|
|
13305
|
-
* is needed beyond the per-group tag lookup.
|
|
13306
13006
|
*/
|
|
13307
13007
|
async import(input) {
|
|
13308
13008
|
const explicit = resolveExplicitPhysicalId(input, "LogGroupName");
|
|
@@ -13315,36 +13015,7 @@ var LogsLogGroupProvider = class {
|
|
|
13315
13015
|
if (err instanceof ResourceNotFoundException$4) return null;
|
|
13316
13016
|
throw err;
|
|
13317
13017
|
}
|
|
13318
|
-
|
|
13319
|
-
cdkPath: input.cdkPath,
|
|
13320
|
-
logicalId: input.logicalId,
|
|
13321
|
-
listPage: async (marker) => {
|
|
13322
|
-
const list = await this.logsClient.send(new DescribeLogGroupsCommand({ ...marker && { nextToken: marker } }));
|
|
13323
|
-
return {
|
|
13324
|
-
items: list.logGroups,
|
|
13325
|
-
nextMarker: list.nextToken
|
|
13326
|
-
};
|
|
13327
|
-
},
|
|
13328
|
-
describe: async (g) => {
|
|
13329
|
-
if (!g.logGroupName || !g.arn) return void 0;
|
|
13330
|
-
const arnForTags = g.arn.replace(/:\*$/, "");
|
|
13331
|
-
try {
|
|
13332
|
-
return await this.logsClient.send(new ListTagsForResourceCommand$5({ resourceArn: arnForTags }));
|
|
13333
|
-
} catch (err) {
|
|
13334
|
-
if (err instanceof ResourceNotFoundException$4) return void 0;
|
|
13335
|
-
throw err;
|
|
13336
|
-
}
|
|
13337
|
-
},
|
|
13338
|
-
tagsOf: (tagsResp) => Object.entries(tagsResp.tags ?? {}).map(([Key, Value]) => ({
|
|
13339
|
-
Key,
|
|
13340
|
-
Value
|
|
13341
|
-
}))
|
|
13342
|
-
});
|
|
13343
|
-
if (!match) return null;
|
|
13344
|
-
return {
|
|
13345
|
-
physicalId: match.summary.logGroupName,
|
|
13346
|
-
attributes: {}
|
|
13347
|
-
};
|
|
13018
|
+
return null;
|
|
13348
13019
|
}
|
|
13349
13020
|
};
|
|
13350
13021
|
|
|
@@ -13661,32 +13332,7 @@ var CloudWatchAlarmProvider = class {
|
|
|
13661
13332
|
if (this.isNotFound(err)) return null;
|
|
13662
13333
|
throw err;
|
|
13663
13334
|
}
|
|
13664
|
-
|
|
13665
|
-
cdkPath: input.cdkPath,
|
|
13666
|
-
logicalId: input.logicalId,
|
|
13667
|
-
listPage: async (marker) => {
|
|
13668
|
-
const list = await this.cloudWatchClient.send(new DescribeAlarmsCommand({ ...marker && { NextToken: marker } }));
|
|
13669
|
-
return {
|
|
13670
|
-
items: [...list.MetricAlarms ?? [], ...list.CompositeAlarms ?? []],
|
|
13671
|
-
nextMarker: list.NextToken
|
|
13672
|
-
};
|
|
13673
|
-
},
|
|
13674
|
-
describe: async (a) => {
|
|
13675
|
-
if (!a.AlarmArn || !a.AlarmName) return void 0;
|
|
13676
|
-
try {
|
|
13677
|
-
return await this.cloudWatchClient.send(new ListTagsForResourceCommand$4({ ResourceARN: a.AlarmArn }));
|
|
13678
|
-
} catch (err) {
|
|
13679
|
-
if (this.isNotFound(err)) return void 0;
|
|
13680
|
-
throw err;
|
|
13681
|
-
}
|
|
13682
|
-
},
|
|
13683
|
-
tagsOf: (tagsResp) => tagsResp.Tags
|
|
13684
|
-
});
|
|
13685
|
-
if (!match) return null;
|
|
13686
|
-
return {
|
|
13687
|
-
physicalId: match.summary.AlarmName,
|
|
13688
|
-
attributes: {}
|
|
13689
|
-
};
|
|
13335
|
+
return null;
|
|
13690
13336
|
}
|
|
13691
13337
|
isNotFound(err) {
|
|
13692
13338
|
if (!(err instanceof Error)) return false;
|
|
@@ -13940,7 +13586,6 @@ var SecretsManagerSecretProvider = class {
|
|
|
13940
13586
|
* Lookup order:
|
|
13941
13587
|
* 1. `--resource` override (ARN) → verify via `DescribeSecret`.
|
|
13942
13588
|
* 2. `Properties.Name` → `DescribeSecret` (accepts name).
|
|
13943
|
-
* 3. `aws:cdk:path` tag match via `ListSecrets` (which already returns Tags).
|
|
13944
13589
|
*/
|
|
13945
13590
|
async import(input) {
|
|
13946
13591
|
if (input.knownPhysicalId) try {
|
|
@@ -13964,24 +13609,7 @@ var SecretsManagerSecretProvider = class {
|
|
|
13964
13609
|
if (err instanceof ResourceNotFoundException$3) return null;
|
|
13965
13610
|
throw err;
|
|
13966
13611
|
}
|
|
13967
|
-
|
|
13968
|
-
cdkPath: input.cdkPath,
|
|
13969
|
-
logicalId: input.logicalId,
|
|
13970
|
-
listPage: async (marker) => {
|
|
13971
|
-
const list = await this.smClient.send(new ListSecretsCommand({ ...marker && { NextToken: marker } }));
|
|
13972
|
-
return {
|
|
13973
|
-
items: list.SecretList,
|
|
13974
|
-
nextMarker: list.NextToken
|
|
13975
|
-
};
|
|
13976
|
-
},
|
|
13977
|
-
describe: async (secret) => secret.ARN ? secret : void 0,
|
|
13978
|
-
tagsOf: (secret) => secret.Tags
|
|
13979
|
-
});
|
|
13980
|
-
if (!match) return null;
|
|
13981
|
-
return {
|
|
13982
|
-
physicalId: match.summary.ARN,
|
|
13983
|
-
attributes: {}
|
|
13984
|
-
};
|
|
13612
|
+
return null;
|
|
13985
13613
|
}
|
|
13986
13614
|
};
|
|
13987
13615
|
|
|
@@ -14251,12 +13879,10 @@ var SSMParameterProvider = class {
|
|
|
14251
13879
|
*
|
|
14252
13880
|
* SSM physical IDs ARE the parameter names (`/foo/bar`). The CDK template
|
|
14253
13881
|
* usually carries `Properties.Name` explicitly, so the explicit-name path
|
|
14254
|
-
* covers most cases.
|
|
13882
|
+
* covers most cases.
|
|
14255
13883
|
*
|
|
14256
13884
|
* Lookup order:
|
|
14257
13885
|
* 1. `--resource` override or `Properties.Name` → verify via `GetParameter`.
|
|
14258
|
-
* 2. `aws:cdk:path` tag match via `DescribeParameters` + `ListTagsForResource`
|
|
14259
|
-
* (`ResourceType: 'Parameter'`, `ResourceId: <name>`).
|
|
14260
13886
|
*/
|
|
14261
13887
|
async import(input) {
|
|
14262
13888
|
const explicit = resolveExplicitPhysicalId(input, "Name");
|
|
@@ -14270,35 +13896,7 @@ var SSMParameterProvider = class {
|
|
|
14270
13896
|
if (err instanceof ParameterNotFound) return null;
|
|
14271
13897
|
throw err;
|
|
14272
13898
|
}
|
|
14273
|
-
|
|
14274
|
-
cdkPath: input.cdkPath,
|
|
14275
|
-
logicalId: input.logicalId,
|
|
14276
|
-
listPage: async (marker) => {
|
|
14277
|
-
const list = await this.ssmClient.send(new DescribeParametersCommand({ ...marker && { NextToken: marker } }));
|
|
14278
|
-
return {
|
|
14279
|
-
items: list.Parameters,
|
|
14280
|
-
nextMarker: list.NextToken
|
|
14281
|
-
};
|
|
14282
|
-
},
|
|
14283
|
-
describe: async (p) => {
|
|
14284
|
-
if (!p.Name) return void 0;
|
|
14285
|
-
try {
|
|
14286
|
-
return await this.ssmClient.send(new ListTagsForResourceCommand$2({
|
|
14287
|
-
ResourceType: "Parameter",
|
|
14288
|
-
ResourceId: p.Name
|
|
14289
|
-
}));
|
|
14290
|
-
} catch (err) {
|
|
14291
|
-
if (err instanceof ParameterNotFound) return void 0;
|
|
14292
|
-
throw err;
|
|
14293
|
-
}
|
|
14294
|
-
},
|
|
14295
|
-
tagsOf: (tagsResp) => tagsResp.TagList
|
|
14296
|
-
});
|
|
14297
|
-
if (!match) return null;
|
|
14298
|
-
return {
|
|
14299
|
-
physicalId: match.summary.Name,
|
|
14300
|
-
attributes: {}
|
|
14301
|
-
};
|
|
13899
|
+
return null;
|
|
14302
13900
|
}
|
|
14303
13901
|
};
|
|
14304
13902
|
|
|
@@ -14580,12 +14178,6 @@ var EventBridgeRuleProvider = class {
|
|
|
14580
14178
|
* 2. If the template carries `Properties.Name` use that as the rule
|
|
14581
14179
|
* name lookup, then verify with `DescribeRule` and return the
|
|
14582
14180
|
* rule's ARN as physicalId.
|
|
14583
|
-
* 3. Walk `ListRules(EventBusName?)` and match `aws:cdk:path` via
|
|
14584
|
-
* `ListTagsForResource(ResourceARN=rule.Arn)`. Returns the rule
|
|
14585
|
-
* ARN as physicalId — same shape that `create` returns.
|
|
14586
|
-
*
|
|
14587
|
-
* EventBridge tags use the standard `Tag[]` array shape
|
|
14588
|
-
* (`Key`/`Value`).
|
|
14589
14181
|
*/
|
|
14590
14182
|
async import(input) {
|
|
14591
14183
|
const eventBusName = input.properties["EventBusName"];
|
|
@@ -14619,30 +14211,7 @@ var EventBridgeRuleProvider = class {
|
|
|
14619
14211
|
if (err instanceof ResourceNotFoundException$2) return null;
|
|
14620
14212
|
throw err;
|
|
14621
14213
|
}
|
|
14622
|
-
|
|
14623
|
-
cdkPath: input.cdkPath,
|
|
14624
|
-
logicalId: input.logicalId,
|
|
14625
|
-
listPage: async (marker) => {
|
|
14626
|
-
const list = await this.eventBridgeClient.send(new ListRulesCommand({
|
|
14627
|
-
...eventBusName && { EventBusName: eventBusName },
|
|
14628
|
-
...marker && { NextToken: marker }
|
|
14629
|
-
}));
|
|
14630
|
-
return {
|
|
14631
|
-
items: list.Rules,
|
|
14632
|
-
nextMarker: list.NextToken
|
|
14633
|
-
};
|
|
14634
|
-
},
|
|
14635
|
-
describe: async (rule) => {
|
|
14636
|
-
if (!rule.Arn) return void 0;
|
|
14637
|
-
return await this.eventBridgeClient.send(new ListTagsForResourceCommand$1({ ResourceARN: rule.Arn }));
|
|
14638
|
-
},
|
|
14639
|
-
tagsOf: (tagsResp) => tagsResp.Tags
|
|
14640
|
-
});
|
|
14641
|
-
if (!match) return null;
|
|
14642
|
-
return {
|
|
14643
|
-
physicalId: match.summary.Arn,
|
|
14644
|
-
attributes: {}
|
|
14645
|
-
};
|
|
14214
|
+
return null;
|
|
14646
14215
|
}
|
|
14647
14216
|
/**
|
|
14648
14217
|
* Extract rule name from an ARN
|
|
@@ -14913,7 +14482,6 @@ var EventBridgeBusProvider = class {
|
|
|
14913
14482
|
*
|
|
14914
14483
|
* Lookup order:
|
|
14915
14484
|
* 1. `--resource` override or `Properties.Name` → verify via `DescribeEventBus`.
|
|
14916
|
-
* 2. `aws:cdk:path` tag match via `ListEventBuses` + `ListTagsForResource`.
|
|
14917
14485
|
*/
|
|
14918
14486
|
async import(input) {
|
|
14919
14487
|
const explicit = resolveExplicitPhysicalId(input, "Name");
|
|
@@ -14927,32 +14495,7 @@ var EventBridgeBusProvider = class {
|
|
|
14927
14495
|
if (err instanceof ResourceNotFoundException$2) return null;
|
|
14928
14496
|
throw err;
|
|
14929
14497
|
}
|
|
14930
|
-
|
|
14931
|
-
cdkPath: input.cdkPath,
|
|
14932
|
-
logicalId: input.logicalId,
|
|
14933
|
-
listPage: async (marker) => {
|
|
14934
|
-
const list = await this.eventBridgeClient.send(new ListEventBusesCommand({ ...marker && { NextToken: marker } }));
|
|
14935
|
-
return {
|
|
14936
|
-
items: list.EventBuses,
|
|
14937
|
-
nextMarker: list.NextToken
|
|
14938
|
-
};
|
|
14939
|
-
},
|
|
14940
|
-
describe: async (bus) => {
|
|
14941
|
-
if (!bus.Name || !bus.Arn) return void 0;
|
|
14942
|
-
try {
|
|
14943
|
-
return await this.eventBridgeClient.send(new ListTagsForResourceCommand$1({ ResourceARN: bus.Arn }));
|
|
14944
|
-
} catch (err) {
|
|
14945
|
-
if (err instanceof ResourceNotFoundException$2) return void 0;
|
|
14946
|
-
throw err;
|
|
14947
|
-
}
|
|
14948
|
-
},
|
|
14949
|
-
tagsOf: (tagsResp) => tagsResp.Tags
|
|
14950
|
-
});
|
|
14951
|
-
if (!match) return null;
|
|
14952
|
-
return {
|
|
14953
|
-
physicalId: match.summary.Name,
|
|
14954
|
-
attributes: {}
|
|
14955
|
-
};
|
|
14498
|
+
return null;
|
|
14956
14499
|
}
|
|
14957
14500
|
};
|
|
14958
14501
|
|
|
@@ -16721,55 +16264,16 @@ var EC2Provider = class {
|
|
|
16721
16264
|
* is rule-level), and the typical adoption story is "find the VPC,
|
|
16722
16265
|
* cdkd reconstructs the rest at deploy time".
|
|
16723
16266
|
*
|
|
16724
|
-
*
|
|
16725
|
-
*
|
|
16267
|
+
* There is no `aws:cdk:path` tag lookup: AWS rejects `aws:`-prefixed tag
|
|
16268
|
+
* writes, so that tag never exists on a real resource and a
|
|
16269
|
+
* `Filters: [{Name: 'tag:aws:cdk:path', ...}]` `Describe*` could never
|
|
16270
|
+
* match (issue #1134). Auto-mode import resolves ids from
|
|
16271
|
+
* CloudFormation's `DescribeStackResources` or the template's
|
|
16272
|
+
* physical-name property instead.
|
|
16726
16273
|
*/
|
|
16727
16274
|
async import(input) {
|
|
16728
16275
|
if (input.knownPhysicalId) return this.verifyExplicit(input.resourceType, input.knownPhysicalId);
|
|
16729
|
-
|
|
16730
|
-
const tagFilter = {
|
|
16731
|
-
Name: `tag:${CDK_PATH_TAG}`,
|
|
16732
|
-
Values: [input.cdkPath]
|
|
16733
|
-
};
|
|
16734
|
-
try {
|
|
16735
|
-
switch (input.resourceType) {
|
|
16736
|
-
case "AWS::EC2::VPC": {
|
|
16737
|
-
const vpc = (await this.ec2Client.send(new DescribeVpcsCommand({ Filters: [tagFilter] }))).Vpcs?.[0];
|
|
16738
|
-
return vpc?.VpcId ? {
|
|
16739
|
-
physicalId: vpc.VpcId,
|
|
16740
|
-
attributes: {}
|
|
16741
|
-
} : null;
|
|
16742
|
-
}
|
|
16743
|
-
case "AWS::EC2::Subnet": {
|
|
16744
|
-
const subnet = (await this.ec2Client.send(new DescribeSubnetsCommand({ Filters: [tagFilter] }))).Subnets?.[0];
|
|
16745
|
-
return subnet?.SubnetId ? {
|
|
16746
|
-
physicalId: subnet.SubnetId,
|
|
16747
|
-
attributes: {}
|
|
16748
|
-
} : null;
|
|
16749
|
-
}
|
|
16750
|
-
case "AWS::EC2::SecurityGroup": {
|
|
16751
|
-
const sg = (await this.ec2Client.send(new DescribeSecurityGroupsCommand({ Filters: [tagFilter] }))).SecurityGroups?.[0];
|
|
16752
|
-
return sg?.GroupId ? {
|
|
16753
|
-
physicalId: sg.GroupId,
|
|
16754
|
-
attributes: {}
|
|
16755
|
-
} : null;
|
|
16756
|
-
}
|
|
16757
|
-
case "AWS::EC2::NatGateway": {
|
|
16758
|
-
const gw = (await this.ec2Client.send(new DescribeNatGatewaysCommand({ Filter: [{
|
|
16759
|
-
Name: `tag:${CDK_PATH_TAG}`,
|
|
16760
|
-
Values: [input.cdkPath]
|
|
16761
|
-
}] }))).NatGateways?.find((g) => g.State !== "deleted" && g.State !== "deleting");
|
|
16762
|
-
return gw?.NatGatewayId ? {
|
|
16763
|
-
physicalId: gw.NatGatewayId,
|
|
16764
|
-
attributes: {}
|
|
16765
|
-
} : null;
|
|
16766
|
-
}
|
|
16767
|
-
default: return null;
|
|
16768
|
-
}
|
|
16769
|
-
} catch (error) {
|
|
16770
|
-
if (this.isNotFoundError(error)) return null;
|
|
16771
|
-
throw error;
|
|
16772
|
-
}
|
|
16276
|
+
return null;
|
|
16773
16277
|
}
|
|
16774
16278
|
/**
|
|
16775
16279
|
* Read the AWS-current EC2 networking resource configuration in
|
|
@@ -19298,8 +18802,11 @@ var ApiGatewayV2Provider = class {
|
|
|
19298
18802
|
/**
|
|
19299
18803
|
* Adopt an existing API Gateway V2 resource into cdkd state.
|
|
19300
18804
|
*
|
|
19301
|
-
* `AWS::ApiGatewayV2::Api`
|
|
19302
|
-
*
|
|
18805
|
+
* `AWS::ApiGatewayV2::Api` resolves an explicit `--resource` override
|
|
18806
|
+
* (verified via `GetApi`). There is no `aws:cdk:path` tag walk — AWS
|
|
18807
|
+
* rejects `aws:`-prefixed tag writes, so that tag never exists on a real
|
|
18808
|
+
* resource (issue #1134); auto-mode import resolves ids from
|
|
18809
|
+
* CloudFormation's `DescribeStackResources` instead.
|
|
19303
18810
|
*
|
|
19304
18811
|
* Sub-resources (`Stage`, `Integration`, `Route`, `Authorizer`) are
|
|
19305
18812
|
* scoped under a parent `ApiId`, and their physical ids are not
|
|
@@ -19327,19 +18834,6 @@ var ApiGatewayV2Provider = class {
|
|
|
19327
18834
|
if (err instanceof NotFoundException$3) return null;
|
|
19328
18835
|
throw err;
|
|
19329
18836
|
}
|
|
19330
|
-
if (!input.cdkPath) return null;
|
|
19331
|
-
let nextToken;
|
|
19332
|
-
do {
|
|
19333
|
-
const list = await this.getClient().send(new GetApisCommand({ ...nextToken && { NextToken: nextToken } }));
|
|
19334
|
-
for (const api of list.Items ?? []) {
|
|
19335
|
-
if (!api.ApiId) continue;
|
|
19336
|
-
if (api.Tags?.["aws:cdk:path"] === input.cdkPath) return {
|
|
19337
|
-
physicalId: api.ApiId,
|
|
19338
|
-
attributes: {}
|
|
19339
|
-
};
|
|
19340
|
-
}
|
|
19341
|
-
nextToken = list.NextToken;
|
|
19342
|
-
} while (nextToken);
|
|
19343
18837
|
return null;
|
|
19344
18838
|
}
|
|
19345
18839
|
/**
|
|
@@ -20489,8 +19983,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
20489
19983
|
*
|
|
20490
19984
|
* CloudFront distributions don't carry a template-supplied name
|
|
20491
19985
|
* (physical id is the AWS-generated `E...` distribution id), so the
|
|
20492
|
-
* lookup is
|
|
20493
|
-
* via `ListDistributions` + `ListTagsForResource(ARN)`.
|
|
19986
|
+
* lookup is explicit-override only.
|
|
20494
19987
|
*/
|
|
20495
19988
|
async import(input) {
|
|
20496
19989
|
if (input.knownPhysicalId) try {
|
|
@@ -20503,32 +19996,7 @@ var CloudFrontDistributionProvider = class {
|
|
|
20503
19996
|
if (err instanceof NoSuchDistribution) return null;
|
|
20504
19997
|
throw err;
|
|
20505
19998
|
}
|
|
20506
|
-
|
|
20507
|
-
cdkPath: input.cdkPath,
|
|
20508
|
-
logicalId: input.logicalId,
|
|
20509
|
-
listPage: async (marker) => {
|
|
20510
|
-
const list = await this.cloudFrontClient.send(new ListDistributionsCommand({ ...marker && { Marker: marker } }));
|
|
20511
|
-
return {
|
|
20512
|
-
items: list.DistributionList?.Items,
|
|
20513
|
-
nextMarker: list.DistributionList?.IsTruncated ? list.DistributionList?.NextMarker : void 0
|
|
20514
|
-
};
|
|
20515
|
-
},
|
|
20516
|
-
describe: async (d) => {
|
|
20517
|
-
if (!d.Id || !d.ARN) return void 0;
|
|
20518
|
-
try {
|
|
20519
|
-
return await this.cloudFrontClient.send(new ListTagsForResourceCommand$3({ Resource: d.ARN }));
|
|
20520
|
-
} catch (err) {
|
|
20521
|
-
if (err instanceof NoSuchDistribution) return void 0;
|
|
20522
|
-
throw err;
|
|
20523
|
-
}
|
|
20524
|
-
},
|
|
20525
|
-
tagsOf: (tagsResp) => tagsResp.Tags?.Items
|
|
20526
|
-
});
|
|
20527
|
-
if (!match) return null;
|
|
20528
|
-
return {
|
|
20529
|
-
physicalId: match.summary.Id,
|
|
20530
|
-
attributes: {}
|
|
20531
|
-
};
|
|
19999
|
+
return null;
|
|
20532
20000
|
}
|
|
20533
20001
|
};
|
|
20534
20002
|
|
|
@@ -21529,10 +20997,6 @@ var StepFunctionsProvider = class {
|
|
|
21529
20997
|
*
|
|
21530
20998
|
* Lookup order:
|
|
21531
20999
|
* 1. `--resource <id>=<arn>` override → verify with `DescribeStateMachine`.
|
|
21532
|
-
* 2. Walk `ListStateMachines` → `ListTagsForResource(arn)` via the shared
|
|
21533
|
-
* `importTagWalk` helper. SFN returns lowercase `key`/`value` tags, so
|
|
21534
|
-
* `tagsOf` maps them to the `Key`/`Value` shape the walk's
|
|
21535
|
-
* `aws:cdk:path` matcher expects.
|
|
21536
21000
|
*
|
|
21537
21001
|
* SFN state machines do not expose a template-supplied name field
|
|
21538
21002
|
* usable as a stable physicalId — the physicalId is the ARN — so the
|
|
@@ -21550,30 +21014,7 @@ var StepFunctionsProvider = class {
|
|
|
21550
21014
|
if (err instanceof StateMachineDoesNotExist) return null;
|
|
21551
21015
|
throw err;
|
|
21552
21016
|
}
|
|
21553
|
-
|
|
21554
|
-
cdkPath: input.cdkPath,
|
|
21555
|
-
logicalId: input.logicalId,
|
|
21556
|
-
listPage: async (marker) => {
|
|
21557
|
-
const list = await this.getClient().send(new ListStateMachinesCommand({ ...marker && { nextToken: marker } }));
|
|
21558
|
-
return {
|
|
21559
|
-
items: list.stateMachines,
|
|
21560
|
-
nextMarker: list.nextToken
|
|
21561
|
-
};
|
|
21562
|
-
},
|
|
21563
|
-
describe: async (sm) => {
|
|
21564
|
-
if (!sm.stateMachineArn) return void 0;
|
|
21565
|
-
return await this.getClient().send(new ListTagsForResourceCommand$11({ resourceArn: sm.stateMachineArn }));
|
|
21566
|
-
},
|
|
21567
|
-
tagsOf: (tagsResp) => (tagsResp.tags ?? []).map((t) => ({
|
|
21568
|
-
Key: t.key,
|
|
21569
|
-
Value: t.value
|
|
21570
|
-
}))
|
|
21571
|
-
});
|
|
21572
|
-
if (!match) return null;
|
|
21573
|
-
return {
|
|
21574
|
-
physicalId: match.summary.stateMachineArn,
|
|
21575
|
-
attributes: {}
|
|
21576
|
-
};
|
|
21017
|
+
return null;
|
|
21577
21018
|
}
|
|
21578
21019
|
/**
|
|
21579
21020
|
* Apply a diff between old and new CFn-shape Tags arrays via SFN's
|
|
@@ -22759,9 +22200,8 @@ var ECSProvider = class {
|
|
|
22759
22200
|
* Adopt an existing ECS resource into cdkd state.
|
|
22760
22201
|
*
|
|
22761
22202
|
* Supported types: `AWS::ECS::Cluster`, `AWS::ECS::Service`,
|
|
22762
|
-
* `AWS::ECS::TaskDefinition
|
|
22763
|
-
*
|
|
22764
|
-
* `matchesCdkPath` helper doesn't apply — match the tag manually.
|
|
22203
|
+
* `AWS::ECS::TaskDefinition` — all explicit-override only (see the
|
|
22204
|
+
* per-branch notes on why the `aws:cdk:path` tag walk was removed).
|
|
22765
22205
|
*
|
|
22766
22206
|
* Service has a composite physical id of `<clusterArn>|<serviceName>`
|
|
22767
22207
|
* (the form ECSProvider uses internally for mutation operations),
|
|
@@ -22788,19 +22228,6 @@ var ECSProvider = class {
|
|
|
22788
22228
|
if (this.isClusterNotFoundException(err) || this.isServiceNotFoundException(err)) return null;
|
|
22789
22229
|
throw err;
|
|
22790
22230
|
}
|
|
22791
|
-
if (!input.cdkPath) return null;
|
|
22792
|
-
let nextToken;
|
|
22793
|
-
do {
|
|
22794
|
-
const list = await this.getClient().send(new ListClustersCommand({ ...nextToken && { nextToken } }));
|
|
22795
|
-
for (const arn of list.clusterArns ?? []) {
|
|
22796
|
-
const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$12({ resourceArn: arn }));
|
|
22797
|
-
if (this.tagsMatchCdkPath(tagsResp.tags, input.cdkPath)) return {
|
|
22798
|
-
physicalId: arn.substring(arn.lastIndexOf("/") + 1),
|
|
22799
|
-
attributes: {}
|
|
22800
|
-
};
|
|
22801
|
-
}
|
|
22802
|
-
nextToken = list.nextToken;
|
|
22803
|
-
} while (nextToken);
|
|
22804
22231
|
return null;
|
|
22805
22232
|
}
|
|
22806
22233
|
async importService(input) {
|
|
@@ -22808,29 +22235,6 @@ var ECSProvider = class {
|
|
|
22808
22235
|
physicalId: input.knownPhysicalId,
|
|
22809
22236
|
attributes: {}
|
|
22810
22237
|
};
|
|
22811
|
-
if (!input.cdkPath) return null;
|
|
22812
|
-
let clusterToken;
|
|
22813
|
-
do {
|
|
22814
|
-
const clusterList = await this.getClient().send(new ListClustersCommand({ ...clusterToken && { nextToken: clusterToken } }));
|
|
22815
|
-
for (const clusterArn of clusterList.clusterArns ?? []) {
|
|
22816
|
-
let svcToken;
|
|
22817
|
-
do {
|
|
22818
|
-
const svcList = await this.getClient().send(new ListServicesCommand({
|
|
22819
|
-
cluster: clusterArn,
|
|
22820
|
-
...svcToken && { nextToken: svcToken }
|
|
22821
|
-
}));
|
|
22822
|
-
for (const svcArn of svcList.serviceArns ?? []) {
|
|
22823
|
-
const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$12({ resourceArn: svcArn }));
|
|
22824
|
-
if (this.tagsMatchCdkPath(tagsResp.tags, input.cdkPath)) return {
|
|
22825
|
-
physicalId: `${clusterArn}|${svcArn.substring(svcArn.lastIndexOf("/") + 1)}`,
|
|
22826
|
-
attributes: {}
|
|
22827
|
-
};
|
|
22828
|
-
}
|
|
22829
|
-
svcToken = svcList.nextToken;
|
|
22830
|
-
} while (svcToken);
|
|
22831
|
-
}
|
|
22832
|
-
clusterToken = clusterList.nextToken;
|
|
22833
|
-
} while (clusterToken);
|
|
22834
22238
|
return null;
|
|
22835
22239
|
}
|
|
22836
22240
|
async importTaskDefinition(input) {
|
|
@@ -22846,11 +22250,6 @@ var ECSProvider = class {
|
|
|
22846
22250
|
}
|
|
22847
22251
|
return null;
|
|
22848
22252
|
}
|
|
22849
|
-
tagsMatchCdkPath(tags, cdkPath) {
|
|
22850
|
-
if (!tags) return false;
|
|
22851
|
-
for (const t of tags) if (t.key === "aws:cdk:path" && t.value === cdkPath) return true;
|
|
22852
|
-
return false;
|
|
22853
|
-
}
|
|
22854
22253
|
};
|
|
22855
22254
|
|
|
22856
22255
|
//#endregion
|
|
@@ -23521,16 +22920,12 @@ var ELBv2Provider = class {
|
|
|
23521
22920
|
/**
|
|
23522
22921
|
* Adopt an existing ELBv2 LoadBalancer or TargetGroup into cdkd state.
|
|
23523
22922
|
*
|
|
23524
|
-
* Lookup
|
|
23525
|
-
*
|
|
23526
|
-
*
|
|
23527
|
-
* 2. Walk `DescribeLoadBalancers` / `DescribeTargetGroups` paginators →
|
|
23528
|
-
* batch-fetch tags for each ARN with `DescribeTags(ResourceArns)`
|
|
23529
|
-
* and match `aws:cdk:path` (standard `Key`/`Value` Tag[] shape).
|
|
22923
|
+
* Lookup: `--resource <id>=<arn>` override → verify with
|
|
22924
|
+
* `DescribeLoadBalancers` or `DescribeTargetGroups`. Without an override
|
|
22925
|
+
* the resource is reported as not-found.
|
|
23530
22926
|
*
|
|
23531
|
-
* Listener is not auto-importable (no template-supplied stable
|
|
23532
|
-
* identifier
|
|
23533
|
-
* `--resource <listenerId>=<arn>` for those.
|
|
22927
|
+
* Listener is likewise not auto-importable (no template-supplied stable
|
|
22928
|
+
* identifier); use `--resource <listenerId>=<arn>` for those.
|
|
23534
22929
|
*/
|
|
23535
22930
|
async import(input) {
|
|
23536
22931
|
switch (input.resourceType) {
|
|
@@ -23556,21 +22951,6 @@ var ELBv2Provider = class {
|
|
|
23556
22951
|
if (this.isNotFoundError(err)) return null;
|
|
23557
22952
|
throw err;
|
|
23558
22953
|
}
|
|
23559
|
-
if (!input.cdkPath) return null;
|
|
23560
|
-
let marker;
|
|
23561
|
-
do {
|
|
23562
|
-
const list = await this.getClient().send(new DescribeLoadBalancersCommand({ ...marker && { Marker: marker } }));
|
|
23563
|
-
const arns = (list.LoadBalancers ?? []).map((lb) => lb.LoadBalancerArn).filter((arn) => Boolean(arn));
|
|
23564
|
-
for (let i = 0; i < arns.length; i += 20) {
|
|
23565
|
-
const batch = arns.slice(i, i + 20);
|
|
23566
|
-
const tagsResp = await this.getClient().send(new DescribeTagsCommand({ ResourceArns: batch }));
|
|
23567
|
-
for (const td of tagsResp.TagDescriptions ?? []) if (td.ResourceArn && matchesCdkPath(td.Tags, input.cdkPath)) return {
|
|
23568
|
-
physicalId: td.ResourceArn,
|
|
23569
|
-
attributes: {}
|
|
23570
|
-
};
|
|
23571
|
-
}
|
|
23572
|
-
marker = list.NextMarker;
|
|
23573
|
-
} while (marker);
|
|
23574
22954
|
return null;
|
|
23575
22955
|
}
|
|
23576
22956
|
async importTargetGroup(input) {
|
|
@@ -23584,21 +22964,6 @@ var ELBv2Provider = class {
|
|
|
23584
22964
|
if (this.isNotFoundError(err)) return null;
|
|
23585
22965
|
throw err;
|
|
23586
22966
|
}
|
|
23587
|
-
if (!input.cdkPath) return null;
|
|
23588
|
-
let marker;
|
|
23589
|
-
do {
|
|
23590
|
-
const list = await this.getClient().send(new DescribeTargetGroupsCommand({ ...marker && { Marker: marker } }));
|
|
23591
|
-
const arns = (list.TargetGroups ?? []).map((tg) => tg.TargetGroupArn).filter((arn) => Boolean(arn));
|
|
23592
|
-
for (let i = 0; i < arns.length; i += 20) {
|
|
23593
|
-
const batch = arns.slice(i, i + 20);
|
|
23594
|
-
const tagsResp = await this.getClient().send(new DescribeTagsCommand({ ResourceArns: batch }));
|
|
23595
|
-
for (const td of tagsResp.TagDescriptions ?? []) if (td.ResourceArn && matchesCdkPath(td.Tags, input.cdkPath)) return {
|
|
23596
|
-
physicalId: td.ResourceArn,
|
|
23597
|
-
attributes: {}
|
|
23598
|
-
};
|
|
23599
|
-
}
|
|
23600
|
-
marker = list.NextMarker;
|
|
23601
|
-
} while (marker);
|
|
23602
22967
|
return null;
|
|
23603
22968
|
}
|
|
23604
22969
|
/**
|
|
@@ -24185,11 +23550,11 @@ var RDSProvider = class {
|
|
|
24185
23550
|
* Adopt an existing RDS resource into cdkd state.
|
|
24186
23551
|
*
|
|
24187
23552
|
* Supported types: `AWS::RDS::DBInstance`, `AWS::RDS::DBCluster`,
|
|
24188
|
-
* `AWS::RDS::DBSubnetGroup`.
|
|
24189
|
-
*
|
|
24190
|
-
* usually present in CDK templates
|
|
24191
|
-
*
|
|
24192
|
-
*
|
|
23553
|
+
* `AWS::RDS::DBSubnetGroup`. Resolution is by identifier name property
|
|
23554
|
+
* (`DBInstanceIdentifier` / `DBClusterIdentifier` / `DBSubnetGroupName`),
|
|
23555
|
+
* which is usually present in CDK templates, verified against the
|
|
23556
|
+
* corresponding `Describe*` call. A resource without one needs an
|
|
23557
|
+
* explicit `--resource` override (issue #1134).
|
|
24193
23558
|
*/
|
|
24194
23559
|
async import(input) {
|
|
24195
23560
|
switch (input.resourceType) {
|
|
@@ -24335,19 +23700,6 @@ var RDSProvider = class {
|
|
|
24335
23700
|
if (err.name === "DBInstanceNotFoundFault") return null;
|
|
24336
23701
|
throw err;
|
|
24337
23702
|
}
|
|
24338
|
-
if (!input.cdkPath) return null;
|
|
24339
|
-
let marker;
|
|
24340
|
-
do {
|
|
24341
|
-
const list = await this.getClient().send(new DescribeDBInstancesCommand({ ...marker && { Marker: marker } }));
|
|
24342
|
-
for (const inst of list.DBInstances ?? []) {
|
|
24343
|
-
if (!inst.DBInstanceIdentifier || !inst.DBInstanceArn) continue;
|
|
24344
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$9({ ResourceName: inst.DBInstanceArn }))).TagList, input.cdkPath)) return {
|
|
24345
|
-
physicalId: inst.DBInstanceIdentifier,
|
|
24346
|
-
attributes: {}
|
|
24347
|
-
};
|
|
24348
|
-
}
|
|
24349
|
-
marker = list.Marker;
|
|
24350
|
-
} while (marker);
|
|
24351
23703
|
return null;
|
|
24352
23704
|
}
|
|
24353
23705
|
async importDBCluster(input) {
|
|
@@ -24362,19 +23714,6 @@ var RDSProvider = class {
|
|
|
24362
23714
|
if (err.name === "DBClusterNotFoundFault") return null;
|
|
24363
23715
|
throw err;
|
|
24364
23716
|
}
|
|
24365
|
-
if (!input.cdkPath) return null;
|
|
24366
|
-
let marker;
|
|
24367
|
-
do {
|
|
24368
|
-
const list = await this.getClient().send(new DescribeDBClustersCommand({ ...marker && { Marker: marker } }));
|
|
24369
|
-
for (const c of list.DBClusters ?? []) {
|
|
24370
|
-
if (!c.DBClusterIdentifier || !c.DBClusterArn) continue;
|
|
24371
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$9({ ResourceName: c.DBClusterArn }))).TagList, input.cdkPath)) return {
|
|
24372
|
-
physicalId: c.DBClusterIdentifier,
|
|
24373
|
-
attributes: {}
|
|
24374
|
-
};
|
|
24375
|
-
}
|
|
24376
|
-
marker = list.Marker;
|
|
24377
|
-
} while (marker);
|
|
24378
23717
|
return null;
|
|
24379
23718
|
}
|
|
24380
23719
|
async importDBSubnetGroup(input) {
|
|
@@ -24389,19 +23728,6 @@ var RDSProvider = class {
|
|
|
24389
23728
|
if (err.name === "DBSubnetGroupNotFoundFault") return null;
|
|
24390
23729
|
throw err;
|
|
24391
23730
|
}
|
|
24392
|
-
if (!input.cdkPath) return null;
|
|
24393
|
-
let marker;
|
|
24394
|
-
do {
|
|
24395
|
-
const list = await this.getClient().send(new DescribeDBSubnetGroupsCommand({ ...marker && { Marker: marker } }));
|
|
24396
|
-
for (const sg of list.DBSubnetGroups ?? []) {
|
|
24397
|
-
if (!sg.DBSubnetGroupName || !sg.DBSubnetGroupArn) continue;
|
|
24398
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$9({ ResourceName: sg.DBSubnetGroupArn }))).TagList, input.cdkPath)) return {
|
|
24399
|
-
physicalId: sg.DBSubnetGroupName,
|
|
24400
|
-
attributes: {}
|
|
24401
|
-
};
|
|
24402
|
-
}
|
|
24403
|
-
marker = list.Marker;
|
|
24404
|
-
} while (marker);
|
|
24405
23731
|
return null;
|
|
24406
23732
|
}
|
|
24407
23733
|
};
|
|
@@ -24439,8 +23765,9 @@ const POLL_TIMEOUT_MS$1 = 1800 * 1e3;
|
|
|
24439
23765
|
* point is treated as idempotent success (region-match-gated).
|
|
24440
23766
|
* - `getAttribute`: `DescribeDBProxies` for `Endpoint` / `DBProxyArn` /
|
|
24441
23767
|
* `VpcId`, cached per `(physicalId, attribute)`.
|
|
24442
|
-
* - `import`: explicit `--resource` override
|
|
24443
|
-
* `
|
|
23768
|
+
* - `import`: explicit `--resource` override or the template's
|
|
23769
|
+
* `DBProxyName` property (issue #1134 removed the unreachable
|
|
23770
|
+
* `aws:cdk:path` tag walk).
|
|
24444
23771
|
*
|
|
24445
23772
|
* **physicalId** = DBProxyName (matches CFn `primaryIdentifier`).
|
|
24446
23773
|
*/
|
|
@@ -24615,23 +23942,6 @@ var RDSDBProxyProvider = class {
|
|
|
24615
23942
|
async import(input) {
|
|
24616
23943
|
const explicit = resolveExplicitPhysicalId(input, "DBProxyName");
|
|
24617
23944
|
if (explicit) return this.buildImportResult(explicit);
|
|
24618
|
-
const client = this.getClient();
|
|
24619
|
-
let marker;
|
|
24620
|
-
do {
|
|
24621
|
-
const describe = await client.send(new DescribeDBProxiesCommand({
|
|
24622
|
-
Marker: marker,
|
|
24623
|
-
MaxRecords: 100
|
|
24624
|
-
}));
|
|
24625
|
-
for (const proxy of describe.DBProxies ?? []) {
|
|
24626
|
-
if (!proxy.DBProxyArn) continue;
|
|
24627
|
-
try {
|
|
24628
|
-
if (matchesCdkPath((await client.send(new ListTagsForResourceCommand$9({ ResourceName: proxy.DBProxyArn }))).TagList ?? [], input.cdkPath)) return this.buildImportResult(proxy.DBProxyName ?? "");
|
|
24629
|
-
} catch (error) {
|
|
24630
|
-
this.logger.debug(`ListTagsForResource failed for ${proxy.DBProxyName}: ${error instanceof Error ? error.message : String(error)}`);
|
|
24631
|
-
}
|
|
24632
|
-
}
|
|
24633
|
-
marker = describe.Marker;
|
|
24634
|
-
} while (marker);
|
|
24635
23945
|
return null;
|
|
24636
23946
|
}
|
|
24637
23947
|
/**
|
|
@@ -24791,9 +24101,9 @@ const POLL_TIMEOUT_MS = 1800 * 1e3;
|
|
|
24791
24101
|
* is already gone via CASCADE, the endpoint is too.
|
|
24792
24102
|
* - `getAttribute`: `Endpoint` / `DBProxyEndpointArn` / `IsDefault` / `VpcId`
|
|
24793
24103
|
* via `DescribeDBProxyEndpoints`, cached per `(physicalId, attribute)`.
|
|
24794
|
-
* - `import`: explicit `--resource <id>=<DBProxyEndpointName>`
|
|
24795
|
-
*
|
|
24796
|
-
*
|
|
24104
|
+
* - `import`: explicit `--resource <id>=<DBProxyEndpointName>` or the
|
|
24105
|
+
* template's `DBProxyEndpointName` property (issue #1134 removed the
|
|
24106
|
+
* unreachable `aws:cdk:path` tag walk).
|
|
24797
24107
|
*
|
|
24798
24108
|
* **physicalId** = DBProxyEndpointName (matches CFn `primaryIdentifier`).
|
|
24799
24109
|
*/
|
|
@@ -24953,23 +24263,6 @@ var RDSDBProxyEndpointProvider = class {
|
|
|
24953
24263
|
async import(input) {
|
|
24954
24264
|
const explicit = resolveExplicitPhysicalId(input, "DBProxyEndpointName");
|
|
24955
24265
|
if (explicit) return this.buildImportResult(explicit);
|
|
24956
|
-
const client = this.getClient();
|
|
24957
|
-
let marker;
|
|
24958
|
-
do {
|
|
24959
|
-
const describe = await client.send(new DescribeDBProxyEndpointsCommand({
|
|
24960
|
-
Marker: marker,
|
|
24961
|
-
MaxRecords: 100
|
|
24962
|
-
}));
|
|
24963
|
-
for (const ep of describe.DBProxyEndpoints ?? []) {
|
|
24964
|
-
if (!ep.DBProxyEndpointArn) continue;
|
|
24965
|
-
try {
|
|
24966
|
-
if (matchesCdkPath((await client.send(new ListTagsForResourceCommand$9({ ResourceName: ep.DBProxyEndpointArn }))).TagList ?? [], input.cdkPath)) return this.buildImportResult(ep.DBProxyEndpointName ?? "");
|
|
24967
|
-
} catch (error) {
|
|
24968
|
-
this.logger.debug(`ListTagsForResource failed for ${ep.DBProxyEndpointName}: ${error instanceof Error ? error.message : String(error)}`);
|
|
24969
|
-
}
|
|
24970
|
-
}
|
|
24971
|
-
marker = describe.Marker;
|
|
24972
|
-
} while (marker);
|
|
24973
24266
|
return null;
|
|
24974
24267
|
}
|
|
24975
24268
|
async readCurrentState(physicalId) {
|
|
@@ -25855,11 +25148,10 @@ var DocDBProvider = class {
|
|
|
25855
25148
|
* Supported types: `AWS::DocDB::DBInstance`, `AWS::DocDB::DBCluster`,
|
|
25856
25149
|
* `AWS::DocDB::DBSubnetGroup`. Identifier name properties (`DBInstance
|
|
25857
25150
|
* Identifier` / `DBClusterIdentifier` / `DBSubnetGroupName`) are usually
|
|
25858
|
-
* present in CDK templates
|
|
25859
|
-
*
|
|
25860
|
-
*
|
|
25861
|
-
*
|
|
25862
|
-
* 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).
|
|
25863
25155
|
*/
|
|
25864
25156
|
async import(input) {
|
|
25865
25157
|
switch (input.resourceType) {
|
|
@@ -25958,7 +25250,7 @@ var DocDBProvider = class {
|
|
|
25958
25250
|
*/
|
|
25959
25251
|
async attachTags(result, arn) {
|
|
25960
25252
|
try {
|
|
25961
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
25253
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$12({ ResourceName: arn }))).TagList);
|
|
25962
25254
|
} catch (err) {
|
|
25963
25255
|
this.logger.debug(`DocDB ListTagsForResource(${arn}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
25964
25256
|
}
|
|
@@ -25975,24 +25267,7 @@ var DocDBProvider = class {
|
|
|
25975
25267
|
if (err.name === "DBInstanceNotFoundFault") return null;
|
|
25976
25268
|
throw err;
|
|
25977
25269
|
}
|
|
25978
|
-
|
|
25979
|
-
cdkPath: input.cdkPath,
|
|
25980
|
-
logicalId: input.logicalId,
|
|
25981
|
-
listPage: async (marker) => {
|
|
25982
|
-
const list = await this.getClient().send(new DescribeDBInstancesCommand$1({ ...marker && { Marker: marker } }));
|
|
25983
|
-
return {
|
|
25984
|
-
items: list.DBInstances,
|
|
25985
|
-
nextMarker: list.Marker
|
|
25986
|
-
};
|
|
25987
|
-
},
|
|
25988
|
-
describe: async (inst) => inst.DBInstanceIdentifier && inst.DBInstanceArn ? await this.listTagsForResource(inst.DBInstanceArn) : void 0,
|
|
25989
|
-
tagsOf: (tags) => tags
|
|
25990
|
-
});
|
|
25991
|
-
if (!match) return null;
|
|
25992
|
-
return {
|
|
25993
|
-
physicalId: match.summary.DBInstanceIdentifier,
|
|
25994
|
-
attributes: {}
|
|
25995
|
-
};
|
|
25270
|
+
return null;
|
|
25996
25271
|
}
|
|
25997
25272
|
async importDBCluster(input) {
|
|
25998
25273
|
const explicit = resolveExplicitPhysicalId(input, "DBClusterIdentifier");
|
|
@@ -26006,24 +25281,7 @@ var DocDBProvider = class {
|
|
|
26006
25281
|
if (err.name === "DBClusterNotFoundFault") return null;
|
|
26007
25282
|
throw err;
|
|
26008
25283
|
}
|
|
26009
|
-
|
|
26010
|
-
cdkPath: input.cdkPath,
|
|
26011
|
-
logicalId: input.logicalId,
|
|
26012
|
-
listPage: async (marker) => {
|
|
26013
|
-
const list = await this.getClient().send(new DescribeDBClustersCommand$1({ ...marker && { Marker: marker } }));
|
|
26014
|
-
return {
|
|
26015
|
-
items: list.DBClusters,
|
|
26016
|
-
nextMarker: list.Marker
|
|
26017
|
-
};
|
|
26018
|
-
},
|
|
26019
|
-
describe: async (c) => c.DBClusterIdentifier && c.DBClusterArn ? await this.listTagsForResource(c.DBClusterArn) : void 0,
|
|
26020
|
-
tagsOf: (tags) => tags
|
|
26021
|
-
});
|
|
26022
|
-
if (!match) return null;
|
|
26023
|
-
return {
|
|
26024
|
-
physicalId: match.summary.DBClusterIdentifier,
|
|
26025
|
-
attributes: {}
|
|
26026
|
-
};
|
|
25284
|
+
return null;
|
|
26027
25285
|
}
|
|
26028
25286
|
async importDBSubnetGroup(input) {
|
|
26029
25287
|
const explicit = resolveExplicitPhysicalId(input, "DBSubnetGroupName");
|
|
@@ -26037,33 +25295,7 @@ var DocDBProvider = class {
|
|
|
26037
25295
|
if (err.name === "DBSubnetGroupNotFoundFault") return null;
|
|
26038
25296
|
throw err;
|
|
26039
25297
|
}
|
|
26040
|
-
|
|
26041
|
-
cdkPath: input.cdkPath,
|
|
26042
|
-
logicalId: input.logicalId,
|
|
26043
|
-
listPage: async (marker) => {
|
|
26044
|
-
const list = await this.getClient().send(new DescribeDBSubnetGroupsCommand$1({ ...marker && { Marker: marker } }));
|
|
26045
|
-
return {
|
|
26046
|
-
items: list.DBSubnetGroups,
|
|
26047
|
-
nextMarker: list.Marker
|
|
26048
|
-
};
|
|
26049
|
-
},
|
|
26050
|
-
describe: async (sg) => sg.DBSubnetGroupName && sg.DBSubnetGroupArn ? await this.listTagsForResource(sg.DBSubnetGroupArn) : void 0,
|
|
26051
|
-
tagsOf: (tags) => tags
|
|
26052
|
-
});
|
|
26053
|
-
if (!match) return null;
|
|
26054
|
-
return {
|
|
26055
|
-
physicalId: match.summary.DBSubnetGroupName,
|
|
26056
|
-
attributes: {}
|
|
26057
|
-
};
|
|
26058
|
-
}
|
|
26059
|
-
/**
|
|
26060
|
-
* `ListTagsForResource` for the tag-walk import path. Returns the tag list
|
|
26061
|
-
* (possibly empty) so `importTagWalk` can match `aws:cdk:path` against it;
|
|
26062
|
-
* `undefined` is reserved for "skip this candidate", which the callers signal
|
|
26063
|
-
* before calling this.
|
|
26064
|
-
*/
|
|
26065
|
-
async listTagsForResource(resourceArn) {
|
|
26066
|
-
return (await this.getClient().send(new ListTagsForResourceCommand$13({ ResourceName: resourceArn }))).TagList ?? [];
|
|
25298
|
+
return null;
|
|
26067
25299
|
}
|
|
26068
25300
|
};
|
|
26069
25301
|
|
|
@@ -26649,7 +25881,7 @@ var NeptuneProvider = class {
|
|
|
26649
25881
|
*/
|
|
26650
25882
|
async attachTags(result, arn) {
|
|
26651
25883
|
try {
|
|
26652
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
25884
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$13({ ResourceName: arn }))).TagList);
|
|
26653
25885
|
} catch (err) {
|
|
26654
25886
|
this.logger.debug(`Neptune ListTagsForResource(${arn}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
26655
25887
|
}
|
|
@@ -26666,19 +25898,6 @@ var NeptuneProvider = class {
|
|
|
26666
25898
|
if (err.name === "DBInstanceNotFoundFault") return null;
|
|
26667
25899
|
throw err;
|
|
26668
25900
|
}
|
|
26669
|
-
if (!input.cdkPath) return null;
|
|
26670
|
-
let marker;
|
|
26671
|
-
do {
|
|
26672
|
-
const list = await this.getClient().send(new DescribeDBInstancesCommand$2({ ...marker && { Marker: marker } }));
|
|
26673
|
-
for (const inst of list.DBInstances ?? []) {
|
|
26674
|
-
if (!inst.DBInstanceIdentifier || !inst.DBInstanceArn) continue;
|
|
26675
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceName: inst.DBInstanceArn }))).TagList, input.cdkPath)) return {
|
|
26676
|
-
physicalId: inst.DBInstanceIdentifier,
|
|
26677
|
-
attributes: {}
|
|
26678
|
-
};
|
|
26679
|
-
}
|
|
26680
|
-
marker = list.Marker;
|
|
26681
|
-
} while (marker);
|
|
26682
25901
|
return null;
|
|
26683
25902
|
}
|
|
26684
25903
|
async importDBCluster(input) {
|
|
@@ -26693,19 +25912,6 @@ var NeptuneProvider = class {
|
|
|
26693
25912
|
if (err.name === "DBClusterNotFoundFault") return null;
|
|
26694
25913
|
throw err;
|
|
26695
25914
|
}
|
|
26696
|
-
if (!input.cdkPath) return null;
|
|
26697
|
-
let marker;
|
|
26698
|
-
do {
|
|
26699
|
-
const list = await this.getClient().send(new DescribeDBClustersCommand$2({ ...marker && { Marker: marker } }));
|
|
26700
|
-
for (const c of list.DBClusters ?? []) {
|
|
26701
|
-
if (!c.DBClusterIdentifier || !c.DBClusterArn) continue;
|
|
26702
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceName: c.DBClusterArn }))).TagList, input.cdkPath)) return {
|
|
26703
|
-
physicalId: c.DBClusterIdentifier,
|
|
26704
|
-
attributes: {}
|
|
26705
|
-
};
|
|
26706
|
-
}
|
|
26707
|
-
marker = list.Marker;
|
|
26708
|
-
} while (marker);
|
|
26709
25915
|
return null;
|
|
26710
25916
|
}
|
|
26711
25917
|
async importDBSubnetGroup(input) {
|
|
@@ -26720,19 +25926,6 @@ var NeptuneProvider = class {
|
|
|
26720
25926
|
if (err.name === "DBSubnetGroupNotFoundFault") return null;
|
|
26721
25927
|
throw err;
|
|
26722
25928
|
}
|
|
26723
|
-
if (!input.cdkPath) return null;
|
|
26724
|
-
let marker;
|
|
26725
|
-
do {
|
|
26726
|
-
const list = await this.getClient().send(new DescribeDBSubnetGroupsCommand$2({ ...marker && { Marker: marker } }));
|
|
26727
|
-
for (const sg of list.DBSubnetGroups ?? []) {
|
|
26728
|
-
if (!sg.DBSubnetGroupName || !sg.DBSubnetGroupArn) continue;
|
|
26729
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceName: sg.DBSubnetGroupArn }))).TagList, input.cdkPath)) return {
|
|
26730
|
-
physicalId: sg.DBSubnetGroupName,
|
|
26731
|
-
attributes: {}
|
|
26732
|
-
};
|
|
26733
|
-
}
|
|
26734
|
-
marker = list.Marker;
|
|
26735
|
-
} while (marker);
|
|
26736
25929
|
return null;
|
|
26737
25930
|
}
|
|
26738
25931
|
};
|
|
@@ -27469,28 +26662,6 @@ var Route53Provider = class {
|
|
|
27469
26662
|
if (err instanceof Error && err.name === "NoSuchHostedZone") return null;
|
|
27470
26663
|
throw err;
|
|
27471
26664
|
}
|
|
27472
|
-
if (!input.cdkPath) return null;
|
|
27473
|
-
let marker;
|
|
27474
|
-
do {
|
|
27475
|
-
const list = await this.getClient().send(new ListHostedZonesCommand({ ...marker && { Marker: marker } }));
|
|
27476
|
-
for (const zone of list.HostedZones ?? []) {
|
|
27477
|
-
if (!zone.Id) continue;
|
|
27478
|
-
const zoneId = zone.Id.replace("/hostedzone/", "");
|
|
27479
|
-
try {
|
|
27480
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$7({
|
|
27481
|
-
ResourceType: "hostedzone",
|
|
27482
|
-
ResourceId: zoneId
|
|
27483
|
-
}))).ResourceTagSet?.Tags, input.cdkPath)) return {
|
|
27484
|
-
physicalId: zoneId,
|
|
27485
|
-
attributes: {}
|
|
27486
|
-
};
|
|
27487
|
-
} catch (err) {
|
|
27488
|
-
if (err instanceof Error && err.name === "NoSuchHostedZone") continue;
|
|
27489
|
-
throw err;
|
|
27490
|
-
}
|
|
27491
|
-
}
|
|
27492
|
-
marker = list.IsTruncated ? list.NextMarker : void 0;
|
|
27493
|
-
} while (marker);
|
|
27494
26665
|
return null;
|
|
27495
26666
|
}
|
|
27496
26667
|
};
|
|
@@ -28018,19 +27189,13 @@ var CognitoUserPoolProvider = class {
|
|
|
28018
27189
|
* 1. `--resource` override → `DescribeUserPool` to verify.
|
|
28019
27190
|
* 2. `Properties.UserPoolName` (when CDK template carries it) →
|
|
28020
27191
|
* `ListUserPools` walk + name match.
|
|
28021
|
-
*
|
|
28022
|
-
*
|
|
28023
|
-
*
|
|
28024
|
-
*
|
|
28025
|
-
*
|
|
28026
|
-
*
|
|
28027
|
-
*
|
|
28028
|
-
* (DescribeUserPool for the ARN, then ListTagsForResource) is retried with
|
|
28029
|
-
* exponential backoff when AWS throttles it instead of aborting the whole
|
|
28030
|
-
* import. The name match is expressed to the walk as a synthetic
|
|
28031
|
-
* `aws:cdk:path` tag carrying the walk's own lookup key, so a name-only
|
|
28032
|
-
* template (no CDK path metadata) still resolves without any per-candidate
|
|
28033
|
-
* 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.
|
|
28034
27199
|
*/
|
|
28035
27200
|
async import(input) {
|
|
28036
27201
|
if (input.knownPhysicalId) try {
|
|
@@ -28044,48 +27209,20 @@ var CognitoUserPoolProvider = class {
|
|
|
28044
27209
|
throw err;
|
|
28045
27210
|
}
|
|
28046
27211
|
const desiredName = typeof input.properties?.["UserPoolName"] === "string" ? input.properties["UserPoolName"] : void 0;
|
|
28047
|
-
|
|
28048
|
-
|
|
28049
|
-
|
|
28050
|
-
|
|
28051
|
-
|
|
28052
|
-
|
|
28053
|
-
|
|
28054
|
-
|
|
28055
|
-
|
|
28056
|
-
|
|
28057
|
-
|
|
28058
|
-
|
|
28059
|
-
|
|
28060
|
-
|
|
28061
|
-
};
|
|
28062
|
-
},
|
|
28063
|
-
describe: async (pool) => {
|
|
28064
|
-
if (!pool.Id) return void 0;
|
|
28065
|
-
if (desiredName && pool.Name === desiredName) return NAME_MATCH;
|
|
28066
|
-
if (!input.cdkPath) return void 0;
|
|
28067
|
-
try {
|
|
28068
|
-
const arn = (await this.getClient().send(new DescribeUserPoolCommand({ UserPoolId: pool.Id }))).UserPool?.Arn;
|
|
28069
|
-
if (!arn) return void 0;
|
|
28070
|
-
return await this.getClient().send(new ListTagsForResourceCommand$15({ ResourceArn: arn }));
|
|
28071
|
-
} catch (err) {
|
|
28072
|
-
if (err instanceof ResourceNotFoundException$7) return void 0;
|
|
28073
|
-
throw err;
|
|
28074
|
-
}
|
|
28075
|
-
},
|
|
28076
|
-
tagsOf: (detail) => "nameMatch" in detail ? [{
|
|
28077
|
-
Key: CDK_PATH_TAG,
|
|
28078
|
-
Value: walkCdkPath
|
|
28079
|
-
}] : Object.entries(detail.Tags ?? {}).map(([Key, Value]) => ({
|
|
28080
|
-
Key,
|
|
28081
|
-
Value
|
|
28082
|
-
}))
|
|
28083
|
-
});
|
|
28084
|
-
if (!match) return null;
|
|
28085
|
-
return {
|
|
28086
|
-
physicalId: match.summary.Id,
|
|
28087
|
-
attributes: {}
|
|
28088
|
-
};
|
|
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;
|
|
28089
27226
|
}
|
|
28090
27227
|
};
|
|
28091
27228
|
|
|
@@ -28103,8 +27240,6 @@ var CognitoUserPoolProvider = class {
|
|
|
28103
27240
|
*/
|
|
28104
27241
|
var ElastiCacheProvider = class {
|
|
28105
27242
|
client;
|
|
28106
|
-
stsClient;
|
|
28107
|
-
cachedAccountId;
|
|
28108
27243
|
providerRegion = process.env["AWS_REGION"];
|
|
28109
27244
|
logger = getLogger().child("ElastiCacheProvider");
|
|
28110
27245
|
handledProperties = /* @__PURE__ */ new Map([["AWS::ElastiCache::SubnetGroup", /* @__PURE__ */ new Set([
|
|
@@ -28520,17 +27655,11 @@ var ElastiCacheProvider = class {
|
|
|
28520
27655
|
/**
|
|
28521
27656
|
* Adopt an existing ElastiCache resource into cdkd state.
|
|
28522
27657
|
*
|
|
28523
|
-
* Supported types
|
|
28524
|
-
*
|
|
28525
|
-
*
|
|
28526
|
-
* - `AWS::ElastiCache::
|
|
28527
|
-
*
|
|
28528
|
-
*
|
|
28529
|
-
* `ListTagsForResource` requires an ARN. Both `CacheCluster.ARN` and
|
|
28530
|
-
* `CacheSubnetGroup.ARN` are returned by the Describe APIs, so no
|
|
28531
|
-
* extra reconstruction is needed in normal flow; for the explicit
|
|
28532
|
-
* override path we build the ARN from `region` + STS account id +
|
|
28533
|
-
* the resource name.
|
|
27658
|
+
* Supported types (both resolve from an explicit `--resource` override
|
|
27659
|
+
* or the template's physical-name property, verified via the matching
|
|
27660
|
+
* `Describe*` call):
|
|
27661
|
+
* - `AWS::ElastiCache::CacheCluster` — `Properties.ClusterName`.
|
|
27662
|
+
* - `AWS::ElastiCache::SubnetGroup` — `Properties.CacheSubnetGroupName`.
|
|
28534
27663
|
*/
|
|
28535
27664
|
async import(input) {
|
|
28536
27665
|
switch (input.resourceType) {
|
|
@@ -28551,20 +27680,6 @@ var ElastiCacheProvider = class {
|
|
|
28551
27680
|
if (this.isNotFoundError(err, "CacheClusterNotFoundFault")) return null;
|
|
28552
27681
|
throw err;
|
|
28553
27682
|
}
|
|
28554
|
-
if (!input.cdkPath) return null;
|
|
28555
|
-
let marker;
|
|
28556
|
-
do {
|
|
28557
|
-
const list = await this.getClient().send(new DescribeCacheClustersCommand({ ...marker && { Marker: marker } }));
|
|
28558
|
-
for (const c of list.CacheClusters ?? []) {
|
|
28559
|
-
if (!c.CacheClusterId) continue;
|
|
28560
|
-
const arn = c.ARN ?? await this.buildClusterArn(c.CacheClusterId);
|
|
28561
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$10({ ResourceName: arn }))).TagList, input.cdkPath)) return {
|
|
28562
|
-
physicalId: c.CacheClusterId,
|
|
28563
|
-
attributes: {}
|
|
28564
|
-
};
|
|
28565
|
-
}
|
|
28566
|
-
marker = list.Marker;
|
|
28567
|
-
} while (marker);
|
|
28568
27683
|
return null;
|
|
28569
27684
|
}
|
|
28570
27685
|
async importSubnetGroup(input) {
|
|
@@ -28579,39 +27694,8 @@ var ElastiCacheProvider = class {
|
|
|
28579
27694
|
if (this.isNotFoundError(err, "CacheSubnetGroupNotFoundFault")) return null;
|
|
28580
27695
|
throw err;
|
|
28581
27696
|
}
|
|
28582
|
-
if (!input.cdkPath) return null;
|
|
28583
|
-
let marker;
|
|
28584
|
-
do {
|
|
28585
|
-
const list = await this.getClient().send(new DescribeCacheSubnetGroupsCommand({ ...marker && { Marker: marker } }));
|
|
28586
|
-
for (const g of list.CacheSubnetGroups ?? []) {
|
|
28587
|
-
if (!g.CacheSubnetGroupName) continue;
|
|
28588
|
-
const arn = g.ARN ?? await this.buildSubnetGroupArn(g.CacheSubnetGroupName);
|
|
28589
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$10({ ResourceName: arn }))).TagList, input.cdkPath)) return {
|
|
28590
|
-
physicalId: g.CacheSubnetGroupName,
|
|
28591
|
-
attributes: {}
|
|
28592
|
-
};
|
|
28593
|
-
}
|
|
28594
|
-
marker = list.Marker;
|
|
28595
|
-
} while (marker);
|
|
28596
27697
|
return null;
|
|
28597
27698
|
}
|
|
28598
|
-
async buildClusterArn(clusterName) {
|
|
28599
|
-
return `arn:aws:elasticache:${await this.getRegion()}:${await this.getAccountId()}:cluster:${clusterName}`;
|
|
28600
|
-
}
|
|
28601
|
-
async buildSubnetGroupArn(subnetGroupName) {
|
|
28602
|
-
return `arn:aws:elasticache:${await this.getRegion()}:${await this.getAccountId()}:subnetgroup:${subnetGroupName}`;
|
|
28603
|
-
}
|
|
28604
|
-
async getRegion() {
|
|
28605
|
-
return await this.getClient().config.region() || this.providerRegion || "us-east-1";
|
|
28606
|
-
}
|
|
28607
|
-
async getAccountId() {
|
|
28608
|
-
if (this.cachedAccountId) return this.cachedAccountId;
|
|
28609
|
-
if (!this.stsClient) this.stsClient = new STSClient(this.providerRegion ? { region: this.providerRegion } : {});
|
|
28610
|
-
const identity = await this.stsClient.send(new GetCallerIdentityCommand({}));
|
|
28611
|
-
if (!identity.Account) throw new Error("Failed to resolve AWS account id from STS");
|
|
28612
|
-
this.cachedAccountId = identity.Account;
|
|
28613
|
-
return this.cachedAccountId;
|
|
28614
|
-
}
|
|
28615
27699
|
};
|
|
28616
27700
|
|
|
28617
27701
|
//#endregion
|
|
@@ -29331,7 +28415,7 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
29331
28415
|
/** Best-effort tag fetch via `ListTagsForResource(ResourceARN)`. */
|
|
29332
28416
|
async attachTags(result, arn) {
|
|
29333
28417
|
try {
|
|
29334
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
28418
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$14({ ResourceARN: arn }))).Tags);
|
|
29335
28419
|
} catch (err) {
|
|
29336
28420
|
this.logger.debug(`ServiceDiscovery ListTagsForResource(${arn}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
29337
28421
|
}
|
|
@@ -29373,25 +28457,17 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
29373
28457
|
throw err;
|
|
29374
28458
|
}
|
|
29375
28459
|
const desiredName = typeof input.properties?.["Name"] === "string" ? input.properties["Name"] : void 0;
|
|
28460
|
+
if (!desiredName) return null;
|
|
29376
28461
|
let token;
|
|
29377
28462
|
do {
|
|
29378
28463
|
const list = await this.getClient().send(new ListNamespacesCommand({ ...token && { NextToken: token } }));
|
|
29379
28464
|
for (const ns of list.Namespaces ?? []) {
|
|
29380
28465
|
if (!ns.Id || !ns.Arn) continue;
|
|
29381
28466
|
if (expectedKind && ns.Type && ns.Type !== expectedKind) continue;
|
|
29382
|
-
if (
|
|
28467
|
+
if (ns.Name === desiredName) return {
|
|
29383
28468
|
physicalId: ns.Id,
|
|
29384
28469
|
attributes: {}
|
|
29385
28470
|
};
|
|
29386
|
-
if (input.cdkPath) try {
|
|
29387
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$16({ ResourceARN: ns.Arn }))).Tags, input.cdkPath)) return {
|
|
29388
|
-
physicalId: ns.Id,
|
|
29389
|
-
attributes: {}
|
|
29390
|
-
};
|
|
29391
|
-
} catch (err) {
|
|
29392
|
-
if (err instanceof NamespaceNotFound) continue;
|
|
29393
|
-
throw err;
|
|
29394
|
-
}
|
|
29395
28471
|
}
|
|
29396
28472
|
token = list.NextToken;
|
|
29397
28473
|
} while (token);
|
|
@@ -29408,24 +28484,6 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
|
|
|
29408
28484
|
if (err instanceof ServiceNotFound) return null;
|
|
29409
28485
|
throw err;
|
|
29410
28486
|
}
|
|
29411
|
-
if (!input.cdkPath) return null;
|
|
29412
|
-
let token;
|
|
29413
|
-
do {
|
|
29414
|
-
const list = await this.getClient().send(new ListServicesCommand$1({ ...token && { NextToken: token } }));
|
|
29415
|
-
for (const svc of list.Services ?? []) {
|
|
29416
|
-
if (!svc.Id || !svc.Arn) continue;
|
|
29417
|
-
try {
|
|
29418
|
-
if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$16({ ResourceARN: svc.Arn }))).Tags, input.cdkPath)) return {
|
|
29419
|
-
physicalId: svc.Id,
|
|
29420
|
-
attributes: {}
|
|
29421
|
-
};
|
|
29422
|
-
} catch (err) {
|
|
29423
|
-
if (err instanceof ServiceNotFound) continue;
|
|
29424
|
-
throw err;
|
|
29425
|
-
}
|
|
29426
|
-
}
|
|
29427
|
-
token = list.NextToken;
|
|
29428
|
-
} while (token);
|
|
29429
28487
|
return null;
|
|
29430
28488
|
}
|
|
29431
28489
|
/**
|
|
@@ -30318,11 +29376,13 @@ var AppSyncProvider = class {
|
|
|
30318
29376
|
/**
|
|
30319
29377
|
* Adopt an existing AppSync resource into cdkd state.
|
|
30320
29378
|
*
|
|
30321
|
-
* `AWS::AppSync::GraphQLApi`
|
|
30322
|
-
* `
|
|
29379
|
+
* `AWS::AppSync::GraphQLApi` resolves an explicit `--resource` override
|
|
29380
|
+
* (verified via `GetGraphqlApi`). There is no `aws:cdk:path` tag walk —
|
|
29381
|
+
* AWS rejects `aws:`-prefixed tag writes, so that tag never exists on a
|
|
29382
|
+
* real resource (issue #1134); auto-mode import resolves ids from
|
|
29383
|
+
* CloudFormation's `DescribeStackResources` instead. AppSync sub-resources
|
|
30323
29384
|
* (`GraphQLSchema`, `DataSource`, `Resolver`, `ApiKey`) are scoped under a
|
|
30324
|
-
* parent `apiId`
|
|
30325
|
-
* explicit-override only.
|
|
29385
|
+
* parent `apiId` — explicit-override only.
|
|
30326
29386
|
*/
|
|
30327
29387
|
async import(input) {
|
|
30328
29388
|
if (input.resourceType !== "AWS::AppSync::GraphQLApi") {
|
|
@@ -30343,19 +29403,6 @@ var AppSyncProvider = class {
|
|
|
30343
29403
|
if (err instanceof NotFoundException$4) return null;
|
|
30344
29404
|
throw err;
|
|
30345
29405
|
}
|
|
30346
|
-
if (!input.cdkPath) return null;
|
|
30347
|
-
let nextToken;
|
|
30348
|
-
do {
|
|
30349
|
-
const list = await this.getClient().send(new ListGraphqlApisCommand({ ...nextToken && { nextToken } }));
|
|
30350
|
-
for (const api of list.graphqlApis ?? []) {
|
|
30351
|
-
if (!api.apiId) continue;
|
|
30352
|
-
if (api.tags?.["aws:cdk:path"] === input.cdkPath) return {
|
|
30353
|
-
physicalId: api.apiId,
|
|
30354
|
-
attributes: {}
|
|
30355
|
-
};
|
|
30356
|
-
}
|
|
30357
|
-
nextToken = list.nextToken;
|
|
30358
|
-
} while (nextToken);
|
|
30359
29406
|
return null;
|
|
30360
29407
|
}
|
|
30361
29408
|
};
|
|
@@ -30374,8 +29421,6 @@ var AppSyncProvider = class {
|
|
|
30374
29421
|
*/
|
|
30375
29422
|
var GlueProvider = class {
|
|
30376
29423
|
client;
|
|
30377
|
-
stsClient;
|
|
30378
|
-
cachedAccountId;
|
|
30379
29424
|
providerRegion = process.env["AWS_REGION"];
|
|
30380
29425
|
logger = getLogger().child("GlueProvider");
|
|
30381
29426
|
handledProperties = /* @__PURE__ */ new Map([["AWS::Glue::Database", /* @__PURE__ */ new Set([
|
|
@@ -30621,16 +29666,11 @@ var GlueProvider = class {
|
|
|
30621
29666
|
/**
|
|
30622
29667
|
* Adopt an existing Glue Database or Table into cdkd state.
|
|
30623
29668
|
*
|
|
30624
|
-
* Lookup
|
|
30625
|
-
*
|
|
30626
|
-
*
|
|
30627
|
-
*
|
|
30628
|
-
*
|
|
30629
|
-
* a `Record<string,string>` map (not a `Tag[]` array), so the
|
|
30630
|
-
* match is `tags?.[CDK_PATH_TAG] === input.cdkPath`.
|
|
30631
|
-
*
|
|
30632
|
-
* Glue list APIs return only names — ARNs are constructed locally
|
|
30633
|
-
* for the per-item GetTags call.
|
|
29669
|
+
* Lookup (per type): explicit override / template name → verify with
|
|
29670
|
+
* `GetDatabase` or `GetTable`. There is no `aws:cdk:path` tag walk — AWS
|
|
29671
|
+
* rejects `aws:`-prefixed tag writes, so that tag never exists on a real
|
|
29672
|
+
* resource (issue #1134); auto-mode import resolves ids from
|
|
29673
|
+
* CloudFormation's `DescribeStackResources` instead.
|
|
30634
29674
|
*/
|
|
30635
29675
|
/**
|
|
30636
29676
|
* Read the AWS-current Glue resource configuration in CFn-property shape.
|
|
@@ -30751,23 +29791,6 @@ var GlueProvider = class {
|
|
|
30751
29791
|
if (err instanceof EntityNotFoundException) return null;
|
|
30752
29792
|
throw err;
|
|
30753
29793
|
}
|
|
30754
|
-
if (!input.cdkPath) return null;
|
|
30755
|
-
let nextToken;
|
|
30756
|
-
do {
|
|
30757
|
-
const list = await this.getClient().send(new GetDatabasesCommand({
|
|
30758
|
-
...nextToken && { NextToken: nextToken },
|
|
30759
|
-
...catalogId && { CatalogId: catalogId }
|
|
30760
|
-
}));
|
|
30761
|
-
for (const db of list.DatabaseList ?? []) {
|
|
30762
|
-
if (!db.Name) continue;
|
|
30763
|
-
const arn = await this.buildDatabaseArn(db.Name, db.CatalogId);
|
|
30764
|
-
if (await this.tagsMatchCdkPath(arn, input.cdkPath)) return {
|
|
30765
|
-
physicalId: db.Name,
|
|
30766
|
-
attributes: {}
|
|
30767
|
-
};
|
|
30768
|
-
}
|
|
30769
|
-
nextToken = list.NextToken;
|
|
30770
|
-
} while (nextToken);
|
|
30771
29794
|
return null;
|
|
30772
29795
|
}
|
|
30773
29796
|
async importTable(input) {
|
|
@@ -30806,51 +29829,8 @@ var GlueProvider = class {
|
|
|
30806
29829
|
if (err instanceof EntityNotFoundException) return null;
|
|
30807
29830
|
throw err;
|
|
30808
29831
|
}
|
|
30809
|
-
if (!input.cdkPath || !databaseName) return null;
|
|
30810
|
-
let nextToken;
|
|
30811
|
-
do {
|
|
30812
|
-
const list = await this.getClient().send(new GetTablesCommand({
|
|
30813
|
-
DatabaseName: databaseName,
|
|
30814
|
-
...nextToken && { NextToken: nextToken },
|
|
30815
|
-
...catalogId && { CatalogId: catalogId }
|
|
30816
|
-
}));
|
|
30817
|
-
for (const t of list.TableList ?? []) {
|
|
30818
|
-
if (!t.Name) continue;
|
|
30819
|
-
const arn = await this.buildTableArn(databaseName, t.Name, catalogId);
|
|
30820
|
-
if (await this.tagsMatchCdkPath(arn, input.cdkPath)) return {
|
|
30821
|
-
physicalId: `${databaseName}|${t.Name}`,
|
|
30822
|
-
attributes: {}
|
|
30823
|
-
};
|
|
30824
|
-
}
|
|
30825
|
-
nextToken = list.NextToken;
|
|
30826
|
-
} while (nextToken);
|
|
30827
29832
|
return null;
|
|
30828
29833
|
}
|
|
30829
|
-
async tagsMatchCdkPath(arn, cdkPath) {
|
|
30830
|
-
try {
|
|
30831
|
-
return (await this.getClient().send(new GetTagsCommand({ ResourceArn: arn }))).Tags?.[CDK_PATH_TAG] === cdkPath;
|
|
30832
|
-
} catch (err) {
|
|
30833
|
-
if (err instanceof EntityNotFoundException) return false;
|
|
30834
|
-
throw err;
|
|
30835
|
-
}
|
|
30836
|
-
}
|
|
30837
|
-
async buildDatabaseArn(databaseName, catalogId) {
|
|
30838
|
-
return `arn:aws:glue:${await this.getRegion()}:${catalogId ?? await this.getAccountId()}:database/${databaseName}`;
|
|
30839
|
-
}
|
|
30840
|
-
async buildTableArn(databaseName, tableName, catalogId) {
|
|
30841
|
-
return `arn:aws:glue:${await this.getRegion()}:${catalogId ?? await this.getAccountId()}:table/${databaseName}/${tableName}`;
|
|
30842
|
-
}
|
|
30843
|
-
async getRegion() {
|
|
30844
|
-
return await this.getClient().config.region() || this.providerRegion || "us-east-1";
|
|
30845
|
-
}
|
|
30846
|
-
async getAccountId() {
|
|
30847
|
-
if (this.cachedAccountId) return this.cachedAccountId;
|
|
30848
|
-
if (!this.stsClient) this.stsClient = new STSClient(this.providerRegion ? { region: this.providerRegion } : {});
|
|
30849
|
-
const identity = await this.stsClient.send(new GetCallerIdentityCommand({}));
|
|
30850
|
-
if (!identity.Account) throw new Error("Failed to resolve AWS account id from STS");
|
|
30851
|
-
this.cachedAccountId = identity.Account;
|
|
30852
|
-
return this.cachedAccountId;
|
|
30853
|
-
}
|
|
30854
29834
|
};
|
|
30855
29835
|
/**
|
|
30856
29836
|
* SDK Provider for `AWS::Glue::Workflow`.
|
|
@@ -30996,29 +29976,8 @@ var GlueWorkflowProvider = class {
|
|
|
30996
29976
|
if (err instanceof EntityNotFoundException) return null;
|
|
30997
29977
|
throw err;
|
|
30998
29978
|
}
|
|
30999
|
-
if (!input.cdkPath) return null;
|
|
31000
|
-
let nextToken;
|
|
31001
|
-
do {
|
|
31002
|
-
const list = await this.getClient().send(new ListWorkflowsCommand({ ...nextToken && { NextToken: nextToken } }));
|
|
31003
|
-
for (const name of list.Workflows ?? []) {
|
|
31004
|
-
const arn = await this.buildWorkflowArn(name);
|
|
31005
|
-
if (await this.tagsMatchCdkPath(arn, input.cdkPath)) return {
|
|
31006
|
-
physicalId: name,
|
|
31007
|
-
attributes: {}
|
|
31008
|
-
};
|
|
31009
|
-
}
|
|
31010
|
-
nextToken = list.NextToken;
|
|
31011
|
-
} while (nextToken);
|
|
31012
29979
|
return null;
|
|
31013
29980
|
}
|
|
31014
|
-
async tagsMatchCdkPath(arn, cdkPath) {
|
|
31015
|
-
try {
|
|
31016
|
-
return (await this.getClient().send(new GetTagsCommand({ ResourceArn: arn }))).Tags?.[CDK_PATH_TAG] === cdkPath;
|
|
31017
|
-
} catch (err) {
|
|
31018
|
-
if (err instanceof EntityNotFoundException) return false;
|
|
31019
|
-
throw err;
|
|
31020
|
-
}
|
|
31021
|
-
}
|
|
31022
29981
|
async buildWorkflowArn(workflowName) {
|
|
31023
29982
|
return `arn:aws:glue:${await this.getRegion()}:${await this.getAccountId()}:workflow/${workflowName}`;
|
|
31024
29983
|
}
|
|
@@ -31136,15 +30095,6 @@ var GlueSecurityConfigurationProvider = class {
|
|
|
31136
30095
|
if (err instanceof EntityNotFoundException) return null;
|
|
31137
30096
|
throw err;
|
|
31138
30097
|
}
|
|
31139
|
-
if (!explicitName) {
|
|
31140
|
-
let nextToken;
|
|
31141
|
-
do {
|
|
31142
|
-
const list = await this.getClient().send(new GetSecurityConfigurationsCommand({ ...nextToken && { NextToken: nextToken } }));
|
|
31143
|
-
for (const _entry of list.SecurityConfigurations ?? []);
|
|
31144
|
-
nextToken = list.NextToken;
|
|
31145
|
-
} while (nextToken);
|
|
31146
|
-
return null;
|
|
31147
|
-
}
|
|
31148
30098
|
return null;
|
|
31149
30099
|
}
|
|
31150
30100
|
};
|
|
@@ -32548,8 +31498,8 @@ var KMSProvider = class {
|
|
|
32548
31498
|
* KMS keys have no `Properties.KeyName` field — physical IDs are
|
|
32549
31499
|
* AWS-generated UUIDs. So:
|
|
32550
31500
|
* - For `AWS::KMS::Key`: `--resource MyKey=<keyId>` is the only explicit
|
|
32551
|
-
* path; auto-lookup
|
|
32552
|
-
* `
|
|
31501
|
+
* path; there is no auto-lookup (a key reaching here without an explicit
|
|
31502
|
+
* id or a CloudFormation-resolved physical id returns `null`).
|
|
32553
31503
|
* - For `AWS::KMS::Alias`: `Properties.AliasName` is explicit and reliable.
|
|
32554
31504
|
*/
|
|
32555
31505
|
async import(input) {
|
|
@@ -32582,36 +31532,7 @@ var KMSProvider = class {
|
|
|
32582
31532
|
if (err instanceof NotFoundException$2) return null;
|
|
32583
31533
|
throw err;
|
|
32584
31534
|
}
|
|
32585
|
-
|
|
32586
|
-
const match = await importTagWalk({
|
|
32587
|
-
cdkPath: input.cdkPath,
|
|
32588
|
-
logicalId: input.logicalId,
|
|
32589
|
-
listPage: async (marker) => {
|
|
32590
|
-
const list = await this.getClient().send(new ListKeysCommand({ ...marker && { Marker: marker } }));
|
|
32591
|
-
return {
|
|
32592
|
-
items: list.Keys,
|
|
32593
|
-
nextMarker: list.NextMarker
|
|
32594
|
-
};
|
|
32595
|
-
},
|
|
32596
|
-
describe: async (key) => {
|
|
32597
|
-
if (!key.KeyId) return void 0;
|
|
32598
|
-
try {
|
|
32599
|
-
return await this.getClient().send(new ListResourceTagsCommand({ KeyId: key.KeyId }));
|
|
32600
|
-
} catch (err) {
|
|
32601
|
-
if (err.name === "AccessDeniedException" || err instanceof NotFoundException$2) return void 0;
|
|
32602
|
-
throw err;
|
|
32603
|
-
}
|
|
32604
|
-
},
|
|
32605
|
-
tagsOf: (tagsResp) => (tagsResp.Tags ?? []).map((t) => ({
|
|
32606
|
-
Key: t.TagKey,
|
|
32607
|
-
Value: t.TagValue
|
|
32608
|
-
}))
|
|
32609
|
-
});
|
|
32610
|
-
if (!match) return null;
|
|
32611
|
-
return {
|
|
32612
|
-
physicalId: match.summary.KeyId,
|
|
32613
|
-
attributes: {}
|
|
32614
|
-
};
|
|
31535
|
+
return null;
|
|
32615
31536
|
}
|
|
32616
31537
|
};
|
|
32617
31538
|
|
|
@@ -33059,9 +31980,6 @@ var BudgetsBudgetProvider = class {
|
|
|
33059
31980
|
* Lookup order:
|
|
33060
31981
|
* 1. `--resource` override or `Properties.Budget.BudgetName` → verify via
|
|
33061
31982
|
* `DescribeBudget`.
|
|
33062
|
-
* 2. `aws:cdk:path` tag match: walk `DescribeBudgets` and check each
|
|
33063
|
-
* budget's tags via `ListTagsForResource` (budget ARNs are
|
|
33064
|
-
* region-free, so the lookup works from any deploy region).
|
|
33065
31983
|
*/
|
|
33066
31984
|
async import(input) {
|
|
33067
31985
|
const rawBudget = input.properties["Budget"] ?? {};
|
|
@@ -33081,31 +31999,7 @@ var BudgetsBudgetProvider = class {
|
|
|
33081
31999
|
if (error instanceof NotFoundException$5) return null;
|
|
33082
32000
|
throw error;
|
|
33083
32001
|
}
|
|
33084
|
-
|
|
33085
|
-
cdkPath: input.cdkPath,
|
|
33086
|
-
logicalId: input.logicalId,
|
|
33087
|
-
listPage: async (marker) => {
|
|
33088
|
-
const list = await client.send(new DescribeBudgetsCommand({
|
|
33089
|
-
AccountId: accountId,
|
|
33090
|
-
...marker && { NextToken: marker }
|
|
33091
|
-
}));
|
|
33092
|
-
return {
|
|
33093
|
-
items: list.Budgets,
|
|
33094
|
-
nextMarker: list.NextToken
|
|
33095
|
-
};
|
|
33096
|
-
},
|
|
33097
|
-
describe: async (budget) => {
|
|
33098
|
-
if (!budget.BudgetName) return void 0;
|
|
33099
|
-
return await client.send(new ListTagsForResourceCommand$17({ ResourceARN: this.budgetArn(accountId, budget.BudgetName) }));
|
|
33100
|
-
},
|
|
33101
|
-
tagsOf: (tags) => tags.ResourceTags
|
|
33102
|
-
});
|
|
33103
|
-
if (!match) return null;
|
|
33104
|
-
const budgetName = match.summary.BudgetName;
|
|
33105
|
-
return {
|
|
33106
|
-
physicalId: budgetName,
|
|
33107
|
-
attributes: { Arn: this.budgetArn(accountId, budgetName) }
|
|
33108
|
-
};
|
|
32002
|
+
return null;
|
|
33109
32003
|
}
|
|
33110
32004
|
};
|
|
33111
32005
|
|
|
@@ -33359,14 +32253,6 @@ var KinesisStreamProvider = class {
|
|
|
33359
32253
|
* Lookup order:
|
|
33360
32254
|
* 1. `--resource <id>=<name>` override or `Properties.Name` → verify
|
|
33361
32255
|
* with `DescribeStream`.
|
|
33362
|
-
* 2. Walk `ListStreams` (paged via `ExclusiveStartStreamName`) and
|
|
33363
|
-
* match the `aws:cdk:path` tag via `ListTagsForStream(StreamName)`.
|
|
33364
|
-
* The walk runs through the shared `importTagWalk` helper, so the N+1
|
|
33365
|
-
* tag-read burst is retried with exponential backoff when AWS
|
|
33366
|
-
* throttles it instead of aborting the whole import.
|
|
33367
|
-
*
|
|
33368
|
-
* Kinesis tags use the standard `Tag[]` array shape (`Key`/`Value`),
|
|
33369
|
-
* so the walk's `matchesCdkPath` matcher applies directly.
|
|
33370
32256
|
*/
|
|
33371
32257
|
/**
|
|
33372
32258
|
* Read the AWS-current Kinesis stream configuration in CFn-property shape.
|
|
@@ -33430,25 +32316,7 @@ var KinesisStreamProvider = class {
|
|
|
33430
32316
|
if (err instanceof ResourceNotFoundException$8) return null;
|
|
33431
32317
|
throw err;
|
|
33432
32318
|
}
|
|
33433
|
-
|
|
33434
|
-
cdkPath: input.cdkPath,
|
|
33435
|
-
logicalId: input.logicalId,
|
|
33436
|
-
listPage: async (marker) => {
|
|
33437
|
-
const list = await this.getClient().send(new ListStreamsCommand({ ...marker && { ExclusiveStartStreamName: marker } }));
|
|
33438
|
-
const names = list.StreamNames ?? [];
|
|
33439
|
-
return {
|
|
33440
|
-
items: names,
|
|
33441
|
-
nextMarker: list.HasMoreStreams && names.length > 0 ? names[names.length - 1] : void 0
|
|
33442
|
-
};
|
|
33443
|
-
},
|
|
33444
|
-
describe: async (streamName) => await this.getClient().send(new ListTagsForStreamCommand({ StreamName: streamName })),
|
|
33445
|
-
tagsOf: (tagsResp) => tagsResp.Tags
|
|
33446
|
-
});
|
|
33447
|
-
if (!match) return null;
|
|
33448
|
-
return {
|
|
33449
|
-
physicalId: match.summary,
|
|
33450
|
-
attributes: {}
|
|
33451
|
-
};
|
|
32319
|
+
return null;
|
|
33452
32320
|
}
|
|
33453
32321
|
/**
|
|
33454
32322
|
* Poll DescribeStream until the stream reaches ACTIVE status
|
|
@@ -33678,7 +32546,7 @@ var KinesisStreamConsumerProvider = class {
|
|
|
33678
32546
|
if (desc.ConsumerName !== void 0) result["ConsumerName"] = desc.ConsumerName;
|
|
33679
32547
|
if (desc.StreamARN !== void 0) result["StreamARN"] = desc.StreamARN;
|
|
33680
32548
|
try {
|
|
33681
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
32549
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$15({ ResourceARN: physicalId }))).Tags);
|
|
33682
32550
|
} catch (err) {
|
|
33683
32551
|
if (err instanceof ResourceNotFoundException$8) return void 0;
|
|
33684
32552
|
this.logger.debug(`ListTagsForResource(${physicalId}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -34595,19 +33463,6 @@ var EFSProvider = class {
|
|
|
34595
33463
|
if (err instanceof FileSystemNotFound) return null;
|
|
34596
33464
|
throw err;
|
|
34597
33465
|
}
|
|
34598
|
-
if (!input.cdkPath) return null;
|
|
34599
|
-
let marker;
|
|
34600
|
-
do {
|
|
34601
|
-
const list = await this.getClient().send(new DescribeFileSystemsCommand({ ...marker && { Marker: marker } }));
|
|
34602
|
-
for (const fs of list.FileSystems ?? []) {
|
|
34603
|
-
if (!fs.FileSystemId) continue;
|
|
34604
|
-
if (matchesCdkPath(fs.Tags, input.cdkPath)) return {
|
|
34605
|
-
physicalId: fs.FileSystemId,
|
|
34606
|
-
attributes: {}
|
|
34607
|
-
};
|
|
34608
|
-
}
|
|
34609
|
-
marker = list.NextMarker;
|
|
34610
|
-
} while (marker);
|
|
34611
33466
|
return null;
|
|
34612
33467
|
}
|
|
34613
33468
|
async importAccessPoint(input) {
|
|
@@ -34621,23 +33476,6 @@ var EFSProvider = class {
|
|
|
34621
33476
|
if (err instanceof AccessPointNotFound) return null;
|
|
34622
33477
|
throw err;
|
|
34623
33478
|
}
|
|
34624
|
-
if (!input.cdkPath) return null;
|
|
34625
|
-
const fileSystemId = input.properties["FileSystemId"];
|
|
34626
|
-
let nextToken;
|
|
34627
|
-
do {
|
|
34628
|
-
const list = await this.getClient().send(new DescribeAccessPointsCommand({
|
|
34629
|
-
...nextToken && { NextToken: nextToken },
|
|
34630
|
-
...fileSystemId && { FileSystemId: fileSystemId }
|
|
34631
|
-
}));
|
|
34632
|
-
for (const ap of list.AccessPoints ?? []) {
|
|
34633
|
-
if (!ap.AccessPointId) continue;
|
|
34634
|
-
if (matchesCdkPath(ap.Tags, input.cdkPath)) return {
|
|
34635
|
-
physicalId: ap.AccessPointId,
|
|
34636
|
-
attributes: {}
|
|
34637
|
-
};
|
|
34638
|
-
}
|
|
34639
|
-
nextToken = list.NextToken;
|
|
34640
|
-
} while (nextToken);
|
|
34641
33479
|
return null;
|
|
34642
33480
|
}
|
|
34643
33481
|
};
|
|
@@ -35748,8 +34586,8 @@ var FSxFileSystemProvider = class {
|
|
|
35748
34586
|
}
|
|
35749
34587
|
/**
|
|
35750
34588
|
* Adopt an existing FSx file system into cdkd state. Explicit physical
|
|
35751
|
-
* id is verified via `DescribeFileSystems`;
|
|
35752
|
-
*
|
|
34589
|
+
* id is verified via `DescribeFileSystems`; without an override the
|
|
34590
|
+
* resource is reported as not-found.
|
|
35753
34591
|
*/
|
|
35754
34592
|
async import(input) {
|
|
35755
34593
|
if (input.resourceType !== "AWS::FSx::FileSystem") return null;
|
|
@@ -35763,19 +34601,6 @@ var FSxFileSystemProvider = class {
|
|
|
35763
34601
|
if (err instanceof FileSystemNotFound$1) return null;
|
|
35764
34602
|
throw err;
|
|
35765
34603
|
}
|
|
35766
|
-
if (!input.cdkPath) return null;
|
|
35767
|
-
let nextToken;
|
|
35768
|
-
do {
|
|
35769
|
-
const list = await this.getClient().send(new DescribeFileSystemsCommand$1({ ...nextToken && { NextToken: nextToken } }));
|
|
35770
|
-
for (const fs of list.FileSystems ?? []) {
|
|
35771
|
-
if (!fs.FileSystemId) continue;
|
|
35772
|
-
if (matchesCdkPath(fs.Tags, input.cdkPath)) return {
|
|
35773
|
-
physicalId: fs.FileSystemId,
|
|
35774
|
-
attributes: this.buildAttributes(fs)
|
|
35775
|
-
};
|
|
35776
|
-
}
|
|
35777
|
-
nextToken = list.NextToken;
|
|
35778
|
-
} while (nextToken);
|
|
35779
34604
|
return null;
|
|
35780
34605
|
}
|
|
35781
34606
|
};
|
|
@@ -35801,18 +34626,6 @@ const CREATE_READY_STATES = /* @__PURE__ */ new Set(["WAITING", "RUNNING"]);
|
|
|
35801
34626
|
*/
|
|
35802
34627
|
const TERMINAL_STATES = /* @__PURE__ */ new Set(["TERMINATED", "TERMINATED_WITH_ERRORS"]);
|
|
35803
34628
|
/**
|
|
35804
|
-
* Cluster states that mean "the cluster is alive" — the `ListClusters` filter
|
|
35805
|
-
* used by `import()` discovery so a long-gone `TERMINATED*` cluster is never
|
|
35806
|
-
* adopted. Everything except the two `TERMINAL_STATES`.
|
|
35807
|
-
*/
|
|
35808
|
-
const NON_TERMINATED_STATES = [
|
|
35809
|
-
"STARTING",
|
|
35810
|
-
"BOOTSTRAPPING",
|
|
35811
|
-
"RUNNING",
|
|
35812
|
-
"WAITING",
|
|
35813
|
-
"TERMINATING"
|
|
35814
|
-
];
|
|
35815
|
-
/**
|
|
35816
34629
|
* Top-level CFn properties that map to a MUTABLE EMR API surface. Every other
|
|
35817
34630
|
* property is either registry-createOnly (routed through DELETE+CREATE by the
|
|
35818
34631
|
* replacement-detection layer) or lives inside the `Instances` block (handled
|
|
@@ -36321,12 +35134,6 @@ var EMRClusterProvider = class {
|
|
|
36321
35134
|
* the physical id — a cluster's id (`j-...`) is service-generated, while
|
|
36322
35135
|
* the template `Name` is only the display name — so no name fallback
|
|
36323
35136
|
* applies (`resolveExplicitPhysicalId(..., null)`).
|
|
36324
|
-
* 2. Tag-based lookup: `ListClusters` filtered to the non-terminated states
|
|
36325
|
-
* (a `TERMINATED*` cluster is gone and must never be adopted), then a
|
|
36326
|
-
* `DescribeCluster` per candidate to read `Tags` (the list summaries do
|
|
36327
|
-
* NOT carry tags) and match `aws:cdk:path`. The walk runs through the
|
|
36328
|
-
* shared `importTagWalk` helper, so each list page / describe is retried
|
|
36329
|
-
* with exponential backoff when AWS throttles the N+1 read burst.
|
|
36330
35137
|
*/
|
|
36331
35138
|
async import(input) {
|
|
36332
35139
|
const explicit = resolveExplicitPhysicalId(input, null);
|
|
@@ -36338,42 +35145,20 @@ var EMRClusterProvider = class {
|
|
|
36338
35145
|
attributes: this.buildAttributes(cluster)
|
|
36339
35146
|
};
|
|
36340
35147
|
}
|
|
36341
|
-
|
|
36342
|
-
cdkPath: input.cdkPath,
|
|
36343
|
-
logicalId: input.logicalId,
|
|
36344
|
-
listPage: async (marker) => {
|
|
36345
|
-
const list = await this.getClient().send(new ListClustersCommand$1({
|
|
36346
|
-
ClusterStates: [...NON_TERMINATED_STATES],
|
|
36347
|
-
...marker && { Marker: marker }
|
|
36348
|
-
}));
|
|
36349
|
-
return {
|
|
36350
|
-
items: list.Clusters,
|
|
36351
|
-
nextMarker: list.Marker
|
|
36352
|
-
};
|
|
36353
|
-
},
|
|
36354
|
-
describe: async (summary) => summary.Id ? await this.describeClusterOrUndefined(summary.Id) : void 0,
|
|
36355
|
-
tagsOf: (cluster) => cluster.Tags
|
|
36356
|
-
});
|
|
36357
|
-
if (!match) return null;
|
|
36358
|
-
return {
|
|
36359
|
-
physicalId: match.summary.Id,
|
|
36360
|
-
attributes: this.buildAttributes(match.detail)
|
|
36361
|
-
};
|
|
35148
|
+
return null;
|
|
36362
35149
|
}
|
|
36363
35150
|
/**
|
|
36364
35151
|
* `DescribeCluster` that maps a not-found (`InvalidRequestException` — the
|
|
36365
35152
|
* cluster id is unknown in this region / aged out of Describe) to
|
|
36366
35153
|
* `undefined` instead of throwing, so `import()` can treat it as "no match"
|
|
36367
|
-
* 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.
|
|
36368
35156
|
*
|
|
36369
|
-
*
|
|
36370
|
-
*
|
|
36371
|
-
*
|
|
36372
|
-
*
|
|
36373
|
-
*
|
|
36374
|
-
* adopt the existing one. The walk logs each skip at debug so the case is at
|
|
36375
|
-
* least visible under `--verbose`; narrowing the mapping needs a
|
|
36376
|
-
* 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.
|
|
36377
35162
|
*/
|
|
36378
35163
|
async describeClusterOrUndefined(clusterId) {
|
|
36379
35164
|
try {
|
|
@@ -38305,25 +37090,7 @@ var FirehoseProvider = class {
|
|
|
38305
37090
|
if (err instanceof ResourceNotFoundException$10) return null;
|
|
38306
37091
|
throw err;
|
|
38307
37092
|
}
|
|
38308
|
-
|
|
38309
|
-
cdkPath: input.cdkPath,
|
|
38310
|
-
logicalId: input.logicalId,
|
|
38311
|
-
listPage: async (marker) => {
|
|
38312
|
-
const list = await this.getClient().send(new ListDeliveryStreamsCommand({ ...marker && { ExclusiveStartDeliveryStreamName: marker } }));
|
|
38313
|
-
const names = list.DeliveryStreamNames ?? [];
|
|
38314
|
-
return {
|
|
38315
|
-
items: names,
|
|
38316
|
-
nextMarker: list.HasMoreDeliveryStreams && names.length > 0 ? names[names.length - 1] : void 0
|
|
38317
|
-
};
|
|
38318
|
-
},
|
|
38319
|
-
describe: async (name) => await this.getClient().send(new ListTagsForDeliveryStreamCommand({ DeliveryStreamName: name })),
|
|
38320
|
-
tagsOf: (tagsResp) => tagsResp.Tags
|
|
38321
|
-
});
|
|
38322
|
-
if (!match) return null;
|
|
38323
|
-
return {
|
|
38324
|
-
physicalId: match.summary,
|
|
38325
|
-
attributes: {}
|
|
38326
|
-
};
|
|
37093
|
+
return null;
|
|
38327
37094
|
}
|
|
38328
37095
|
/**
|
|
38329
37096
|
* Wait for a delivery stream to become ACTIVE.
|
|
@@ -38829,32 +37596,7 @@ var CloudTrailProvider = class {
|
|
|
38829
37596
|
if (err instanceof TrailNotFoundException) return null;
|
|
38830
37597
|
throw err;
|
|
38831
37598
|
}
|
|
38832
|
-
|
|
38833
|
-
cdkPath: input.cdkPath,
|
|
38834
|
-
logicalId: input.logicalId,
|
|
38835
|
-
listPage: async (marker) => {
|
|
38836
|
-
const list = await this.getClient().send(new ListTrailsCommand({ ...marker && { NextToken: marker } }));
|
|
38837
|
-
return {
|
|
38838
|
-
items: list.Trails,
|
|
38839
|
-
nextMarker: list.NextToken
|
|
38840
|
-
};
|
|
38841
|
-
},
|
|
38842
|
-
describe: async (trail) => {
|
|
38843
|
-
if (!trail.TrailARN || !trail.Name) return void 0;
|
|
38844
|
-
try {
|
|
38845
|
-
return await this.getClient().send(new ListTagsCommand$1({ ResourceIdList: [trail.TrailARN] }));
|
|
38846
|
-
} catch (err) {
|
|
38847
|
-
if (err instanceof TrailNotFoundException) return void 0;
|
|
38848
|
-
throw err;
|
|
38849
|
-
}
|
|
38850
|
-
},
|
|
38851
|
-
tagsOf: (tagsResp) => tagsResp.ResourceTagList?.[0]?.TagsList
|
|
38852
|
-
});
|
|
38853
|
-
if (!match) return null;
|
|
38854
|
-
return {
|
|
38855
|
-
physicalId: match.summary.Name,
|
|
38856
|
-
attributes: {}
|
|
38857
|
-
};
|
|
37599
|
+
return null;
|
|
38858
37600
|
}
|
|
38859
37601
|
};
|
|
38860
37602
|
|
|
@@ -39102,11 +37844,11 @@ var CodeBuildProvider = class {
|
|
|
39102
37844
|
/**
|
|
39103
37845
|
* Adopt an existing CodeBuild project into cdkd state.
|
|
39104
37846
|
*
|
|
39105
|
-
* Lookup
|
|
39106
|
-
*
|
|
39107
|
-
*
|
|
39108
|
-
*
|
|
39109
|
-
*
|
|
37847
|
+
* Lookup: `--resource` override or `Properties.Name` → verify via
|
|
37848
|
+
* `BatchGetProjects`. There is no `aws:cdk:path` tag walk — AWS rejects
|
|
37849
|
+
* `aws:`-prefixed tag writes, so that tag never exists on a real resource
|
|
37850
|
+
* (issue #1134); auto-mode import resolves ids from CloudFormation's
|
|
37851
|
+
* `DescribeStackResources` instead.
|
|
39110
37852
|
*/
|
|
39111
37853
|
/**
|
|
39112
37854
|
* Read the AWS-current CodeBuild Project configuration in CFn-property shape.
|
|
@@ -39290,24 +38032,6 @@ var CodeBuildProvider = class {
|
|
|
39290
38032
|
if (err instanceof ResourceNotFoundException$11) return null;
|
|
39291
38033
|
throw err;
|
|
39292
38034
|
}
|
|
39293
|
-
if (!input.cdkPath) return null;
|
|
39294
|
-
let nextToken;
|
|
39295
|
-
do {
|
|
39296
|
-
const list = await this.getClient().send(new ListProjectsCommand({ ...nextToken && { nextToken } }));
|
|
39297
|
-
const names = (list.projects ?? []).filter((n) => typeof n === "string");
|
|
39298
|
-
if (names.length > 0) {
|
|
39299
|
-
const batch = await this.getClient().send(new BatchGetProjectsCommand({ names }));
|
|
39300
|
-
for (const proj of batch.projects ?? []) {
|
|
39301
|
-
if (!proj.name) continue;
|
|
39302
|
-
const tags = proj.tags ?? [];
|
|
39303
|
-
for (const t of tags) if (t.key === "aws:cdk:path" && t.value === input.cdkPath) return {
|
|
39304
|
-
physicalId: proj.name,
|
|
39305
|
-
attributes: {}
|
|
39306
|
-
};
|
|
39307
|
-
}
|
|
39308
|
-
}
|
|
39309
|
-
nextToken = list.nextToken;
|
|
39310
|
-
} while (nextToken);
|
|
39311
38035
|
return null;
|
|
39312
38036
|
}
|
|
39313
38037
|
};
|
|
@@ -39677,7 +38401,7 @@ var CodeCommitRepositoryProvider = class {
|
|
|
39677
38401
|
if (!metadata) return void 0;
|
|
39678
38402
|
let tags = [];
|
|
39679
38403
|
if (metadata.Arn) try {
|
|
39680
|
-
tags = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
38404
|
+
tags = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$16({ resourceArn: metadata.Arn }))).tags);
|
|
39681
38405
|
} catch (err) {
|
|
39682
38406
|
if (err instanceof RepositoryDoesNotExistException) return void 0;
|
|
39683
38407
|
throw err;
|
|
@@ -39712,9 +38436,6 @@ var CodeCommitRepositoryProvider = class {
|
|
|
39712
38436
|
* Lookup order:
|
|
39713
38437
|
* 1. `--resource` override or `Properties.RepositoryName` → verify via
|
|
39714
38438
|
* `GetRepository`.
|
|
39715
|
-
* 2. `ListRepositories` paginated, then `ListTagsForResource(arn)` per
|
|
39716
|
-
* repository to match `aws:cdk:path` (CodeCommit uses the
|
|
39717
|
-
* `Record<string, string>` tag-map shape).
|
|
39718
38439
|
*/
|
|
39719
38440
|
async import(input) {
|
|
39720
38441
|
const explicit = resolveExplicitPhysicalId(input, "RepositoryName");
|
|
@@ -39728,42 +38449,7 @@ var CodeCommitRepositoryProvider = class {
|
|
|
39728
38449
|
if (err instanceof RepositoryDoesNotExistException) return null;
|
|
39729
38450
|
throw err;
|
|
39730
38451
|
}
|
|
39731
|
-
|
|
39732
|
-
cdkPath: input.cdkPath,
|
|
39733
|
-
logicalId: input.logicalId,
|
|
39734
|
-
listPage: async (marker) => {
|
|
39735
|
-
const list = await this.getClient().send(new ListRepositoriesCommand({ ...marker && { nextToken: marker } }));
|
|
39736
|
-
return {
|
|
39737
|
-
items: list.repositories,
|
|
39738
|
-
nextMarker: list.nextToken
|
|
39739
|
-
};
|
|
39740
|
-
},
|
|
39741
|
-
describe: async (repo) => {
|
|
39742
|
-
if (!repo.repositoryName) return void 0;
|
|
39743
|
-
let metadata;
|
|
39744
|
-
try {
|
|
39745
|
-
metadata = await this.getRepositoryMetadata(repo.repositoryName);
|
|
39746
|
-
} catch (err) {
|
|
39747
|
-
if (err instanceof RepositoryDoesNotExistException) return void 0;
|
|
39748
|
-
throw err;
|
|
39749
|
-
}
|
|
39750
|
-
if (!metadata?.Arn) return void 0;
|
|
39751
|
-
const tagsResp = await this.getClient().send(new ListTagsForResourceCommand$19({ resourceArn: metadata.Arn }));
|
|
39752
|
-
return {
|
|
39753
|
-
metadata,
|
|
39754
|
-
tags: tagsResp.tags
|
|
39755
|
-
};
|
|
39756
|
-
},
|
|
39757
|
-
tagsOf: (detail) => Object.entries(detail.tags ?? {}).map(([Key, Value]) => ({
|
|
39758
|
-
Key,
|
|
39759
|
-
Value
|
|
39760
|
-
}))
|
|
39761
|
-
});
|
|
39762
|
-
if (!match) return null;
|
|
39763
|
-
return {
|
|
39764
|
-
physicalId: match.summary.repositoryName,
|
|
39765
|
-
attributes: this.toAttributes(match.detail.metadata)
|
|
39766
|
-
};
|
|
38452
|
+
return null;
|
|
39767
38453
|
}
|
|
39768
38454
|
/**
|
|
39769
38455
|
* Seed the repository's initial commit from the CFn `Code` property.
|
|
@@ -40078,9 +38764,6 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
40078
38764
|
* 1. `--resource` override (`knownPhysicalId`) -> verify via
|
|
40079
38765
|
* GetLifecyclePolicy. There is no template name property — the policy
|
|
40080
38766
|
* id is service-generated — so no name fallback applies.
|
|
40081
|
-
* 2. Tag-based lookup: GetLifecyclePolicies returns every policy summary
|
|
40082
|
-
* WITH its tag map in a single unpaginated call, so the `aws:cdk:path`
|
|
40083
|
-
* match needs no per-policy follow-up.
|
|
40084
38767
|
*/
|
|
40085
38768
|
async import(input) {
|
|
40086
38769
|
if (input.knownPhysicalId) try {
|
|
@@ -40093,23 +38776,7 @@ var DLMLifecyclePolicyProvider = class {
|
|
|
40093
38776
|
if (err instanceof ResourceNotFoundException$12) return null;
|
|
40094
38777
|
throw err;
|
|
40095
38778
|
}
|
|
40096
|
-
|
|
40097
|
-
cdkPath: input.cdkPath,
|
|
40098
|
-
logicalId: input.logicalId,
|
|
40099
|
-
listPage: async () => {
|
|
40100
|
-
return { items: (await this.getClient().send(new GetLifecyclePoliciesCommand({}))).Policies };
|
|
40101
|
-
},
|
|
40102
|
-
describe: async (policy) => policy.PolicyId ? policy : void 0,
|
|
40103
|
-
tagsOf: (policy) => Object.entries(policy.Tags ?? {}).map(([Key, Value]) => ({
|
|
40104
|
-
Key,
|
|
40105
|
-
Value
|
|
40106
|
-
}))
|
|
40107
|
-
});
|
|
40108
|
-
if (!match) return null;
|
|
40109
|
-
return {
|
|
40110
|
-
physicalId: match.summary.PolicyId,
|
|
40111
|
-
attributes: {}
|
|
40112
|
-
};
|
|
38779
|
+
return null;
|
|
40113
38780
|
}
|
|
40114
38781
|
};
|
|
40115
38782
|
|
|
@@ -40318,7 +38985,7 @@ var S3VectorsProvider = class {
|
|
|
40318
38985
|
if (Object.keys(enc).length > 0) result["EncryptionConfiguration"] = enc;
|
|
40319
38986
|
}
|
|
40320
38987
|
if (bucket?.vectorBucketArn) try {
|
|
40321
|
-
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$
|
|
38988
|
+
result["Tags"] = normalizeAwsTagsToCfn((await this.getClient().send(new ListTagsForResourceCommand$17({ resourceArn: bucket.vectorBucketArn }))).tags);
|
|
40322
38989
|
} catch (err) {
|
|
40323
38990
|
this.logger.debug(`S3Vectors ListTagsForResource(${bucket.vectorBucketArn}) failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
40324
38991
|
result["Tags"] = [];
|
|
@@ -40332,8 +38999,6 @@ var S3VectorsProvider = class {
|
|
|
40332
38999
|
* Lookup order:
|
|
40333
39000
|
* 1. `--resource <id>=<name>` override or `Properties.VectorBucketName`
|
|
40334
39001
|
* → verify via `GetVectorBucket`. The physical id is the bucket name.
|
|
40335
|
-
* 2. `ListVectorBuckets` paginator + `ListTagsForResource(resourceArn)`
|
|
40336
|
-
* (tags map keyed by tag name) and match `aws:cdk:path`.
|
|
40337
39002
|
*/
|
|
40338
39003
|
async import(input) {
|
|
40339
39004
|
const explicit = input.knownPhysicalId ?? (typeof input.properties?.["VectorBucketName"] === "string" && input.properties["VectorBucketName"].length > 0 ? input.properties["VectorBucketName"] : void 0);
|
|
@@ -40347,35 +39012,7 @@ var S3VectorsProvider = class {
|
|
|
40347
39012
|
if (this.isNotFoundError(err)) return null;
|
|
40348
39013
|
throw err;
|
|
40349
39014
|
}
|
|
40350
|
-
|
|
40351
|
-
cdkPath: input.cdkPath,
|
|
40352
|
-
logicalId: input.logicalId,
|
|
40353
|
-
listPage: async (marker) => {
|
|
40354
|
-
const list = await this.getClient().send(new ListVectorBucketsCommand({ ...marker && { nextToken: marker } }));
|
|
40355
|
-
return {
|
|
40356
|
-
items: list.vectorBuckets,
|
|
40357
|
-
nextMarker: list.nextToken
|
|
40358
|
-
};
|
|
40359
|
-
},
|
|
40360
|
-
describe: async (bucket) => {
|
|
40361
|
-
if (!bucket.vectorBucketName || !bucket.vectorBucketArn) return void 0;
|
|
40362
|
-
try {
|
|
40363
|
-
return await this.getClient().send(new ListTagsForResourceCommand$20({ resourceArn: bucket.vectorBucketArn }));
|
|
40364
|
-
} catch (err) {
|
|
40365
|
-
if (this.isNotFoundError(err)) return void 0;
|
|
40366
|
-
throw err;
|
|
40367
|
-
}
|
|
40368
|
-
},
|
|
40369
|
-
tagsOf: (tagsResp) => Object.entries(tagsResp.tags ?? {}).map(([Key, Value]) => ({
|
|
40370
|
-
Key,
|
|
40371
|
-
Value
|
|
40372
|
-
}))
|
|
40373
|
-
});
|
|
40374
|
-
if (!match) return null;
|
|
40375
|
-
return {
|
|
40376
|
-
physicalId: match.summary.vectorBucketName,
|
|
40377
|
-
attributes: {}
|
|
40378
|
-
};
|
|
39015
|
+
return null;
|
|
40379
39016
|
}
|
|
40380
39017
|
isNotFoundError(error) {
|
|
40381
39018
|
if (error instanceof Error) {
|
|
@@ -40588,10 +39225,6 @@ var S3DirectoryBucketProvider = class {
|
|
|
40588
39225
|
* Lookup order:
|
|
40589
39226
|
* 1. `--resource <id>=<name>` override or `Properties.BucketName` →
|
|
40590
39227
|
* verify via `HeadBucket`.
|
|
40591
|
-
* 2. `ListDirectoryBuckets` paginator + `GetBucketTagging` (TagSet:
|
|
40592
|
-
* Tag[]) and match `aws:cdk:path`. `GetBucketTagging` may surface
|
|
40593
|
-
* `NoSuchTagSet` / `AccessDenied` per-bucket — those are skipped
|
|
40594
|
-
* rather than fatal.
|
|
40595
39228
|
*/
|
|
40596
39229
|
async import(input) {
|
|
40597
39230
|
const explicit = resolveExplicitPhysicalId(input, "BucketName");
|
|
@@ -40606,33 +39239,7 @@ var S3DirectoryBucketProvider = class {
|
|
|
40606
39239
|
if (e.name === "NotFound" || e.name === "NoSuchBucket") return null;
|
|
40607
39240
|
throw err;
|
|
40608
39241
|
}
|
|
40609
|
-
|
|
40610
|
-
cdkPath: input.cdkPath,
|
|
40611
|
-
logicalId: input.logicalId,
|
|
40612
|
-
listPage: async (token) => {
|
|
40613
|
-
const list = await this.s3Client.send(new ListDirectoryBucketsCommand({ ...token && { ContinuationToken: token } }));
|
|
40614
|
-
return {
|
|
40615
|
-
items: list.Buckets,
|
|
40616
|
-
nextMarker: list.ContinuationToken
|
|
40617
|
-
};
|
|
40618
|
-
},
|
|
40619
|
-
describe: async (b) => {
|
|
40620
|
-
if (!b.Name) return void 0;
|
|
40621
|
-
try {
|
|
40622
|
-
return await this.s3Client.send(new GetBucketTaggingCommand({ Bucket: b.Name }));
|
|
40623
|
-
} catch (err) {
|
|
40624
|
-
const e = err;
|
|
40625
|
-
if (e.name === "NoSuchTagSet" || e.name === "AccessDenied") return void 0;
|
|
40626
|
-
throw err;
|
|
40627
|
-
}
|
|
40628
|
-
},
|
|
40629
|
-
tagsOf: (tagging) => tagging.TagSet
|
|
40630
|
-
});
|
|
40631
|
-
if (!match) return null;
|
|
40632
|
-
return {
|
|
40633
|
-
physicalId: match.summary.Name,
|
|
40634
|
-
attributes: {}
|
|
40635
|
-
};
|
|
39242
|
+
return null;
|
|
40636
39243
|
}
|
|
40637
39244
|
};
|
|
40638
39245
|
|
|
@@ -40748,7 +39355,7 @@ var S3TablesProvider = class {
|
|
|
40748
39355
|
if (!namespaceName) continue;
|
|
40749
39356
|
let tableContinuationToken;
|
|
40750
39357
|
do {
|
|
40751
|
-
const tablesResult = await this.getClient().send(new ListTablesCommand
|
|
39358
|
+
const tablesResult = await this.getClient().send(new ListTablesCommand({
|
|
40752
39359
|
tableBucketARN,
|
|
40753
39360
|
namespace: namespaceName,
|
|
40754
39361
|
continuationToken: tableContinuationToken
|
|
@@ -40940,16 +39547,10 @@ var S3TablesProvider = class {
|
|
|
40940
39547
|
/**
|
|
40941
39548
|
* Adopt an existing S3 Tables resource into cdkd state.
|
|
40942
39549
|
*
|
|
40943
|
-
* - **AWS::S3Tables::TableBucket**:
|
|
40944
|
-
* `
|
|
40945
|
-
*
|
|
40946
|
-
*
|
|
40947
|
-
* - **AWS::S3Tables::Table**: tag-based auto-lookup walks every
|
|
40948
|
-
* table bucket → namespace → table and calls `ListTagsForResource`
|
|
40949
|
-
* on each table ARN; matches `aws:cdk:path`.
|
|
40950
|
-
* - **AWS::S3Tables::Namespace**: explicit-override only. Namespaces
|
|
40951
|
-
* are not taggable in S3 Tables (`ListTagsForResource` accepts only
|
|
40952
|
-
* table-bucket or table ARNs), so auto-lookup is impossible.
|
|
39550
|
+
* - **AWS::S3Tables::TableBucket**: `--resource <id>=<arn>` override, or
|
|
39551
|
+
* a `Properties.TableBucketName` match against `ListTableBuckets`.
|
|
39552
|
+
* - **AWS::S3Tables::Table**: explicit-override only.
|
|
39553
|
+
* - **AWS::S3Tables::Namespace**: explicit-override only.
|
|
40953
39554
|
*/
|
|
40954
39555
|
async import(input) {
|
|
40955
39556
|
switch (input.resourceType) {
|
|
@@ -40971,24 +39572,16 @@ var S3TablesProvider = class {
|
|
|
40971
39572
|
throw err;
|
|
40972
39573
|
}
|
|
40973
39574
|
const desiredName = typeof input.properties?.["TableBucketName"] === "string" ? input.properties["TableBucketName"] : void 0;
|
|
39575
|
+
if (!desiredName) return null;
|
|
40974
39576
|
let token;
|
|
40975
39577
|
do {
|
|
40976
39578
|
const list = await this.getClient().send(new ListTableBucketsCommand({ ...token && { continuationToken: token } }));
|
|
40977
39579
|
for (const bucket of list.tableBuckets ?? []) {
|
|
40978
39580
|
if (!bucket.arn) continue;
|
|
40979
|
-
if (
|
|
39581
|
+
if (bucket.name === desiredName) return {
|
|
40980
39582
|
physicalId: bucket.arn,
|
|
40981
39583
|
attributes: {}
|
|
40982
39584
|
};
|
|
40983
|
-
if (input.cdkPath) try {
|
|
40984
|
-
if ((await this.getClient().send(new ListTagsForResourceCommand$21({ resourceArn: bucket.arn }))).tags?.["aws:cdk:path"] === input.cdkPath) return {
|
|
40985
|
-
physicalId: bucket.arn,
|
|
40986
|
-
attributes: {}
|
|
40987
|
-
};
|
|
40988
|
-
} catch (err) {
|
|
40989
|
-
if (err instanceof NotFoundException$6) continue;
|
|
40990
|
-
throw err;
|
|
40991
|
-
}
|
|
40992
39585
|
}
|
|
40993
39586
|
token = list.continuationToken;
|
|
40994
39587
|
} while (token);
|
|
@@ -41023,48 +39616,6 @@ var S3TablesProvider = class {
|
|
|
41023
39616
|
attributes: {}
|
|
41024
39617
|
};
|
|
41025
39618
|
}
|
|
41026
|
-
if (!input.cdkPath) return null;
|
|
41027
|
-
let bucketToken;
|
|
41028
|
-
do {
|
|
41029
|
-
const buckets = await this.getClient().send(new ListTableBucketsCommand({ ...bucketToken && { continuationToken: bucketToken } }));
|
|
41030
|
-
for (const bucket of buckets.tableBuckets ?? []) {
|
|
41031
|
-
if (!bucket.arn) continue;
|
|
41032
|
-
let nsToken;
|
|
41033
|
-
do {
|
|
41034
|
-
const namespaces = await this.getClient().send(new ListNamespacesCommand$1({
|
|
41035
|
-
tableBucketARN: bucket.arn,
|
|
41036
|
-
...nsToken && { continuationToken: nsToken }
|
|
41037
|
-
}));
|
|
41038
|
-
for (const ns of namespaces.namespaces ?? []) {
|
|
41039
|
-
const namespaceName = ns.namespace?.[0];
|
|
41040
|
-
if (!namespaceName) continue;
|
|
41041
|
-
let tableToken;
|
|
41042
|
-
do {
|
|
41043
|
-
const tables = await this.getClient().send(new ListTablesCommand$1({
|
|
41044
|
-
tableBucketARN: bucket.arn,
|
|
41045
|
-
namespace: namespaceName,
|
|
41046
|
-
...tableToken && { continuationToken: tableToken }
|
|
41047
|
-
}));
|
|
41048
|
-
for (const table of tables.tables ?? []) {
|
|
41049
|
-
if (!table.name || !table.tableARN) continue;
|
|
41050
|
-
try {
|
|
41051
|
-
if ((await this.getClient().send(new ListTagsForResourceCommand$21({ resourceArn: table.tableARN }))).tags?.["aws:cdk:path"] === input.cdkPath) return {
|
|
41052
|
-
physicalId: `${bucket.arn}|${namespaceName}|${table.name}`,
|
|
41053
|
-
attributes: {}
|
|
41054
|
-
};
|
|
41055
|
-
} catch (err) {
|
|
41056
|
-
if (err instanceof NotFoundException$6) continue;
|
|
41057
|
-
throw err;
|
|
41058
|
-
}
|
|
41059
|
-
}
|
|
41060
|
-
tableToken = tables.continuationToken;
|
|
41061
|
-
} while (tableToken);
|
|
41062
|
-
}
|
|
41063
|
-
nsToken = namespaces.continuationToken;
|
|
41064
|
-
} while (nsToken);
|
|
41065
|
-
}
|
|
41066
|
-
bucketToken = buckets.continuationToken;
|
|
41067
|
-
} while (bucketToken);
|
|
41068
39619
|
return null;
|
|
41069
39620
|
}
|
|
41070
39621
|
async deleteTable(logicalId, physicalId, resourceType, context) {
|
|
@@ -41144,7 +39695,7 @@ var S3TablesProvider = class {
|
|
|
41144
39695
|
*/
|
|
41145
39696
|
async readTagsBestEffort(resourceArn) {
|
|
41146
39697
|
try {
|
|
41147
|
-
const tags = (await this.getClient().send(new ListTagsForResourceCommand$
|
|
39698
|
+
const tags = (await this.getClient().send(new ListTagsForResourceCommand$18({ resourceArn }))).tags ?? {};
|
|
41148
39699
|
const out = [];
|
|
41149
39700
|
for (const [Key, Value] of Object.entries(tags)) out.push({
|
|
41150
39701
|
Key,
|
|
@@ -41546,8 +40097,6 @@ var ECRProvider = class {
|
|
|
41546
40097
|
* Lookup order:
|
|
41547
40098
|
* 1. `--resource` override or `Properties.RepositoryName` → verify via
|
|
41548
40099
|
* `DescribeRepositories`.
|
|
41549
|
-
* 2. `DescribeRepositories` paginated, then `ListTagsForResource(arn)`
|
|
41550
|
-
* per repository to match `aws:cdk:path` (`Tag[]` array shape).
|
|
41551
40100
|
*/
|
|
41552
40101
|
async import(input) {
|
|
41553
40102
|
const explicit = resolveExplicitPhysicalId(input, "RepositoryName");
|
|
@@ -41560,32 +40109,7 @@ var ECRProvider = class {
|
|
|
41560
40109
|
if (err instanceof RepositoryNotFoundException) return null;
|
|
41561
40110
|
throw err;
|
|
41562
40111
|
}
|
|
41563
|
-
|
|
41564
|
-
cdkPath: input.cdkPath,
|
|
41565
|
-
logicalId: input.logicalId,
|
|
41566
|
-
listPage: async (marker) => {
|
|
41567
|
-
const list = await this.getClient().send(new DescribeRepositoriesCommand({ ...marker && { nextToken: marker } }));
|
|
41568
|
-
return {
|
|
41569
|
-
items: list.repositories,
|
|
41570
|
-
nextMarker: list.nextToken
|
|
41571
|
-
};
|
|
41572
|
-
},
|
|
41573
|
-
describe: async (repo) => {
|
|
41574
|
-
if (!repo.repositoryArn || !repo.repositoryName) return void 0;
|
|
41575
|
-
try {
|
|
41576
|
-
return await this.getClient().send(new ListTagsForResourceCommand$8({ resourceArn: repo.repositoryArn }));
|
|
41577
|
-
} catch (err) {
|
|
41578
|
-
if (err instanceof RepositoryNotFoundException) return void 0;
|
|
41579
|
-
throw err;
|
|
41580
|
-
}
|
|
41581
|
-
},
|
|
41582
|
-
tagsOf: (tagsResp) => tagsResp.tags
|
|
41583
|
-
});
|
|
41584
|
-
if (!match) return null;
|
|
41585
|
-
return {
|
|
41586
|
-
physicalId: match.summary.repositoryName,
|
|
41587
|
-
attributes: {}
|
|
41588
|
-
};
|
|
40112
|
+
return null;
|
|
41589
40113
|
}
|
|
41590
40114
|
};
|
|
41591
40115
|
|
|
@@ -42643,10 +41167,6 @@ var ACMCertificateProvider = class {
|
|
|
42643
41167
|
*
|
|
42644
41168
|
* Lookup order:
|
|
42645
41169
|
* 1. `--resource` override (must be an ARN — ACM has no other unique id).
|
|
42646
|
-
* 2. Tag-based `aws:cdk:path` match across `ListCertificates` +
|
|
42647
|
-
* `ListTagsForCertificate`. NOTE: ACM has no `Scope: Local` filter —
|
|
42648
|
-
* `ListCertificates` returns customer-managed certs only (AWS-managed
|
|
42649
|
-
* certs are not surfaced via this API), so no extra guard is needed.
|
|
42650
41170
|
*/
|
|
42651
41171
|
async import(input) {
|
|
42652
41172
|
if (input.knownPhysicalId) {
|
|
@@ -42666,36 +41186,7 @@ var ACMCertificateProvider = class {
|
|
|
42666
41186
|
throw err;
|
|
42667
41187
|
}
|
|
42668
41188
|
}
|
|
42669
|
-
|
|
42670
|
-
cdkPath: input.cdkPath,
|
|
42671
|
-
logicalId: input.logicalId,
|
|
42672
|
-
listPage: async (marker) => {
|
|
42673
|
-
const list = await this.acmClient.send(new ListCertificatesCommand({ ...marker && { NextToken: marker } }));
|
|
42674
|
-
return {
|
|
42675
|
-
items: list.CertificateSummaryList,
|
|
42676
|
-
nextMarker: list.NextToken
|
|
42677
|
-
};
|
|
42678
|
-
},
|
|
42679
|
-
describe: async (summary) => {
|
|
42680
|
-
if (!summary.CertificateArn) return void 0;
|
|
42681
|
-
try {
|
|
42682
|
-
return await this.acmClient.send(new ListTagsForCertificateCommand({ CertificateArn: summary.CertificateArn }));
|
|
42683
|
-
} catch (err) {
|
|
42684
|
-
if (err instanceof ResourceNotFoundException$6) return void 0;
|
|
42685
|
-
throw err;
|
|
42686
|
-
}
|
|
42687
|
-
},
|
|
42688
|
-
tagsOf: (tagsResp) => tagsResp.Tags
|
|
42689
|
-
});
|
|
42690
|
-
if (!match) return null;
|
|
42691
|
-
const arn = match.summary.CertificateArn;
|
|
42692
|
-
return {
|
|
42693
|
-
physicalId: arn,
|
|
42694
|
-
attributes: {
|
|
42695
|
-
Arn: arn,
|
|
42696
|
-
CertificateArn: arn
|
|
42697
|
-
}
|
|
42698
|
-
};
|
|
41189
|
+
return null;
|
|
42699
41190
|
}
|
|
42700
41191
|
/**
|
|
42701
41192
|
* Poll `DescribeCertificate` until status === `ISSUED`. On the FIRST poll
|
|
@@ -43125,15 +41616,17 @@ async function deployCommand(stacks, options) {
|
|
|
43125
41616
|
logger.info(cyan(synthesisStatusMessage(app, "Synthesizing CDK app...")));
|
|
43126
41617
|
const synthesizer = new Synthesizer();
|
|
43127
41618
|
const context = parseContextOptions(options.context);
|
|
43128
|
-
const
|
|
41619
|
+
const synthOptions = {
|
|
43129
41620
|
app: options.app,
|
|
43130
41621
|
output: options.output,
|
|
43131
41622
|
...options.region && { region: options.region },
|
|
43132
41623
|
...options.profile && { profile: options.profile },
|
|
43133
41624
|
...Object.keys(context).length > 0 && { context },
|
|
43134
41625
|
stateBucket,
|
|
43135
|
-
...options.profile && { macroExpandS3ClientOpts: { profile: options.profile } }
|
|
43136
|
-
|
|
41626
|
+
...options.profile && { macroExpandS3ClientOpts: { profile: options.profile } },
|
|
41627
|
+
deferMacroExpansion: true
|
|
41628
|
+
};
|
|
41629
|
+
const { stacks: allStacks } = await synthesizer.synthesize(synthOptions);
|
|
43137
41630
|
logger.debug(`Found ${allStacks.length} stack(s) in assembly`);
|
|
43138
41631
|
const stackPatterns = stacks.length > 0 ? stacks : options.stack ? [options.stack] : [];
|
|
43139
41632
|
let targetStacks;
|
|
@@ -43172,6 +41665,7 @@ async function deployCommand(stacks, options) {
|
|
|
43172
41665
|
};
|
|
43173
41666
|
for (const stack of [...targetStacks]) addDependencies(stack.stackName);
|
|
43174
41667
|
}
|
|
41668
|
+
await synthesizer.expandMacrosForStacks(targetStacks, synthOptions);
|
|
43175
41669
|
const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
|
|
43176
41670
|
const stsClient = new STSClient({ region: options.region || process.env["AWS_REGION"] || "us-east-1" });
|
|
43177
41671
|
const accountId = (await stsClient.send(new GetCallerIdentityCommand({}))).Account;
|
|
@@ -44832,15 +43326,17 @@ async function diffCommand(stacks, options) {
|
|
|
44832
43326
|
logger.info(synthesisStatusMessage(app, "Synthesizing CDK app..."));
|
|
44833
43327
|
const synthesizer = new Synthesizer();
|
|
44834
43328
|
const context = parseContextOptions(options.context);
|
|
44835
|
-
const
|
|
43329
|
+
const synthOptions = {
|
|
44836
43330
|
app: options.app,
|
|
44837
43331
|
output: options.output,
|
|
44838
43332
|
...options.region && { region: options.region },
|
|
44839
43333
|
...options.profile && { profile: options.profile },
|
|
44840
43334
|
...Object.keys(context).length > 0 && { context },
|
|
44841
43335
|
stateBucket,
|
|
44842
|
-
...options.profile && { macroExpandS3ClientOpts: { profile: options.profile } }
|
|
44843
|
-
|
|
43336
|
+
...options.profile && { macroExpandS3ClientOpts: { profile: options.profile } },
|
|
43337
|
+
deferMacroExpansion: true
|
|
43338
|
+
};
|
|
43339
|
+
const { stacks: allStacks } = await synthesizer.synthesize(synthOptions);
|
|
44844
43340
|
logger.info(`Found ${allStacks.length} stack(s) in assembly`);
|
|
44845
43341
|
const stackPatterns = stacks.length > 0 ? stacks : options.stack ? [options.stack] : [];
|
|
44846
43342
|
let targetStacks;
|
|
@@ -44849,6 +43345,7 @@ async function diffCommand(stacks, options) {
|
|
|
44849
43345
|
else if (allStacks.length === 1) targetStacks = allStacks;
|
|
44850
43346
|
else throw new Error(`Multiple stacks found: ${allStacks.map(describeStack).join(", ")}. Specify stack name(s) or use --all`);
|
|
44851
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);
|
|
44852
43349
|
const stateConfig = {
|
|
44853
43350
|
bucket: stateBucket,
|
|
44854
43351
|
prefix: options.statePrefix
|
|
@@ -46077,8 +44574,7 @@ async function destroyCommand(stackArgs, options) {
|
|
|
46077
44574
|
app: appCmd,
|
|
46078
44575
|
output: options.output || "cdk.out",
|
|
46079
44576
|
...Object.keys(context).length > 0 && { context },
|
|
46080
|
-
|
|
46081
|
-
...options.profile && { macroExpandS3ClientOpts: { profile: options.profile } }
|
|
44577
|
+
deferMacroExpansion: true
|
|
46082
44578
|
});
|
|
46083
44579
|
appStacks = result.stacks.map((s) => ({
|
|
46084
44580
|
stackName: s.stackName,
|
|
@@ -52281,12 +50777,10 @@ async function importOne(task) {
|
|
|
52281
50777
|
outcome: "skipped-no-impl",
|
|
52282
50778
|
reason: `provider does not implement import (yet)`
|
|
52283
50779
|
};
|
|
52284
|
-
const cdkPath = readCdkPath(resource);
|
|
52285
50780
|
const properties = substituteOverrideRefs(resource.Properties ?? {}, overrides);
|
|
52286
50781
|
const input = {
|
|
52287
50782
|
logicalId,
|
|
52288
50783
|
resourceType: resource.Type,
|
|
52289
|
-
cdkPath,
|
|
52290
50784
|
stackName,
|
|
52291
50785
|
region,
|
|
52292
50786
|
properties,
|
|
@@ -52298,7 +50792,7 @@ async function importOne(task) {
|
|
|
52298
50792
|
logicalId,
|
|
52299
50793
|
resourceType: resource.Type,
|
|
52300
50794
|
outcome: "skipped-not-found",
|
|
52301
|
-
reason:
|
|
50795
|
+
reason: `no matching AWS resource — pass --resource ${logicalId}=<physicalId> to adopt it explicitly`
|
|
52302
50796
|
};
|
|
52303
50797
|
return {
|
|
52304
50798
|
logicalId,
|
|
@@ -62376,7 +60870,7 @@ function createMigrateCommand() {
|
|
|
62376
60870
|
*/
|
|
62377
60871
|
function buildProgram() {
|
|
62378
60872
|
const program = new Command();
|
|
62379
|
-
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");
|
|
62380
60874
|
program.addCommand(createBootstrapCommand());
|
|
62381
60875
|
program.addCommand(createSynthCommand());
|
|
62382
60876
|
program.addCommand(createListCommand());
|