Fix Optional diagnostic settings for Synapse SQL Pool (#104)
* optional synapse sql pool * optional diagnostic settings Co-authored-by: Marvin Buss <34542414+marvinbuss@users.noreply.github.com> Co-authored-by: Marvin Buss <marvin.buss@gmail.com>
This commit is contained in:
Родитель
d177917589
Коммит
cf9095dfe0
|
@ -299,11 +299,11 @@ module diagnosticSettings './modules/services/diagnosticsettings.bicep' = if (en
|
|||
params: {
|
||||
logAnalyticsName: enableMonitoring ? logAnalytics001.outputs.logAnalyticsWorkspaceName: ''
|
||||
synapseName: synapse001Name
|
||||
synapseSqlPools: [
|
||||
synapse001.outputs.synapseSqlPool001Name
|
||||
synapseSqlPools:[
|
||||
enableSqlPool ? synapse001.outputs.synapseSqlPool001Name : null
|
||||
]
|
||||
synapseSparkPools: [
|
||||
synapse001.outputs.synapseBigDataPool001Name
|
||||
synapse001.outputs.synapseBigDataPool001Name
|
||||
]
|
||||
cosmosdbName: enableCosmos ? cosmosdb001.outputs.cosmosdbName : ''
|
||||
iothubName: iothub001Name
|
||||
|
@ -313,6 +313,7 @@ module diagnosticSettings './modules/services/diagnosticsettings.bicep' = if (en
|
|||
enableCosmos: enableCosmos
|
||||
enableStreamAnalytics: enableStreamAnalytics
|
||||
database001Name: enableSqlServer ? sql001.outputs.sqlserverDatabaseName : ''
|
||||
enableSqlPool: enableSqlPool
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"_generator": {
|
||||
"name": "bicep",
|
||||
"version": "0.12.40.16777",
|
||||
"templateHash": "1043826373370405115"
|
||||
"templateHash": "17358088311522229630"
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
|
@ -2886,7 +2886,7 @@
|
|||
},
|
||||
"synapseSqlPools": {
|
||||
"value": [
|
||||
"[reference(resourceId('Microsoft.Resources/deployments', 'synapse001'), '2020-10-01').outputs.synapseSqlPool001Name.value]"
|
||||
"[if(parameters('enableSqlPool'), reference(resourceId('Microsoft.Resources/deployments', 'synapse001'), '2020-10-01').outputs.synapseSqlPool001Name.value, null())]"
|
||||
]
|
||||
},
|
||||
"synapseSparkPools": {
|
||||
|
@ -2917,6 +2917,9 @@
|
|||
},
|
||||
"database001Name": {
|
||||
"value": "[if(parameters('enableSqlServer'), reference(resourceId('Microsoft.Resources/deployments', 'sql001'), '2020-10-01').outputs.sqlserverDatabaseName.value, '')]"
|
||||
},
|
||||
"enableSqlPool": {
|
||||
"value": "[parameters('enableSqlPool')]"
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
|
@ -2926,7 +2929,7 @@
|
|||
"_generator": {
|
||||
"name": "bicep",
|
||||
"version": "0.12.40.16777",
|
||||
"templateHash": "13269706606198490871"
|
||||
"templateHash": "13746696680236980375"
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
|
@ -2965,6 +2968,9 @@
|
|||
},
|
||||
"database001Name": {
|
||||
"type": "string"
|
||||
},
|
||||
"enableSqlPool": {
|
||||
"type": "bool"
|
||||
}
|
||||
},
|
||||
"variables": {
|
||||
|
@ -3008,6 +3014,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"condition": "[parameters('enableSqlPool')]",
|
||||
"copy": {
|
||||
"name": "diagnosticSetting002",
|
||||
"count": "[length(range(0, variables('synapseSqlPoolsCount')))]"
|
||||
|
|
|
@ -17,6 +17,7 @@ param synapseSparkPools array
|
|||
param enableCosmos bool
|
||||
param enableStreamAnalytics bool
|
||||
param database001Name string
|
||||
param enableSqlPool bool
|
||||
|
||||
//variables
|
||||
var synapseSqlPoolsCount = length(synapseSqlPools)
|
||||
|
@ -100,7 +101,7 @@ resource diagnosticSetting001 'Microsoft.Insights/diagnosticSettings@2021-05-01-
|
|||
}
|
||||
}
|
||||
|
||||
resource diagnosticSetting002 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for i in range(0, synapseSqlPoolsCount): {
|
||||
resource diagnosticSetting002 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = [for i in range(0, synapseSqlPoolsCount): if(enableSqlPool) {
|
||||
scope: synapsesqlpool[i]
|
||||
name: 'diagnostic-${synapseworkspace.name}-${synapsesqlpool[i].name}'
|
||||
properties: {
|
||||
|
|
Загрузка…
Ссылка в новой задаче