Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Deployment/resourcedeployment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand Down