cdk-real-drift 0.12.100 → 0.12.102

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
@@ -2496,7 +2496,11 @@ const KNOWN_DEFAULTS = {
2496
2496
  AutoMinorVersionUpgrade: true,
2497
2497
  DataTiering: "false",
2498
2498
  NetworkType: "ipv4",
2499
- IpDiscovery: "ipv4"
2499
+ IpDiscovery: "ipv4",
2500
+ NumShards: 1,
2501
+ NumReplicasPerShard: 1,
2502
+ SnapshotRetentionLimit: 0,
2503
+ TLSEnabled: true
2500
2504
  },
2501
2505
  "AWS::RDS::DBProxy": {
2502
2506
  TargetConnectionNetworkType: "IPV4",
@@ -3439,7 +3443,11 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
3439
3443
  "EngineVersion"
3440
3444
  ]),
3441
3445
  "AWS::ElastiCache::ServerlessCache": new Set(["DailySnapshotTime"]),
3442
- "AWS::MemoryDB::Cluster": new Set(["MaintenanceWindow", "SnapshotWindow"]),
3446
+ "AWS::MemoryDB::Cluster": new Set([
3447
+ "MaintenanceWindow",
3448
+ "SnapshotWindow",
3449
+ "EngineVersion"
3450
+ ]),
3443
3451
  "AWS::Redshift::Cluster": new Set([
3444
3452
  "PreferredMaintenanceWindow",
3445
3453
  "AvailabilityZone",
@@ -5554,7 +5562,8 @@ const MEANINGFUL_WHEN_OFF = {
5554
5562
  "AWS::ApplicationInsights::Application": { CWEMonitorEnabled: () => true },
5555
5563
  "AWS::GuardDuty::Detector": { DataSources: () => true },
5556
5564
  "AWS::Lambda::EventSourceMapping": { Enabled: () => true },
5557
- "AWS::ElasticLoadBalancingV2::TargetGroup": { HealthCheckEnabled: ({ declared }) => declared["TargetType"] !== "lambda" }
5565
+ "AWS::ElasticLoadBalancingV2::TargetGroup": { HealthCheckEnabled: ({ declared }) => declared["TargetType"] !== "lambda" },
5566
+ "AWS::MemoryDB::Cluster": { TLSEnabled: () => true }
5558
5567
  };
5559
5568
  const MEANINGFUL_WHEN_OFF_NESTED = { "AWS::CloudFront::Distribution": { "DistributionConfig.IPV6Enabled": () => true } };
5560
5569
  const GUARDDUTY_FEATURE_CREATION_STATUS = {
@@ -5639,6 +5648,23 @@ function accountDerivedDefault(resourceType, key, ad) {
5639
5648
  if (resourceType === "AWS::EC2::Volume" && key === "Encrypted" && ad.ebsEncryptionByDefault !== void 0) return { value: ad.ebsEncryptionByDefault };
5640
5649
  if ((resourceType === "AWS::RDS::DBInstance" || resourceType === "AWS::DocDB::DBInstance") && key === "CACertificateIdentifier" && ad.rdsDefaultCaIdentifier !== void 0) return { value: ad.rdsDefaultCaIdentifier };
5641
5650
  }
5651
+ function elastiCacheReplicationGroupDerivedDefault(key, declared) {
5652
+ const numNodeGroups = typeof declared["NumNodeGroups"] === "number" ? declared["NumNodeGroups"] : void 0;
5653
+ const nodeGroupConfig = Array.isArray(declared["NodeGroupConfiguration"]) ? declared["NodeGroupConfiguration"] : void 0;
5654
+ const replicasPerNodeGroup = typeof declared["ReplicasPerNodeGroup"] === "number" ? declared["ReplicasPerNodeGroup"] : void 0;
5655
+ const engine = typeof declared["Engine"] === "string" ? declared["Engine"].toLowerCase() : void 0;
5656
+ const clusterModeEnabled = numNodeGroups !== void 0 && numNodeGroups > 1 || nodeGroupConfig !== void 0 && nodeGroupConfig.length > 0 || declared["ClusterMode"] === "enabled";
5657
+ if (key === "ClusterMode") return clusterModeEnabled ? { value: "enabled" } : void 0;
5658
+ if (key === "AutomaticFailoverEnabled") return clusterModeEnabled || engine === "valkey" ? { value: true } : void 0;
5659
+ if (key === "NumCacheClusters") {
5660
+ if (numNodeGroups !== void 0) return { value: numNodeGroups * (1 + (replicasPerNodeGroup ?? 0)) };
5661
+ if (nodeGroupConfig !== void 0 && nodeGroupConfig.length > 0) return { value: nodeGroupConfig.reduce((sum, g) => {
5662
+ const rc = typeof g["ReplicaCount"] === "number" ? g["ReplicaCount"] : replicasPerNodeGroup ?? 0;
5663
+ return sum + 1 + rc;
5664
+ }, 0) };
5665
+ return;
5666
+ }
5667
+ }
5642
5668
  const stripCognitoAttrPrefix = (id) => id.replace(/^(custom|dev):/, "");
5643
5669
  const IDENTITY_KEYED_SUBSET_ARRAYS = {
5644
5670
  "AWS::Cognito::UserPool": { Schema: {
@@ -7219,6 +7245,19 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
7219
7245
  });
7220
7246
  continue;
7221
7247
  }
7248
+ if (resourceType === "AWS::ElastiCache::ReplicationGroup") {
7249
+ const rgDerived = elastiCacheReplicationGroupDerivedDefault(k, declared);
7250
+ if (rgDerived !== void 0) {
7251
+ findings.push({
7252
+ tier: matchesKnownDefault(v, rgDerived.value) ? "atDefault" : "undeclared",
7253
+ logicalId,
7254
+ resourceType,
7255
+ path: k,
7256
+ actual: v
7257
+ });
7258
+ continue;
7259
+ }
7260
+ }
7222
7261
  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)) {
7223
7262
  findings.push({
7224
7263
  tier: "atDefault",