Translate

Sunday, April 3, 2022

Azure - How to move resources between subscriptions under different tenants

To make a long story short. Directly this does not work at least until now (2022-04). But as often there is a good workaround.

ATTENTION! This is an unsupported workaround. So do not blame me if you loose something important. Backup (e.g. ARM Templates, data etc.) is always a good idea! So this is out of any warranty. These steps were working a couple times for me but that does not mean it will work for you. THIS IS ON YOUR OWN RISK!

First of all you need to know. Not all resources can be moved. Check here which resource you can move.
Move operation support by resource type - Azure Resource Manager | Microsoft Docs

You need to differentiate between move from:

  • Resource to another resource group
  • Resource to another subscription
  • Resource to another region

Also keep mind some pieces you can not move at all. Whenever you have some access assignments based on your active directory you will loose them and you need to recreate them in a another tenants active directory.

Also if you have some scripts or resource identifiers you may need to update them as well.

As a direct move is not possible you can do it with a intermediate "Pay as you go" subscription.
This type of subscription can easily move between tenants. But you need to be member of the tenant and need the right to add subscriptions (in my case I am global admin so I do not care. But you need to be at least Account Administrator).


And then simply move the subscription from one to another directory. All directories your account had sufficient access should be shown in the selection list.

Therefore go to to your resource group and ensure you have selected all resources.

Then click on MOVE (dropdown) in the top toolbar  -> Select there the "Move to another subscription".

While you do this you are asked for the right subscription. In case of the transfer you use the Pay as you go one. And in the second step you repeat it and you select your final target subscription.

While you do this you need to move the resources into a new resource group name. I use there the old one and add an -payg at the end. And in the target subscription I use another extension. But that's your choice what you use there. It must be just different then the one you use in the pay as you go subscription.

Actually you do the same thing twice (moving resources between subscriptions):
1. Moving resources from source tenant resource group to PAYG-subscription into an intermediate resource group.

2. Moving the PAYG-subscription to another tenant.

3. Ensuring you are owner of the PAYG-subscription in the target tenant.

4. Moving the resources from the PAYG-subscription to the target subscription in the target tenant.

And do that stuff immediately. Otherwise the PAYG subscription might be charged for you! So do not wait one or a few days in between! Especially if you have to pay with your own credit card!

Are you in doubt if the target resource group remains still empty (after a few seconds/minutes)? Be patient it will take a while. Sometimes even hours. So do not get nervous.

This hint was not by my own. I found an article from Damir Dobric (MVP). So credits go to him (including the great graphics above!): Azure: How to move resources between subscriptions under different tenants? - TechNet Articles - United States (English) - TechNet Wiki (microsoft.com)



Monday, March 21, 2022

Monday, January 17, 2022

Microsoft Build of OpenJDK

Microsoft is now offering a free and maintained OpenJDK package!

The Microsoft Build of OpenJDK is a no-cost distribution of OpenJDK that's open source and available for free for anyone to deploy anywhere.

It includes Long-Term Support (LTS) binaries for Java 11 and Java 17 on x64 server and desktop environments on macOS, Linux, and Windows, AArch64/ARM64 on Linux and Windows, and binaries for macOS on Apple Silicon (AArch64/M1). Additionally Java 16 is also provided (non-LTS).

The Microsoft Build of OpenJDK binaries are based on OpenJDK source code, following the same build scripts used by the Eclipse Adoptium project and tested against the Eclipse Adoptium Quality Assurance suite (including OpenJDK project tests).

More you can learn from here:
https://docs.microsoft.com/en-us/java/openjdk/overview

You can download the OpenJDK packages here:
https://docs.microsoft.com/en-us/java/openjdk/download

With Windows Package manager its in PowerShell:

Search for the OpenJDK version:

winget search Microsoft.OpenJDK

To Install the corresponding version its: 

winget install Microsoft.OpenJDK.17