-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Compute - VMMgmtThis issue is related to a management-plane library.This issue is related to a management-plane library.Service AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
Query/Question
I want to use images between tenants using shared image galleries, as described in here using the java sdk, both there is no documentation as to how authentication to 2 different tenants can be done.
Why is this not a Bug or a feature Request?
This can be done using the azure cli, and rest api. I already have a shared image created and the app registration setup, I'm missing on how to deploy the image to a different tenant. These are the steps using the cli:
az account clear
az login --service-principal -u '<app ID>' -p '<Secret>' --tenant '<tenant 1 ID>'
az account get-access-token
az login --service-principal -u '<app ID>' -p '<Secret>' --tenant '<tenant 2 ID>'
az account get-access-token
az vm create \
--resource-group myResourceGroup \
--name myVM \
--image "/subscriptions/<Tenant 1 subscription>/resourceGroups/<Resource group>/providers/Microsoft.Compute/galleries/<Gallery>/images/<Image definition>/versions/<version>" \
--admin-username azureuser \
--generate-ssh-keys
Setup (please complete the following information if applicable):
- OS: ubuntu
- IDE : intelliJ
- Version of the Library used : 1.22.0
Metadata
Metadata
Assignees
Labels
Compute - VMMgmtThis issue is related to a management-plane library.This issue is related to a management-plane library.Service AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that