@go-to-k/cdkd 0.280.39 → 0.280.40

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 requireConfigObject, $t as AssemblyReader, A as green, At as runDockerForeground, B as disableInstanceApiTermination, Bt as resolveCaptureObservedState, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as StackTerminationProtectionError, Ct as getBootstrapMarkerKey, D as bold, Dt as buildDockerImage, E as formatResourceLine, Et as validateContainerRepoName, F as clearOnUpdateRemoval, Ft as synthesisStatusMessage, G as WAFv2WebACLProvider, Gt as stateBucketExistenceConfirmed, H as IntrinsicFunctionResolver, Ht as resolveStateBucketWithDefault, I as ProviderRegistry, It as getDefaultStateBucketName, J as assertRegionMatch, Jt as CFN_TEMPLATE_URL_LIMIT, K as normalizeAwsTagsToCfn, Kt as warnDeprecatedNoPrefixCliFlag, L as findActionableSilentDrops, Lt as getLegacyStateBucketName, M as yellow, Mt as AssetManifestLoader, N as IAMRoleProvider, Nt as getDockerImageBySourceHash, O as cyan, On as normalizeAwsError, Ot as formatDockerLoginError, P as collectInlinePolicyNamesManagedBySiblings, Pt as Synthesizer, Q as requireConfigArray, Qt as expectedOwnerParam, R as CloudControlProvider, Rt as resolveApp, S as extractDeploymentEventError, Sn as StackHasActiveImportsError, St as ensureAssetStorage, T as renderStatefulReason, Tt as validateAssetBucketName, U as cfnRefValueFromPhysicalId, Ut as resolveStateBucketWithDefaultAndSource, V as isTerminationProtectionPropagationError, Vt as resolveSkipPrefix, W as refStateLookupFromResource, Wt as resolveUseCdkBootstrapAssets, X as readConfigString, Xt as findLargeInlineResources, Y as configStringRefusal, Yt as MIGRATE_TMP_PREFIX, Z as replayWarn, Zt as uploadCfnTemplate, _ as createPreDeleteFinalSnapshot, _n as NestedStackChildDirectDestroyError, _t as createAssetRedirectResolver, a as DeploymentEventsStore, an as resetAwsClients, at as isRetryableTransientError, b as unsupportedFinalSnapshotError, bn as ResourceTimeoutError, bt as AssetModeResolver, c as replayFailedOperations, cn as CdkdError, ct as TemplateParser, d as IMPLICIT_DELETE_DEPENDENCIES, dn as DeployCancelledError, dt as rebuildClientForBucketRegion, en as processStackMessages, et as requireConfigString, f as computeImplicitDeleteEdges, fn as LocalInvokeBuildError$1, ft as shouldRetainResource, g as ccRoutedFinalSnapshotError, gn as MissingCdkCliError, gt as buildAssetRedirectMap, h as buildFinalSnapshotIdentifier, ht as WorkGraph, i as DeploymentEventsReader, in as getAwsClients, it as withRetry, j as red, jt as runDockerStreaming, k as gray, kn as withErrorHandling, kt as getDockerCmd, l as replayRollback, lt as LockManager, m as PRE_DELETE_SNAPSHOT_TYPES, mn as LocalStartServiceError, mt as stringifyValue, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as resolveBucketRegion, nt as DiffCalculator, o as planFailedOps, on as setAwsClients, ot as isThrottlingError, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as LocalMigrateError, pt as AssetPublisher, q as resolveExplicitPhysicalId, qt as CFN_TEMPLATE_BODY_LIMIT, r as DeployEngine, rn as AwsClients, rt as describeTypeWithThrottleRetry, s as planRollback, st as DagBuilder, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as applyRoleArnIfSet, u as withResourceDeadline, ut as S3StateBackend, v as isFinalSnapshotError, vn as PartialFailureError, vt as loadPublishableAssetManifest, w as isStatefulRecreateTargetSync, wt as parseBootstrapMarker, x as makeCanonicalizePropertiesFn, xn as ResourceUpdateNotSupportedError, xt as BOOTSTRAP_MARKER_PREFIX, y as refusesFinalSnapshot, yn as ProvisioningError, yt as rewriteTemplateAssetReferences, z as slowCcOperationTimeoutMs, zt as resolveAutoAssetStorage } from "./deploy-engine-BXVYshtP.js";
2
+ import { $ as requireConfigObject, $t as AssemblyReader, A as green, At as runDockerForeground, B as disableInstanceApiTermination, Bt as resolveCaptureObservedState, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as StackTerminationProtectionError, Ct as getBootstrapMarkerKey, D as bold, Dt as buildDockerImage, E as formatResourceLine, Et as validateContainerRepoName, F as clearOnUpdateRemoval, Ft as synthesisStatusMessage, G as WAFv2WebACLProvider, Gt as stateBucketExistenceConfirmed, H as IntrinsicFunctionResolver, Ht as resolveStateBucketWithDefault, I as ProviderRegistry, It as getDefaultStateBucketName, J as assertRegionMatch, Jt as CFN_TEMPLATE_URL_LIMIT, K as normalizeAwsTagsToCfn, Kt as warnDeprecatedNoPrefixCliFlag, L as findActionableSilentDrops, Lt as getLegacyStateBucketName, M as yellow, Mt as AssetManifestLoader, N as IAMRoleProvider, Nt as getDockerImageBySourceHash, O as cyan, On as normalizeAwsError, Ot as formatDockerLoginError, P as collectInlinePolicyNamesManagedBySiblings, Pt as Synthesizer, Q as requireConfigArray, Qt as expectedOwnerParam, R as CloudControlProvider, Rt as resolveApp, S as extractDeploymentEventError, Sn as StackHasActiveImportsError, St as ensureAssetStorage, T as renderStatefulReason, Tt as validateAssetBucketName, U as cfnRefValueFromPhysicalId, Ut as resolveStateBucketWithDefaultAndSource, V as isTerminationProtectionPropagationError, Vt as resolveSkipPrefix, W as refStateLookupFromResource, Wt as resolveUseCdkBootstrapAssets, X as readConfigString, Xt as findLargeInlineResources, Y as configStringRefusal, Yt as MIGRATE_TMP_PREFIX, Z as replayWarn, Zt as uploadCfnTemplate, _ as createPreDeleteFinalSnapshot, _n as NestedStackChildDirectDestroyError, _t as createAssetRedirectResolver, a as DeploymentEventsStore, an as resetAwsClients, at as isRetryableTransientError, b as unsupportedFinalSnapshotError, bn as ResourceTimeoutError, bt as AssetModeResolver, c as replayFailedOperations, cn as CdkdError, ct as TemplateParser, d as IMPLICIT_DELETE_DEPENDENCIES, dn as DeployCancelledError, dt as rebuildClientForBucketRegion, en as processStackMessages, et as requireConfigString, f as computeImplicitDeleteEdges, fn as LocalInvokeBuildError$1, ft as shouldRetainResource, g as ccRoutedFinalSnapshotError, gn as MissingCdkCliError, gt as buildAssetRedirectMap, h as buildFinalSnapshotIdentifier, ht as WorkGraph, i as DeploymentEventsReader, in as getAwsClients, it as withRetry, j as red, jt as runDockerStreaming, k as gray, kn as withErrorHandling, kt as getDockerCmd, l as replayRollback, lt as LockManager, m as PRE_DELETE_SNAPSHOT_TYPES, mn as LocalStartServiceError, mt as stringifyValue, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as resolveBucketRegion, nt as DiffCalculator, o as planFailedOps, on as setAwsClients, ot as isThrottlingError, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as LocalMigrateError, pt as AssetPublisher, q as resolveExplicitPhysicalId, qt as CFN_TEMPLATE_BODY_LIMIT, r as DeployEngine, rn as AwsClients, rt as describeTypeWithThrottleRetry, s as planRollback, st as DagBuilder, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as applyRoleArnIfSet, u as withResourceDeadline, ut as S3StateBackend, v as isFinalSnapshotError, vn as PartialFailureError, vt as loadPublishableAssetManifest, w as isStatefulRecreateTargetSync, wt as parseBootstrapMarker, x as makeCanonicalizePropertiesFn, xn as ResourceUpdateNotSupportedError, xt as BOOTSTRAP_MARKER_PREFIX, y as refusesFinalSnapshot, yn as ProvisioningError, yt as rewriteTemplateAssetReferences, z as slowCcOperationTimeoutMs, zt as resolveAutoAssetStorage } from "./deploy-engine-CU47_nau.js";
3
3
  import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, h as withStackName, i as runStackBuffered, m as withSkipPrefix, n as getLogger, o as PATTERN_B_NAME_OPTIONS, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-zRrlbaQt.js";
4
- import { t as ASGProvider } from "./asg-provider-DPYPr-Op.js";
4
+ import { t as ASGProvider } from "./asg-provider-BOGjxxxb.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, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, 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";
@@ -37386,6 +37386,97 @@ var AppSyncProvider = class {
37386
37386
  function importableString(value) {
37387
37387
  return typeof value === "string" && value.length > 0 ? value : void 0;
37388
37388
  }
37389
+ /** The one pseudo parameter whose value IS the Glue API's `CatalogId` default. */
37390
+ const ACCOUNT_ID_PSEUDO_PARAMETER = "AWS::AccountId";
37391
+ const ACCOUNT_ID_SUB_TEMPLATE = "${AWS::AccountId}";
37392
+ /**
37393
+ * Is this unresolved intrinsic PROVABLY the caller's own account id?
37394
+ *
37395
+ * `@aws-cdk/aws-glue-alpha` sets `catalogId: Stack.of(this).account`, which
37396
+ * renders as `{Ref: AWS::AccountId}` (or an `Fn::Sub` wrapper) for an
37397
+ * environment-agnostic stack. A pseudo parameter is never in the import
37398
+ * overrides map, so a `cdkd import`-written state record holds the intrinsic
37399
+ * verbatim — but its resolved value is exactly what OMITTING `CatalogId` gives
37400
+ * the Glue API, so dropping it is not a loss and a NotFound afterwards is
37401
+ * ordinary idempotency, not the silent-leak shape.
37402
+ *
37403
+ * Kept deliberately narrow. An intrinsic object has exactly ONE key, and only
37404
+ * the two account-id spellings qualify: `{Ref: SomeParam}`, `Fn::ImportValue`,
37405
+ * an `Fn::Sub` of anything else, and every other shape stay UNUSABLE, because
37406
+ * their resolved value could be any catalog at all.
37407
+ */
37408
+ function isAccountIdPseudoParameter(value) {
37409
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
37410
+ const keys = Object.keys(value);
37411
+ if (keys.length !== 1) return false;
37412
+ const bag = value;
37413
+ if (keys[0] === "Ref") return bag["Ref"] === ACCOUNT_ID_PSEUDO_PARAMETER;
37414
+ if (keys[0] === "Fn::Sub") {
37415
+ const arg = bag["Fn::Sub"];
37416
+ if (typeof arg === "string") return arg === ACCOUNT_ID_SUB_TEMPLATE;
37417
+ return Array.isArray(arg) && arg[0] === ACCOUNT_ID_SUB_TEMPLATE;
37418
+ }
37419
+ return false;
37420
+ }
37421
+ /**
37422
+ * Coerce a template-borne `CatalogId` into the string the Glue API wants, or
37423
+ * `undefined` when no usable value is present (issue
37424
+ * [#1675](https://github.com/go-to-k/cdkd/issues/1675)).
37425
+ *
37426
+ * This is {@link importableString} plus a NUMBER arm, and the number arm is
37427
+ * load-bearing rather than defensive: `cdkd import --migrate-from-cloudformation`
37428
+ * reads the stack's ORIGINAL template (`cfn-stack-prefetch.ts`), where an
37429
+ * unquoted YAML `CatalogId: 123456789012` parses as a JSON number. Rejecting it
37430
+ * as "not a string" would drop the field and silently retarget the call at the
37431
+ * account's DEFAULT catalog — which on a DELETE can destroy a same-named
37432
+ * resource that happens to live there. `Number.isFinite` keeps `NaN` /
37433
+ * `Infinity` out (they fall through to the unusable arm, where they are
37434
+ * reported); a non-integer is stringified and AWS rejects it loudly, which is
37435
+ * the right failure.
37436
+ *
37437
+ * The coercion lives HERE rather than inside `importableString`: that helper is
37438
+ * shared with `DatabaseName` / `TableInput.Name` reads, where a number is a
37439
+ * malformed template rather than a YAML scalar to recover.
37440
+ */
37441
+ function catalogIdForApi(value) {
37442
+ if (typeof value === "number" && Number.isFinite(value)) return String(value);
37443
+ return importableString(value);
37444
+ }
37445
+ function deleteCatalogId(properties) {
37446
+ const raw = properties?.["CatalogId"];
37447
+ const catalogId = catalogIdForApi(raw);
37448
+ return {
37449
+ catalogId,
37450
+ declaredButUnusable: catalogId === void 0 && raw != null && !isAccountIdPseudoParameter(raw)
37451
+ };
37452
+ }
37453
+ /** Human-readable name for the catalog a call addressed, for log messages. */
37454
+ function describeCatalog(catalogId) {
37455
+ return catalogId === void 0 ? "this account's default Data Catalog" : `Data Catalog ${catalogId}`;
37456
+ }
37457
+ /**
37458
+ * Report the `EntityNotFoundException` arm of a Glue delete, at the severity
37459
+ * the evidence supports (issue #1675).
37460
+ *
37461
+ * With a correctly-targeted delete a NotFound means the resource is already
37462
+ * gone and the skip is ordinary idempotency — debug. When the template DECLARED
37463
+ * a `CatalogId` that {@link deleteCatalogId} could not use, cdkd addressed the
37464
+ * DEFAULT catalog instead, so a NotFound is equally consistent with "the
37465
+ * resource is alive in the declared catalog" — that is the silent-leak shape,
37466
+ * and it gets a warning.
37467
+ *
37468
+ * BOTH arms name the catalog actually addressed. A LITERAL-but-wrong
37469
+ * `CatalogId` (a typo, a stale account id) is otherwise indistinguishable from
37470
+ * an already-deleted resource in the log, and it takes the debug arm.
37471
+ */
37472
+ function logCatalogScopedDeleteSkip(logger, target, kind, logicalId, physicalId) {
37473
+ const where = describeCatalog(target.catalogId);
37474
+ if (!target.declaredButUnusable) {
37475
+ logger.debug(`Glue ${kind} ${physicalId} does not exist in ${where}, skipping deletion`);
37476
+ return;
37477
+ }
37478
+ logger.warn(`Glue ${kind} ${logicalId} (${physicalId}) was not found, so cdkd skipped its deletion — but the recorded CatalogId is not a usable value (likely an unresolved intrinsic), so the delete targeted ${where}. If the resource lives in a different Data Catalog it still exists. cdkd cannot retry this delete: the state record is dropped once the destroy completes, so check the intended catalog (aws glue get-${kind.toLowerCase()} --catalog-id <id> ...) and delete the resource there by hand.`);
37479
+ }
37389
37480
  function resolveTableIdentity(input) {
37390
37481
  const { knownPhysicalId, templateDatabaseName, templateTableName } = input;
37391
37482
  let databaseName;
@@ -37517,17 +37608,18 @@ var GlueProvider = class {
37517
37608
  }
37518
37609
  async deleteDatabase(logicalId, physicalId, resourceType, properties, context) {
37519
37610
  this.logger.debug(`Deleting Glue Database ${logicalId}: ${physicalId}`);
37611
+ const target = deleteCatalogId(properties);
37612
+ if (target.declaredButUnusable) this.logger.debug(`Glue Database ${logicalId}: CatalogId is not a usable value (likely an unresolved intrinsic), so DeleteDatabase targets ${describeCatalog(target.catalogId)}.`);
37520
37613
  try {
37521
- const catalogId = properties?.["CatalogId"];
37522
37614
  await this.getClient().send(new DeleteDatabaseCommand({
37523
37615
  Name: physicalId,
37524
- ...catalogId && { CatalogId: catalogId }
37616
+ ...target.catalogId !== void 0 && { CatalogId: target.catalogId }
37525
37617
  }));
37526
37618
  this.logger.debug(`Successfully deleted Glue Database ${logicalId}`);
37527
37619
  } catch (error) {
37528
37620
  if (error instanceof EntityNotFoundException) {
37529
37621
  assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
37530
- this.logger.debug(`Glue Database ${physicalId} does not exist, skipping deletion`);
37622
+ logCatalogScopedDeleteSkip(this.logger, target, "Database", logicalId, physicalId);
37531
37623
  return;
37532
37624
  }
37533
37625
  const cause = error instanceof Error ? error : void 0;
@@ -37602,15 +37694,18 @@ var GlueProvider = class {
37602
37694
  throw new ProvisioningError(message, resourceType, logicalId, physicalId, cause);
37603
37695
  }
37604
37696
  }
37605
- async deleteTable(logicalId, physicalId, resourceType, _properties, context) {
37697
+ async deleteTable(logicalId, physicalId, resourceType, properties, context) {
37606
37698
  this.logger.debug(`Deleting Glue Table ${logicalId}: ${physicalId}`);
37607
37699
  const [databaseName, tableName] = physicalId.split("|");
37608
37700
  if (!databaseName || !tableName) {
37609
37701
  this.logger.warn(`Invalid Glue Table physical ID format: ${physicalId}, skipping`);
37610
37702
  return;
37611
37703
  }
37704
+ const target = deleteCatalogId(properties);
37705
+ if (target.declaredButUnusable) this.logger.debug(`Glue Table ${logicalId}: CatalogId is not a usable value (likely an unresolved intrinsic), so DeleteTable targets ${describeCatalog(target.catalogId)}.`);
37612
37706
  try {
37613
37707
  await this.getClient().send(new DeleteTableCommand$1({
37708
+ ...target.catalogId !== void 0 && { CatalogId: target.catalogId },
37614
37709
  DatabaseName: databaseName,
37615
37710
  Name: tableName
37616
37711
  }));
@@ -37618,7 +37713,7 @@ var GlueProvider = class {
37618
37713
  } catch (error) {
37619
37714
  if (error instanceof EntityNotFoundException) {
37620
37715
  assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
37621
- this.logger.debug(`Glue Table ${physicalId} does not exist, skipping deletion`);
37716
+ logCatalogScopedDeleteSkip(this.logger, target, "Table", logicalId, physicalId);
37622
37717
  return;
37623
37718
  }
37624
37719
  const cause = error instanceof Error ? error : void 0;
@@ -37965,7 +38060,7 @@ var GlueProvider = class {
37965
38060
  * up drift detection for the rest.
37966
38061
  */
37967
38062
  async readCurrentState(physicalId, _logicalId, resourceType, properties) {
37968
- const catalogId = properties?.["CatalogId"];
38063
+ const catalogId = catalogIdForApi(properties?.["CatalogId"]);
37969
38064
  switch (resourceType) {
37970
38065
  case "AWS::Glue::Database": return this.readDatabase(physicalId, catalogId);
37971
38066
  case "AWS::Glue::Table": return this.readTable(physicalId, catalogId);
@@ -38050,7 +38145,7 @@ var GlueProvider = class {
38050
38145
  }
38051
38146
  async importDatabase(input) {
38052
38147
  const explicitName = input.knownPhysicalId ?? importableString(input.properties["DatabaseInput"]?.["Name"]);
38053
- const catalogId = importableString(input.properties["CatalogId"]);
38148
+ const catalogId = catalogIdForApi(input.properties["CatalogId"]);
38054
38149
  if (explicitName) try {
38055
38150
  await this.getClient().send(new GetDatabaseCommand({
38056
38151
  Name: explicitName,
@@ -38070,7 +38165,7 @@ var GlueProvider = class {
38070
38165
  const databaseName = importableString(input.properties["DatabaseName"]);
38071
38166
  const tableInput = input.properties["TableInput"];
38072
38167
  const templateTableName = importableString(tableInput?.["Name"]);
38073
- const catalogId = importableString(input.properties["CatalogId"]);
38168
+ const catalogId = catalogIdForApi(input.properties["CatalogId"]);
38074
38169
  const identity = resolveTableIdentity({
38075
38170
  knownPhysicalId: input.knownPhysicalId,
38076
38171
  templateDatabaseName: databaseName,
@@ -39338,16 +39433,17 @@ var GlueConnectionProvider = class {
39338
39433
  }
39339
39434
  async delete(logicalId, physicalId, resourceType, properties, context) {
39340
39435
  this.logger.debug(`Deleting Glue Connection ${logicalId}: ${physicalId}`);
39341
- const catalogId = properties?.["CatalogId"];
39436
+ const target = deleteCatalogId(properties);
39437
+ if (target.declaredButUnusable) this.logger.debug(`Glue Connection ${logicalId}: CatalogId is not a usable value (likely an unresolved intrinsic), so DeleteConnection targets ${describeCatalog(target.catalogId)}.`);
39342
39438
  try {
39343
39439
  await this.getClient().send(new DeleteConnectionCommand({
39344
39440
  ConnectionName: physicalId,
39345
- ...catalogId && { CatalogId: catalogId }
39441
+ ...target.catalogId !== void 0 && { CatalogId: target.catalogId }
39346
39442
  }));
39347
39443
  } catch (error) {
39348
39444
  if (error instanceof EntityNotFoundException) {
39349
39445
  assertRegionMatch(await this.getClient().config.region(), context?.expectedRegion, resourceType, logicalId, physicalId);
39350
- this.logger.debug(`Glue Connection ${physicalId} does not exist, skipping deletion`);
39446
+ logCatalogScopedDeleteSkip(this.logger, target, "Connection", logicalId, physicalId);
39351
39447
  return;
39352
39448
  }
39353
39449
  const cause = error instanceof Error ? error : void 0;
@@ -39358,12 +39454,12 @@ var GlueConnectionProvider = class {
39358
39454
  if (attributeName === "Id" || attributeName === "Ref" || attributeName === "Name") return physicalId;
39359
39455
  }
39360
39456
  async readCurrentState(physicalId, _logicalId, _resourceType, properties) {
39361
- const catalogId = properties?.["CatalogId"];
39457
+ const catalogId = catalogIdForApi(properties?.["CatalogId"]);
39362
39458
  let conn;
39363
39459
  try {
39364
39460
  conn = (await this.getClient().send(new GetConnectionCommand({
39365
39461
  Name: physicalId,
39366
- ...catalogId && { CatalogId: catalogId }
39462
+ ...catalogId !== void 0 && { CatalogId: catalogId }
39367
39463
  }))).Connection;
39368
39464
  } catch (err) {
39369
39465
  if (err instanceof EntityNotFoundException) return void 0;
@@ -39385,11 +39481,11 @@ var GlueConnectionProvider = class {
39385
39481
  async import(input) {
39386
39482
  const explicitName = input.knownPhysicalId ?? input.properties["ConnectionInput"]?.["Name"];
39387
39483
  if (!explicitName) return null;
39388
- const catalogId = input.properties["CatalogId"];
39484
+ const catalogId = catalogIdForApi(input.properties["CatalogId"]);
39389
39485
  try {
39390
39486
  await this.getClient().send(new GetConnectionCommand({
39391
39487
  Name: explicitName,
39392
- ...catalogId && { CatalogId: catalogId }
39488
+ ...catalogId !== void 0 && { CatalogId: catalogId }
39393
39489
  }));
39394
39490
  return {
39395
39491
  physicalId: explicitName,
@@ -71574,7 +71670,7 @@ function createMigrateCommand() {
71574
71670
  */
71575
71671
  function buildProgram() {
71576
71672
  const program = new Command();
71577
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.280.39");
71673
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.280.40");
71578
71674
  program.hook("preAction", (_thisCommand, actionCommand) => {
71579
71675
  const { profile } = actionCommand.optsWithGlobals();
71580
71676
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;