@go-to-k/cdkd 0.242.0 → 0.244.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.
@@ -9302,8 +9302,6 @@ const NON_PROVISIONABLE_TYPES = new Set([
9302
9302
  "AWS::AppSync::ApiCache",
9303
9303
  "AWS::AutoScalingPlans::ScalingPlan",
9304
9304
  "AWS::Bedrock::ModelInvocationJob",
9305
- "AWS::BedrockAgentCore::Browser",
9306
- "AWS::BedrockAgentCore::CodeInterpreter",
9307
9305
  "AWS::BedrockAgentCore::TokenVault",
9308
9306
  "AWS::Cloud9::EnvironmentEC2",
9309
9307
  "AWS::CloudFormation::Macro",
@@ -9340,7 +9338,6 @@ const NON_PROVISIONABLE_TYPES = new Set([
9340
9338
  "AWS::EMR::Cluster",
9341
9339
  "AWS::EMR::InstanceFleetConfig",
9342
9340
  "AWS::EMR::InstanceGroupConfig",
9343
- "AWS::FSx::FileSystem",
9344
9341
  "AWS::FSx::Snapshot",
9345
9342
  "AWS::FSx::StorageVirtualMachine",
9346
9343
  "AWS::FSx::Volume",
@@ -11165,6 +11162,25 @@ const PROPERTY_COVERAGE_BY_TYPE = new Map([
11165
11162
  ["PlacementGroup", "not yet implemented by cdkd"]
11166
11163
  ])
11167
11164
  }],
11165
+ ["AWS::BedrockAgentCore::Browser", {
11166
+ handled: /* @__PURE__ */ new Set(),
11167
+ silentDrop: /* @__PURE__ */ new Map()
11168
+ }],
11169
+ ["AWS::BedrockAgentCore::CodeInterpreter", {
11170
+ handled: /* @__PURE__ */ new Set(),
11171
+ silentDrop: /* @__PURE__ */ new Map()
11172
+ }],
11173
+ ["AWS::BedrockAgentCore::Evaluator", {
11174
+ handled: new Set([
11175
+ "Description",
11176
+ "EvaluatorConfig",
11177
+ "EvaluatorName",
11178
+ "KmsKeyArn",
11179
+ "Level",
11180
+ "Tags"
11181
+ ]),
11182
+ silentDrop: /* @__PURE__ */ new Map()
11183
+ }],
11168
11184
  ["AWS::BedrockAgentCore::Runtime", {
11169
11185
  handled: new Set([
11170
11186
  "AgentRuntimeArtifact",
@@ -11911,6 +11927,26 @@ const PROPERTY_COVERAGE_BY_TYPE = new Map([
11911
11927
  ]),
11912
11928
  silentDrop: /* @__PURE__ */ new Map()
11913
11929
  }],
11930
+ ["AWS::FSx::FileSystem", {
11931
+ handled: new Set([
11932
+ "BackupId",
11933
+ "FileSystemType",
11934
+ "FileSystemTypeVersion",
11935
+ "KmsKeyId",
11936
+ "LustreConfiguration",
11937
+ "NetworkType",
11938
+ "SecurityGroupIds",
11939
+ "StorageCapacity",
11940
+ "StorageType",
11941
+ "SubnetIds",
11942
+ "Tags"
11943
+ ]),
11944
+ silentDrop: new Map([
11945
+ ["OntapConfiguration", "FSx for NetApp ONTAP variant — the file system is only a container for SVMs/volumes (separate AWS::FSx::StorageVirtualMachine / AWS::FSx::Volume types, both still unsupported), so shipping it alone would be misleading; only the Lustre variant is supported in v1. Follow-up to issue #1042."],
11946
+ ["OpenZFSConfiguration", "FSx for OpenZFS variant — root-volume semantics (RootVolumeId, child AWS::FSx::Volume trees) are not implemented in v1; only the Lustre variant is supported. Follow-up to issue #1042."],
11947
+ ["WindowsConfiguration", "FSx for Windows File Server variant — requires Active Directory wiring and Windows-specific update/delete semantics (final backups, throughput tiers) that v1 does not implement; only the Lustre variant (the CDK L2) is supported. Follow-up to issue #1042."]
11948
+ ])
11949
+ }],
11914
11950
  ["AWS::Glue::Connection", {
11915
11951
  handled: new Set(["CatalogId", "ConnectionInput"]),
11916
11952
  silentDrop: /* @__PURE__ */ new Map()
@@ -12940,7 +12976,11 @@ function findActionableSilentDrops(resourceType, templateProperties, allowedKeys
12940
12976
  * 3. SDK Provider registered, no silent-drop properties (after the
12941
12977
  * `--allow-unsupported-properties` override filter) → SDK Provider.
12942
12978
  * 4. SDK Provider registered, silent-drop properties present, NOT all
12943
- * in the allow set → Cloud Control (auto-route, info-logged).
12979
+ * in the allow set → Cloud Control (auto-route, info-logged). When the
12980
+ * CC route is NOT viable — the type is `NON_PROVISIONABLE` (no CC
12981
+ * handlers, e.g. AWS::FSx::FileSystem) or the provider sets
12982
+ * `disableCcApiFallback` (e.g. NestedStackProvider) — throw the clear
12983
+ * pre-flight error instead of failing opaquely at provisioning time.
12944
12984
  * 5. SDK Provider registered, silent-drop properties present, ALL in
12945
12985
  * the allow set → SDK Provider (the user explicitly accepted the
12946
12986
  * silent drop, warn-logged).
@@ -12948,10 +12988,12 @@ function findActionableSilentDrops(resourceType, templateProperties, allowedKeys
12948
12988
  * 7. `--allow-unsupported-types` escape hatch → Cloud Control optimistically.
12949
12989
  * 8. Otherwise → throw (no provider available).
12950
12990
  *
12951
- * Tier 3 (`NON_PROVISIONABLE`) types are rejected earlier by
12952
- * {@link validateResourceTypes}; the silent-drop auto-route only fires for
12953
- * Tier 1 types whose SDK Provider declares `handledProperties` and where
12954
- * Cloud Control is guaranteed to be a viable alternative.
12991
+ * SDK-provider-less Tier 3 (`NON_PROVISIONABLE`) types are rejected earlier
12992
+ * by {@link validateResourceTypes}. A Tier 1 type that is ALSO
12993
+ * NON_PROVISIONABLE (SDK provider registered for a type Cloud Control cannot
12994
+ * manage e.g. AWS::FSx::FileSystem, AWS::DLM::LifecyclePolicy) passes the
12995
+ * type check but has no viable CC auto-route; rule 4's viability guard turns
12996
+ * that case into a clear pre-flight error.
12955
12997
  */
12956
12998
  /**
12957
12999
  * Types exempt from the sticky `provisionedBy: 'cc-api'` routing rule.
@@ -13086,6 +13128,7 @@ var ProviderRegistry = class {
13086
13128
  provisionedBy: "sdk"
13087
13129
  };
13088
13130
  }
13131
+ if (isNonProvisionable(resourceType) || specificProvider.disableCcApiFallback === true) throw new Error(this.buildUnroutableSilentDropMessage(resourceType, actionableDrops));
13089
13132
  this.logger.debug(`Auto-routing ${resourceType} via Cloud Control (silent-drop properties: ${actionableDrops.map((d) => d.property).join(", ")})`);
13090
13133
  return {
13091
13134
  provider: this.cloudControlProvider,
@@ -13110,6 +13153,21 @@ var ProviderRegistry = class {
13110
13153
  throw new Error(`No provider available for resource type: ${resourceType}. This resource type is not supported by Cloud Control API and no SDK provider is registered.`);
13111
13154
  }
13112
13155
  /**
13156
+ * Error message for a resource whose template uses SDK-provider-unhandled
13157
+ * properties on a type where the Cloud Control auto-route (issue #614) is
13158
+ * NOT viable — `ProvisioningType: NON_PROVISIONABLE` (no CC handlers) or a
13159
+ * provider-level `disableCcApiFallback` opt-out. Includes each property's
13160
+ * `unhandledByDesign` rationale so the user sees WHY it is unhandled, plus
13161
+ * the `--allow-unsupported-properties` escape hatch (which forces the SDK
13162
+ * path and accepts the drop — the provider may still reject the resource
13163
+ * if the property is load-bearing, e.g. a non-Lustre FSx variant config).
13164
+ */
13165
+ buildUnroutableSilentDropMessage(resourceType, drops) {
13166
+ const details = drops.map((d) => ` - ${d.property}: ${d.rationale}`).join("\n");
13167
+ const overrideHint = drops.map((d) => `${resourceType}:${d.property}`).join(",");
13168
+ return `${resourceType} uses properties cdkd's SDK Provider does not handle, and this type cannot fall back to Cloud Control API (${isNonProvisionable(resourceType) ? "ProvisioningType: NON_PROVISIONABLE — Cloud Control has no handlers for it" : "the type's SDK provider opts out of the Cloud Control fallback (disableCcApiFallback)"}):\n${details}\nRemove the properties, or force the SDK provider path and accept the drop via --allow-unsupported-properties ${overrideHint} (the provider may still reject the resource if the property is required).`;
13169
+ }
13170
+ /**
13113
13171
  * Legacy entry point that returns just the provider. Delegates to
13114
13172
  * {@link getProviderFor} with no properties / no state-recorded layer —
13115
13173
  * which means silent-drop auto-routing CANNOT fire (no template to
@@ -13187,14 +13245,17 @@ var ProviderRegistry = class {
13187
13245
  /**
13188
13246
  * Walk every resource in the template and identify top-level CFn
13189
13247
  * properties cdkd's SDK provider would silently drop on write. As of
13190
- * issue [#614](https://github.com/go-to-k/cdkd/issues/614), this method
13191
- * **no longer throws** silent drops now auto-route the resource through
13192
- * Cloud Control API by default (see {@link getProviderFor}). The method
13193
- * is retained on the name `validateResourceProperties` so existing deploy
13194
- * call sites continue to work; it now emits info-level routing decisions
13248
+ * issue [#614](https://github.com/go-to-k/cdkd/issues/614), silent drops
13249
+ * auto-route the resource through Cloud Control API by default (see
13250
+ * {@link getProviderFor}) the method emits info-level routing decisions
13195
13251
  * for each silent-drop resource, plus warn-level lines for resources
13196
13252
  * where the user explicitly opted into the silent drop via
13197
- * `--allow-unsupported-properties`.
13253
+ * `--allow-unsupported-properties`. The ONE remaining throw path is the
13254
+ * CC-route viability guard: when the auto-route target cannot manage the
13255
+ * type (`NON_PROVISIONABLE` or a provider-level `disableCcApiFallback`
13256
+ * opt-out — e.g. AWS::FSx::FileSystem's Windows/ONTAP/OpenZFS blocks),
13257
+ * this rejects pre-flight with a clear per-property error instead of
13258
+ * letting provisioning fail opaquely.
13198
13259
  *
13199
13260
  * Must be called AFTER {@link validateResourceTypes} — type-level errors
13200
13261
  * are still hard rejects. For a type allowed via `--allow-unsupported-types`,
@@ -13211,11 +13272,13 @@ var ProviderRegistry = class {
13211
13272
  * Info-log every silent-drop routing decision (auto-route via CC API) and
13212
13273
  * warn-log every silent drop the user explicitly opted into via
13213
13274
  * `--allow-unsupported-properties` (forced SDK path, the property will
13214
- * be dropped). Pure side-effect — does not mutate state and never throws.
13275
+ * be dropped). Does not mutate state; throws ONLY for the CC-route
13276
+ * viability guard (un-allowed silent drops on a type Cloud Control cannot
13277
+ * manage — see {@link buildUnroutableSilentDropMessage}).
13215
13278
  *
13216
13279
  * Issue [#614](https://github.com/go-to-k/cdkd/issues/614). Replaces the
13217
13280
  * pre-v0.16x throw path: silent drops are now a routing signal, not an
13218
- * error.
13281
+ * error (except the viability guard above).
13219
13282
  *
13220
13283
  * When the optional `provisionedBy` (from existing state) is `'cc-api'`,
13221
13284
  * the auto-route info line is demoted to `debug` — the resource has been
@@ -13238,6 +13301,8 @@ var ProviderRegistry = class {
13238
13301
  else autoRouted.push(property);
13239
13302
  }
13240
13303
  if (autoRouted.length > 0) {
13304
+ const provider = this.providers.get(resourceType);
13305
+ if (isNonProvisionable(resourceType) || provider?.disableCcApiFallback === true) throw new Error(`${logicalId}: ${this.buildUnroutableSilentDropMessage(resourceType, drops.filter((d) => autoRouted.includes(d.property)))}`);
13241
13306
  const message = `${logicalId} (${resourceType}): routing via Cloud Control API (cdkd's SDK Provider does not yet wire ${autoRouted.join(", ")} — CC API will forward the full property map. Override via --allow-unsupported-properties ${autoRouted.map((p) => `${resourceType}:${p}`).join(",")}.)`;
13242
13307
  if (provisionedBy === "cc-api") this.logger.debug(message);
13243
13308
  else this.logger.info(message);
@@ -13995,6 +14060,7 @@ const STATEFUL_TYPES = new Set([
13995
14060
  "AWS::DynamoDB::Table",
13996
14061
  "AWS::DynamoDB::GlobalTable",
13997
14062
  "AWS::EFS::FileSystem",
14063
+ "AWS::FSx::FileSystem",
13998
14064
  "AWS::S3::Bucket",
13999
14065
  "AWS::ECR::Repository",
14000
14066
  "AWS::Kinesis::Stream",
@@ -15809,11 +15875,12 @@ var DeployEngine = class {
15809
15875
  } else throw updateError;
15810
15876
  }
15811
15877
  if (result.wasReplaced) this.logger.info(`Resource ${logicalId} was replaced: ${currentResource.physicalId} -> ${result.physicalId}`);
15878
+ const carriedAttributes = result.attributes ?? (result.wasReplaced ? void 0 : currentResource.attributes);
15812
15879
  stateResources[logicalId] = {
15813
15880
  physicalId: result.physicalId,
15814
15881
  resourceType,
15815
15882
  properties: resolvedProps,
15816
- ...result.attributes && { attributes: result.attributes },
15883
+ ...carriedAttributes && { attributes: carriedAttributes },
15817
15884
  ...dependencies && dependencies.length > 0 && { dependencies },
15818
15885
  ...this.extractTemplateAttributes(template, logicalId),
15819
15886
  provisionedBy: resultProvisionedBy
@@ -16075,4 +16142,4 @@ var DeployEngine = class {
16075
16142
 
16076
16143
  //#endregion
16077
16144
  export { getDockerCmd as $, DiffCalculator as A, buildAssetRedirectMap as B, findActionableSilentDrops as C, resolveBucketRegion as Ct, refStateLookupFromResource as D, cfnRefValueFromPhysicalId as E, rebuildClientForBucketRegion as F, BOOTSTRAP_MARKER_PREFIX as G, loadPublishableAssetManifest as H, shouldRetainResource as I, parseBootstrapMarker as J, ensureAssetStorage as K, AssetPublisher as L, TemplateParser as M, LockManager as N, WAFv2WebACLProvider as O, S3StateBackend as P, formatDockerLoginError as Q, stringifyValue as R, ProviderRegistry as S, clearBucketRegionCache as St, IntrinsicFunctionResolver as T, rewriteTemplateAssetReferences as U, createAssetRedirectResolver as V, AssetModeResolver as W, validateContainerRepoName as X, validateAssetBucketName as Y, buildDockerImage as Z, green as _, CFN_TEMPLATE_URL_LIMIT as _t, withRetry as a, synthesisStatusMessage as at, IAMRoleProvider as b, uploadCfnTemplate as bt, computeImplicitDeleteEdges as c, resolveApp as ct, isStatefulRecreateTargetSync as d, resolveSkipPrefix as dt, runDockerForeground as et, renderStatefulReason as f, resolveStateBucketWithDefault as ft, gray as g, CFN_TEMPLATE_BODY_LIMIT as gt, cyan as h, warnDeprecatedNoPrefixCliFlag as ht, withResourceDeadline as i, Synthesizer as it, DagBuilder as j, applyRoleArnIfSet as k, extractDeploymentEventError as l, resolveAutoAssetStorage as lt, bold as m, resolveUseCdkBootstrapAssets as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, AssetManifestLoader as nt, isRetryableTransientError as o, getDefaultStateBucketName as ot, formatResourceLine as p, resolveStateBucketWithDefaultAndSource as pt, getBootstrapMarkerKey as q, DeployEngine as r, getDockerImageBySourceHash as rt, IMPLICIT_DELETE_DEPENDENCIES as s, getLegacyStateBucketName as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, runDockerStreaming as tt, MULTI_REGION_RECREATE_BLOCKED_TYPES as u, resolveCaptureObservedState as ut, red as v, MIGRATE_TMP_PREFIX as vt, CloudControlProvider as w, collectInlinePolicyNamesManagedBySiblings as x, AssemblyReader as xt, yellow as y, findLargeInlineResources as yt, WorkGraph as z };
16078
- //# sourceMappingURL=deploy-engine-7FfFEJkw.js.map
16145
+ //# sourceMappingURL=deploy-engine-3KNTmr1u.js.map