Azure / Azure/azure-powershell
Missing serverFarmId in New-AzWebAppSSLBinding
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
### Description
certificate call: **https://management.local.azurestack.external/subscriptions/{SubscriptionId} /resourceGroups/{ResourceGroupName} /providers/Microsoft.Web/certificates/{ThumbPrint} __local_{ResourceGroupName}?api-version=2016-03-01** made by New-AzWebAppSSLBinding is missing serverFarmId in body in Azure Stack.
In Azure, same call includes serverFarmId in body.
Missing serverFarmId in body in this call would cause issue when using it on App service in Azure Stack.
### Issue script & Debug output
```PowerShell
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
PUT
Absolute Uri:
https://management.local.azurestack.external/subscriptions/{SubscriptionId}/resourceGroups/{ResouerceGroupName}/providers/Microsoft.Web/certi
ficates/{ThumbPrint}__local_{ResourceGroupName}?api-version=2016-03-01
Headers:
x-ms-client-request-id : c69535a4-b579-4d23-a665-d8e3b127876f
accept-language : en-US
Body:
{
"properties": {
"pfxBlob": {BlobContent}
",
"password": "{Password}"
},
"location": "local"
}
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
InternalServerError
Headers:
Pragma : no-cache
x-ms-failure-cause : service
x-ms-ratelimit-remaining-subscription-writes: 1193
x-ms-request-id : 58157d22-15be-4f13-9a9d-5a0b3806164c
x-ms-correlation-request-id : 58157d22-15be-4f13-9a9d-5a0b3806164c
x-ms-routing-request-id : LOCAL:20220124T222220Z:58157d22-15be-4f13-9a9d-5a0b3806164c
Strict-Transport-Security : max-age=31536000; includeSubDomains
X-Content-Type-Options : nosniff
Connection : close
Cache-Control : no-cache
Date : Mon, 24 Jan 2022 22:22:20 GMT
Server : Microsoft-IIS/10.0
X-Powered-By : ASP.NET
Body:
{
"Message": "An error has occurred."
}
New-AzWebAppSSLBinding : An error has occurred.
At line:1 char:1
+ New-AzWebAppSSLBinding -WebApp $webApp -Name $fqdn -CertificateFilePa ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzWebAppSSLBinding], CloudException
+ FullyQualifiedErrorId : Microsoft.Rest.Azure.CloudException,Microsoft.Azure.Commands.WebApps.Cmdlets.WebApps.NewAzureWebAppSSLBinding
```
### Environment data
```PowerShell
Name Value
---- -----
PSVersion 5.1.17763.10520
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.10520
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```
### Module versions
```PowerShell
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 2.2.8 Az.Accounts {Add-AzEnvironment, Clear-AzContext, Clear-AzDefault, Connect-AzAccount...}
Script 0.11.0 Az.Websites {Edit-AzWebAppBackupConfiguration, Get-AzAppServicePlan, Get-AzAppServicePlanMetrics,...
```
### Error output
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.