-
Notifications
You must be signed in to change notification settings - Fork 1
/
users.bicep
41 lines (39 loc) · 974 Bytes
/
users.bicep
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
33
34
35
36
37
38
39
40
41
// ****************************************
// Azure Bicep Module:
// Create multiple users from sample JSON records
// ****************************************
@minLength(1)
param apimInstanceName string
var usersSet = [
{
userId: 'pvd'
firstName: 'Paul'
lastName: 'Van Dyk'
email: '[email protected]'
state: 'active'
notes: 'Good DJ'
}
{
userId: 'abuuren'
firstName: 'Armin'
lastName: 'van Buuren'
email: '[email protected]'
state: 'active'
notes: 'OK meh!'
}
]
//parent APIM instance
resource parentAPIM 'Microsoft.ApiManagement/service@2019-01-01' existing = {
name: apimInstanceName
}
resource apimUser 'Microsoft.ApiManagement/service/users@2020-06-01-preview' = [for usr in usersSet: {
parent: parentAPIM
name: usr.userId
properties: {
firstName: usr.firstName
lastName: usr.lastName
email: usr.email
state: usr.state
note: usr.notes
}
}]