cdk-real-drift 0.9.9 → 0.9.10
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 +47 -0
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -5508,6 +5508,40 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
5508
5508
|
StorageType: storageDefault
|
|
5509
5509
|
};
|
|
5510
5510
|
}
|
|
5511
|
+
if (resourceType === "AWS::CE::AnomalySubscription") {
|
|
5512
|
+
const threshold = declared["Threshold"];
|
|
5513
|
+
if (typeof threshold === "number" && Number.isFinite(threshold)) {
|
|
5514
|
+
const decimal = Number.isInteger(threshold) ? `${threshold}.0` : String(threshold);
|
|
5515
|
+
knownDef = {
|
|
5516
|
+
...knownDef,
|
|
5517
|
+
ThresholdExpression: JSON.stringify({ Dimensions: {
|
|
5518
|
+
Key: "ANOMALY_TOTAL_IMPACT_ABSOLUTE",
|
|
5519
|
+
MatchOptions: ["GREATER_THAN_OR_EQUAL"],
|
|
5520
|
+
Values: [decimal]
|
|
5521
|
+
} })
|
|
5522
|
+
};
|
|
5523
|
+
}
|
|
5524
|
+
}
|
|
5525
|
+
if (resourceType === "AWS::ElastiCache::ReplicationGroup" && declared["TransitEncryptionEnabled"] === true) knownDef = {
|
|
5526
|
+
...knownDef,
|
|
5527
|
+
TransitEncryptionMode: "required"
|
|
5528
|
+
};
|
|
5529
|
+
if (resourceType === "AWS::EC2::TransitGatewayRoute") {
|
|
5530
|
+
const rtb = declared["TransitGatewayRouteTableId"];
|
|
5531
|
+
const cidr = declared["DestinationCidrBlock"];
|
|
5532
|
+
if (typeof rtb === "string" && typeof cidr === "string") knownDef = {
|
|
5533
|
+
...knownDef,
|
|
5534
|
+
Id: `${rtb}_${cidr}`
|
|
5535
|
+
};
|
|
5536
|
+
}
|
|
5537
|
+
if (resourceType === "AWS::EC2::TransitGatewayRouteTableAssociation") {
|
|
5538
|
+
const attach = declared["TransitGatewayAttachmentId"];
|
|
5539
|
+
const rtb = declared["TransitGatewayRouteTableId"];
|
|
5540
|
+
if (typeof attach === "string" && typeof rtb === "string") knownDef = {
|
|
5541
|
+
...knownDef,
|
|
5542
|
+
Id: `${attach}_${rtb}`
|
|
5543
|
+
};
|
|
5544
|
+
}
|
|
5511
5545
|
if (resourceType === "AWS::Lambda::EventSourceMapping") {
|
|
5512
5546
|
const arn = declared["EventSourceArn"];
|
|
5513
5547
|
const service = typeof arn === "string" ? arn.split(":")[2] : void 0;
|
|
@@ -6088,6 +6122,19 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
6088
6122
|
});
|
|
6089
6123
|
continue;
|
|
6090
6124
|
}
|
|
6125
|
+
if (resourceType === "AWS::ElastiCache::ReplicationGroup" && k === "SnapshottingClusterId" && typeof v === "string") {
|
|
6126
|
+
const rgId = declared["ReplicationGroupId"] ?? physicalId;
|
|
6127
|
+
if (typeof rgId === "string" && new RegExp(`^${rgId.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}-\\d{3}$`).test(v)) {
|
|
6128
|
+
findings.push({
|
|
6129
|
+
tier: "atDefault",
|
|
6130
|
+
logicalId,
|
|
6131
|
+
resourceType,
|
|
6132
|
+
path: k,
|
|
6133
|
+
actual: v
|
|
6134
|
+
});
|
|
6135
|
+
continue;
|
|
6136
|
+
}
|
|
6137
|
+
}
|
|
6091
6138
|
if (k in genDef && deepEqual(v, genDef[k])) {
|
|
6092
6139
|
findings.push({
|
|
6093
6140
|
tier: "generated",
|