@go-to-k/cdkd 0.281.8 → 0.281.9

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 requireConfigArray, $t as expectedOwnerParam, A as green, An as withErrorHandling, At as getDockerCmd, B as slowCcOperationTimeoutMs, Bt as resolveAutoAssetStorage, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as StackHasActiveImportsError, Ct as ensureAssetStorage, D as bold, Dt as validateContainerRepoName, E as formatResourceLine, Et as validateAssetBucketName, F as clearOnUpdateRemoval, Ft as Synthesizer, G as refStateLookupFromResource, Gt as resolveUseCdkBootstrapAssets, H as isTerminationProtectionPropagationError, Ht as resolveSkipPrefix, I as ProviderRegistry, It as synthesisStatusMessage, J as resolveExplicitPhysicalId, Jt as CFN_TEMPLATE_BODY_LIMIT, K as WAFv2WebACLProvider, Kt as stateBucketExistenceConfirmed, L as findActionableSilentDrops, Lt as getDefaultStateBucketName, M as yellow, Mt as runDockerStreaming, N as IAMRoleProvider, Nt as AssetManifestLoader, O as cyan, Ot as buildDockerImage, P as collectInlinePolicyNamesManagedBySiblings, Pt as getDockerImageBySourceHash, Q as replayWarn, Qt as uploadCfnTemplate, R as findSilentDropProperties, Rt as getLegacyStateBucketName, S as extractDeploymentEventError, Sn as ResourceUpdateNotSupportedError, St as BOOTSTRAP_MARKER_PREFIX, T as renderStatefulReason, Tt as parseBootstrapMarker, U as IntrinsicFunctionResolver, Ut as resolveStateBucketWithDefault, V as disableInstanceApiTermination, Vt as resolveCaptureObservedState, W as cfnRefValueFromPhysicalId, Wt as resolveStateBucketWithDefaultAndSource, X as configStringRefusal, Xt as MIGRATE_TMP_PREFIX, Y as assertRegionMatch, Yt as CFN_TEMPLATE_URL_LIMIT, Z as readConfigString, Zt as findLargeInlineResources, _ as createPreDeleteFinalSnapshot, _n as MissingCdkCliError, _t as buildAssetRedirectMap, a as DeploymentEventsStore, an as getAwsClients, at as withRetry, b as unsupportedFinalSnapshotError, bn as ProvisioningError, bt as rewriteTemplateAssetReferences, c as replayFailedOperations, ct as DagBuilder, d as IMPLICIT_DELETE_DEPENDENCIES, dt as S3StateBackend, en as AssemblyReader, et as requireConfigObject, f as computeImplicitDeleteEdges, fn as DeployCancelledError, ft as rebuildClientForBucketRegion, g as ccRoutedFinalSnapshotError, gt as WorkGraph, h as buildFinalSnapshotIdentifier, hn as LocalStartServiceError, ht as stringifyValue, i as DeploymentEventsReader, in as AwsClients, it as describeTypeWithThrottleRetry, j as red, jt as runDockerForeground, k as gray, kn as normalizeAwsError, kt as formatDockerLoginError, l as replayRollback, ln as CdkdError, lt as TemplateParser, m as PRE_DELETE_SNAPSHOT_TYPES, mn as LocalMigrateError, mt as AssetPublisher, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as applyRoleArnIfSet, o as planFailedOps, on as resetAwsClients, ot as isRetryableTransientError, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as LocalInvokeBuildError$1, pt as shouldRetainResource, q as normalizeAwsTagsToCfn, qt as warnDeprecatedNoPrefixCliFlag, r as DeployEngine, rn as resolveBucketRegion, rt as DiffCalculator, s as planRollback, sn as setAwsClients, st as isThrottlingError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as processStackMessages, tt as requireConfigString, u as withResourceDeadline, ut as LockManager, v as isFinalSnapshotError, vn as NestedStackChildDirectDestroyError, vt as createAssetRedirectResolver, w as isStatefulRecreateTargetSync, wn as StackTerminationProtectionError, wt as getBootstrapMarkerKey, x as makeCanonicalizePropertiesFn, xn as ResourceTimeoutError, xt as AssetModeResolver, y as refusesFinalSnapshot, yn as PartialFailureError, yt as loadPublishableAssetManifest, z as CloudControlProvider, zt as resolveApp } from "./deploy-engine-OafbuSbc.js";
2
+ import { $ as replayWarn, $t as uploadCfnTemplate, A as green, An as normalizeAwsError, At as formatDockerLoginError, B as slowCcOperationTimeoutMs, Bt as resolveApp, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as ResourceUpdateNotSupportedError, Ct as BOOTSTRAP_MARKER_PREFIX, D as bold, Dt as validateAssetBucketName, E as formatResourceLine, Et as parseBootstrapMarker, F as clearOnUpdateRemoval, Ft as getDockerImageBySourceHash, G as getAccountInfo, Gt as resolveStateBucketWithDefaultAndSource, H as isTerminationProtectionPropagationError, Ht as resolveCaptureObservedState, I as ProviderRegistry, It as Synthesizer, J as normalizeAwsTagsToCfn, Jt as warnDeprecatedNoPrefixCliFlag, K as refStateLookupFromResource, Kt as resolveUseCdkBootstrapAssets, L as findActionableSilentDrops, Lt as synthesisStatusMessage, M as yellow, Mt as runDockerForeground, N as IAMRoleProvider, Nt as runDockerStreaming, O as cyan, Ot as validateContainerRepoName, P as collectInlinePolicyNamesManagedBySiblings, Pt as AssetManifestLoader, Q as readConfigString, Qt as findLargeInlineResources, R as findSilentDropProperties, Rt as getDefaultStateBucketName, S as extractDeploymentEventError, Sn as ResourceTimeoutError, St as AssetModeResolver, T as renderStatefulReason, Tn as StackTerminationProtectionError, Tt as getBootstrapMarkerKey, U as IntrinsicFunctionResolver, Ut as resolveSkipPrefix, V as disableInstanceApiTermination, Vt as resolveAutoAssetStorage, W as cfnRefValueFromPhysicalId, Wt as resolveStateBucketWithDefault, X as assertRegionMatch, Xt as CFN_TEMPLATE_URL_LIMIT, Y as resolveExplicitPhysicalId, Yt as CFN_TEMPLATE_BODY_LIMIT, Z as configStringRefusal, Zt as MIGRATE_TMP_PREFIX, _ as createPreDeleteFinalSnapshot, _t as WorkGraph, a as DeploymentEventsStore, an as AwsClients, at as describeTypeWithThrottleRetry, b as unsupportedFinalSnapshotError, bn as PartialFailureError, bt as loadPublishableAssetManifest, c as replayFailedOperations, cn as setAwsClients, ct as isThrottlingError, d as IMPLICIT_DELETE_DEPENDENCIES, dt as LockManager, en as expectedOwnerParam, et as requireConfigArray, f as computeImplicitDeleteEdges, ft as S3StateBackend, g as ccRoutedFinalSnapshotError, gn as LocalStartServiceError, gt as stringifyValue, h as buildFinalSnapshotIdentifier, hn as LocalMigrateError, ht as AssetPublisher, i as DeploymentEventsReader, in as resolveBucketRegion, it as DiffCalculator, j as red, jn as withErrorHandling, jt as getDockerCmd, k as gray, kt as buildDockerImage, l as replayRollback, lt as DagBuilder, m as PRE_DELETE_SNAPSHOT_TYPES, mn as LocalInvokeBuildError$1, mt as shouldRetainResource, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as processStackMessages, nt as requireConfigString, o as planFailedOps, on as getAwsClients, ot as withRetry, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as DeployCancelledError, pt as rebuildClientForBucketRegion, q as WAFv2WebACLProvider, qt as stateBucketExistenceConfirmed, r as DeployEngine, rt as applyRoleArnIfSet, s as planRollback, sn as resetAwsClients, st as isRetryableTransientError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as AssemblyReader, tt as requireConfigObject, u as withResourceDeadline, un as CdkdError, ut as TemplateParser, v as isFinalSnapshotError, vn as MissingCdkCliError, vt as buildAssetRedirectMap, w as isStatefulRecreateTargetSync, wn as StackHasActiveImportsError, wt as ensureAssetStorage, x as makeCanonicalizePropertiesFn, xn as ProvisioningError, xt as rewriteTemplateAssetReferences, y as refusesFinalSnapshot, yn as NestedStackChildDirectDestroyError, yt as createAssetRedirectResolver, z as CloudControlProvider, zt as getLegacyStateBucketName } from "./deploy-engine-DQ9kW3Pu.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-BhomRJhR.js";
4
+ import { t as ASGProvider } from "./asg-provider-C4zMjWYv.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";
@@ -36765,6 +36765,51 @@ var ServiceDiscoveryProvider = class ServiceDiscoveryProvider {
36765
36765
  }
36766
36766
  };
36767
36767
 
36768
+ //#endregion
36769
+ //#region src/utils/aws-partition.ts
36770
+ /**
36771
+ * AWS partition / URL-suffix derivation, shared across layers.
36772
+ *
36773
+ * Lives in `src/utils/` because it has consumers in two different layers: the
36774
+ * `cdkd local *` command family (which passes a region in once to keep the STS
36775
+ * hop minimal) and the provisioning layer's `AppSyncProvider`, which rebuilds a
36776
+ * child resource's ARN when AWS did not report one.
36777
+ *
36778
+ * It was originally defined in `src/local/ecs-task-resolver.ts`, which
36779
+ * re-exports it so every existing call site is unchanged; a provisioning
36780
+ * provider importing from `src/local/**` would invert the layering.
36781
+ *
36782
+ * NOTE this is the mapping to prefer over `getAccountInfo().partition`
36783
+ * (`src/deployment/intrinsic-function-resolver.ts`), which is hardcoded to
36784
+ * `'aws'` and says so in its own comment.
36785
+ */
36786
+ /**
36787
+ * Derive the AWS partition / URL suffix for an AWS region. Same mapping
36788
+ * CloudFormation applies to `${AWS::Partition}` / `${AWS::URLSuffix}`.
36789
+ */
36790
+ function derivePartitionAndUrlSuffix(region) {
36791
+ if (region.startsWith("cn-")) return {
36792
+ partition: "aws-cn",
36793
+ urlSuffix: "amazonaws.com.cn"
36794
+ };
36795
+ if (region.startsWith("us-gov-")) return {
36796
+ partition: "aws-us-gov",
36797
+ urlSuffix: "amazonaws.com"
36798
+ };
36799
+ if (region.startsWith("us-iso-")) return {
36800
+ partition: "aws-iso",
36801
+ urlSuffix: "c2s.ic.gov"
36802
+ };
36803
+ if (region.startsWith("us-isob-")) return {
36804
+ partition: "aws-iso-b",
36805
+ urlSuffix: "sc2s.sgov.gov"
36806
+ };
36807
+ return {
36808
+ partition: "aws",
36809
+ urlSuffix: "amazonaws.com"
36810
+ };
36811
+ }
36812
+
36768
36813
  //#endregion
36769
36814
  //#region src/provisioning/providers/appsync-provider.ts
36770
36815
  const MUTABLE_GRAPHQL_API_CONFIG_PROPERTIES = [
@@ -36882,6 +36927,111 @@ var AppSyncProvider = class {
36882
36927
  return this.client;
36883
36928
  }
36884
36929
  /**
36930
+ * Build a child-resource ARN from the deploy's REAL partition / region /
36931
+ * account (issue #1681).
36932
+ *
36933
+ * The three child types record an ARN attribute because CloudFormation's
36934
+ * `Ref` for each of them returns the resource ARN (docs-verified 2026-08-12)
36935
+ * and `Fn::GetAtt` serves the same value from the same cached map — this
36936
+ * provider's `getAttribute` always resolves `undefined`, so the recorded
36937
+ * attribute is the ONLY source for both intrinsics.
36938
+ *
36939
+ * Until #1681 those attributes were string-built as
36940
+ * `arn:aws:appsync:*:*:...`, i.e. with literal `*` in the region and account
36941
+ * positions, so every consumer received an ARN AWS cannot resolve. Prefer the
36942
+ * ARN the create response reports (`dataSourceArn` / `resolverArn`); this
36943
+ * helper is for `AWS::AppSync::ApiKey`, whose `CreateApiKey` response carries
36944
+ * no ARN field at all, and as the fallback for the other two when a response
36945
+ * comes back without one.
36946
+ *
36947
+ * `getAccountInfo` is the same STS-backed, process-cached resolver
36948
+ * `CloudControlProvider` uses for its own ARN reconstruction, so this costs
36949
+ * at most one `GetCallerIdentity` per deploy.
36950
+ */
36951
+ async buildAppSyncArn(suffix) {
36952
+ const accountInfo = await getAccountInfo(this.providerRegion ?? await this.getClient().config.region());
36953
+ const { partition } = derivePartitionAndUrlSuffix(accountInfo.region);
36954
+ return `arn:${partition}:appsync:${accountInfo.region}:${accountInfo.accountId}:${suffix}`;
36955
+ }
36956
+ /**
36957
+ * {@link buildAppSyncArn} for the POST-CREATE sites, where throwing is not an
36958
+ * option (issue #1681 PR review).
36959
+ *
36960
+ * Moving the ARN build outside the create `try` stops a failure being
36961
+ * re-labelled as a creation failure — but on its own it does NOT stop the
36962
+ * resource being orphaned: `create()` still throws, the engine still journals
36963
+ * no physicalId for a failed CREATE, and the resource still sits in AWS
36964
+ * untracked (the issue #1710 class). Since the ARN is bookkeeping and the
36965
+ * resource already exists, the honest answer is to never fail the create for
36966
+ * it: warn, omit the attribute, and let `Ref` fall back to the compound id
36967
+ * exactly as it does for an imported child. The resource's next update heals
36968
+ * the record via `childRefAttributes`.
36969
+ */
36970
+ async buildAppSyncArnOrWarn(suffix, logicalId, physicalId) {
36971
+ try {
36972
+ return await this.buildAppSyncArn(suffix);
36973
+ } catch (error) {
36974
+ this.logger.warn(`Created ${logicalId} (${physicalId}) but could not build its ARN attribute: ${error instanceof Error ? error.message : String(error)}. Ref will resolve to the compound physical id until the next update.`);
36975
+ return;
36976
+ }
36977
+ }
36978
+ /**
36979
+ * Rebuild a child type's COMPLETE attribute set from its compound physical id
36980
+ * (issue #1681), for the update path to return.
36981
+ *
36982
+ * This is what heals a record written by a pre-#1681 binary. `update()`
36983
+ * previously returned no attributes, and the deploy engine carries the
36984
+ * existing ones forward when a provider reports none — so without this a
36985
+ * resource created before the fix would keep its `arn:aws:appsync:*:*:...`
36986
+ * placeholder for the rest of its life, since only a REPLACEMENT re-runs
36987
+ * `create()`. `Fn::GetAtt` reads the same cached map, so the placeholder was
36988
+ * breaking that intrinsic too, independently of the `Ref` defect #1681 is
36989
+ * about.
36990
+ *
36991
+ * It must return EVERY key the create path records, not just the ARN: an
36992
+ * `attributes` map returned from `update()` REPLACES the record's map
36993
+ * wholesale rather than merging into it (`deploy-engine.ts`), so a partial
36994
+ * answer would silently drop `Name` / `ApiKey`.
36995
+ *
36996
+ * Returns `undefined` for an id whose arity does not match the type — a
36997
+ * record that malformed cannot be healed by guessing, and carrying the
36998
+ * existing attributes forward is the safe answer.
36999
+ */
37000
+ async childRefAttributes(resourceType, physicalId) {
37001
+ const parts = physicalId.split("|");
37002
+ if (resourceType === "AWS::AppSync::DataSource" && parts.length === 2) {
37003
+ const [apiId, name] = parts;
37004
+ return {
37005
+ DataSourceArn: await this.buildAppSyncArn(`apis/${apiId}/datasources/${name}`),
37006
+ Name: name
37007
+ };
37008
+ }
37009
+ if (resourceType === "AWS::AppSync::Resolver" && parts.length === 3) {
37010
+ const [apiId, typeName, fieldName] = parts;
37011
+ return { ResolverArn: await this.buildAppSyncArn(`apis/${apiId}/types/${typeName}/resolvers/${fieldName}`) };
37012
+ }
37013
+ if (resourceType === "AWS::AppSync::ApiKey" && parts.length === 2) {
37014
+ const [apiId, apiKeyId] = parts;
37015
+ return {
37016
+ ApiKey: apiKeyId,
37017
+ Arn: await this.buildAppSyncArn(`apis/${apiId}/apikey/${apiKeyId}`)
37018
+ };
37019
+ }
37020
+ }
37021
+ /**
37022
+ * The no-replacement update result for a child type, carrying the healed
37023
+ * attribute set (issue #1681). Reporting none is still the correct answer for
37024
+ * an unhealable id — the engine then carries the existing attributes forward.
37025
+ */
37026
+ async childUpdateResult(resourceType, physicalId) {
37027
+ const attributes = await this.childRefAttributes(resourceType, physicalId);
37028
+ return {
37029
+ physicalId,
37030
+ wasReplaced: false,
37031
+ ...attributes && { attributes }
37032
+ };
37033
+ }
37034
+ /**
36885
37035
  * Lazy S3 client for the `*S3Location` properties (Resolver
36886
37036
  * `CodeS3Location` / `RequestMappingTemplateS3Location` /
36887
37037
  * `ResponseMappingTemplateS3Location`, GraphQLSchema
@@ -37071,10 +37221,7 @@ var AppSyncProvider = class {
37071
37221
  "EventBridgeConfig",
37072
37222
  "RelationalDatabaseConfig",
37073
37223
  "MetricsConfig"
37074
- ].some((key) => (key in properties || key in previousProperties) && !this.deepEqual(properties[key], previousProperties[key]))) return {
37075
- physicalId,
37076
- wasReplaced: false
37077
- };
37224
+ ].some((key) => (key in properties || key in previousProperties) && !this.deepEqual(properties[key], previousProperties[key]))) return this.childUpdateResult(resourceType, physicalId);
37078
37225
  const input = {
37079
37226
  apiId,
37080
37227
  name,
@@ -37086,10 +37233,7 @@ var AppSyncProvider = class {
37086
37233
  } catch (error) {
37087
37234
  throw this.wrapUpdateError(error, resourceType, logicalId, physicalId, "DataSource");
37088
37235
  }
37089
- return {
37090
- physicalId,
37091
- wasReplaced: false
37092
- };
37236
+ return this.childUpdateResult(resourceType, physicalId);
37093
37237
  }
37094
37238
  async updateResolver(logicalId, physicalId, resourceType, properties, previousProperties) {
37095
37239
  for (const field of [
@@ -37119,10 +37263,7 @@ var AppSyncProvider = class {
37119
37263
  "CodeS3Location",
37120
37264
  "RequestMappingTemplateS3Location",
37121
37265
  "ResponseMappingTemplateS3Location"
37122
- ].some((key) => (key in properties || key in previousProperties) && !this.deepEqual(properties[key], previousProperties[key]))) return {
37123
- physicalId,
37124
- wasReplaced: false
37125
- };
37266
+ ].some((key) => (key in properties || key in previousProperties) && !this.deepEqual(properties[key], previousProperties[key]))) return this.childUpdateResult(resourceType, physicalId);
37126
37267
  const input = {
37127
37268
  apiId,
37128
37269
  typeName,
@@ -37134,10 +37275,7 @@ var AppSyncProvider = class {
37134
37275
  } catch (error) {
37135
37276
  throw this.wrapUpdateError(error, resourceType, logicalId, physicalId, "Resolver");
37136
37277
  }
37137
- return {
37138
- physicalId,
37139
- wasReplaced: false
37140
- };
37278
+ return this.childUpdateResult(resourceType, physicalId);
37141
37279
  }
37142
37280
  async updateApiKey(logicalId, physicalId, resourceType, properties, previousProperties) {
37143
37281
  if (properties["ApiId"] !== void 0 && previousProperties["ApiId"] !== void 0 && properties["ApiId"] !== previousProperties["ApiId"]) throw new ResourceUpdateNotSupportedError(resourceType, logicalId, "AWS AppSync ApiKey.ApiId is immutable — destroy + redeploy to change");
@@ -37147,10 +37285,7 @@ var AppSyncProvider = class {
37147
37285
  const oldDesc = previousProperties["Description"];
37148
37286
  const newExp = properties["Expires"];
37149
37287
  const oldExp = previousProperties["Expires"];
37150
- if (newDesc === oldDesc && newExp === oldExp) return {
37151
- physicalId,
37152
- wasReplaced: false
37153
- };
37288
+ if (newDesc === oldDesc && newExp === oldExp) return this.childUpdateResult(resourceType, physicalId);
37154
37289
  const input = {
37155
37290
  apiId,
37156
37291
  id: apiKeyId
@@ -37162,10 +37297,7 @@ var AppSyncProvider = class {
37162
37297
  } catch (error) {
37163
37298
  throw this.wrapUpdateError(error, resourceType, logicalId, physicalId, "ApiKey");
37164
37299
  }
37165
- return {
37166
- physicalId,
37167
- wasReplaced: false
37168
- };
37300
+ return this.childUpdateResult(resourceType, physicalId);
37169
37301
  }
37170
37302
  /**
37171
37303
  * Apply a Tags diff to a GraphqlApi via TagResource / UntagResource.
@@ -37827,6 +37959,7 @@ var AppSyncProvider = class {
37827
37959
  name: "name",
37828
37960
  value: name
37829
37961
  }], context?.replayingState === true ? { onRefusal: (message) => this.logger.warn(message) } : void 0);
37962
+ let reportedArn;
37830
37963
  try {
37831
37964
  const input = {
37832
37965
  apiId,
@@ -37834,19 +37967,20 @@ var AppSyncProvider = class {
37834
37967
  type
37835
37968
  };
37836
37969
  this.applyDataSourceConfig(input, resourceType, logicalId, properties);
37837
- await this.getClient().send(new CreateDataSourceCommand(input));
37970
+ reportedArn = (await this.getClient().send(new CreateDataSourceCommand(input))).dataSource?.dataSourceArn;
37838
37971
  this.logger.debug(`Successfully created DataSource ${logicalId}: ${physicalId}`);
37839
- return {
37840
- physicalId,
37841
- attributes: {
37842
- DataSourceArn: `arn:aws:appsync:*:*:apis/${apiId}/datasources/${name}`,
37843
- Name: name
37844
- }
37845
- };
37846
37972
  } catch (error) {
37847
37973
  const cause = error instanceof Error ? error : void 0;
37848
37974
  throw new ProvisioningError(`Failed to create DataSource ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
37849
37975
  }
37976
+ const dataSourceArn = reportedArn ?? await this.buildAppSyncArnOrWarn(`apis/${apiId}/datasources/${name}`, logicalId, physicalId);
37977
+ return {
37978
+ physicalId,
37979
+ attributes: {
37980
+ ...dataSourceArn !== void 0 && { DataSourceArn: dataSourceArn },
37981
+ Name: name
37982
+ }
37983
+ };
37850
37984
  }
37851
37985
  async deleteDataSource(logicalId, physicalId, resourceType, context) {
37852
37986
  this.logger.debug(`Deleting DataSource ${logicalId}: ${physicalId}`);
@@ -37891,6 +38025,7 @@ var AppSyncProvider = class {
37891
38025
  value: fieldName
37892
38026
  }
37893
38027
  ], context?.replayingState === true ? { onRefusal: (message) => this.logger.warn(message) } : void 0);
38028
+ let reportedArn;
37894
38029
  try {
37895
38030
  const input = {
37896
38031
  apiId,
@@ -37898,16 +38033,17 @@ var AppSyncProvider = class {
37898
38033
  fieldName
37899
38034
  };
37900
38035
  await this.applyResolverConfig(input, resourceType, logicalId, properties);
37901
- await this.getClient().send(new CreateResolverCommand(input));
38036
+ reportedArn = (await this.getClient().send(new CreateResolverCommand(input))).resolver?.resolverArn;
37902
38037
  this.logger.debug(`Successfully created Resolver ${logicalId}: ${physicalId}`);
37903
- return {
37904
- physicalId,
37905
- attributes: { ResolverArn: `arn:aws:appsync:*:*:apis/${apiId}/types/${typeName}/resolvers/${fieldName}` }
37906
- };
37907
38038
  } catch (error) {
37908
38039
  const cause = error instanceof Error ? error : void 0;
37909
38040
  throw new ProvisioningError(`Failed to create Resolver ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
37910
38041
  }
38042
+ const resolverArn = reportedArn ?? await this.buildAppSyncArnOrWarn(`apis/${apiId}/types/${typeName}/resolvers/${fieldName}`, logicalId, physicalId);
38043
+ return {
38044
+ physicalId,
38045
+ attributes: { ...resolverArn !== void 0 && { ResolverArn: resolverArn } }
38046
+ };
37911
38047
  }
37912
38048
  async deleteResolver(logicalId, physicalId, resourceType, context) {
37913
38049
  this.logger.debug(`Deleting Resolver ${logicalId}: ${physicalId}`);
@@ -37949,17 +38085,19 @@ var AppSyncProvider = class {
37949
38085
  const cause = error instanceof Error ? error : void 0;
37950
38086
  throw new ProvisioningError(`Failed to create ApiKey ${logicalId}: ${error instanceof Error ? error.message : String(error)}`, resourceType, logicalId, void 0, cause);
37951
38087
  }
38088
+ const physicalId = packCompositeId(resourceType, logicalId, [{
38089
+ name: "apiId",
38090
+ value: apiId
38091
+ }, {
38092
+ name: "apiKeyId",
38093
+ value: apiKeyId
38094
+ }], context?.replayingState === true ? { onRefusal: (message) => this.logger.warn(message) } : void 0);
38095
+ const apiKeyArn = await this.buildAppSyncArnOrWarn(`apis/${apiId}/apikey/${apiKeyId}`, logicalId, physicalId);
37952
38096
  return {
37953
- physicalId: packCompositeId(resourceType, logicalId, [{
37954
- name: "apiId",
37955
- value: apiId
37956
- }, {
37957
- name: "apiKeyId",
37958
- value: apiKeyId
37959
- }], context?.replayingState === true ? { onRefusal: (message) => this.logger.warn(message) } : void 0),
38097
+ physicalId,
37960
38098
  attributes: {
37961
38099
  ApiKey: apiKeyId,
37962
- Arn: `arn:aws:appsync:*:*:apis/${apiId}/apikeys/${apiKeyId}`
38100
+ ...apiKeyArn !== void 0 && { Arn: apiKeyArn }
37963
38101
  }
37964
38102
  };
37965
38103
  }
@@ -64628,34 +64766,6 @@ function notFoundError$1(target, stack, resources) {
64628
64766
 
64629
64767
  //#endregion
64630
64768
  //#region src/local/ecs-task-resolver.ts
64631
- /**
64632
- * Derive the AWS partition / URL suffix for an AWS region. Same mapping
64633
- * CloudFormation applies to `${AWS::Partition}` / `${AWS::URLSuffix}`.
64634
- * Exported so the CLI can keep the STS hop minimal — caller passes the
64635
- * region in once, this returns the matching partition + suffix.
64636
- */
64637
- function derivePartitionAndUrlSuffix(region) {
64638
- if (region.startsWith("cn-")) return {
64639
- partition: "aws-cn",
64640
- urlSuffix: "amazonaws.com.cn"
64641
- };
64642
- if (region.startsWith("us-gov-")) return {
64643
- partition: "aws-us-gov",
64644
- urlSuffix: "amazonaws.com"
64645
- };
64646
- if (region.startsWith("us-iso-")) return {
64647
- partition: "aws-iso",
64648
- urlSuffix: "c2s.ic.gov"
64649
- };
64650
- if (region.startsWith("us-isob-")) return {
64651
- partition: "aws-iso-b",
64652
- urlSuffix: "sc2s.sgov.gov"
64653
- };
64654
- return {
64655
- partition: "aws",
64656
- urlSuffix: "amazonaws.com"
64657
- };
64658
- }
64659
64769
  function detectEcsImageResolutionNeeds(stack) {
64660
64770
  const resources = stack.template.Resources ?? {};
64661
64771
  let needsPseudoParameters = false;
@@ -73301,7 +73411,7 @@ function createMigrateCommand() {
73301
73411
  */
73302
73412
  function buildProgram() {
73303
73413
  const program = new Command();
73304
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.281.8");
73414
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.281.9");
73305
73415
  program.hook("preAction", (_thisCommand, actionCommand) => {
73306
73416
  const { profile } = actionCommand.optsWithGlobals();
73307
73417
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;