diff --git a/src/PSRule.Rules.Azure/en/PSRule-rules.psd1 b/src/PSRule.Rules.Azure/en/PSRule-rules.psd1 index a0e9975c758..362332734d3 100644 --- a/src/PSRule.Rules.Azure/en/PSRule-rules.psd1 +++ b/src/PSRule.Rules.Azure/en/PSRule-rules.psd1 @@ -114,5 +114,4 @@ AzureSQLDatabaseMaintenanceWindow = "The {0} ({1}) should have a customer-controlled maintenance window configured." ASEAvailabilityZoneVersion = "The app service environment ({0}) is not deployed with a version that supports zone-redundancy." AppServiceAvailabilityZoneSKU = "The app service plan ({0}) is not deployed with a SKU that supports zone-redundancy." - AppServiceAvailabilityZone = "The app service plan ({0}) deployed to region ({1}) should use three availability zones from the following [{2}]." } diff --git a/src/PSRule.Rules.Azure/rules/Azure.AppService.Rule.ps1 b/src/PSRule.Rules.Azure/rules/Azure.AppService.Rule.ps1 index cfd2d47cb7c..7fda3b60493 100644 --- a/src/PSRule.Rules.Azure/rules/Azure.AppService.Rule.ps1 +++ b/src/PSRule.Rules.Azure/rules/Azure.AppService.Rule.ps1 @@ -206,12 +206,7 @@ Rule 'Azure.AppService.AvailabilityZone' -Ref 'AZR-000442' -Type 'Microsoft.Web/ $TargetObject.name ) - $Assert.HasFieldValue($TargetObject, 'properties.zoneRedundant', $true).Reason( - $LocalizedData.AppServiceAvailabilityZone, - $TargetObject.name, - $TargetObject.location, - ($availabilityZones -join ', ') - ) + $Assert.HasFieldValue($TargetObject, 'properties.zoneRedundant', $true) } #endregion Web Apps diff --git a/tests/PSRule.Rules.Azure.Tests/Azure.AppService.Tests.ps1 b/tests/PSRule.Rules.Azure.Tests/Azure.AppService.Tests.ps1 index bba5332d9fe..11f970af94c 100644 --- a/tests/PSRule.Rules.Azure.Tests/Azure.AppService.Tests.ps1 +++ b/tests/PSRule.Rules.Azure.Tests/Azure.AppService.Tests.ps1 @@ -266,9 +266,9 @@ Describe 'Azure.AppService' -Tag 'AppService' { $ruleResult[0].Reason | Should -BeExactly @( "The app service plan (plan-A) is not deployed with a SKU that supports zone-redundancy." - "The app service plan (plan-A) deployed to region (eastus) should use three availability zones from the following [1, 2, 3]." + "Path properties.zoneRedundant: Does not exist." ); - $ruleResult[1].Reason | Should -BeExactly "The app service plan (plan-D) deployed to region (eastus) should use three availability zones from the following [1, 2, 3]."; + $ruleResult[1].Reason | Should -BeExactly "Path properties.zoneRedundant: Is set to 'False'."; # Pass $ruleResult = @($filteredResult | Where-Object { $_.Outcome -eq 'Pass' });