Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Update] GR7 V3 Improve Error Handling #328

Merged
merged 2 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified psmodules/Check-ApplicationGatewayCertificateValidity.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 @@ -322,7 +322,7 @@ resource guardrailsAC 'Microsoft.Automation/automationAccounts@2021-06-22' = if
properties: {
contentLink: {
uri: '${ModuleBaseURL}/Check-ApplicationGatewayCertificateValidity.zip'
version: '1.0.3'
version: '1.0.4'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
RootModule = 'Check-ApplicationGatewayCertificateValidity'

# Version number of this module.
ModuleVersion = '1.0.3'
ModuleVersion = '1.0.4'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,13 @@ function Check-ApplicationGatewayCertificateValidity {
$isApprovedCA = $false

# Get the Key Vault name from the Application Gateway configuration
$keyVaultName = $appGateway.SslCertificates | Where-Object { $_.Name -eq $certName } | Select-Object -ExpandProperty KeyVaultSecretId -ErrorAction SilentlyContinue
try{
$keyVaultName = $appGateway.SslCertificates | Where-Object { $_.Name -eq $certName } | Select-Object -ExpandProperty KeyVaultSecretId
}
catch{
$ErrorList.Add("Failed to get Key Vault name from Application Gateway configuration: $_")
throw "Error: Failed to get Key Vault name from Application Gateway configuration: $_"
}
if ($keyVaultName) {
$keyVaultName = ($keyVaultName -split '/')[8]
$isApprovedCA = $true
Expand Down
Loading