f-bader / SentinelARConverter

Sentinel Analytics Rule converter PowerShell module
MIT License
53 stars 11 forks source link

Add IncludeRequiredDataConnectors,OmitDataTypeExtension - requiredDataConnectors to ARM template #35

Open Kaloszer opened 5 months ago

Kaloszer commented 5 months ago

Adds requiredDataConnectors back to the ARM template - I use it to validate the workspace prior to deployment whether it contains required tables/columns.

IncludeRequiredDataConnectors

Switch to include requiredDataConnectors to the ARM template when converting from yaml

OmitDataTypeExtension

Removes the stuff inside of () and the brackets themselves - as this is not a table name - useless for me, opt in, not default behaviour.

Exec w/ -OmitDataTypeExtension and -IncludeRequiredDataConnectors

image

Exec w/ -IncludeRequiredDataConnectors

image

Also @f-bader where the Pester tests at 😄 ?

f-bader commented 5 months ago

Nice additional. I will review the PR over the next week but looks really cool

Tests can be found here https://github.com/f-bader/SentinelARConverter/blob/main/tests/Convert-SentinelARYamlToArm.tests.ps1

f-bader commented 5 months ago

Hi @Kaloszer thank you very much for the additional functionality. I checked the offical ARM template description and it seems that RequiredDataConnectors is not a valid field.

Have you successfully tested the deployment of an ARM template created this way?

Kaloszer commented 5 months ago

@f-bader It's not, that's why it's an optional field here. I filter it out in the CD workflow just before it gets sent as an ARM template.