I want to deploy multi resources in a each different resource group in one ARM template like below.
But I have no idea how should I write deploy code in Azure CLI or PowerShell.
BTW, I wrote target subscription ID and resource group name in ARM template like below.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2023-05-01",
"name": "strageAccount",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroup": "RG-compute",
"properties": {}
}
},
{
"type": "Microsoft.Network/privateEndpoints",
"apiVersion": "2024-01-01",
"name": "privateEndpointBlob",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroup": "RG-network",
"properties": {}
}
}
],
"outputs": {}
}
I read this MS reference but I couldn’t understand very well.
https://learn.microsoft.com/ja-jp/azure/azure-resource-manager/templates/deploy-to-resource-group?tabs=azure-cli
If you have any idea, please tell me.
Any other would be helped.
Thank you.