Open vlo001 opened 1 year ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/deployments-owners.
Author: | vlo001 |
---|---|
Assignees: | - |
Labels: | `Service Attention`, `question`, `ARM - Templates`, `customer-reported` |
Milestone: | - |
Description
The New-AzResourceGroupDeployment command doesn't work when deploying a template from an Azure storage account with Public network access disabled.
Following the below from the New-AzResourceGroupDeployment examples
Example 4: Deploy a template stored in a non public storage account using a uri and SAS token PowerShell
New-AzResourceGroupDeployment -ResourceGroupName "RGName" -TemplateUri "https://example.com/example.json" -QueryString "foo" This command creates a new deployment using the template in TemplateUri which is not public and requires a token parameter to access which would be provided using the QueryString parameter. Running this command effectively accesses the template using the url https://example.com/example.json?foo. This can be used if you want to use a template in a storage account by providing the SAS token as the QueryString
Our Command New-AzResourceGroupDeployment -ResourceGroupName $ResourceGroupName -TemplateURI "https://storageaccountURL/folder/xxxx.json"
-TemplateParameterObject $Params
-Name ("create-xxxxx" + '-' + ((Get-Date).ToUniversalTime()).ToString('MMdd-HHmm')) ` -QueryString "SAS Token"Error New-AzResourceGroupDeployment -ResourceGroupName $ResourceGroupNa … |
~~~~~~~~~~~~~| 18:05:59 - Error: Code=InvalidContentLink; Message=Unable to download | deployment content from | 'https://storageaccountURL/folder/xxxx.json?SAS tokenNote, I can access the storage account successfully using a browser and providing the SAS token.
Your assistance would be appreciated. If this should be doable, I'll gather the debug and error output.
Thanks.
Script or Debug output
No response
Environment data
Module versions
Error output
No response