File: bicep

package info (click to toggle)
ruby-rouge 4.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,836 kB
  • sloc: ruby: 38,168; sed: 2,071; perl: 152; makefile: 8
file content (32 lines) | stat: -rw-r--r-- 670 bytes parent folder | download
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)
}