Skip to content

Commit

Permalink
Fixed -SubscriptionIds parameter validation: no leading (^)/trailing …
Browse files Browse the repository at this point in the history
…($) characters allowed; "/subscriptions/" prefix is optional.
  • Loading branch information
caseywatson committed Jul 31, 2024
1 parent a38531d commit 987d4a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/1_wara_collector.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Param(
[switch]$AVD,
[switch]$AVS,
[switch]$HPC,
[ValidatePattern('\/subscriptions\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}')]
[ValidatePattern('^(\/subscriptions\/)?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$')]
[String[]]$SubscriptionIds,
[ValidatePattern('\/subscriptions\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\/resourceGroups\/[a-zA-Z0-9._-]+')]
[String[]]$ResourceGroups,
Expand Down

0 comments on commit 987d4a6

Please sign in to comment.