Skip to content

Commit 5caa61f

Browse files
committed
Updating Set-AzWebApp when updating an AppservicePlan
1 parent 958bc48 commit 5caa61f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Websites/Websites/Utilities/WebsitesClient.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ public void UpdateWebApp(string resourceGroupName, string location, string webAp
111111
webSiteToUpdate = siteEnvelope;
112112
}
113113

114+
// make sure the serverfarm ID is nt overwritten to the old value
115+
if (appServicePlan != null)
116+
{
117+
webSiteToUpdate.ServerFarmId = appServicePlan;
118+
}
119+
114120
string qualifiedSiteName;
115121
if (CmdletHelpers.ShouldUseDeploymentSlot(webAppName, slotName, out qualifiedSiteName))
116122
{

0 commit comments

Comments
 (0)