From ae4196c326c553746e32985faeebfe584ac6cdca Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Tue, 6 Oct 2020 13:06:12 -0700 Subject: [PATCH] make service directory the default parameter --- eng/common/TestResources/New-TestResources.ps1 | 4 ++-- eng/common/TestResources/New-TestResources.ps1.md | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/common/TestResources/New-TestResources.ps1 b/eng/common/TestResources/New-TestResources.ps1 index d65defd7c0..f881cdc453 100644 --- a/eng/common/TestResources/New-TestResources.ps1 +++ b/eng/common/TestResources/New-TestResources.ps1 @@ -11,14 +11,14 @@ [CmdletBinding(DefaultParameterSetName = 'Default', SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] param ( # Limit $BaseName to enough characters to be under limit plus prefixes, and https://docs.microsoft.com/azure/architecture/best-practices/resource-naming. - [Parameter(Position = 0)] + [Parameter()] [ValidatePattern('^[-a-zA-Z0-9\.\(\)_]{0,80}(?<=[a-zA-Z0-9\(\)])$')] [string] $BaseName, [ValidatePattern('^[-\w\._\(\)]+$')] [string] $ResourceGroupName, - [Parameter(Mandatory = $true)] + [Parameter(Mandatory = $true, Position = 0)] [string] $ServiceDirectory, [Parameter()] diff --git a/eng/common/TestResources/New-TestResources.ps1.md b/eng/common/TestResources/New-TestResources.ps1.md index 88024f2c69..5e7b843c34 100644 --- a/eng/common/TestResources/New-TestResources.ps1.md +++ b/eng/common/TestResources/New-TestResources.ps1.md @@ -14,7 +14,7 @@ Deploys live test resources defined for a service directory to Azure. ### Default (Default) ``` -New-TestResources.ps1 [[-BaseName] ] [-ResourceGroupName ] -ServiceDirectory +New-TestResources.ps1 [-BaseName ] [-ResourceGroupName ] [-ServiceDirectory] [-TestApplicationId ] [-TestApplicationSecret ] [-TestApplicationOid ] [-DeleteAfterHours ] [-Location ] [-Environment ] [-AdditionalParameters ] [-CI] [-Force] [-OutFile] [-WhatIf] [-Confirm] [] @@ -22,7 +22,7 @@ New-TestResources.ps1 [[-BaseName] ] [-ResourceGroupName ] -Serv ### Provisioner ``` -New-TestResources.ps1 [[-BaseName] ] [-ResourceGroupName ] -ServiceDirectory +New-TestResources.ps1 [-BaseName ] [-ResourceGroupName ] [-ServiceDirectory] [-TestApplicationId ] [-TestApplicationSecret ] [-TestApplicationOid ] -TenantId [-SubscriptionId ] -ProvisionerApplicationId -ProvisionerApplicationSecret [-DeleteAfterHours ] [-Location ] @@ -107,7 +107,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 1 +Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -140,7 +140,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: Named +Position: 1 Default value: None Accept pipeline input: False Accept wildcard characters: False