diff --git a/Deployment/resourcedeployment.ps1 b/Deployment/resourcedeployment.ps1 index 02f30dfe..925c4e66 100644 --- a/Deployment/resourcedeployment.ps1 +++ b/Deployment/resourcedeployment.ps1 @@ -246,7 +246,7 @@ function DeployAzureResources([string]$location, [string]$modelLocation) { # Perform a what-if deployment to preview changes Write-Host "Evaluating Deployment resource availabilities to preview changes..." -ForegroundColor Yellow - $whatIfResult = az deployment group what-if --resource-group $resourceGroupName --template-file .\main.bicep --name $deploymentName --parameters modeldatacenter=$modelLocation location=$location environmentName=$environmentName + $whatIfResult = az deployment group what-if --resource-group $resourceGroupName --template-file "./main.bicep" --name $deploymentName --parameters modeldatacenter=$modelLocation location=$location environmentName=$environmentName if ($LASTEXITCODE -ne 0) { Write-Host "There might be something wrong with your deployment." -ForegroundColor Red @@ -257,7 +257,7 @@ function DeployAzureResources([string]$location, [string]$modelLocation) { # Proceed with the actual deployment Write-Host "Proceeding with Deployment..." -ForegroundColor Yellow Write-Host "Resource Group Name: $resourceGroupName" -ForegroundColor Yellow - $deploymentResult = az deployment group create --resource-group $resourceGroupName --template-file .\main.bicep --name $deploymentName --parameters modeldatacenter=$modelLocation location=$location environmentName=$environmentName + $deploymentResult = az deployment group create --resource-group $resourceGroupName --template-file "./main.bicep" --name $deploymentName --parameters modeldatacenter=$modelLocation location=$location environmentName=$environmentName # Check if deploymentResult is valid ValidateVariableIsNullOrEmpty -variableValue $deploymentResult -variableName "Deployment Result" if ($LASTEXITCODE -ne 0) {