@@ -73,13 +73,7 @@ function ValidateVariableIsNullOrEmpty {
7373# Function to prompt for parameters with kind messages
7474function PromptForParameters {
7575 param (
76- [string ]$tenantId ,
77- [string ]$subscriptionID ,
78- [string ]$environmentName ,
79- [string ]$resourceGroupName ,
80- [string ]$location ,
81- [string ]$modelLocation ,
82- [string ]$email
76+ [string ]$email
8377 )
8478
8579 Clear-Host
@@ -88,80 +82,26 @@ function PromptForParameters {
8882
8983 startBanner
9084
91- $availableRegions = @ (
92- ' EastUS' , ' EastUS2' , ' WestUS' , ' WestUS2' , ' WestUS3' , ' CentralUS' , ' NorthCentralUS' , ' SouthCentralUS' ,
93- ' WestEurope' , ' NorthEurope' , ' SoutheastAsia' , ' EastAsia' , ' JapanEast' , ' JapanWest' ,
94- ' AustraliaEast' , ' AustraliaSoutheast' , ' CentralIndia' , ' SouthIndia' , ' CanadaCentral' ,
95- ' CanadaEast' , ' UKSouth' , ' UKWest' , ' FranceCentral' , ' FranceSouth' , ' KoreaCentral' ,
96- ' KoreaSouth' , ' GermanyWestCentral' , ' GermanyNorth' , ' NorwayWest' , ' NorwayEast' ,
97- ' SwitzerlandNorth' , ' SwitzerlandWest' , ' UAENorth' , ' UAECentral' , ' SouthAfricaNorth' ,
98- ' SouthAfricaWest' , ' BrazilSouth' , ' BrazilSoutheast' , ' QatarCentral' , ' ChinaNorth' ,
99- ' ChinaEast' , ' ChinaNorth2' , ' ChinaEast2'
100- )
101-
102- $availableModelRegions = @ (
103- ' EastUS' , ' EastUS2' , ' SwedenCentral' , ' WestUS3'
104- )
105-
106- if (-not $tenantId ) {
107- Write-Host " Please enter your Azure tenant ID" - ForegroundColor Cyan
108- $tenantId = Read-Host - Prompt ' > '
109- }
110- if (-not $subscriptionID ) {
111- Write-Host " Please enter your Azure subscription ID to deploy your resources" - ForegroundColor Cyan
112- $subscriptionID = Read-Host - Prompt ' > '
113- }
114-
115- if (-not $environmentName ) {
116- Write-Host " Please enter Environment name" - ForegroundColor Cyan
117- $environmentName = Read-Host - Prompt ' > '
118- }
119-
120- if (-not $resourceGroupName ) {
121- Write-Host " Please enter your Azure Resource Group Name to deploy your resources (leave blank to auto-generate one)" - ForegroundColor Cyan
122- $resourceGroupName = Read-Host - Prompt ' > '
123- }
124-
125- if (-not $location ) {
126- Write-Host " Please enter the Azure Data Center Region to deploy your resources" - ForegroundColor Cyan
127- Write-Host " Available regions are:" - ForegroundColor Cyan
128- Write-Host ($availableRegions -join ' , ' ) - ForegroundColor Yellow
129- $location = Read-Host - Prompt ' > '
130- }
131-
132- if (-not $modelLocation ) {
133- Write-Host " Please enter the Azure Data Center Region to deploy your GPT model" - ForegroundColor Cyan
134- Write-Host " Available regions are:" - ForegroundColor Cyan
135- Write-Host ($availableModelRegions -join ' , ' ) - ForegroundColor Yellow
136- $modelLocation = Read-Host - Prompt ' > '
137- }
138-
13985 if (-not $email ) {
14086 Write-Host " Please enter your email address for certificate management" - ForegroundColor Cyan
14187 $email = Read-Host - Prompt ' > '
14288 }
14389
14490 return @ {
145- tenantId = $tenantId
146- subscriptionID = $subscriptionID
147- environmentName = $environmentName
148- resourceGroupName = $resourceGroupName
149- location = $location
150- modelLocation = $modelLocation
15191 email = $email
15292 }
15393}
15494
155- # # Prompt for parameters with kind messages
156- # $params = PromptForParameters -tenantId $tenantId -subscriptionID $subscriptionID -environmentName $environmentName -resourceGroupName $resourceGroupName -location $location -modelLocation $modelLocation -email $email
95+ # Prompt for parameters with kind messages
96+ $params = PromptForParameters - email $email
15797# # Assign the parameters to variables
15898# $tenantId = $params.tenantId
15999# $subscriptionID = $params.subscriptionID
160100# $environmentName = $params.environmentName
161101# $resourceGroupName = $params.resourceGroupName
162102# $location = $params.location
163103# $modelLocation = $params.modelLocation
164- # $email = $params.email
104+ $email = $params.email
165105
166106function LoginAzure ([string ]$tenantId , [string ]$subscriptionID ) {
167107 Write-Host " Log in to Azure.....`r`n " - ForegroundColor Yellow
0 commit comments