Skip to content

Create Resource failed by azure cli #26503

@myob-hankun

Description

@myob-hankun

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

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions