Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/plzm/azure-deploy into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
plzm committed Apr 24, 2024
2 parents 1ba3ce7 + d119d5c commit 5ee7a8a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/plzm.Azure/plzm.Azure.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
RootModule = '.\modules\plzm.Azure\plzm.Azure.psm1'

# Version number of this module.
ModuleVersion = '2.12'
ModuleVersion = '2.13'

# Supported PSEditions
# CompatiblePSEditions = @()

# ID used to uniquely identify this module
GUID = '7c228a7e-edce-4b2c-b0d7-436ae29da54c'
GUID = '0317d0ec-2512-4653-80d9-3051590c77f4'

# Author of this module
Author = 'Patrick El-Azem'
Expand Down
11 changes: 9 additions & 2 deletions modules/plzm.Azure/plzm.Azure.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1695,8 +1695,15 @@ function Get-DiagnosticsSettingsForResource()
Write-Debug -Debug:$true -Message "query = $query"

# Main resource diagnostic settings
$settings = "$(az monitor diagnostic-settings list --subscription $SubscriptionId --resource $ResourceId --query "$query" 2>nul)"
#$settings = "$(az monitor diagnostic-settings list --subscription $SubscriptionId --resource $ResourceId --query "$query")" | ConvertFrom-Json
try
{
$settings = "$(az monitor diagnostic-settings list --subscription $SubscriptionId --resource $ResourceId --query "$query" 2>nul)"
}
catch
{
Write-Debug -Debug:$true -Message "Error: $_"
$settings = $null
}

if ($settings)
{
Expand Down

0 comments on commit 5ee7a8a

Please sign in to comment.