cdk-real-drift 0.12.103 → 0.12.105
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 +10 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3497,6 +3497,7 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
|
|
|
3497
3497
|
"AWS::AutoScaling::ScheduledAction": new Set(["StartTime"]),
|
|
3498
3498
|
"AWS::CloudFormation::Stack": new Set(["TemplateBody", "Capabilities"])
|
|
3499
3499
|
};
|
|
3500
|
+
const VALUE_INDEPENDENT_DEFAULT_NESTED_PATHS = { "AWS::Batch::ComputeEnvironment": new Set(["ComputeResources.DesiredvCpus"]) };
|
|
3500
3501
|
function isPhysicalIdSegment(value, physicalId) {
|
|
3501
3502
|
if (typeof value !== "string" || physicalId === void 0) return false;
|
|
3502
3503
|
if (value === physicalId) return true;
|
|
@@ -6493,6 +6494,13 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
6493
6494
|
for (const src of Object.values(SHAPE_ECHO_TWIN[resourceType] ?? {})) if (isNestedObject(declared[src])) twinSources[src] = declared[src];
|
|
6494
6495
|
const sfnDefinitionObject = resourceType === "AWS::StepFunctions::StateMachine" && isNestedObject(declared["Definition"]) ? declared["Definition"] : void 0;
|
|
6495
6496
|
const sfnDefinitionSubstitutions = resourceType === "AWS::StepFunctions::StateMachine" && isNestedObject(declared["DefinitionSubstitutions"]) ? declared["DefinitionSubstitutions"] : void 0;
|
|
6497
|
+
const elastiCacheRgDeclaredShape = resourceType === "AWS::ElastiCache::ReplicationGroup" ? {
|
|
6498
|
+
NumNodeGroups: declared["NumNodeGroups"],
|
|
6499
|
+
NodeGroupConfiguration: declared["NodeGroupConfiguration"],
|
|
6500
|
+
ReplicasPerNodeGroup: declared["ReplicasPerNodeGroup"],
|
|
6501
|
+
ClusterMode: declared["ClusterMode"],
|
|
6502
|
+
Engine: declared["Engine"]
|
|
6503
|
+
} : void 0;
|
|
6496
6504
|
deepStripPaths(declared, schema.writeOnlyPaths);
|
|
6497
6505
|
if (sfnDefinitionSubstitutions !== void 0 && typeof declared["DefinitionString"] === "string") declared["DefinitionString"] = applyDefinitionSubstitutions(declared["DefinitionString"], sfnDefinitionSubstitutions);
|
|
6498
6506
|
if (resourceType === "AWS::ServiceCatalogAppRegistry::AttributeGroupAssociation" && typeof physicalId === "string") {
|
|
@@ -6781,7 +6789,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
6781
6789
|
const parentKey = (path.split(".").pop() ?? "").replace(/\[.*$/, "");
|
|
6782
6790
|
if (!isObjectForm || /tags$/i.test(parentKey)) return;
|
|
6783
6791
|
}
|
|
6784
|
-
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";
|
|
6792
|
+
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) || VALUE_INDEPENDENT_DEFAULT_NESTED_PATHS[resourceType]?.has(schemaPath) && !(schemaPath in knownDefPaths) || 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";
|
|
6785
6793
|
const freeFormKey = tier === "undeclared" && underFreeFormMap(schemaPath);
|
|
6786
6794
|
findings.push({
|
|
6787
6795
|
tier,
|
|
@@ -7263,7 +7271,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
7263
7271
|
continue;
|
|
7264
7272
|
}
|
|
7265
7273
|
if (resourceType === "AWS::ElastiCache::ReplicationGroup") {
|
|
7266
|
-
const rgDerived = elastiCacheReplicationGroupDerivedDefault(k, declared);
|
|
7274
|
+
const rgDerived = elastiCacheReplicationGroupDerivedDefault(k, elastiCacheRgDeclaredShape ?? declared);
|
|
7267
7275
|
if (rgDerived !== void 0) {
|
|
7268
7276
|
findings.push({
|
|
7269
7277
|
tier: matchesKnownDefault(v, rgDerived.value) ? "atDefault" : "undeclared",
|