Skip to content

Commit 316375e

Browse files
author
Mateo Ruiz
committed
add logging to connector fallback
1 parent 7953819 commit 316375e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Tools/Create-Azure-Sentinel-Solution/common/createCCPConnector.ps1

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,8 @@ function createCCPConnectorResources($contentResourceDetails, $dataFileMetadata,
768768
}
769769
# Process only the first item, it will be parameterized
770770
CCPDataConnectorsResource -fileContent $fileContent[0];
771-
} else {
771+
}
772+
else {
772773
foreach ($content in $fileContent) {
773774
CCPDataConnectorsResource -fileContent $content;
774775
}
@@ -1458,15 +1459,18 @@ function CreateAwsResourceProperties($armResource, $templateContentConnections,
14581459
if ($i -eq $mappingArray.Count - 1) {
14591460
# Last item (rightmost in the conditional)
14601461
$conditionalLogic = "'$destTable'"
1461-
} else {
1462+
}
1463+
else {
14621464
# Wrap with if(equals())
14631465
$conditionalLogic = "if(equals(parameters('streamName')[0], '$streamName'), '$destTable', $conditionalLogic)"
14641466
}
14651467
}
14661468

14671469
$armResource.properties.destinationTable = "[[$conditionalLogic]]"
1468-
} else {
1470+
}
1471+
else {
14691472
# Fallback to _CL suffix if no mappings found
1473+
Write-Host "Warning: No streamNameMappings found. Defaulting destinationTable to streamName with _CL suffix." -BackgroundColor Yellow
14701474
$armResource.properties.destinationTable = "[[concat(parameters('streamName')[0],'_CL')]"
14711475
}
14721476

0 commit comments

Comments
 (0)