Skip to content

Commit e230615

Browse files
committed
Added workspace deployment
1 parent 4bd462d commit e230615

5 files changed

Lines changed: 196 additions & 1 deletion

File tree

samples/manage/synapse-analytics/storage/azuredeploy.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"contentVersion": "1.0.0.0",
44
"parameters": {
55
"storageAccount": {
6-
"defaultValue": "jovanpopsynapse",
76
"type": "string"
87
},
98
"location": {
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
{
2+
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.1",
4+
"parameters": {
5+
"name": {
6+
"type": "String"
7+
},
8+
"location": {
9+
"defaultValue": "[resourceGroup().location]",
10+
"type": "String"
11+
},
12+
"defaultDataLakeStorageAccountName": {
13+
"type": "String"
14+
},
15+
"defaultDataLakeStorageFilesystemName": {
16+
"type": "String"
17+
},
18+
"sqlAdministratorLogin": {
19+
"type": "String"
20+
},
21+
"sqlAdministratorPassword": {
22+
"type": "SecureString"
23+
},
24+
"setWorkspaceIdentityRbacOnFilesystem": {
25+
"type": "Bool"
26+
},
27+
"allowAllConnections": {
28+
"defaultValue": true,
29+
"type": "Bool"
30+
},
31+
"poolSubnetId": {
32+
"defaultValue": "",
33+
"type": "String"
34+
},
35+
"tagValues": {
36+
"defaultValue": {},
37+
"type": "Object"
38+
},
39+
"storageSubscriptionID": {
40+
"defaultValue": "[subscription().subscriptionId]",
41+
"type": "String"
42+
},
43+
"storageResourceGroupName": {
44+
"defaultValue": "[resourceGroup().name]",
45+
"type": "String"
46+
},
47+
"storageLocation": {
48+
"defaultValue": "[resourceGroup().location]",
49+
"type": "String"
50+
}
51+
},
52+
"variables": {
53+
"storageBlobDataContributorRoleID": "ba92f5b4-2d11-453d-a403-e96b0029c9fe",
54+
"defaultDataLakeStorageAccountUrl": "[concat('https://', parameters('defaultDataLakeStorageAccountName'), '.dfs.core.windows.net')]"
55+
},
56+
"resources": [
57+
{
58+
"type": "Microsoft.Synapse/workspaces",
59+
"apiVersion": "2019-06-01-preview",
60+
"name": "[parameters('name')]",
61+
"location": "[parameters('location')]",
62+
"tags": "[parameters('tagValues')]",
63+
"identity": {
64+
"type": "SystemAssigned"
65+
},
66+
"properties": {
67+
"defaultDataLakeStorage": {
68+
"accountUrl": "[variables('defaultDataLakeStorageAccountUrl')]",
69+
"filesystem": "[parameters('defaultDataLakeStorageFilesystemName')]"
70+
},
71+
"virtualNetworkProfile": {
72+
"computeSubnetId": "[parameters('poolSubnetId')]"
73+
},
74+
"sqlAdministratorLogin": "[parameters('sqlAdministratorLogin')]",
75+
"sqlAdministratorLoginPassword": "[parameters('sqlAdministratorLoginPassword')]"
76+
},
77+
"resources": [
78+
{
79+
"type": "firewallrules",
80+
"apiVersion": "2019-06-01-preview",
81+
"name": "allowAll",
82+
"location": "[parameters('location')]",
83+
"dependsOn": [
84+
"[concat('Microsoft.Synapse/workspaces/', parameters('name'))]"
85+
],
86+
"properties": {
87+
"startIpAddress": "0.0.0.0",
88+
"endIpAddress": "255.255.255.255"
89+
},
90+
"condition": "[parameters('allowAllConnections')]"
91+
}
92+
]
93+
},
94+
{
95+
"type": "Microsoft.Resources/deployments",
96+
"apiVersion": "2019-05-01",
97+
"name": "storageRoleDeploymentResource",
98+
"dependsOn": [
99+
"[concat('Microsoft.Synapse/workspaces/', parameters('name'))]"
100+
],
101+
"properties": {
102+
"mode": "Incremental",
103+
"template": {
104+
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
105+
"contentVersion": "1.0.0.0",
106+
"parameters": {},
107+
"variables": {},
108+
"resources": [
109+
{
110+
"type": "Microsoft.Storage/storageAccounts/blobServices/containers/providers/roleAssignments",
111+
"apiVersion": "2018-09-01-preview",
112+
"name": "[concat(parameters('defaultDataLakeStorageAccountName'), '/default/', parameters('defaultDataLakeStorageFilesystemName'), '/Microsoft.Authorization/', guid(concat(resourceGroup().id, '/', variables('storageBlobDataContributorRoleID'), '/', parameters('name'))))]",
113+
"location": "[parameters('storageLocation')]",
114+
"properties": {
115+
"roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', variables('storageBlobDataContributorRoleID'))]",
116+
"principalId": "[reference(concat('Microsoft.Synapse/workspaces/', parameters('name')), '2019-06-01-preview', 'Full').identity.principalId]",
117+
"principalType": "ServicePrincipal"
118+
}
119+
}
120+
]
121+
}
122+
},
123+
"subscriptionId": "[parameters('storageSubscriptionID')]",
124+
"resourceGroup": "[parameters('storageResourceGroupName')]",
125+
"condition": "[parameters('setWorkspaceIdentityRbacOnFilesystem')]"
126+
}
127+
],
128+
"outputs": {}
129+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"name": {
6+
"value": ""
7+
},
8+
"location": {
9+
"value": ""
10+
},
11+
"defaultDataLakeStorageAccountName": {
12+
"value": ""
13+
},
14+
"defaultDataLakeStorageFilesystemName": {
15+
"value": "workspace"
16+
},
17+
"sqlAdministratorLogin": {
18+
"value": ""
19+
},
20+
"sqlAdministratorLoginPassword": {
21+
"value": null
22+
},
23+
"setWorkspaceIdentityRbacOnFilesystem": {
24+
"value": true
25+
},
26+
"allowAllConnections": {
27+
"value": true
28+
},
29+
"poolSubnetId": {
30+
"value": ""
31+
},
32+
"tagValues": {
33+
"value": {}
34+
},
35+
"storageSubscriptionID": {
36+
"value": ""
37+
},
38+
"storageResourceGroupName": {
39+
"value": ""
40+
},
41+
"storageLocation": {
42+
"value": ""
43+
}
44+
}
45+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://aka.ms/azure-quickstart-templates-metadata-schema#",
3+
"type": "QuickStart",
4+
"itemDisplayName": "Deploy Azure Synapse Workspace",
5+
"description": "This template allows you to deploy Azure Synapse Workspace.",
6+
"summary": "Deploy Azure Synapse Workspace.",
7+
"githubUsername": "jocapc",
8+
"dateUpdated": "2019-10-10"
9+
}
10+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Deploy Azure Synapse workspace
2+
3+
This template deploys Azure Synapse workspace
4+
5+
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fjocapc%2Fsql-server-samples%2Fsynapse%2Fsamples%2Fmanage%2Fsynapse-analytics%2Fworkspace%2Fazuredeploy.json" target="_blank">
6+
<img src="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/deploytoazure.png"/>
7+
</a>
8+
<a href="http://armviz.io/#/?load=https%3A%2F%2Fraw.githubusercontent.com%2Fjocapc%2Fsql-server-samples%2Fsynapse%2Fsamples%2Fmanage%2Fsynapse-analytics%2Fworkspace%2Fazuredeploy.json" target="_blank">
9+
<img src="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/visualizebutton.png"/>
10+
</a>
11+
12+
`Tags: Azure, Synapse, Storage`

0 commit comments

Comments
 (0)