Azure / Azure/azure-cli

Create Resource failed by azure cli

Open
#26,503 2 comments 0 reactions 2 assignees Assigned to @evelyn-ys View on GitHub
act-codegen-extensibility-squad Auto-Assign Azure CLI Team customer-reported feature-request Storage
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Related command**
az storage blob generate-sas #{storage_credentials} --name #{function_zip_name} --expiry \"#{sas_expiry}\" --permissions r --full-uri
`resources": [
{
"name": "MSDeploy",
"type": "Extensions",
"location": "[resourceGroup().location]",
"apiVersion": "2015-02-01",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
],
"properties": {
"packageUri": "[parameters('packageURI')]"
}
},
`

**Describe the bug**
I upgraded Azure CLI from 0.10 to 2.1.
And I used the above command to generate a package uri. And run `az deployment group create` to create resource. but this recourse is failed.

The error is: `ARM-MSDeploy Deploy Failed: 'System.UriFormatException: Invalid URI: The URI scheme is not valid.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString)
at Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadPackageAndSettings>d__27.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at `

My URI format is https://XXX.blob.core.windows.net/XXX/XXX?se=XX&sp=x&sv=2021-06-08&sr=b&sig=xxx

**Environment summary**
Azure cli 2.1.0, buildkite

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.