0
votes

When we use storage account path for $ConfigPath ,we get URI format not supported error.

New-AzureDeployment -ServiceName $ServiceName -Slot $Slot -Package $PackagePath -Configuration $ConfigPath -Label $LabelName -ErrorAction Stop

1

1 Answers

0
votes

It is quite clearly stated in the documentation that path to configuration file can only be a local path to file:

-Configuration

Specifies the path and file name of a service configuration file (.cscfg).

while a package can be path to local file or URI to package uploaded in a storage account within same subscription:

-Package

Specifies the path or URI to a .cspkg blob in a storage within the same subscription/project.

My speculation is that this is simply because PowerShell cmdlets are just wrappers around the REST API where the Create Deployment operation takes a URI for Package and Base64 encoded configuration for parameters.

Where if PowerShell was supporting a path for configuration, it would have to download the config first locally, then base64 encode, then execute the REST API operation.