How to upgrade the SKU of the public IP address in the Azure?

For many reasons, you can want to upgrade to the SKU of the public IP. Recently I had to do that too. Fortunately the possibility of upgrade the public IP from Basic to Standard SKU has been in GA for a few days. Without such possibility you would have to recreate the public IP resource that is associated with a loss of assigned IP address - and updating it could be really difficult.

You can do this in a few simple steps using Powershell:

1
2
3
4
5
6
7
8
9
Connect-AzAccount
$context = Get-AzSubscription -SubscriptionId <YourSubscriptionId>
Set-AzContext $context
$rgName = '<PublicIpRgName>'
$pipName = '<PublicIpName>'
$newsku = 'Standard'
$pubIP = Get-AzPublicIpAddress -name $pipName -ResourceGroupName $rgName
$pubIP.Sku.Name = $newsku
Set-AzPublicIpAddress -PublicIpAddress $pubIP

Again, you have to connect to your Azure account from Powershell. The next two steps are optional - only required if you want to change subscription, f.g. because you logged into another one by default.

In the next three lines, we are configuring some useful variables - we are defining in which Resource Group the public IP is existing and what is the name of the resource. Wa are configuring the new SKU name too.

The last three lines are the most important - we are taking the information about public IP, we are assigning the new SKU to the public IP and then we are committing the changes by the last line.

You have to remember that there are some limitations:

Public IPs upgraded from Basic to Standard SKU continue to have no availability zones. This means they cannot be associated with an Azure resource that is either zone-redundant or tied to a pre-specified zone in regions where this is offered. ~Microsoft Docs

What is more, to upgrade the SKU, the public IP address cannot be associated with any resource. And you have to remember that you cannot downgrade SKU!

I hope it will be useful for you!

Newsletter

Thank you for visiting my website. I hope you enjoyed the content that I prepared and learned something valuable from it. If you want to be informed about my next entries or occasionally get a message with a collection of some interesting links, please subscribe to my newsletter. I will be extremely pleased if you do this and join my community!

  • By clicking button below you agree to send you news from my blog, about my products and services. Above data are stored in Mailchimp and I do not share them to anyone. More info you can find in privacy policy.

comments powered by Disqus