cdk-real-drift 0.12.93 → 0.12.94

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
@@ -5550,6 +5550,7 @@ const MEANINGFUL_WHEN_OFF = {
5550
5550
  "AWS::Lambda::EventSourceMapping": { Enabled: () => true },
5551
5551
  "AWS::ElasticLoadBalancingV2::TargetGroup": { HealthCheckEnabled: ({ declared }) => declared["TargetType"] !== "lambda" }
5552
5552
  };
5553
+ const MEANINGFUL_WHEN_OFF_NESTED = { "AWS::CloudFront::Distribution": { "DistributionConfig.IPV6Enabled": () => true } };
5553
5554
  const GUARDDUTY_DEFAULT_DISABLED_FEATURES = new Set(["AI_ANALYST"]);
5554
5555
  function guardDutyFeaturesAllAtDefault(features) {
5555
5556
  const atDefault = (node) => {
@@ -6715,13 +6716,16 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
6715
6716
  const freeFormMapPaths = schema.freeFormMapPaths ?? [];
6716
6717
  const underFreeFormMap = (schemaPath) => freeFormMapPaths.some((ff) => schemaPath.startsWith(`${ff}.`));
6717
6718
  const emitNested = (path, value) => {
6718
- if (isTrivialEmpty(value)) return;
6719
+ const schemaPath = path.replace(/\[[^\]]*\]/g, ".*");
6720
+ if (!(schemaPath in knownDefPaths && !matchesKnownDefault(value, knownDefPaths[schemaPath]) && (MEANINGFUL_WHEN_OFF_NESTED[resourceType]?.[schemaPath]?.({
6721
+ declared,
6722
+ live
6723
+ }) ?? false)) && isTrivialEmpty(value)) return;
6719
6724
  if (isAllAwsTags(value)) {
6720
6725
  const isObjectForm = value !== null && typeof value === "object" && !Array.isArray(value);
6721
6726
  const parentKey = (path.split(".").pop() ?? "").replace(/\[.*$/, "");
6722
6727
  if (!isObjectForm || /tags$/i.test(parentKey)) return;
6723
6728
  }
6724
- const schemaPath = path.replace(/\[[^\]]*\]/g, ".*");
6725
6729
  const tier = schemaPath in schema.defaultPaths && matchesKnownDefault(value, schema.defaultPaths[schemaPath]) || schemaPath in knownDefPaths && matchesKnownDefault(value, knownDefPaths[schemaPath]) || (KNOWN_DEFAULT_ONE_OF_PATHS[resourceType]?.[schemaPath]?.some((d) => matchesKnownDefault(value, d)) ?? false) || dynamoGsiWarmThroughputAtDefault(resourceType, path, value, live) || resourceType === "AWS::Events::EventBusPolicy" && schemaPath === "Statement.*.Sid" && typeof value === "string" && value === declared["StatementId"] ? "atDefault" : generatedPaths.includes(schemaPath) && isPhysicalIdSegment(value, physicalId) || generatedNestedPaths?.has(schemaPath) && !(schemaPath in knownDefPaths) && (!(schemaPath in (MANAGED_KEY_ALIAS_PATHS[resourceType] ?? {})) || shouldFoldManagedServiceKey(resourceType, schemaPath, value, opts.kmsAliasTargets)) ? "generated" : "undeclared";
6726
6730
  const freeFormKey = tier === "undeclared" && underFreeFormMap(schemaPath);
6727
6731
  findings.push({