1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
/*
Target scope can be set using the following values:
- resourceGroup (default)
- subscription
- managementGroup
- tenant
*/
targetScope = 'subscription' // To create a resource group
@description('The Azure region to create the resources in.')
param location string
var suffix = uniqueString(subscription().subscriptionId, 'my-project')
var someTags = [
{
key: 'location'
value: location
}
{
key: 'isTest'
value: true
}
]
// Create a resource group
resource rg 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: 'rg-${suffix}'
location: location
tags: toObject(someTags, tag => tag.key, tag => tag.?value)
}
|