Create and Publish Azure classic Cloud Service project with AzureRM powershell

谁说我不能喝 提交于 2020-01-04 04:29:33

问题


Even after looking at the docs, I couldn't find a way to do this with the AzureRM powershell cmdlets. Does anyone know how to do this?

The old Azure Service Management powershell cmdlets have a Publish-AzureServiceProject, but I believe it is deprecated now.


EDIT: Supplement Answer to yoape's answer below

You can create a new classical cloud service project using something like this:

New-AzureRmResource -ResourceType "Microsoft.ClassicCompute/domainNames" -Location "centralus" -ResourceName "myCloudServiceProjectName"  -ResourceGroupName "myResourceGroup"

Where Microsoft.ClassicCompute/domainNames is the magic sauce one needs to create the desired classic cloud service project.

However, (afaik) you will still need to deploy/publish the classic cloud service via the old cmdlet: Publish-AzureServiceProject. Using the above cmdlet lets you create the cloud project in the proper resource group though.


回答1:


The classic compute services are basically not supported by the Azure Resource Manager model. This means you cannot use the AzureRM cmdlets for publishing your Cloud Services.

The Publish-AzureServiceProject cmdlet from ASM is not depricated (yet), you can still use it (in fact it is still the only way to publish your Cloud Service from PowerShell). Perhaps you where thinking about the deprecation of the Switch-AzureMode cmdlet?



来源:https://stackoverflow.com/questions/42335487/create-and-publish-azure-classic-cloud-service-project-with-azurerm-powershell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!