Share gallery VM images across Azure tenants using an app registration in Terraform

Doran Kerkhofs 0 Reputation points
2024-08-21T17:51:17.4933333+00:00

Hello all,

I was playing around with the Azure Compute Gallery.
I noticed there is a possibility to use the Azure Compute Gallery in other tenants by using a Shared App Registration.

The whole process is described on the following article: https://learn.microsoft.com/en-us/azure/virtual-machines/share-using-app-registration?tabs=cli
the article is very straightforward and easy to get to work.

My question here is if anyone also has experience to make this solution work in Terraform?
I've been trying multiple times but cannot get it to work, and cannot find any similar questions/cases.

Problem i'm facing is that for powershell/CLI it's fairly easy to connect to multiple tenants/contexts, but I'm having a hard time working out this same behaviour in terraform.

Any tips are welcome.

thanks!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,989 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.