2022-12-09 07:56:08 +03:00
|
|
|
##
|
|
|
|
##Deploy Bicep template using PowerShell
|
|
|
|
##
|
|
|
|
|
|
|
|
#Login to Azure
|
|
|
|
#Login-AzAccount
|
|
|
|
|
|
|
|
#Vars
|
2024-09-10 14:51:50 +03:00
|
|
|
$resourceGroupName="sample-wordpress-app-rg"
|
|
|
|
$location="Australia Central"
|
2022-12-09 07:56:08 +03:00
|
|
|
|
|
|
|
#Create Resource Group
|
|
|
|
New-AzResourceGroup -Name $resourceGroupName -Location $location -Force
|
|
|
|
|
|
|
|
###########################
|
|
|
|
|
|
|
|
##Deploy resource group and provision resources
|
|
|
|
New-AzResourceGroupDeployment `
|
|
|
|
-Name "wpappsvcdeploy" `
|
|
|
|
-ResourceGroupName $resourceGroupName `
|
|
|
|
-TemplateFile "azuredeploy.json" `
|
|
|
|
-TemplateParameterFile "azuredeploy.parameters.json" #-WhatIf
|
|
|
|
|
|
|
|
#Remove Resource Group
|
|
|
|
##Remove-AzResourceGroup -Name $resourceGroupName -Force -AsJob
|