-
Notifications
You must be signed in to change notification settings - Fork 0
/
DataLakeStorageAccount.json
105 lines (105 loc) · 4.35 KB
/
DataLakeStorageAccount.json
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"defaultValue": "westeurope",
"metadata": { "description": "The location for the storage account." }
},
"allowTrustedAzureServices": {
"type": "bool",
"defaultValue": true,
"metadata": { "description": "If trusted Azure services are allowed access." }
},
"cannotDelete": {
"defaultValue": true,
"metadata": { "description": "Whether a resource delete lock should be added after creation." },
"type": "bool"
},
"defaultAclAction": {
"type": "string",
"defaultValue": "Deny",
"allowedValues": [
"Allow",
"Deny"
],
"metadata": { "description": "The default access if no ACL matches: allow or deny." }
},
"storageSku": {
"type": "string",
"defaultValue": "Standard_LRS",
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
"Standard_RAGRS",
"Standard_ZRS"
],
"metadata": { "description": "The SKU for the storage account (locally redundant, zone redundant, geo redundant or geo redundant with readable secondary)." }
},
"ipRules": {
"type": "array",
"defaultValue": [],
"metadata": { "description": "Array of IP address or ranges (CIDR notation) rules with option Deny or Allow action (default Allow). Example element { \"value\":\"87.213.22.6\", \"action\":\"Allow\" }." }
},
"virtualNetworkRules": {
"type": "array",
"defaultValue": [],
"metadata": { "description": "Array of virtual network rules with option Deny or Allow action (default Allow). Example element { \"id\":\"/subscriptions/0a1e54a3-58b3-40f8-82bd-efd7844068a5/resourceGroups/erwyn-d-rg/providers/Microsoft.Network/virtualNetworks/erwyntest01/subnets/default\", \"action\":\"Allow\" }." }
}
"storageAccountName": {
"type": "string",
"minLength": 3,
"maxLength": 24,
"metadata": { "description": "The name for the storage account (must be globally unique)." }
},
},
"variables": {
"productTag": "Data Lake Storage 1",
"aclBypass": "[concat('Logging, Metrics', if(parameters('allowTrustedAzureServices'), ', AzureServices', ''))]",
"hierarchicalNamespaceEnabled": true,
"storageKind": "StorageV2"
},
"resources": [{
"name": "[parameters('storageAccountName')]",
"type": "Microsoft.Storage/storageAccounts",
"location": "[parameters('location')]",
"tags": {
"Product": "[variables('productTag')]"
},
"apiVersion": "2018-07-01",
"dependsOn": [],
"kind": "[variables('storageKind')]",
"identity": {
"type": "SystemAssigned"
},
"properties": {
"networkAcls": {
"bypass": "[variables('aclBypass')]",
"virtualNetworkRules": "[parameters('virtualNetworkRules')]",
"ipRules": "[parameters('ipRules')]",
"defaultAction": "[parameters('defaultAclAction')]"
},
"supportsHttpsTrafficOnly": true,
"isHnsEnabled": "[variables('hierarchicalNamespaceEnabled')]",
"accessTier": "Hot"
},
"sku": {
"name": "[parameters('storageSku')]"
},
"resources": [{
"apiVersion": "2017-04-01",
"condition": "[parameters('cannotDelete')]",
"name": "[concat(parameters('storageAccountName'), '/Microsoft.Authorization/storageLock')]",
"type": "Microsoft.Storage/storageAccounts/providers/locks",
"dependsOn": [
"[parameters('storageAccountName')]"
],
"properties": {
"level": "cannotDelete",
"notes": "Storage account should not be deleted"
}
}]
}],
"outputs": {}
}