cdk-real-drift 0.3.13 → 0.3.14

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
@@ -4295,7 +4295,10 @@ const CC_ALT_REPRESENTATION = {
4295
4295
  AvailabilityZoneId: "AvailabilityZone",
4296
4296
  AvailabilityZone: "AvailabilityZoneId"
4297
4297
  },
4298
- "AWS::ElasticLoadBalancingV2::LoadBalancer": { SubnetMappings: "Subnets" }
4298
+ "AWS::ElasticLoadBalancingV2::LoadBalancer": {
4299
+ SubnetMappings: "Subnets",
4300
+ Subnets: "SubnetMappings"
4301
+ }
4299
4302
  };
4300
4303
  const SHAPE_ECHO_TWIN = { "AWS::KinesisFirehose::DeliveryStream": { ExtendedS3DestinationConfiguration: "S3DestinationConfiguration" } };
4301
4304
  function twinOverlapEchoes(source, twin) {
@@ -4665,6 +4668,28 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
4665
4668
  };
4666
4669
  }
4667
4670
  }
4671
+ if (resourceType === "AWS::CodeBuild::Project") {
4672
+ const name = declared["Name"];
4673
+ if (typeof name === "string") knownDefPaths = {
4674
+ ...knownDefPaths,
4675
+ "Artifacts.Name": name
4676
+ };
4677
+ }
4678
+ if (resourceType === "AWS::SecretsManager::RotationSchedule") {
4679
+ const expr = declared["RotationRules"]?.["ScheduleExpression"];
4680
+ const m = typeof expr === "string" ? /^rate\((\d+)\s+days?\)$/.exec(expr.trim()) : null;
4681
+ if (m) knownDefPaths = {
4682
+ ...knownDefPaths,
4683
+ "RotationRules.AutomaticallyAfterDays": Number(m[1])
4684
+ };
4685
+ }
4686
+ if (resourceType === "AWS::AmazonMQ::Broker") {
4687
+ const engineType = declared["EngineType"];
4688
+ if (typeof engineType === "string" && engineType.toUpperCase() === "ACTIVEMQ") knownDef = {
4689
+ ...knownDef,
4690
+ StorageType: "EFS"
4691
+ };
4692
+ }
4668
4693
  if (resourceType === "AWS::Lambda::EventSourceMapping") {
4669
4694
  const arn = declared["EventSourceArn"];
4670
4695
  const service = typeof arn === "string" ? arn.split(":")[2] : void 0;
@@ -4983,14 +5008,20 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
4983
5008
  if (nvSubsetSpec?.re.test(d.path)) {
4984
5009
  const liveOnly = alignNameValueSubset(d.stateValue, d.awsValue, nvSubsetSpec);
4985
5010
  if (liveOnly) {
4986
- for (const lo of liveOnly) findings.push({
4987
- tier: "undeclared",
4988
- logicalId,
4989
- resourceType,
4990
- path: `${d.path}[${String(lo[nvSubsetSpec.nameField])}]`,
4991
- actual: lo,
4992
- nested: true
4993
- });
5011
+ for (const lo of liveOnly) {
5012
+ const loRec = lo;
5013
+ const loName = String(loRec[nvSubsetSpec.nameField]);
5014
+ const loValue = loRec[nvSubsetSpec.valueField];
5015
+ const isFirehoseRetriesDefault = resourceType === "AWS::KinesisFirehose::DeliveryStream" && loName === "NumberOfRetries" && loValue === "3";
5016
+ findings.push({
5017
+ tier: isFirehoseRetriesDefault ? "atDefault" : "undeclared",
5018
+ logicalId,
5019
+ resourceType,
5020
+ path: `${d.path}[${loName}]`,
5021
+ actual: lo,
5022
+ nested: true
5023
+ });
5024
+ }
4994
5025
  continue;
4995
5026
  }
4996
5027
  }