AzurePSDrive icon indicating copy to clipboard operation
AzurePSDrive copied to clipboard

Empty siteconfig property under Webapp directory

Open jianyunt opened this issue 8 years ago • 3 comments

A user reported:

From Thom Schumacher When viewing web applications in my subscription I the property for SiteConfig is empty. I would think that that would be the same value as: Get-AzureRmWebAppSlot -name webapp -ResourceGroupName myres -slot ‘production’ In the provider my drivename is AZ. cd az:\mysub\webapps (gci *webapp).siteconfig (gci *webapp).sitename — this is valid and has data

CLoudShell Version

PS Azure:\> dir env:acc_version

ACC_VERSION master_20171006.3

Modules

4.4.0 AzureRM
3.4.0 AzureRM.Profile

jianyunt avatar Oct 22 '17 18:10 jianyunt

@Thom, the WebApp directory under Azure drive is calling Get-AzureRmWebApp. I also can repro it with the following commands. Thanks for reporting it. I opened a github issue to track it.

#SiteConfig is empty
Get-AzureRmWebApp | % {$_.SiteConfig}                                             

# worked properly
Get-AzureRmWebApp -name JianyunBot| % {$_.SiteConfig}              

jianyunt avatar Oct 22 '17 19:10 jianyunt

According to @ahmedelnably and @markcowl, populating SiteConfig is a separate call, which can be seriously expensive and perf hit. For that consideration, Siteconfig is empty object for now. However Azure cmdlet team is willing to consider to allow user opt in to perf hit case such as -Config. See https://github.com/Azure/azure-powershell/issues/4841

jianyunt avatar Oct 23 '17 22:10 jianyunt

Thank you for your response and for putting the issue I put on the blog site about this... Look forward to what comes next.
thom

crshnbrn66 avatar Oct 26 '17 15:10 crshnbrn66