@go-to-k/cdkd 0.254.1 → 0.256.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { $ as BOOTSTRAP_MARKER_PREFIX, A as refStateLookupFromResource, At as AssemblyReader, B as TemplateParser, C as ProviderRegistry, Ct as warnDeprecatedNoPrefixCliFlag, D as isTerminationProtectionPropagationError, Dt as findLargeInlineResources, E as disableInstanceApiTermination, Et as MIGRATE_TMP_PREFIX, F as resolveExplicitPhysicalId, Ft as resetAwsClients, G as AssetPublisher, Gt as MissingCdkCliError, H as S3StateBackend, Ht as LocalMigrateError, I as assertRegionMatch, It as setAwsClients, J as buildAssetRedirectMap, Jt as ProvisioningError, K as stringifyValue, Kt as NestedStackChildDirectDestroyError, L as applyRoleArnIfSet, M as CDK_PATH_TAG, Mt as resolveBucketRegion, N as matchesCdkPath, Nt as AwsClients, O as IntrinsicFunctionResolver, Ot as uploadCfnTemplate, P as normalizeAwsTagsToCfn, Pt as getAwsClients, Q as AssetModeResolver, Qt as StackTerminationProtectionError, R as DiffCalculator, Rt as CdkdError, S as collectInlinePolicyNamesManagedBySiblings, St as resolveUseCdkBootstrapAssets, T as CloudControlProvider, Tt as CFN_TEMPLATE_URL_LIMIT, U as rebuildClientForBucketRegion, Ut as LocalStartServiceError, V as LockManager, Vt as LocalInvokeBuildError$1, W as shouldRetainResource, X as loadPublishableAssetManifest, Xt as ResourceUpdateNotSupportedError, Y as createAssetRedirectResolver, Yt as ResourceTimeoutError, Z as rewriteTemplateAssetReferences, Zt as StackHasActiveImportsError, _ as gray, _t as resolveAutoAssetStorage, a as withRetry, at as buildDockerImage, b as yellow, bt as resolveStateBucketWithDefault, c as IMPLICIT_DELETE_DEPENDENCIES, ct as runDockerForeground, d as MULTI_REGION_RECREATE_BLOCKED_TYPES, dt as getDockerImageBySourceHash, et as ensureAssetStorage, f as isStatefulRecreateTargetSync, ft as Synthesizer, g as cyan, gt as resolveApp, h as bold, ht as getLegacyStateBucketName, i as withResourceDeadline, in as withErrorHandling, it as validateContainerRepoName, j as WAFv2WebACLProvider, k as cfnRefValueFromPhysicalId, kt as expectedOwnerParam, l as computeImplicitDeleteEdges, lt as runDockerStreaming, m as formatResourceLine, mt as getDefaultStateBucketName, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as parseBootstrapMarker, o as isRetryableTransientError, ot as formatDockerLoginError, p as renderStatefulReason, pt as synthesisStatusMessage, q as WorkGraph, qt as PartialFailureError, r as DeployEngine, rn as normalizeAwsError, rt as validateAssetBucketName, s as isThrottlingError, st as getDockerCmd, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as getBootstrapMarkerKey, u as extractDeploymentEventError, ut as AssetManifestLoader, v as green, vt as resolveCaptureObservedState, w as findActionableSilentDrops, wt as CFN_TEMPLATE_BODY_LIMIT, x as IAMRoleProvider, xt as resolveStateBucketWithDefaultAndSource, y as red, yt as resolveSkipPrefix, z as DagBuilder } from "./deploy-engine-d-cwg8zS.js";
2
+ import { $ as BOOTSTRAP_MARKER_PREFIX, A as refStateLookupFromResource, At as AssemblyReader, B as TemplateParser, C as ProviderRegistry, Ct as warnDeprecatedNoPrefixCliFlag, D as isTerminationProtectionPropagationError, Dt as findLargeInlineResources, E as disableInstanceApiTermination, Et as MIGRATE_TMP_PREFIX, F as resolveExplicitPhysicalId, Ft as resetAwsClients, G as AssetPublisher, Gt as MissingCdkCliError, H as S3StateBackend, Ht as LocalMigrateError, I as assertRegionMatch, It as setAwsClients, J as buildAssetRedirectMap, Jt as ProvisioningError, K as stringifyValue, Kt as NestedStackChildDirectDestroyError, L as applyRoleArnIfSet, M as CDK_PATH_TAG, Mt as resolveBucketRegion, N as matchesCdkPath, Nt as AwsClients, O as IntrinsicFunctionResolver, Ot as uploadCfnTemplate, P as normalizeAwsTagsToCfn, Pt as getAwsClients, Q as AssetModeResolver, Qt as StackTerminationProtectionError, R as DiffCalculator, Rt as CdkdError, S as isRetryableTransientError, St as resolveUseCdkBootstrapAssets, T as CloudControlProvider, Tt as CFN_TEMPLATE_URL_LIMIT, U as rebuildClientForBucketRegion, Ut as LocalStartServiceError, V as LockManager, Vt as LocalInvokeBuildError$1, W as shouldRetainResource, X as loadPublishableAssetManifest, Xt as ResourceUpdateNotSupportedError, Y as createAssetRedirectResolver, Yt as ResourceTimeoutError, Z as rewriteTemplateAssetReferences, Zt as StackHasActiveImportsError, _ as yellow, _t as resolveAutoAssetStorage, a as IMPLICIT_DELETE_DEPENDENCIES, at as buildDockerImage, b as importTagWalk, bt as resolveStateBucketWithDefault, c as MULTI_REGION_RECREATE_BLOCKED_TYPES, ct as runDockerForeground, d as formatResourceLine, dt as getDockerImageBySourceHash, et as ensureAssetStorage, f as bold, ft as Synthesizer, g as red, gt as resolveApp, h as green, ht as getLegacyStateBucketName, i as withResourceDeadline, in as withErrorHandling, it as validateContainerRepoName, j as WAFv2WebACLProvider, k as cfnRefValueFromPhysicalId, kt as expectedOwnerParam, l as isStatefulRecreateTargetSync, lt as runDockerStreaming, m as gray, mt as getDefaultStateBucketName, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as parseBootstrapMarker, o as computeImplicitDeleteEdges, ot as formatDockerLoginError, p as cyan, pt as synthesisStatusMessage, q as WorkGraph, qt as PartialFailureError, r as DeployEngine, rn as normalizeAwsError, rt as validateAssetBucketName, s as extractDeploymentEventError, st as getDockerCmd, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as getBootstrapMarkerKey, u as renderStatefulReason, ut as AssetManifestLoader, v as IAMRoleProvider, vt as resolveCaptureObservedState, w as findActionableSilentDrops, wt as CFN_TEMPLATE_BODY_LIMIT, x as withRetry, xt as resolveStateBucketWithDefaultAndSource, y as collectInlinePolicyNamesManagedBySiblings, yt as resolveSkipPrefix, z as DagBuilder } from "./deploy-engine-vUgwldVH.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-BgcH5ymP.js";
4
+ import { t as ASGProvider } from "./asg-provider-DbIC4hWG.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { createHash, randomBytes, randomUUID } from "node:crypto";
7
7
  import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListBucketsCommand, ListDirectoryBucketsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
@@ -505,6 +505,16 @@ const replaceOption = new Option("--replace", "Replace (DELETE + CREATE) a resou
505
505
  * (see `resolveUseCdkBootstrapAssets` in config-loader.ts).
506
506
  */
507
507
  const useCdkBootstrapAssetsOption = new Option("--use-cdk-bootstrap-assets", "Publish assets to the CDK bootstrap bucket/repo named by the asset manifest verbatim, skipping the cdkd asset-storage redirection even when this region is opted in via 'cdkd bootstrap'. For apps deployed via both CloudFormation and cdkd during a migration window. Per-app pin: cdk.json context.cdkd.useCdkBootstrapAssets. Also suppresses the legacy-mode 'cdk gc' notice.").default(false);
508
+ /**
509
+ * Issue #1111 — `--strict-getatt` (deploy only). By default, an
510
+ * `Fn::GetAtt` for an attribute cdkd cannot construct falls back to the
511
+ * resource's physical ID with a warning (hard-failing only on knowably-wrong
512
+ * shapes: `*Arn` attributes with a non-ARN fallback, `*Url` with a
513
+ * non-http(s) fallback — issue #1106). This flag promotes EVERY such
514
+ * fallback to a hard error, and additionally fails the deploy when a stack
515
+ * Output cannot be resolved (default: warn and store no value).
516
+ */
517
+ const strictGetattOption = new Option("--strict-getatt", "Fail the deploy on ANY Fn::GetAtt that falls back to the physical ID because cdkd cannot construct the attribute (default: warn and use the physical ID, hard-failing only when the fallback is knowably wrong — an *Arn attribute with a non-ARN value or a *Url attribute with a non-http(s) value). Also fails the deploy when a stack Output cannot be resolved (default: warn and store no value).").default(false);
508
518
  const deployOptions = [
509
519
  new Option("--concurrency <number>", "Maximum concurrent resource operations").default(10).argParser((value) => parseInt(value, 10)),
510
520
  new Option("--stack-concurrency <number>", "Maximum concurrent stack deployments").default(4).argParser((value) => parseInt(value, 10)),
@@ -526,6 +536,7 @@ const deployOptions = [
526
536
  forceStatefulRecreationOption,
527
537
  replaceOption,
528
538
  useCdkBootstrapAssetsOption,
539
+ strictGetattOption,
529
540
  ...resourceTimeoutOptions
530
541
  ];
531
542
  /**
@@ -1888,7 +1899,7 @@ const FLUSH_INTERVAL_MS = 2e3;
1888
1899
  const FLUSH_EVENT_THRESHOLD = 50;
1889
1900
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
1890
1901
  function getCdkdVersion() {
1891
- return "0.254.1";
1902
+ return "0.256.0";
1892
1903
  }
1893
1904
  /**
1894
1905
  * Generate a time-sortable unique run id, e.g.
@@ -3504,28 +3515,36 @@ var IAMManagedPolicyProvider = class {
3504
3515
  };
3505
3516
  return null;
3506
3517
  }
3507
- if (!input.cdkPath) return null;
3508
- let marker;
3509
- do {
3510
- const list = await this.iamClient.send(new ListPoliciesCommand({
3511
- Scope: "Local",
3512
- ...marker ? { Marker: marker } : {}
3513
- }));
3514
- for (const policy of list.Policies ?? []) {
3515
- if (!policy.Arn) continue;
3518
+ const match = await importTagWalk({
3519
+ cdkPath: input.cdkPath,
3520
+ logicalId: input.logicalId,
3521
+ listPage: async (marker) => {
3522
+ const list = await this.iamClient.send(new ListPoliciesCommand({
3523
+ Scope: "Local",
3524
+ ...marker ? { Marker: marker } : {}
3525
+ }));
3526
+ return {
3527
+ items: list.Policies,
3528
+ nextMarker: list.IsTruncated ? list.Marker : void 0
3529
+ };
3530
+ },
3531
+ describe: async (policy) => {
3532
+ if (!policy.Arn) return void 0;
3516
3533
  try {
3517
- if (matchesCdkPath((await this.iamClient.send(new ListPolicyTagsCommand({ PolicyArn: policy.Arn }))).Tags, input.cdkPath)) return {
3518
- physicalId: policy.Arn,
3519
- attributes: { PolicyArn: policy.Arn }
3520
- };
3534
+ return await this.iamClient.send(new ListPolicyTagsCommand({ PolicyArn: policy.Arn }));
3521
3535
  } catch (err) {
3522
- if (err instanceof NoSuchEntityException) continue;
3536
+ if (err instanceof NoSuchEntityException) return void 0;
3523
3537
  throw err;
3524
3538
  }
3525
- }
3526
- marker = list.IsTruncated ? list.Marker : void 0;
3527
- } while (marker);
3528
- return null;
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
+ };
3529
3548
  }
3530
3549
  async attachToPrincipals(policyArn, groups, roles, users) {
3531
3550
  if (groups && Array.isArray(groups)) for (const groupName of groups) {
@@ -6297,22 +6316,32 @@ var S3BucketProvider = class {
6297
6316
  if (e.name === "NotFound" || e.name === "NoSuchBucket") return null;
6298
6317
  throw err;
6299
6318
  }
6300
- if (!input.cdkPath) return null;
6301
- const list = await this.s3Client.send(new ListBucketsCommand({}));
6302
- for (const b of list.Buckets ?? []) {
6303
- if (!b.Name) continue;
6304
- try {
6305
- if (matchesCdkPath((await this.s3Client.send(new GetBucketTaggingCommand({ Bucket: b.Name }))).TagSet, input.cdkPath)) return {
6306
- physicalId: b.Name,
6307
- attributes: {}
6319
+ const match = await importTagWalk({
6320
+ cdkPath: input.cdkPath,
6321
+ logicalId: input.logicalId,
6322
+ listPage: async () => {
6323
+ return {
6324
+ items: (await this.s3Client.send(new ListBucketsCommand({}))).Buckets,
6325
+ nextMarker: void 0
6308
6326
  };
6309
- } catch (err) {
6310
- const e = err;
6311
- if (e.name === "NoSuchTagSet" || e.name === "AccessDenied" || e.$metadata?.httpStatusCode === 301) continue;
6312
- throw err;
6313
- }
6314
- }
6315
- return null;
6327
+ },
6328
+ describe: async (b) => {
6329
+ if (!b.Name) return void 0;
6330
+ try {
6331
+ return await this.s3Client.send(new GetBucketTaggingCommand({ Bucket: b.Name }));
6332
+ } catch (err) {
6333
+ const e = err;
6334
+ if (e.name === "NoSuchTagSet" || e.name === "AccessDenied" || e.$metadata?.httpStatusCode === 301) return;
6335
+ throw err;
6336
+ }
6337
+ },
6338
+ tagsOf: (tagging) => tagging.TagSet
6339
+ });
6340
+ if (!match) return null;
6341
+ return {
6342
+ physicalId: match.summary.Name,
6343
+ attributes: {}
6344
+ };
6316
6345
  }
6317
6346
  /**
6318
6347
  * Delete a bucket, emptying it first if not empty.
@@ -7156,22 +7185,34 @@ var SQSQueueProvider = class {
7156
7185
  if (err instanceof QueueDoesNotExist) return null;
7157
7186
  throw err;
7158
7187
  }
7159
- if (!input.cdkPath) return null;
7160
- let nextToken;
7161
- do {
7162
- const list = await this.sqsClient.send(new ListQueuesCommand({ ...nextToken && { NextToken: nextToken } }));
7163
- for (const url of list.QueueUrls ?? []) try {
7164
- if ((await this.sqsClient.send(new ListQueueTagsCommand({ QueueUrl: url }))).Tags?.["aws:cdk:path"] === input.cdkPath) return {
7165
- physicalId: url,
7166
- attributes: {}
7188
+ const match = await importTagWalk({
7189
+ cdkPath: input.cdkPath,
7190
+ logicalId: input.logicalId,
7191
+ listPage: async (marker) => {
7192
+ const list = await this.sqsClient.send(new ListQueuesCommand({ ...marker && { NextToken: marker } }));
7193
+ return {
7194
+ items: list.QueueUrls,
7195
+ nextMarker: list.NextToken
7167
7196
  };
7168
- } catch (err) {
7169
- if (err instanceof QueueDoesNotExist) continue;
7170
- throw err;
7171
- }
7172
- nextToken = list.NextToken;
7173
- } while (nextToken);
7174
- return null;
7197
+ },
7198
+ describe: async (url) => {
7199
+ try {
7200
+ return await this.sqsClient.send(new ListQueueTagsCommand({ QueueUrl: url }));
7201
+ } catch (err) {
7202
+ if (err instanceof QueueDoesNotExist) return void 0;
7203
+ throw err;
7204
+ }
7205
+ },
7206
+ tagsOf: (tagsResp) => Object.entries(tagsResp.Tags ?? {}).map(([Key, Value]) => ({
7207
+ Key,
7208
+ Value
7209
+ }))
7210
+ });
7211
+ if (!match) return null;
7212
+ return {
7213
+ physicalId: match.summary,
7214
+ attributes: {}
7215
+ };
7175
7216
  }
7176
7217
  };
7177
7218
 
@@ -7841,6 +7882,15 @@ var SNSTopicProvider = class {
7841
7882
  * 1. `--resource` override → trust as ARN, verify via `GetTopicAttributes`.
7842
7883
  * 2. `Properties.TopicName` → `ListTopics` to find matching ARN.
7843
7884
  * 3. `aws:cdk:path` tag match via `ListTopics` + `ListTagsForResource`.
7885
+ *
7886
+ * Steps 2 and 3 share ONE `ListTopics` walk (per candidate: name check
7887
+ * first, then the tag read — only when a `cdkPath` is present), which runs
7888
+ * through the shared `importTagWalk` helper so the N+1 `ListTagsForResource`
7889
+ * burst is retried with exponential backoff when AWS throttles it instead
7890
+ * of aborting the whole import. The name match is expressed to the walk as
7891
+ * a synthetic `aws:cdk:path` tag carrying the walk's own lookup key, so a
7892
+ * name-only template (no CDK path metadata) still resolves without any tag
7893
+ * API call — matching the previous inline loop.
7844
7894
  */
7845
7895
  async import(input) {
7846
7896
  if (input.knownPhysicalId) try {
@@ -7854,28 +7904,40 @@ var SNSTopicProvider = class {
7854
7904
  throw err;
7855
7905
  }
7856
7906
  const desiredName = typeof input.properties?.["TopicName"] === "string" ? input.properties["TopicName"] : void 0;
7857
- let nextToken;
7858
- do {
7859
- const list = await this.snsClient.send(new ListTopicsCommand({ ...nextToken && { NextToken: nextToken } }));
7860
- for (const t of list.Topics ?? []) {
7861
- if (!t.TopicArn) continue;
7862
- const arnTail = t.TopicArn.substring(t.TopicArn.lastIndexOf(":") + 1);
7863
- if (desiredName && arnTail === desiredName) return {
7864
- physicalId: t.TopicArn,
7865
- attributes: {}
7907
+ const walkCdkPath = input.cdkPath || (desiredName ? `cdkd:sns-topic-name:${desiredName}` : void 0);
7908
+ /** Sentinel detail for a candidate matched by its ARN-tail topic name. */
7909
+ const NAME_MATCH = { nameMatch: true };
7910
+ const match = await importTagWalk({
7911
+ cdkPath: walkCdkPath,
7912
+ logicalId: input.logicalId,
7913
+ listPage: async (marker) => {
7914
+ const list = await this.snsClient.send(new ListTopicsCommand({ ...marker && { NextToken: marker } }));
7915
+ return {
7916
+ items: list.Topics,
7917
+ nextMarker: list.NextToken
7866
7918
  };
7867
- if (input.cdkPath) try {
7868
- if (matchesCdkPath((await this.snsClient.send(new ListTagsForResourceCommand({ ResourceArn: t.TopicArn }))).Tags, input.cdkPath)) return {
7869
- physicalId: t.TopicArn,
7870
- attributes: {}
7871
- };
7919
+ },
7920
+ describe: async (t) => {
7921
+ if (!t.TopicArn) return void 0;
7922
+ const arnTail = t.TopicArn.substring(t.TopicArn.lastIndexOf(":") + 1);
7923
+ if (desiredName && arnTail === desiredName) return NAME_MATCH;
7924
+ if (!input.cdkPath) return void 0;
7925
+ try {
7926
+ return await this.snsClient.send(new ListTagsForResourceCommand({ ResourceArn: t.TopicArn }));
7872
7927
  } catch (err) {
7873
- if (err instanceof NotFoundException) continue;
7928
+ if (err instanceof NotFoundException) return void 0;
7874
7929
  throw err;
7875
7930
  }
7876
- }
7877
- nextToken = list.NextToken;
7878
- } while (nextToken);
7931
+ },
7932
+ tagsOf: (detail) => "nameMatch" in detail ? [{
7933
+ Key: CDK_PATH_TAG,
7934
+ Value: walkCdkPath
7935
+ }] : detail.Tags
7936
+ });
7937
+ if (match?.summary.TopicArn) return {
7938
+ physicalId: match.summary.TopicArn,
7939
+ attributes: {}
7940
+ };
7879
7941
  return null;
7880
7942
  }
7881
7943
  };
@@ -9232,8 +9294,12 @@ var LambdaFunctionProvider = class {
9232
9294
  * 2. `ListFunctions` + `ListTags`, match `aws:cdk:path` tag.
9233
9295
  *
9234
9296
  * Lambda's `ListTags` returns a `Tags` map keyed by tag name (unlike
9235
- * EC2/S3 which return an array of `{Key, Value}`), so we read it directly
9236
- * instead of going through the shared `matchesCdkPath` helper.
9297
+ * EC2/S3 which return an array of `{Key, Value}`), so the map is re-shaped
9298
+ * to `{Key, Value}` entries for the walk's matcher.
9299
+ *
9300
+ * The tag walk runs through the shared `importTagWalk` helper, so the N+1
9301
+ * `ListTags` burst is retried with exponential backoff when AWS throttles
9302
+ * it instead of aborting the whole import.
9237
9303
  */
9238
9304
  async import(input) {
9239
9305
  const explicit = resolveExplicitPhysicalId(input, "FunctionName");
@@ -9247,25 +9313,35 @@ var LambdaFunctionProvider = class {
9247
9313
  if (err instanceof ResourceNotFoundException) return null;
9248
9314
  throw err;
9249
9315
  }
9250
- if (!input.cdkPath) return null;
9251
- let marker;
9252
- do {
9253
- const list = await this.lambdaClient.send(new ListFunctionsCommand({ ...marker && { Marker: marker } }));
9254
- for (const fn of list.Functions ?? []) {
9255
- if (!fn.FunctionArn || !fn.FunctionName) continue;
9316
+ const match = await importTagWalk({
9317
+ cdkPath: input.cdkPath,
9318
+ logicalId: input.logicalId,
9319
+ listPage: async (marker) => {
9320
+ const list = await this.lambdaClient.send(new ListFunctionsCommand({ ...marker && { Marker: marker } }));
9321
+ return {
9322
+ items: list.Functions,
9323
+ nextMarker: list.NextMarker
9324
+ };
9325
+ },
9326
+ describe: async (fn) => {
9327
+ if (!fn.FunctionArn || !fn.FunctionName) return void 0;
9256
9328
  try {
9257
- if ((await this.lambdaClient.send(new ListTagsCommand({ Resource: fn.FunctionArn }))).Tags?.["aws:cdk:path"] === input.cdkPath) return {
9258
- physicalId: fn.FunctionName,
9259
- attributes: {}
9260
- };
9329
+ return await this.lambdaClient.send(new ListTagsCommand({ Resource: fn.FunctionArn }));
9261
9330
  } catch (err) {
9262
- if (err instanceof ResourceNotFoundException) continue;
9331
+ if (err instanceof ResourceNotFoundException) return void 0;
9263
9332
  throw err;
9264
9333
  }
9265
- }
9266
- marker = list.NextMarker;
9267
- } while (marker);
9268
- return null;
9334
+ },
9335
+ tagsOf: (tagsResp) => Object.entries(tagsResp.Tags ?? {}).map(([Key, Value]) => ({
9336
+ Key,
9337
+ Value
9338
+ }))
9339
+ });
9340
+ if (!match) return null;
9341
+ return {
9342
+ physicalId: match.summary.FunctionName,
9343
+ attributes: {}
9344
+ };
9269
9345
  }
9270
9346
  };
9271
9347
 
@@ -11404,24 +11480,33 @@ var DynamoDBTableProvider = class {
11404
11480
  if (err instanceof ResourceNotFoundException$1) return null;
11405
11481
  throw err;
11406
11482
  }
11407
- if (!input.cdkPath) return null;
11408
- let exclusiveStartTableName;
11409
- do {
11410
- const list = await this.dynamoDBClient.send(new ListTablesCommand({ ...exclusiveStartTableName && { ExclusiveStartTableName: exclusiveStartTableName } }));
11411
- for (const name of list.TableNames ?? []) try {
11412
- const arn = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: name }))).Table?.TableArn;
11413
- if (!arn) continue;
11414
- if (matchesCdkPath((await this.dynamoDBClient.send(new ListTagsOfResourceCommand({ ResourceArn: arn }))).Tags, input.cdkPath)) return {
11415
- physicalId: name,
11416
- attributes: {}
11483
+ const match = await importTagWalk({
11484
+ cdkPath: input.cdkPath,
11485
+ logicalId: input.logicalId,
11486
+ listPage: async (marker) => {
11487
+ const list = await this.dynamoDBClient.send(new ListTablesCommand({ ...marker && { ExclusiveStartTableName: marker } }));
11488
+ return {
11489
+ items: list.TableNames,
11490
+ nextMarker: list.LastEvaluatedTableName
11417
11491
  };
11418
- } catch (err) {
11419
- if (err instanceof ResourceNotFoundException$1) continue;
11420
- throw err;
11421
- }
11422
- exclusiveStartTableName = list.LastEvaluatedTableName;
11423
- } while (exclusiveStartTableName);
11424
- return null;
11492
+ },
11493
+ describe: async (name) => {
11494
+ try {
11495
+ const arn = (await this.dynamoDBClient.send(new DescribeTableCommand({ TableName: name }))).Table?.TableArn;
11496
+ if (!arn) return void 0;
11497
+ return await this.dynamoDBClient.send(new ListTagsOfResourceCommand({ ResourceArn: arn }));
11498
+ } catch (err) {
11499
+ if (err instanceof ResourceNotFoundException$1) return void 0;
11500
+ throw err;
11501
+ }
11502
+ },
11503
+ tagsOf: (tagsResp) => tagsResp.Tags
11504
+ });
11505
+ if (!match) return null;
11506
+ return {
11507
+ physicalId: match.summary,
11508
+ attributes: {}
11509
+ };
11425
11510
  }
11426
11511
  };
11427
11512
 
@@ -13197,26 +13282,36 @@ var LogsLogGroupProvider = class {
13197
13282
  if (err instanceof ResourceNotFoundException$4) return null;
13198
13283
  throw err;
13199
13284
  }
13200
- if (!input.cdkPath) return null;
13201
- let nextToken;
13202
- do {
13203
- const list = await this.logsClient.send(new DescribeLogGroupsCommand({ ...nextToken && { nextToken } }));
13204
- for (const g of list.logGroups ?? []) {
13205
- if (!g.logGroupName || !g.arn) continue;
13285
+ const match = await importTagWalk({
13286
+ cdkPath: input.cdkPath,
13287
+ logicalId: input.logicalId,
13288
+ listPage: async (marker) => {
13289
+ const list = await this.logsClient.send(new DescribeLogGroupsCommand({ ...marker && { nextToken: marker } }));
13290
+ return {
13291
+ items: list.logGroups,
13292
+ nextMarker: list.nextToken
13293
+ };
13294
+ },
13295
+ describe: async (g) => {
13296
+ if (!g.logGroupName || !g.arn) return void 0;
13206
13297
  const arnForTags = g.arn.replace(/:\*$/, "");
13207
13298
  try {
13208
- if ((await this.logsClient.send(new ListTagsForResourceCommand$5({ resourceArn: arnForTags }))).tags?.["aws:cdk:path"] === input.cdkPath) return {
13209
- physicalId: g.logGroupName,
13210
- attributes: {}
13211
- };
13299
+ return await this.logsClient.send(new ListTagsForResourceCommand$5({ resourceArn: arnForTags }));
13212
13300
  } catch (err) {
13213
- if (err instanceof ResourceNotFoundException$4) continue;
13301
+ if (err instanceof ResourceNotFoundException$4) return void 0;
13214
13302
  throw err;
13215
13303
  }
13216
- }
13217
- nextToken = list.nextToken;
13218
- } while (nextToken);
13219
- return null;
13304
+ },
13305
+ tagsOf: (tagsResp) => Object.entries(tagsResp.tags ?? {}).map(([Key, Value]) => ({
13306
+ Key,
13307
+ Value
13308
+ }))
13309
+ });
13310
+ if (!match) return null;
13311
+ return {
13312
+ physicalId: match.summary.logGroupName,
13313
+ attributes: {}
13314
+ };
13220
13315
  }
13221
13316
  };
13222
13317
 
@@ -13533,26 +13628,32 @@ var CloudWatchAlarmProvider = class {
13533
13628
  if (this.isNotFound(err)) return null;
13534
13629
  throw err;
13535
13630
  }
13536
- if (!input.cdkPath) return null;
13537
- let nextToken;
13538
- do {
13539
- const list = await this.cloudWatchClient.send(new DescribeAlarmsCommand({ ...nextToken && { NextToken: nextToken } }));
13540
- const all = [...list.MetricAlarms ?? [], ...list.CompositeAlarms ?? []];
13541
- for (const a of all) {
13542
- if (!a.AlarmArn || !a.AlarmName) continue;
13631
+ const match = await importTagWalk({
13632
+ cdkPath: input.cdkPath,
13633
+ logicalId: input.logicalId,
13634
+ listPage: async (marker) => {
13635
+ const list = await this.cloudWatchClient.send(new DescribeAlarmsCommand({ ...marker && { NextToken: marker } }));
13636
+ return {
13637
+ items: [...list.MetricAlarms ?? [], ...list.CompositeAlarms ?? []],
13638
+ nextMarker: list.NextToken
13639
+ };
13640
+ },
13641
+ describe: async (a) => {
13642
+ if (!a.AlarmArn || !a.AlarmName) return void 0;
13543
13643
  try {
13544
- if (matchesCdkPath((await this.cloudWatchClient.send(new ListTagsForResourceCommand$4({ ResourceARN: a.AlarmArn }))).Tags, input.cdkPath)) return {
13545
- physicalId: a.AlarmName,
13546
- attributes: {}
13547
- };
13644
+ return await this.cloudWatchClient.send(new ListTagsForResourceCommand$4({ ResourceARN: a.AlarmArn }));
13548
13645
  } catch (err) {
13549
- if (this.isNotFound(err)) continue;
13646
+ if (this.isNotFound(err)) return void 0;
13550
13647
  throw err;
13551
13648
  }
13552
- }
13553
- nextToken = list.NextToken;
13554
- } while (nextToken);
13555
- return null;
13649
+ },
13650
+ tagsOf: (tagsResp) => tagsResp.Tags
13651
+ });
13652
+ if (!match) return null;
13653
+ return {
13654
+ physicalId: match.summary.AlarmName,
13655
+ attributes: {}
13656
+ };
13556
13657
  }
13557
13658
  isNotFound(err) {
13558
13659
  if (!(err instanceof Error)) return false;
@@ -14129,28 +14230,35 @@ var SSMParameterProvider = class {
14129
14230
  if (err instanceof ParameterNotFound) return null;
14130
14231
  throw err;
14131
14232
  }
14132
- if (!input.cdkPath) return null;
14133
- let nextToken;
14134
- do {
14135
- const list = await this.ssmClient.send(new DescribeParametersCommand({ ...nextToken && { NextToken: nextToken } }));
14136
- for (const p of list.Parameters ?? []) {
14137
- if (!p.Name) continue;
14233
+ const match = await importTagWalk({
14234
+ cdkPath: input.cdkPath,
14235
+ logicalId: input.logicalId,
14236
+ listPage: async (marker) => {
14237
+ const list = await this.ssmClient.send(new DescribeParametersCommand({ ...marker && { NextToken: marker } }));
14238
+ return {
14239
+ items: list.Parameters,
14240
+ nextMarker: list.NextToken
14241
+ };
14242
+ },
14243
+ describe: async (p) => {
14244
+ if (!p.Name) return void 0;
14138
14245
  try {
14139
- if (matchesCdkPath((await this.ssmClient.send(new ListTagsForResourceCommand$2({
14246
+ return await this.ssmClient.send(new ListTagsForResourceCommand$2({
14140
14247
  ResourceType: "Parameter",
14141
14248
  ResourceId: p.Name
14142
- }))).TagList, input.cdkPath)) return {
14143
- physicalId: p.Name,
14144
- attributes: {}
14145
- };
14249
+ }));
14146
14250
  } catch (err) {
14147
- if (err instanceof ParameterNotFound) continue;
14251
+ if (err instanceof ParameterNotFound) return void 0;
14148
14252
  throw err;
14149
14253
  }
14150
- }
14151
- nextToken = list.NextToken;
14152
- } while (nextToken);
14153
- return null;
14254
+ },
14255
+ tagsOf: (tagsResp) => tagsResp.TagList
14256
+ });
14257
+ if (!match) return null;
14258
+ return {
14259
+ physicalId: match.summary.Name,
14260
+ attributes: {}
14261
+ };
14154
14262
  }
14155
14263
  };
14156
14264
 
@@ -25212,155 +25320,6 @@ var RDSDBProxyTargetGroupProvider = class {
25212
25320
  }
25213
25321
  };
25214
25322
 
25215
- //#endregion
25216
- //#region src/provisioning/import-tag-walk.ts
25217
- /**
25218
- * Shared, throttle-tolerant `aws:cdk:path` tag walk for `ResourceProvider.import`.
25219
- *
25220
- * Providers that adopt a resource without an explicit name property fall back
25221
- * to step 3 of the lookup order documented in `./import-helpers.ts`: enumerate
25222
- * the service's `List*`/`Describe*` pages, then issue ONE per-candidate read
25223
- * (`DescribeX` / `ListTagsForResource`) to obtain the tag set — the list
25224
- * summaries usually do not carry tags. That is an inherent **N+1** read
25225
- * pattern: an account with many resources of the type produces one API call
25226
- * per candidate in a tight loop, which is exactly the shape AWS rate-limits.
25227
- *
25228
- * Every provider previously hand-rolled this loop with NO backoff, so a single
25229
- * throttled `Describe*` aborted the whole `cdkd import` run. This helper
25230
- * centralises the loop and wraps BOTH the list page fetch and the per-candidate
25231
- * describe in the deploy engine's `withRetry` with exponential backoff.
25232
- *
25233
- * ## Why a narrower classifier than `isRetryableTransientError`
25234
- *
25235
- * The deploy engine's classifier is tuned for the WRITE path: it also treats
25236
- * eventual-consistency phrasings like `does not exist` / `not authorized to
25237
- * perform` as transient, because a just-created dependency legitimately needs a
25238
- * moment to propagate. On a read-only import walk those messages mean the
25239
- * opposite — the candidate really is gone, or the caller's credentials really
25240
- * lack the permission — and retrying them burns the full backoff budget per
25241
- * candidate before surfacing the true error.
25242
- *
25243
- * So the walk retries throttling ONLY, reusing the deploy engine's throttle
25244
- * tables verbatim ({@link THROTTLING_ERROR_NAMES} /
25245
- * {@link RETRYABLE_HTTP_STATUS_CODES}) rather than maintaining a second copy.
25246
- *
25247
- * ## Batching
25248
- *
25249
- * Batched tag reads are deliberately NOT modelled here: the services this
25250
- * helper currently serves (EMR `DescribeCluster`, DocDB
25251
- * `ListTagsForResource`) expose only single-resource reads. A service that
25252
- * genuinely offers a batch API (e.g. CodeCommit `BatchGetRepositories`) can
25253
- * satisfy several candidates from one call inside its own `describe` callback,
25254
- * or bypass the helper entirely.
25255
- */
25256
- /** Max number of retries after the first attempt, per API call in the walk. */
25257
- const DEFAULT_MAX_RETRIES = 5;
25258
- /** Initial backoff; each retry doubles it up to {@link DEFAULT_MAX_DELAY_MS}. */
25259
- const DEFAULT_INITIAL_DELAY_MS = 500;
25260
- /** Cap for the per-retry delay (0.5s -> 1s -> 2s -> 4s -> 5s, ~12.5s total). */
25261
- const DEFAULT_MAX_DELAY_MS = 5e3;
25262
- /**
25263
- * Wall-clock ceiling for the WHOLE walk (all pages + all candidates), not just
25264
- * one call. Backoff is per-call, so without this a sustained throttle against a
25265
- * large account degrades into `(pages + candidates) x ~12.5s` of near-silent
25266
- * retrying — ~42 minutes for 200 candidates, with no way to tell a slow walk
25267
- * from a hung one. 10 minutes is generous for a healthy walk (a 200-candidate
25268
- * DocDB account completes in seconds when AWS is not throttling) and bounds the
25269
- * pathological case to something a user will wait through.
25270
- */
25271
- const DEFAULT_MAX_WALK_MS = 10 * 6e4;
25272
- /**
25273
- * Ceiling on pages fetched. A service that returns a non-advancing pagination
25274
- * token (a bug, or a marker cdkd echoes back wrongly) would otherwise spin
25275
- * forever. This is now the shared path every migrated provider runs on, so the
25276
- * guard belongs here rather than in each caller.
25277
- */
25278
- const DEFAULT_MAX_PAGES = 1e3;
25279
- /**
25280
- * Whether an error hit during the read-only tag walk is a rate-limit rejection
25281
- * worth backing off on.
25282
- *
25283
- * Delegates the error + `.cause` chain traversal to the deploy engine's
25284
- * {@link isThrottlingError} (throttling error names + retryable HTTP statuses,
25285
- * at every cause depth) and adds the canonical `Rate exceeded` message, which
25286
- * several services return with an HTTP 400 and a service-specific error name.
25287
- *
25288
- * This is deliberately NARROWER than `isRetryableTransientError`: that
25289
- * classifier also treats write-path eventual-consistency phrasings (`does not
25290
- * exist`, `not authorized to perform`) as transient, because a just-created
25291
- * dependency legitimately needs a moment to propagate. On a read-only walk
25292
- * those mean the candidate really is gone or the credentials really lack the
25293
- * permission, and retrying them burns the full backoff budget per candidate
25294
- * before surfacing the true error.
25295
- *
25296
- * Exported for direct unit testing and for providers whose tag walk cannot use
25297
- * {@link importTagWalk} verbatim.
25298
- */
25299
- function isThrottlingLikeError(error, message) {
25300
- return isThrottlingError(error) || message.includes("Rate exceeded");
25301
- }
25302
- /** Thrown when the walk exceeds its wall-clock budget or page ceiling. */
25303
- var ImportTagWalkLimitError = class extends Error {
25304
- constructor(message) {
25305
- super(message);
25306
- this.name = "ImportTagWalkLimitError";
25307
- }
25308
- };
25309
- /**
25310
- * Paginate `listPage`, `describe` each candidate, and return the first one
25311
- * whose tags carry the requested `aws:cdk:path`. Returns `null` when no
25312
- * candidate matches (or when `cdkPath` is empty).
25313
- *
25314
- * Both callbacks are individually retried with exponential backoff on
25315
- * throttling errors, so one rate-limited call mid-walk no longer aborts the
25316
- * whole import.
25317
- */
25318
- async function importTagWalk(options) {
25319
- const { cdkPath, listPage, describe, tagsOf } = options;
25320
- if (!cdkPath) return null;
25321
- const logicalId = options.logicalId ?? "import";
25322
- const logger = options.retry?.logger ?? getLogger();
25323
- const maxWalkMs = options.retry?.maxWalkMs ?? DEFAULT_MAX_WALK_MS;
25324
- const maxPages = options.retry?.maxPages ?? DEFAULT_MAX_PAGES;
25325
- const retryOpts = {
25326
- maxRetries: options.retry?.maxRetries ?? DEFAULT_MAX_RETRIES,
25327
- initialDelayMs: options.retry?.initialDelayMs ?? DEFAULT_INITIAL_DELAY_MS,
25328
- maxDelayMs: options.retry?.maxDelayMs ?? DEFAULT_MAX_DELAY_MS,
25329
- isRetryable: (message, error) => isThrottlingLikeError(error, message),
25330
- logger,
25331
- ...options.retry?.isInterrupted && { isInterrupted: options.retry.isInterrupted },
25332
- ...options.retry?.onInterrupted && { onInterrupted: options.retry.onInterrupted },
25333
- ...options.retry?.sleep && { sleep: options.retry.sleep }
25334
- };
25335
- const startedAt = Date.now();
25336
- const assertWithinBudget = (stage) => {
25337
- const elapsed = Date.now() - startedAt;
25338
- if (elapsed >= maxWalkMs) throw new ImportTagWalkLimitError(`Timed out looking up ${logicalId} by its aws:cdk:path tag after ${Math.round(elapsed / 1e3)}s (limit ${Math.round(maxWalkMs / 1e3)}s, while ${stage}). AWS is likely throttling the lookup; retry, or pass an explicit physical id with --resource ${logicalId}=<physicalId>.`);
25339
- };
25340
- let marker;
25341
- let pages = 0;
25342
- do {
25343
- assertWithinBudget("listing candidates");
25344
- if (++pages > maxPages) throw new ImportTagWalkLimitError(`Gave up looking up ${logicalId} by its aws:cdk:path tag after ${maxPages} pages (the service may be returning a non-advancing pagination token). Pass an explicit physical id with --resource ${logicalId}=<physicalId>.`);
25345
- const currentMarker = marker;
25346
- const page = await withRetry(() => listPage(currentMarker), logicalId, retryOpts);
25347
- for (const summary of page.items ?? []) {
25348
- assertWithinBudget("reading candidate tags");
25349
- const detail = await withRetry(() => describe(summary), logicalId, retryOpts);
25350
- if (detail === void 0) {
25351
- logger.debug(` ↷ Skipped an ${logicalId} import candidate: its detail lookup returned no result`);
25352
- continue;
25353
- }
25354
- if (matchesCdkPath(tagsOf(detail, summary), cdkPath)) return {
25355
- summary,
25356
- detail
25357
- };
25358
- }
25359
- marker = page.nextMarker;
25360
- } while (marker);
25361
- return null;
25362
- }
25363
-
25364
25323
  //#endregion
25365
25324
  //#region src/provisioning/providers/docdb-provider.ts
25366
25325
  /**
@@ -33297,9 +33256,12 @@ var KinesisStreamProvider = class {
33297
33256
  * with `DescribeStream`.
33298
33257
  * 2. Walk `ListStreams` (paged via `ExclusiveStartStreamName`) and
33299
33258
  * match the `aws:cdk:path` tag via `ListTagsForStream(StreamName)`.
33259
+ * The walk runs through the shared `importTagWalk` helper, so the N+1
33260
+ * tag-read burst is retried with exponential backoff when AWS
33261
+ * throttles it instead of aborting the whole import.
33300
33262
  *
33301
33263
  * Kinesis tags use the standard `Tag[]` array shape (`Key`/`Value`),
33302
- * so `matchesCdkPath` from import-helpers applies directly.
33264
+ * so the walk's `matchesCdkPath` matcher applies directly.
33303
33265
  */
33304
33266
  /**
33305
33267
  * Read the AWS-current Kinesis stream configuration in CFn-property shape.
@@ -33363,19 +33325,25 @@ var KinesisStreamProvider = class {
33363
33325
  if (err instanceof ResourceNotFoundException$8) return null;
33364
33326
  throw err;
33365
33327
  }
33366
- if (!input.cdkPath) return null;
33367
- let exclusiveStartStreamName;
33368
- while (true) {
33369
- const list = await this.getClient().send(new ListStreamsCommand({ ...exclusiveStartStreamName && { ExclusiveStartStreamName: exclusiveStartStreamName } }));
33370
- const names = list.StreamNames ?? [];
33371
- for (const streamName of names) if (matchesCdkPath((await this.getClient().send(new ListTagsForStreamCommand({ StreamName: streamName }))).Tags, input.cdkPath)) return {
33372
- physicalId: streamName,
33373
- attributes: {}
33374
- };
33375
- if (!list.HasMoreStreams || names.length === 0) break;
33376
- exclusiveStartStreamName = names[names.length - 1];
33377
- }
33378
- return null;
33328
+ const match = await importTagWalk({
33329
+ cdkPath: input.cdkPath,
33330
+ logicalId: input.logicalId,
33331
+ listPage: async (marker) => {
33332
+ const list = await this.getClient().send(new ListStreamsCommand({ ...marker && { ExclusiveStartStreamName: marker } }));
33333
+ const names = list.StreamNames ?? [];
33334
+ return {
33335
+ items: names,
33336
+ nextMarker: list.HasMoreStreams && names.length > 0 ? names[names.length - 1] : void 0
33337
+ };
33338
+ },
33339
+ describe: async (streamName) => await this.getClient().send(new ListTagsForStreamCommand({ StreamName: streamName })),
33340
+ tagsOf: (tagsResp) => tagsResp.Tags
33341
+ });
33342
+ if (!match) return null;
33343
+ return {
33344
+ physicalId: match.summary,
33345
+ attributes: {}
33346
+ };
33379
33347
  }
33380
33348
  /**
33381
33349
  * Poll DescribeStream until the stream reaches ACTIVE status
@@ -41437,25 +41405,32 @@ var ECRProvider = class {
41437
41405
  if (err instanceof RepositoryNotFoundException) return null;
41438
41406
  throw err;
41439
41407
  }
41440
- if (!input.cdkPath) return null;
41441
- let nextToken;
41442
- do {
41443
- const list = await this.getClient().send(new DescribeRepositoriesCommand({ ...nextToken && { nextToken } }));
41444
- for (const repo of list.repositories ?? []) {
41445
- if (!repo.repositoryArn || !repo.repositoryName) continue;
41408
+ const match = await importTagWalk({
41409
+ cdkPath: input.cdkPath,
41410
+ logicalId: input.logicalId,
41411
+ listPage: async (marker) => {
41412
+ const list = await this.getClient().send(new DescribeRepositoriesCommand({ ...marker && { nextToken: marker } }));
41413
+ return {
41414
+ items: list.repositories,
41415
+ nextMarker: list.nextToken
41416
+ };
41417
+ },
41418
+ describe: async (repo) => {
41419
+ if (!repo.repositoryArn || !repo.repositoryName) return void 0;
41446
41420
  try {
41447
- if (matchesCdkPath((await this.getClient().send(new ListTagsForResourceCommand$8({ resourceArn: repo.repositoryArn }))).tags, input.cdkPath)) return {
41448
- physicalId: repo.repositoryName,
41449
- attributes: {}
41450
- };
41421
+ return await this.getClient().send(new ListTagsForResourceCommand$8({ resourceArn: repo.repositoryArn }));
41451
41422
  } catch (err) {
41452
- if (err instanceof RepositoryNotFoundException) continue;
41423
+ if (err instanceof RepositoryNotFoundException) return void 0;
41453
41424
  throw err;
41454
41425
  }
41455
- }
41456
- nextToken = list.nextToken;
41457
- } while (nextToken);
41458
- return null;
41426
+ },
41427
+ tagsOf: (tagsResp) => tagsResp.tags
41428
+ });
41429
+ if (!match) return null;
41430
+ return {
41431
+ physicalId: match.summary.repositoryName,
41432
+ attributes: {}
41433
+ };
41459
41434
  }
41460
41435
  };
41461
41436
 
@@ -43204,6 +43179,7 @@ async function deployCommand(stacks, options) {
43204
43179
  ...recreateViaSdkProviderTargets && recreateViaSdkProviderTargets.size > 0 && { recreateViaSdkProviderTargets },
43205
43180
  ...options.replace && { replace: true },
43206
43181
  ...options.forceStatefulRecreation && { forceStatefulRecreation: true },
43182
+ ...options.strictGetatt && { strictGetAtt: true },
43207
43183
  captureObservedState: resolveCaptureObservedState(options.captureObservedState),
43208
43184
  ...options.resourceWarnAfter?.globalMs !== void 0 && { resourceWarnAfterMs: options.resourceWarnAfter.globalMs },
43209
43185
  ...options.resourceTimeout?.globalMs !== void 0 && { resourceTimeoutMs: options.resourceTimeout.globalMs },
@@ -43234,6 +43210,7 @@ async function deployCommand(stacks, options) {
43234
43210
  logger.info(` Deleted: ${deployResult.deleted > 0 ? red(deployResult.deleted) : gray(deployResult.deleted)}`);
43235
43211
  logger.info(` Unchanged: ${gray(deployResult.unchanged)}`);
43236
43212
  logger.info(` Duration: ${cyan((deployResult.durationMs / 1e3).toFixed(2) + "s")}`);
43213
+ if (deployResult.attributeFallbackCount > 0) logger.warn(`${deployResult.attributeFallbackCount} attribute resolution(s) fell back to the physical ID (potentially wrong values); re-run with --strict-getatt to fail on these`);
43237
43214
  if (deployResult.outputs && Object.keys(deployResult.outputs).length > 0) {
43238
43215
  logger.info("\nOutputs:");
43239
43216
  for (const [key, value] of Object.entries(deployResult.outputs)) logger.info(` ${deployResult.stackName}.${key} = ${String(value)}`);
@@ -62104,7 +62081,7 @@ function createMigrateCommand() {
62104
62081
  */
62105
62082
  function buildProgram() {
62106
62083
  const program = new Command();
62107
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.254.1");
62084
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.256.0");
62108
62085
  program.addCommand(createBootstrapCommand());
62109
62086
  program.addCommand(createSynthCommand());
62110
62087
  program.addCommand(createListCommand());