Skip to content

Commit

Permalink
[BugFix] - GR9 | V3 Missing ItemName and Subscription Columns in the …
Browse files Browse the repository at this point in the history
…client workbook (#310)

* update

* update

* update

* undo Guadrails setup psm

* update modules
  • Loading branch information
singhgss authored Dec 13, 2024
1 parent f2b4a5e commit 23327fc
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
Binary file modified psmodules/Check-NetworkWatcherEnabled.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion setup/IaC/modules/automationaccount.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ resource guardrailsAC 'Microsoft.Automation/automationAccounts@2021-06-22' = if
properties: {
contentLink: {
uri: '${ModuleBaseURL}/Check-NetworkWatcherEnabled.zip'
version: '1.0.5'
version: '1.0.6'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion setup/IaC/modules/gr.workbook
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "let itsgcodes=GRITSGControls_CL | where TimeGenerated == toscalar(GRITSGControls_CL | summarize by TimeGenerated | top 2 by TimeGenerated desc | top 1 by TimeGenerated asc | project TimeGenerated);\r\nlet ctrlprefix=\"GUARDRAIL 9\";\r\nGuardrailsCompliance_CL\r\n| where ControlName_s has ctrlprefix and ReportTime_s == \"{RunTime}\" and Required_s !=tostring(\"{RequiredYesNo}\")\r\n| where TimeGenerated > ago (24h)\r\n|join kind=leftouter (itsgcodes) on itsgcode_s\r\n| project ['VNet Name']=column_ifexists('VNETName_s', ''), Status=case(ComplianceStatus_b == true, \"✔️\", ComplianceStatus_b == false, \"\", \"\"), Comments=Comments_s,[\"ITSG Control\"]=itsgcode_s, Mitigation=gr_geturl(replace_string(ctrlprefix,\" \",\"\"),itsgcode_s), Profile=iff(isnotempty(column_ifexists('Profile_d', '')), tostring(toint(column_ifexists('Profile_d', ''))), '')\r\n",
"query": "let itsgcodes=GRITSGControls_CL | where TimeGenerated == toscalar(GRITSGControls_CL | summarize by TimeGenerated | top 2 by TimeGenerated desc | top 1 by TimeGenerated asc | project TimeGenerated);\r\nlet ctrlprefix=\"GUARDRAIL 9\";\r\nGuardrailsCompliance_CL\r\n| where ControlName_s has ctrlprefix and ReportTime_s == \"{RunTime}\" and Required_s !=tostring(\"{RequiredYesNo}\")\r\n| where TimeGenerated > ago (24h)\r\n|join kind=leftouter (itsgcodes) on itsgcode_s\r\n| project ['Subscription Name']=SubscriptionName_s, ['Item Name']=ItemName_s, ['VNet Name']=column_ifexists('VNETName_s', ''), Status=case(ComplianceStatus_b == true, \"✔️\", ComplianceStatus_b == false, \"\", \"\"), Comments=Comments_s, ['ITSG Control']=itsgcode_s, Mitigation=gr_geturl(replace_string(ctrlprefix,\" \",\"\"),itsgcode_s), Profile=iff(isnotempty(column_ifexists('Profile_d', '')), tostring(toint(column_ifexists('Profile_d', ''))), '')",
"size": 0,
"title": "GR 9",
"timeContext": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
RootModule = '.\Check-NetworkWatcherEnabled.psm1'

# Version number of this module.
ModuleVersion = '1.0.5'
ModuleVersion = '1.0.6'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function Get-NetworkWatcherStatus {
SubscriptionName = $sub.Name
ComplianceStatus = $ComplianceStatus
Comments = $msgTable.networkWatcherConfigNoRegions
ItemName = $msgTable.networkWatcherConfigNoRegions
ItemName = $msgTable.networkWatcherConfig
itsgcode = $itsgcode
ControlName = $ControlName
ReportTime = $ReportTime
Expand Down

0 comments on commit 23327fc

Please sign in to comment.