I’m trying to deploy my bicep script with module that are located in my Azure storage account. And this doesn’t work at all. I’m using Powershel, should I use something else?
New-AzResourceGroupDeployment -ResourceGroupName test01
-TemplateFile "https://xxxyyyzzzz.blob.core.windows.net/my-bicepscript/main.bicep"
-TemplateParameterObject $params
2
Answers
You cannot deploy the
Bicep
file from a storage account as it’s not supported, but you can deploy a JSON file from a storage account using -TemplateUri. Refer to the MS Doc for more detailsAlternatively, you can deploy a
Bicep
file by downloading it locally and use the same file for deployment in a single execution using the script below.Output:
After executing the above script, the Bicep deployment has been completed and created Vnet with 2 subnets.
I have used the VNet module for testing.
Case1:
result:
Case2:
result:
Summarization:
Whether using bicep file in local or json file in remote. Bicep in remote uri is not supported.