-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata-factory.bicep
45 lines (40 loc) · 1.15 KB
/
data-factory.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
42
43
44
45
param location string
param name string
param storageName string
param dfsStorageUrl string
resource dataFactory 'Microsoft.DataFactory/factories@2018-06-01' = {
name: name
location: location
identity: {
type: 'SystemAssigned'
}
properties: {
publicNetworkAccess: 'Disabled'
}
}
resource storageService 'Microsoft.DataFactory/factories/linkedservices@2018-06-01' = {
name: 'storageService'
parent: dataFactory
properties: {
type:'AzureBlobFS'
typeProperties: {
url: dfsStorageUrl
}
}
}
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-04-01' existing = {
name: storageName
}
module storageAccountContributorRole 'standard-role.bicep' = {
name: 'storageAccountContributorRole'
params: {standardRoleName:'Storage Account Contributor'}
}
resource roleAssignment 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = {
name: guid(storageName, 'Storage Account Contributor', dataFactory.id)
scope: storageAccount
properties: {
roleDefinitionId: storageAccountContributorRole.outputs.standardRoleId
principalId: dataFactory.identity.principalId
principalType: 'ServicePrincipal'
}
}