cdk-real-drift 0.12.68 → 0.12.70

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
@@ -3427,7 +3427,6 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
3427
3427
  "AWS::StepFunctions::StateMachineVersion": new Set(["StateMachineRevisionId"]),
3428
3428
  "AWS::StepFunctions::StateMachineAlias": new Set(["StateMachineArn"]),
3429
3429
  "AWS::AutoScaling::ScheduledAction": new Set(["StartTime"]),
3430
- "AWS::RedshiftServerless::Workgroup": new Set(["ConfigParameters"]),
3431
3430
  "AWS::CloudFormation::Stack": new Set(["TemplateBody", "Capabilities"])
3432
3431
  };
3433
3432
  function isPhysicalIdSegment(value, physicalId) {
@@ -5522,6 +5521,17 @@ function shouldFoldDefaultSubnetList(resourceType, key, liveValue, defaultSubnet
5522
5521
  return liveValue.every((s) => typeof s === "string" && defaultSubnetIds.has(s));
5523
5522
  }
5524
5523
  const DEFAULT_SUBNET_LIST_PATHS = { "AWS::RedshiftServerless::Workgroup": "SubnetIds" };
5524
+ const RS_WORKGROUP_CONFIG_PARAM_DEFAULTS = {
5525
+ auto_mv: "true",
5526
+ datestyle: "ISO, MDY",
5527
+ enable_case_sensitive_identifier: "false",
5528
+ enable_user_activity_logging: "true",
5529
+ query_group: "default",
5530
+ require_ssl: "true",
5531
+ search_path: "$user, public",
5532
+ use_fips_ssl: "false",
5533
+ max_query_execution_time: "14400"
5534
+ };
5525
5535
  /** #889 fold decision for an UNDECLARED default-SG list (ALB SecurityGroups / ENI GroupSet).
5526
5536
  * Returns whether the value-independent fold should still apply for this live value:
5527
5537
  * - `true` → FOLD (atDefault): the live list is a single VPC-default SG id, OR the prefetch is
@@ -5852,7 +5862,7 @@ function cloneDeepWithSymbols(v) {
5852
5862
  }
5853
5863
  const isPolicyStatementArray = (arr) => arr.length > 0 && arr.every((el) => isNestedObject(el) && "Effect" in el);
5854
5864
  const isInlinePolicyArray = (arr) => arr.length > 0 && arr.every((el) => isNestedObject(el) && "PolicyDocument" in el);
5855
- const isKeyValueTagList = (arr) => arr.length > 0 && identityField(arr) === "Key" && arr.every((el) => isNestedObject(el) && "Value" in el);
5865
+ const isIdentitySortedObjectArray = (arr) => arr.length > 0 && identityField(arr) !== void 0;
5856
5866
  function isPolicySubsetOf(sub, sup) {
5857
5867
  for (const [k, v] of Object.entries(sub)) {
5858
5868
  if (!(k in sup)) return false;
@@ -6884,14 +6894,14 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
6884
6894
  const transformExpr = schema.propertyTransforms?.[d.path] ?? schema.propertyTransforms?.[d.path.replace(/\.\d+(?=\.|$)/g, ".*")];
6885
6895
  if (transformExpr !== void 0 && matchesPropertyTransform(transformExpr, d.stateValue, resolveParentObject(declared, d.path), declared, d.awsValue, d.path.split(".").at(-1) ?? d.path)) continue;
6886
6896
  if (schema.propertyTransforms !== void 0 && transformExpr === void 0 && matchesAncestorPropertyTransform(schema.propertyTransforms, d.path, declared, live)) continue;
6887
- const tagListWhole = !unorderedObjArray && Array.isArray(v) && isKeyValueTagList(v) && d.path.startsWith(`${k}.`);
6897
+ const identitySortedWhole = !unorderedObjArray && Array.isArray(v) && isIdentitySortedObjectArray(v) && d.path.startsWith(`${k}.`);
6888
6898
  const unorderedExtra = unorderedObjArray && Array.isArray(declaredVal) && declaredRemapSource ? {
6889
6899
  path: remapSortedIndexToDeclared(d.path, k, declaredVal, declaredRemapSource),
6890
6900
  wholeArrayRevert: {
6891
6901
  path: k,
6892
6902
  value: v
6893
6903
  }
6894
- } : tagListWhole ? { wholeArrayRevert: {
6904
+ } : identitySortedWhole ? { wholeArrayRevert: {
6895
6905
  path: k,
6896
6906
  value: v
6897
6907
  } } : {};
@@ -6973,6 +6983,26 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
6973
6983
  });
6974
6984
  continue;
6975
6985
  }
6986
+ if (resourceType === "AWS::RedshiftServerless::Workgroup" && k === "ConfigParameters" && Array.isArray(v)) {
6987
+ for (const el of v) {
6988
+ if (!el || typeof el !== "object") continue;
6989
+ const e = el;
6990
+ const pk = e.ParameterKey ?? e.parameterKey;
6991
+ const pv = e.ParameterValue ?? e.parameterValue;
6992
+ if (typeof pk !== "string") continue;
6993
+ const def = RS_WORKGROUP_CONFIG_PARAM_DEFAULTS[pk];
6994
+ const isDefault = def === void 0 || pv === def || isStringlyEqualScalar(pv, def);
6995
+ findings.push({
6996
+ tier: isDefault ? "atDefault" : "undeclared",
6997
+ logicalId,
6998
+ resourceType,
6999
+ path: `${k}[${pk}]`,
7000
+ actual: pv,
7001
+ nested: true
7002
+ });
7003
+ }
7004
+ continue;
7005
+ }
6976
7006
  if (k in schema.defaults && matchesKnownDefault(v, schema.defaults[k]) || k in schema.defaultPaths && matchesKnownDefault(v, schema.defaultPaths[k]) || k in knownDef && matchesKnownDefault(v, knownDef[k]) || KNOWN_DEFAULT_ONE_OF[resourceType]?.[k]?.some((d) => matchesKnownDefault(v, d)) || VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS[resourceType]?.has(k) && !isTrivialEmpty(v) && !(k in knownDef) || clbDefaultSslPoliciesAtDefault(resourceType, k, v)) {
6977
7007
  findings.push({
6978
7008
  tier: "atDefault",