Make Cosmos DB, SQL Pool & Stream Analytics Deployment Optional (#76)
* Make Cosmos & Stream Analytics Deployment Optional * added additional conditions * updated required inputs * fixed bug * fixed wron reference * fix reference issue * Made Synapse SQL Pool optional * make sql server optional * updated docs
This commit is contained in:
Родитель
d18f1d656a
Коммит
6cfdc243ff
|
@ -77,6 +77,10 @@ To begin, please open the [infra/params.dev.json](/infra/params.dev.json). In th
|
|||
| `tags` | Specifies the tags that you want to apply to all resources. | {`key`: `value`} |
|
||||
| `administratorPassword` | Specifies the administrator password of the sql servers. Will be automatically set in the workflow. **Leave this value as is.** | `<your-secure-password>` |
|
||||
| `synapseDefaultStorageAccountFileSystemId` | Specifies the Resource ID of the default storage account file system for synapse. | `/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Storage/storageAccounts/{storage-name}/blobServices/default/containers/{container-name}` |
|
||||
| `enableSqlPool` | Specifies whether an Azure SQL Pool should be deployed inside your Synapse workspace as part of the template. If you selected dataFactory as processingService, leave this value as is. | `true` or `false` |
|
||||
| `enableSqlServer` | Specifies whether Azure SQL Server should be deployed as part of the template. | `true` or `false` |
|
||||
| `enableCosmos` | Specifies whether Azure Cosmos DB should be deployed as part of the template. | `true` or `false` |
|
||||
| `enableStreamAnalytics` | Specifies whether Azure Stream Analytics Cluster and Job should be deployed as part of the template. | `true` or `false` |
|
||||
| `streamanalyticsDefaultStorageAccountFileSystemId` | Specifies the resource ID of the default Storage Account file system for Stream Analytics. | `/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Storage/storageAccounts/{storage-name}/blobServices/default/containers/{container-name}` |
|
||||
| `subnetId` | Specifies the Resource ID of the subnet to which all services will connect. | `/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Network/virtualNetworks/{vnet-name}/subnets/{subnet-name}` |
|
||||
| `purviewId` | Specifies the Resource ID of the central Purview instance. | `/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Purview/accounts/{purview-name}` |
|
||||
|
|
|
@ -65,12 +65,16 @@ To begin, please open the [infra/params.dev.json](/infra/params.dev.json). In th
|
|||
| `location` | Specifies the location for all resources. | `northeurope` |
|
||||
| `environment` | Specifies the environment of the deployment. | `dev`, `tst` or `prd` |
|
||||
| `prefix` | Specifies the prefix for all resources created in this deployment. | `prefi` |
|
||||
| `tags` | Specifies the tags that you want to apply to all the resources. | {`key`: `value`} |
|
||||
| `administratorPassword` | Specifies the administrator password of the SQL Servers. Will be automatically set in the workflow. **Leave this value as is.** | `<your-secure-password>` |
|
||||
| `tags` | Specifies the tags that you want to apply to all resources. | {`key`: `value`} |
|
||||
| `administratorPassword` | Specifies the administrator password of the sql servers. Will be automatically set in the workflow. **Leave this value as is.** | `<your-secure-password>` |
|
||||
| `synapseDefaultStorageAccountFileSystemId` | Specifies the Resource ID of the default storage account file system for synapse. | `/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Storage/storageAccounts/{storage-name}/blobServices/default/containers/{container-name}` |
|
||||
| `streamanalyticsDefaultStorageAccountFileSystemId` | Specifies the Resource ID of the default storage account file system for stream analytics. | `/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Storage/storageAccounts/{storage-name}/blobServices/default/containers/{container-name}` |
|
||||
| `enableSqlPool` | Specifies whether an Azure SQL Pool should be deployed inside your Synapse workspace as part of the template. If you selected dataFactory as processingService, leave this value as is. | `true` or `false` |
|
||||
| `enableSqlServer` | Specifies whether Azure SQL Server should be deployed as part of the template. | `true` or `false` |
|
||||
| `enableCosmos` | Specifies whether Azure Cosmos DB should be deployed as part of the template. | `true` or `false` |
|
||||
| `enableStreamAnalytics` | Specifies whether Azure Stream Analytics Cluster and Job should be deployed as part of the template. | `true` or `false` |
|
||||
| `streamanalyticsDefaultStorageAccountFileSystemId` | Specifies the resource ID of the default Storage Account file system for Stream Analytics. | `/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Storage/storageAccounts/{storage-name}/blobServices/default/containers/{container-name}` |
|
||||
| `subnetId` | Specifies the Resource ID of the subnet to which all services will connect. | `/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Network/virtualNetworks/{vnet-name}/subnets/{subnet-name}` |
|
||||
| `purviewId` | Specifies the Resource ID of the central purview instance. | `/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Purview/accounts/{purview-name}` |
|
||||
| `purviewId` | Specifies the Resource ID of the central Purview instance. | `/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Purview/accounts/{purview-name}` |
|
||||
| `enableRoleAssignments` | Specifies whether role assignments should be enabled. **Leave this value as is.** | `true` or `false` |
|
||||
| `privateDnsZoneIdKeyVault` | Specifies the Resource ID of the private DNS zone for KeyVault. | `/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Network/privateDnsZones/privatelink.vaultcore.azure.net` |
|
||||
| `privateDnsZoneIdSynapseDev` | Specifies the Resource ID of the private DNS zone for Synapse Dev. | `/subscriptions/{subscription-id}/resourceGroups/{rg-name}/providers/Microsoft.Network/privateDnsZones/privatelink.dev.azuresynapse.net` |
|
||||
|
|
|
@ -20,13 +20,13 @@ The deployment and code artifacts include the following services:
|
|||
- [Key Vault](https://docs.microsoft.com/azure/key-vault/general)
|
||||
- [Event Hub](https://docs.microsoft.com/azure/event-hubs/)
|
||||
- [IoT Hub](https://docs.microsoft.com/azure/iot-hub/about-iot-hub)
|
||||
- [Stream Analytics](https://docs.microsoft.com/azure/stream-analytics/stream-analytics-introduction)
|
||||
- [Cosmos DB](https://docs.microsoft.com/azure/cosmos-db/introduction)
|
||||
- [Stream Analytics](https://docs.microsoft.com/azure/stream-analytics/stream-analytics-introduction) (optional)
|
||||
- [Cosmos DB](https://docs.microsoft.com/azure/cosmos-db/introduction) (optional)
|
||||
- [Synapse Workspace](https://docs.microsoft.com/azure/synapse-analytics/)
|
||||
- [Azure SQL Database](https://docs.microsoft.com/azure/azure-sql/database/)
|
||||
- [SQL Pool](https://docs.microsoft.com/azure/synapse-analytics/sql-data-warehouse/sql-data-warehouse-overview-what-is)
|
||||
- [SQL Server](https://docs.microsoft.com/sql/sql-server/?view=sql-server-ver15)
|
||||
- [SQL Elastic Pool](https://docs.microsoft.com/azure/azure-sql/database/elastic-pool-overview)
|
||||
- [Azure SQL Database](https://docs.microsoft.com/azure/azure-sql/database/) (optional)
|
||||
- [SQL Pool](https://docs.microsoft.com/azure/synapse-analytics/sql-data-warehouse/sql-data-warehouse-overview-what-is) (optional)
|
||||
- [SQL Server](https://docs.microsoft.com/sql/sql-server/?view=sql-server-ver15) (optional)
|
||||
- [SQL Elastic Pool](https://docs.microsoft.com/azure/azure-sql/database/elastic-pool-overview) (optional)
|
||||
- [BigData Pool](https://docs.microsoft.com/sql/big-data-cluster/concept-data-pool?view=sql-server-ver15)
|
||||
|
||||
## Code Structure
|
||||
|
|
|
@ -408,6 +408,18 @@
|
|||
"allowedValues": "[map(steps('generalSettings').synapseDeploymentSettings.synapseDefaultStorageAccountFileSystemApi.value, (item) => parse(concat('{\"label\":\"', item.name, '\",\"value\":\"', item.id, '\"}')))]",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "enableSqlPool",
|
||||
"label": "Enable SQL Pool",
|
||||
"type": "Microsoft.Common.CheckBox",
|
||||
"visible": true,
|
||||
"defaultValue": false,
|
||||
"toolTip": "Enable the deployment of an Azure SQL Pool (DW100).",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"validationMessage": "Enable the deployment of an Azure SQL Pool (DW100)."
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -429,10 +441,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "enableStreamAnalytics",
|
||||
"label": "Enable Azure Stream Analytics",
|
||||
"type": "Microsoft.Common.CheckBox",
|
||||
"visible": true,
|
||||
"defaultValue": false,
|
||||
"toolTip": "Enable the deployment of Azure Stream Analytics Cluster and Job.",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"validationMessage": "Enable the deployment of Azure Stream Analytics Cluster and Job."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "infoBoxStreamAnalyticsDefaultStorageAccount",
|
||||
"type": "Microsoft.Common.InfoBox",
|
||||
"visible": true,
|
||||
"visible": "[equals(steps('generalSettings').streamAnalyticsDeploymentSettings.enableStreamAnalytics, true)]",
|
||||
"options": {
|
||||
"text": "We are recommending to use a dedicated container per Data Product in the workspace Data Lake and per Data Integration in the Raw as well as Enriched & Curated Data Lake. Please select the respective Data Lake in your Data Landing Zone (e.g. Raw - '{prefix}{environment}raw', Enriched & Curated - '{prefix}{environment}encur', Workspace - '{prefix}{environment}work') and select one of the pre-existing storage account containers (e.g. 'di001', 'di002', 'dp001', 'dp002') or create and select a new one for this deployment if all of them are already in use.",
|
||||
"style": "Info"
|
||||
|
@ -450,7 +474,7 @@
|
|||
"name": "streamAnalyticsDefaultStorageAccountId",
|
||||
"label": "Storage Account",
|
||||
"type": "Microsoft.Common.DropDown",
|
||||
"visible": true,
|
||||
"visible": "[equals(steps('generalSettings').streamAnalyticsDeploymentSettings.enableStreamAnalytics, true)]",
|
||||
"defaultValue": "",
|
||||
"toolTip": "Select the Storage account to which you want to connect the Stream Analytics Cluster.",
|
||||
"multiselect": false,
|
||||
|
@ -475,7 +499,7 @@
|
|||
"name": "streamanalyticsDefaultStorageAccountFileSystemId",
|
||||
"label": "Stream Analytics Default Storage Account Container",
|
||||
"type": "Microsoft.Common.DropDown",
|
||||
"visible": true,
|
||||
"visible": "[equals(steps('generalSettings').streamAnalyticsDeploymentSettings.enableStreamAnalytics, true)]",
|
||||
"defaultValue": "",
|
||||
"toolTip": "Default storage container for the Stream Analytics Cluster. If no option is shown, please make sure that a container exists within the storage account selected above.",
|
||||
"multiselect": false,
|
||||
|
@ -544,6 +568,30 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "enableSqlServer",
|
||||
"label": "Enable Azure SQL Server",
|
||||
"type": "Microsoft.Common.CheckBox",
|
||||
"visible": true,
|
||||
"defaultValue": false,
|
||||
"toolTip": "Enable the deployment of Azure SQL Server.",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"validationMessage": "Enable the deployment of Azure SQL Server."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "enableCosmos",
|
||||
"label": "Enable Azure Cosmos DB",
|
||||
"type": "Microsoft.Common.CheckBox",
|
||||
"visible": true,
|
||||
"defaultValue": false,
|
||||
"toolTip": "Enable the deployment of Azure Cosmos DB.",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"validationMessage": "Enable the deployment of Azure Cosmos DB."
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "infoBoxRoleAssignment",
|
||||
"type": "Microsoft.Common.InfoBox",
|
||||
|
@ -895,6 +943,10 @@
|
|||
"prefix": "[if(empty(steps('basics').dataProductName.dataProductPrefix), '', steps('basics').dataProductName.dataProductPrefix)]",
|
||||
"administratorPassword": "[if(empty(steps('generalSettings').synapseDeploymentSettings.administratorPassword.password), '', steps('generalSettings').synapseDeploymentSettings.administratorPassword.password)]",
|
||||
"synapseDefaultStorageAccountFileSystemId": "[if(empty(steps('generalSettings').synapseDeploymentSettings.synapseDefaultStorageAccountFileSystemId), '', steps('generalSettings').synapseDeploymentSettings.synapseDefaultStorageAccountFileSystemId)]",
|
||||
"enableSqlPool": "[steps('generalSettings').synapseDeploymentSettings.enableSqlPool]",
|
||||
"enableSqlServer": "[steps('generalSettings').generalSettings.enableSqlServer]",
|
||||
"enableCosmos": "[steps('generalSettings').generalSettings.enableCosmos]",
|
||||
"enableStreamAnalytics": "[steps('generalSettings').streamAnalyticsDeploymentSettings.enableStreamAnalytics]",
|
||||
"streamanalyticsDefaultStorageAccountFileSystemId": "[if(empty(steps('generalSettings').streamAnalyticsDeploymentSettings.streamanalyticsDefaultStorageAccountFileSystemId), '', steps('generalSettings').streamAnalyticsDeploymentSettings.streamanalyticsDefaultStorageAccountFileSystemId)]",
|
||||
"purviewId": "[if(empty(steps('generalSettings').dataGovernanceSettings.purviewId.id), '', steps('generalSettings').dataGovernanceSettings.purviewId.id)]",
|
||||
"enableRoleAssignments": "[steps('generalSettings').generalSettings.enableRoleAssignments]",
|
||||
|
|
|
@ -26,8 +26,16 @@ param tags object = {}
|
|||
param administratorPassword string
|
||||
@description('Specifies the resource ID of the default storage account file system for synapse.')
|
||||
param synapseDefaultStorageAccountFileSystemId string
|
||||
@description('Specifies whether an Azure SQL Pool should be deployed inside your Synapse workspace as part of the template. If you selected dataFactory as processingService, leave this value as is.')
|
||||
param enableSqlPool bool = false
|
||||
@description('Specifies whether Azure SQL Server should be deployed as part of the template.')
|
||||
param enableSqlServer bool = false
|
||||
@description('Specifies whether Azure Cosmos DB should be deployed as part of the template.')
|
||||
param enableCosmos bool = false
|
||||
@description('Specifies whether Azure Stream Analytics Cluster and Job should be deployed as part of the template.')
|
||||
param enableStreamAnalytics bool = false
|
||||
@description('Specifies the resource ID of the default storage account file system for stream analytics.')
|
||||
param streamanalyticsDefaultStorageAccountFileSystemId string
|
||||
param streamanalyticsDefaultStorageAccountFileSystemId string = ''
|
||||
@description('Specifies the resource ID of the central purview instance.')
|
||||
param purviewId string = ''
|
||||
@description('Specifies whether role assignments should be enabled.')
|
||||
|
@ -64,11 +72,11 @@ var tagsDefault = {
|
|||
}
|
||||
var tagsJoined = union(tagsDefault, tags)
|
||||
var administratorUsername = 'SqlServerMainUser'
|
||||
var synapseDefaultStorageAccountSubscriptionId = split(synapseDefaultStorageAccountFileSystemId, '/')[2]
|
||||
var synapseDefaultStorageAccountResourceGroupName = split(synapseDefaultStorageAccountFileSystemId, '/')[4]
|
||||
var streamanalyticsDefaultStorageAccountSubscriptionId = split(streamanalyticsDefaultStorageAccountFileSystemId, '/')[2]
|
||||
var streamanalyticsDefaultStorageAccountResourceGroupName = split(streamanalyticsDefaultStorageAccountFileSystemId, '/')[4]
|
||||
var streamanalyticsDefaultStorageAccountName = split(streamanalyticsDefaultStorageAccountFileSystemId, '/')[8]
|
||||
var synapseDefaultStorageAccountSubscriptionId = length(split(synapseDefaultStorageAccountFileSystemId, '/')) >= 13 ? split(synapseDefaultStorageAccountFileSystemId, '/')[2] : subscription().subscriptionId
|
||||
var synapseDefaultStorageAccountResourceGroupName = length(split(synapseDefaultStorageAccountFileSystemId, '/')) >= 13 ? split(synapseDefaultStorageAccountFileSystemId, '/')[4] : resourceGroup().name
|
||||
var streamanalyticsDefaultStorageAccountSubscriptionId = length(split(streamanalyticsDefaultStorageAccountFileSystemId, '/')) >= 13 ? split(streamanalyticsDefaultStorageAccountFileSystemId, '/')[2] : subscription().subscriptionId
|
||||
var streamanalyticsDefaultStorageAccountResourceGroupName = length(split(streamanalyticsDefaultStorageAccountFileSystemId, '/')) >= 13 ? split(streamanalyticsDefaultStorageAccountFileSystemId, '/')[4] : resourceGroup().name
|
||||
var streamanalyticsDefaultStorageAccountName = length(split(streamanalyticsDefaultStorageAccountFileSystemId, '/')) >= 13 ? split(streamanalyticsDefaultStorageAccountFileSystemId, '/')[8] : 'incorrectSegmentLength'
|
||||
var keyVault001Name = '${name}-vault001'
|
||||
var synapse001Name = '${name}-synapse001'
|
||||
var cosmosdb001Name = '${name}-cosmos001'
|
||||
|
@ -106,6 +114,7 @@ module synapse001 'modules/services/synapse.bicep' = {
|
|||
privateDnsZoneIdSynapseDev: privateDnsZoneIdSynapseDev
|
||||
privateDnsZoneIdSynapseSql: privateDnsZoneIdSynapseSql
|
||||
purviewId: purviewId
|
||||
enableSqlPool: enableSqlPool
|
||||
synapseComputeSubnetId: ''
|
||||
synapseDefaultStorageAccountFileSystemId: synapseDefaultStorageAccountFileSystemId
|
||||
}
|
||||
|
@ -120,7 +129,7 @@ module synapse001RoleAssignmentStorage 'modules/auxiliary/synapseRoleAssignmentS
|
|||
}
|
||||
}
|
||||
|
||||
module cosmosdb001 'modules/services/cosmosdb.bicep' = {
|
||||
module cosmosdb001 'modules/services/cosmosdb.bicep' = if(enableCosmos) {
|
||||
name: 'cosmos001'
|
||||
scope: resourceGroup()
|
||||
params: {
|
||||
|
@ -132,7 +141,7 @@ module cosmosdb001 'modules/services/cosmosdb.bicep' = {
|
|||
}
|
||||
}
|
||||
|
||||
module sql001 'modules/services/sql.bicep' = {
|
||||
module sql001 'modules/services/sql.bicep' = if(enableSqlServer) {
|
||||
name: 'sql001'
|
||||
scope: resourceGroup()
|
||||
params: {
|
||||
|
@ -177,14 +186,14 @@ module eventhubNamespace001 'modules/services/eventhubnamespace.bicep' = {
|
|||
}
|
||||
}
|
||||
|
||||
module streamanalytics001 'modules/services/streamanalytics.bicep' = {
|
||||
module streamanalytics001 'modules/services/streamanalytics.bicep' = if(enableStreamAnalytics) {
|
||||
name: 'streamanalytics001'
|
||||
scope: resourceGroup()
|
||||
params: {
|
||||
location: location
|
||||
tags: tagsJoined
|
||||
eventhubNamespaceId: eventhubNamespace001.outputs.eventhubNamespaceId
|
||||
sqlServerId: sql001.outputs.sqlserverId
|
||||
sqlServerId: enableSqlServer ? sql001.outputs.sqlserverId : ''
|
||||
storageAccountId: resourceId(streamanalyticsDefaultStorageAccountSubscriptionId, streamanalyticsDefaultStorageAccountResourceGroupName, 'Microsoft.Storage/storageAccounts', streamanalyticsDefaultStorageAccountName)
|
||||
streamanalyticsclusterName: streamanalyticscluster001Name
|
||||
streamanalyticsclusterSkuCapacity: 36
|
||||
|
@ -194,7 +203,7 @@ module streamanalytics001 'modules/services/streamanalytics.bicep' = {
|
|||
}
|
||||
|
||||
@batchSize(1)
|
||||
module deploymentDelay 'modules/auxiliary/delay.bicep' = [for i in range(0,20): if (enableRoleAssignments) {
|
||||
module deploymentDelay 'modules/auxiliary/delay.bicep' = [for i in range(0,20): if (enableStreamAnalytics && enableRoleAssignments) {
|
||||
name: 'delay-${i}'
|
||||
dependsOn: [
|
||||
streamanalytics001
|
||||
|
@ -205,7 +214,7 @@ module deploymentDelay 'modules/auxiliary/delay.bicep' = [for i in range(0,20):
|
|||
}
|
||||
}]
|
||||
|
||||
module streamanalytics001RoleAssignmentStorage 'modules/auxiliary/streamanalyticsRoleAssignmentStorage.bicep' = if (enableRoleAssignments) {
|
||||
module streamanalytics001RoleAssignmentStorage 'modules/auxiliary/streamanalyticsRoleAssignmentStorage.bicep' = if (enableStreamAnalytics && enableRoleAssignments) {
|
||||
name: 'streamanalytics001RoleAssignmentStorage'
|
||||
dependsOn: [
|
||||
deploymentDelay
|
||||
|
@ -213,6 +222,8 @@ module streamanalytics001RoleAssignmentStorage 'modules/auxiliary/streamanalytic
|
|||
scope: resourceGroup(streamanalyticsDefaultStorageAccountSubscriptionId, streamanalyticsDefaultStorageAccountResourceGroupName)
|
||||
params: {
|
||||
storageAccountFileSystemId: streamanalyticsDefaultStorageAccountFileSystemId
|
||||
streamanalyticsjobId: streamanalytics001.outputs.streamanalyticsjob001Id
|
||||
streamanalyticsjobId: enableStreamAnalytics ? streamanalytics001.outputs.streamanalyticsjob001Id : ''
|
||||
}
|
||||
}
|
||||
|
||||
// Outputs
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"_generator": {
|
||||
"name": "bicep",
|
||||
"version": "0.4.1008.15138",
|
||||
"templateHash": "7815382455487377949"
|
||||
"templateHash": "8330284745485260728"
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
|
@ -53,8 +53,37 @@
|
|||
"description": "Specifies the resource ID of the default storage account file system for synapse."
|
||||
}
|
||||
},
|
||||
"enableSqlPool": {
|
||||
"type": "bool",
|
||||
"defaultValue": false,
|
||||
"metadata": {
|
||||
"description": "Specifies whether an Azure SQL Pool should be deployed inside your Synapse workspace as part of the template. If you selected dataFactory as processingService, leave this value as is."
|
||||
}
|
||||
},
|
||||
"enableSqlServer": {
|
||||
"type": "bool",
|
||||
"defaultValue": false,
|
||||
"metadata": {
|
||||
"description": "Specifies whether Azure SQL Server should be deployed as part of the template."
|
||||
}
|
||||
},
|
||||
"enableCosmos": {
|
||||
"type": "bool",
|
||||
"defaultValue": false,
|
||||
"metadata": {
|
||||
"description": "Specifies whether Azure Cosmos DB should be deployed as part of the template."
|
||||
}
|
||||
},
|
||||
"enableStreamAnalytics": {
|
||||
"type": "bool",
|
||||
"defaultValue": false,
|
||||
"metadata": {
|
||||
"description": "Specifies whether Azure Stream Analytics Cluster and Job should be deployed as part of the template."
|
||||
}
|
||||
},
|
||||
"streamanalyticsDefaultStorageAccountFileSystemId": {
|
||||
"type": "string",
|
||||
"defaultValue": "",
|
||||
"metadata": {
|
||||
"description": "Specifies the resource ID of the default storage account file system for stream analytics."
|
||||
}
|
||||
|
@ -141,11 +170,11 @@
|
|||
},
|
||||
"tagsJoined": "[union(variables('tagsDefault'), parameters('tags'))]",
|
||||
"administratorUsername": "SqlServerMainUser",
|
||||
"synapseDefaultStorageAccountSubscriptionId": "[split(parameters('synapseDefaultStorageAccountFileSystemId'), '/')[2]]",
|
||||
"synapseDefaultStorageAccountResourceGroupName": "[split(parameters('synapseDefaultStorageAccountFileSystemId'), '/')[4]]",
|
||||
"streamanalyticsDefaultStorageAccountSubscriptionId": "[split(parameters('streamanalyticsDefaultStorageAccountFileSystemId'), '/')[2]]",
|
||||
"streamanalyticsDefaultStorageAccountResourceGroupName": "[split(parameters('streamanalyticsDefaultStorageAccountFileSystemId'), '/')[4]]",
|
||||
"streamanalyticsDefaultStorageAccountName": "[split(parameters('streamanalyticsDefaultStorageAccountFileSystemId'), '/')[8]]",
|
||||
"synapseDefaultStorageAccountSubscriptionId": "[if(greaterOrEquals(length(split(parameters('synapseDefaultStorageAccountFileSystemId'), '/')), 13), split(parameters('synapseDefaultStorageAccountFileSystemId'), '/')[2], subscription().subscriptionId)]",
|
||||
"synapseDefaultStorageAccountResourceGroupName": "[if(greaterOrEquals(length(split(parameters('synapseDefaultStorageAccountFileSystemId'), '/')), 13), split(parameters('synapseDefaultStorageAccountFileSystemId'), '/')[4], resourceGroup().name)]",
|
||||
"streamanalyticsDefaultStorageAccountSubscriptionId": "[if(greaterOrEquals(length(split(parameters('streamanalyticsDefaultStorageAccountFileSystemId'), '/')), 13), split(parameters('streamanalyticsDefaultStorageAccountFileSystemId'), '/')[2], subscription().subscriptionId)]",
|
||||
"streamanalyticsDefaultStorageAccountResourceGroupName": "[if(greaterOrEquals(length(split(parameters('streamanalyticsDefaultStorageAccountFileSystemId'), '/')), 13), split(parameters('streamanalyticsDefaultStorageAccountFileSystemId'), '/')[4], resourceGroup().name)]",
|
||||
"streamanalyticsDefaultStorageAccountName": "[if(greaterOrEquals(length(split(parameters('streamanalyticsDefaultStorageAccountFileSystemId'), '/')), 13), split(parameters('streamanalyticsDefaultStorageAccountFileSystemId'), '/')[8], 'incorrectSegmentLength')]",
|
||||
"keyVault001Name": "[format('{0}-vault001', variables('name'))]",
|
||||
"synapse001Name": "[format('{0}-synapse001', variables('name'))]",
|
||||
"cosmosdb001Name": "[format('{0}-cosmos001', variables('name'))]",
|
||||
|
@ -344,6 +373,9 @@
|
|||
"purviewId": {
|
||||
"value": "[parameters('purviewId')]"
|
||||
},
|
||||
"enableSqlPool": {
|
||||
"value": "[parameters('enableSqlPool')]"
|
||||
},
|
||||
"synapseComputeSubnetId": {
|
||||
"value": ""
|
||||
},
|
||||
|
@ -358,7 +390,7 @@
|
|||
"_generator": {
|
||||
"name": "bicep",
|
||||
"version": "0.4.1008.15138",
|
||||
"templateHash": "16826995183249451487"
|
||||
"templateHash": "16920360437300226845"
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
|
@ -407,6 +439,10 @@
|
|||
"purviewId": {
|
||||
"type": "string",
|
||||
"defaultValue": ""
|
||||
},
|
||||
"enableSqlPool": {
|
||||
"type": "bool",
|
||||
"defaultValue": false
|
||||
}
|
||||
},
|
||||
"functions": [],
|
||||
|
@ -451,6 +487,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"condition": "[parameters('enableSqlPool')]",
|
||||
"type": "Microsoft.Synapse/workspaces/sqlPools",
|
||||
"apiVersion": "2021-03-01",
|
||||
"name": "[format('{0}/{1}', parameters('synapseName'), 'sqlPool001')]",
|
||||
|
@ -745,6 +782,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"condition": "[parameters('enableCosmos')]",
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"apiVersion": "2020-06-01",
|
||||
"name": "cosmos001",
|
||||
|
@ -898,6 +936,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"condition": "[parameters('enableSqlServer')]",
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"apiVersion": "2020-06-01",
|
||||
"name": "sql001",
|
||||
|
@ -1478,6 +1517,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"condition": "[parameters('enableStreamAnalytics')]",
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"apiVersion": "2020-06-01",
|
||||
"name": "streamanalytics001",
|
||||
|
@ -1497,7 +1537,7 @@
|
|||
"value": "[reference(resourceId('Microsoft.Resources/deployments', 'eventhubNamespace001'), '2020-06-01').outputs.eventhubNamespaceId.value]"
|
||||
},
|
||||
"sqlServerId": {
|
||||
"value": "[reference(resourceId('Microsoft.Resources/deployments', 'sql001'), '2020-06-01').outputs.sqlserverId.value]"
|
||||
"value": "[if(parameters('enableSqlServer'), reference(resourceId('Microsoft.Resources/deployments', 'sql001'), '2020-06-01').outputs.sqlserverId.value, '')]"
|
||||
},
|
||||
"storageAccountId": {
|
||||
"value": "[resourceId(variables('streamanalyticsDefaultStorageAccountSubscriptionId'), variables('streamanalyticsDefaultStorageAccountResourceGroupName'), 'Microsoft.Storage/storageAccounts', variables('streamanalyticsDefaultStorageAccountName'))]"
|
||||
|
@ -1718,7 +1758,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"condition": "[parameters('enableRoleAssignments')]",
|
||||
"condition": "[and(parameters('enableStreamAnalytics'), parameters('enableRoleAssignments'))]",
|
||||
"copy": {
|
||||
"name": "deploymentDelay",
|
||||
"count": "[length(range(0, 20))]",
|
||||
|
@ -1768,7 +1808,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"condition": "[parameters('enableRoleAssignments')]",
|
||||
"condition": "[and(parameters('enableStreamAnalytics'), parameters('enableRoleAssignments'))]",
|
||||
"type": "Microsoft.Resources/deployments",
|
||||
"apiVersion": "2020-06-01",
|
||||
"name": "streamanalytics001RoleAssignmentStorage",
|
||||
|
@ -1784,7 +1824,7 @@
|
|||
"value": "[parameters('streamanalyticsDefaultStorageAccountFileSystemId')]"
|
||||
},
|
||||
"streamanalyticsjobId": {
|
||||
"value": "[reference(resourceId('Microsoft.Resources/deployments', 'streamanalytics001'), '2020-06-01').outputs.streamanalyticsjob001Id.value]"
|
||||
"value": "[if(parameters('enableStreamAnalytics'), reference(resourceId('Microsoft.Resources/deployments', 'streamanalytics001'), '2020-06-01').outputs.streamanalyticsjob001Id.value, '')]"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
|
|
|
@ -50,7 +50,7 @@ resource streamanalyticscluster 'Microsoft.StreamAnalytics/clusters@2020-03-01'
|
|||
properties: {}
|
||||
}
|
||||
|
||||
resource streamanalyticsclusterManagedPrivateEndpointStorageAccount 'Microsoft.StreamAnalytics/clusters/privateEndpoints@2020-03-01' = if (!empty(storageAccountId)) {
|
||||
resource streamanalyticsclusterManagedPrivateEndpointStorageAccount 'Microsoft.StreamAnalytics/clusters/privateEndpoints@2020-03-01' = if(!empty(storageAccountId)) {
|
||||
parent: streamanalyticscluster
|
||||
name: streamanalyticsclusterManagedPrivateEndpointNameStorageAccount
|
||||
properties: {
|
||||
|
@ -69,7 +69,7 @@ resource streamanalyticsclusterManagedPrivateEndpointStorageAccount 'Microsoft.S
|
|||
}
|
||||
}
|
||||
|
||||
resource streamanalyticsclusterManagedPrivateEndpointSqlServer 'Microsoft.StreamAnalytics/clusters/privateEndpoints@2020-03-01' = if (!empty(sqlServerId)) {
|
||||
resource streamanalyticsclusterManagedPrivateEndpointSqlServer 'Microsoft.StreamAnalytics/clusters/privateEndpoints@2020-03-01' = if(!empty(sqlServerId)) {
|
||||
parent: streamanalyticscluster
|
||||
name: streamanalyticsclusterManagedPrivateEndpointNameSqlServer
|
||||
properties: {
|
||||
|
@ -88,7 +88,7 @@ resource streamanalyticsclusterManagedPrivateEndpointSqlServer 'Microsoft.Stream
|
|||
}
|
||||
}
|
||||
|
||||
resource streamanalyticsclusterManagedPrivateEndpointEventhubNamespace 'Microsoft.StreamAnalytics/clusters/privateEndpoints@2020-03-01' = if (!empty(eventhubNamespaceId)) {
|
||||
resource streamanalyticsclusterManagedPrivateEndpointEventhubNamespace 'Microsoft.StreamAnalytics/clusters/privateEndpoints@2020-03-01' = if(!empty(eventhubNamespaceId)) {
|
||||
parent: streamanalyticscluster
|
||||
name: streamanalyticsclusterManagedPrivateEndpointNameEventhubNamespace
|
||||
properties: {
|
||||
|
|
|
@ -19,6 +19,7 @@ param synapseComputeSubnetId string = ''
|
|||
param privateDnsZoneIdSynapseSql string = ''
|
||||
param privateDnsZoneIdSynapseDev string = ''
|
||||
param purviewId string = ''
|
||||
param enableSqlPool bool = false
|
||||
|
||||
// Variables
|
||||
var synapseDefaultStorageAccountFileSystemName = length(split(synapseDefaultStorageAccountFileSystemId, '/')) >= 13 ? last(split(synapseDefaultStorageAccountFileSystemId, '/')) : 'incorrectSegmentLength'
|
||||
|
@ -59,7 +60,7 @@ resource synapse 'Microsoft.Synapse/workspaces@2021-03-01' = {
|
|||
}
|
||||
}
|
||||
|
||||
resource synapseSqlPool001 'Microsoft.Synapse/workspaces/sqlPools@2021-03-01' = {
|
||||
resource synapseSqlPool001 'Microsoft.Synapse/workspaces/sqlPools@2021-03-01' = if(enableSqlPool) {
|
||||
parent: synapse
|
||||
name: 'sqlPool001'
|
||||
location: location
|
||||
|
|
|
@ -20,6 +20,18 @@
|
|||
"synapseDefaultStorageAccountFileSystemId": {
|
||||
"value": "/subscriptions/2150d511-458f-43b9-8691-6819ba2e6c7b/resourceGroups/dlz01-dev-storage/providers/Microsoft.Storage/storageAccounts/dlz01devencur/blobServices/default/containers/di002"
|
||||
},
|
||||
"enableSqlPool": {
|
||||
"value": true
|
||||
},
|
||||
"enableSqlServer": {
|
||||
"value": true
|
||||
},
|
||||
"enableCosmos": {
|
||||
"value": true
|
||||
},
|
||||
"enableStreamAnalytics": {
|
||||
"value": true
|
||||
},
|
||||
"streamanalyticsDefaultStorageAccountFileSystemId": {
|
||||
"value": "/subscriptions/2150d511-458f-43b9-8691-6819ba2e6c7b/resourceGroups/dlz01-dev-storage/providers/Microsoft.Storage/storageAccounts/dlz01devencur/blobServices/default/containers/di002"
|
||||
},
|
||||
|
|
|
@ -20,6 +20,18 @@
|
|||
"synapseDefaultStorageAccountFileSystemId": {
|
||||
"value": "/subscriptions/2150d511-458f-43b9-8691-6819ba2e6c7b/resourceGroups/dlz01-prd-storage/providers/Microsoft.Storage/storageAccounts/dlz01prdencur/blobServices/default/containers/di002"
|
||||
},
|
||||
"enableSqlPool": {
|
||||
"value": true
|
||||
},
|
||||
"enableSqlServer": {
|
||||
"value": true
|
||||
},
|
||||
"enableCosmos": {
|
||||
"value": true
|
||||
},
|
||||
"enableStreamAnalytics": {
|
||||
"value": true
|
||||
},
|
||||
"streamanalyticsDefaultStorageAccountFileSystemId": {
|
||||
"value": "/subscriptions/2150d511-458f-43b9-8691-6819ba2e6c7b/resourceGroups/dlz01-prd-storage/providers/Microsoft.Storage/storageAccounts/dlz01prdencur/blobServices/default/containers/di002"
|
||||
},
|
||||
|
|
|
@ -20,6 +20,18 @@
|
|||
"synapseDefaultStorageAccountFileSystemId": {
|
||||
"value": "/subscriptions/2150d511-458f-43b9-8691-6819ba2e6c7b/resourceGroups/dlz01-tst-storage/providers/Microsoft.Storage/storageAccounts/dlz01tstencur/blobServices/default/containers/di002"
|
||||
},
|
||||
"enableSqlPool": {
|
||||
"value": true
|
||||
},
|
||||
"enableSqlServer": {
|
||||
"value": true
|
||||
},
|
||||
"enableCosmos": {
|
||||
"value": true
|
||||
},
|
||||
"enableStreamAnalytics": {
|
||||
"value": true
|
||||
},
|
||||
"streamanalyticsDefaultStorageAccountFileSystemId": {
|
||||
"value": "/subscriptions/2150d511-458f-43b9-8691-6819ba2e6c7b/resourceGroups/dlz01-tst-storage/providers/Microsoft.Storage/storageAccounts/dlz01tstencur/blobServices/default/containers/di002"
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче