Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improves sql-database-with-management example #2970

Merged
merged 13 commits into from
Jun 2, 2021
Prev Previous commit
Next Next commit
removes extra end line
  • Loading branch information
Stanislav Zhelyazkov committed Apr 21, 2021
commit b59d203ee357d4b51c99cc3a9e47917c3001ec27
2 changes: 1 addition & 1 deletion docs/examples/301/sql-database-with-management/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ module sqlLogicalServers 'modules/sql-logical-servers.bicep' = {
tags: union(defaultResourceGroupProperties, resourceGroup).tags
password: password
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

param sqlDatabase object
param sqlServerName string

Expand All @@ -20,4 +19,4 @@ resource auditSettings 'Microsoft.Sql/servers/databases/auditingSettings@2020-08
retentionDays: 0
isAzureMonitorTargetEnabled: sqlDatabase.diagnosticLogsAndMetrics.auditLogs
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ resource azureDefender 'Microsoft.Sql/servers/databases/securityAlertPolicies@20
emailAccountAdmins: sqlDatabase.azureDefender.emailAccountAdmins
disabledAlerts: sqlDatabase.azureDefender.disabledRules
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ resource shortTermBackup 'Microsoft.Sql/servers/databases/backupShortTermRetenti
properties: {
retentionDays: sqlDatabase.shortTermBackupRetention
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,4 @@ resource diagnosticSetings 'microsoft.insights/diagnosticSettings@2017-05-01-pre
enabled: true
}]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ resource firewallRule 'Microsoft.Sql/servers/firewallRules@2020-08-01-preview' =
startIpAddress: sqlFirewallRule.startIpAddress
endIpAddress: sqlFirewallRule.endIpAddress
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,4 @@ resource diagnosticSetings 'microsoft.insights/diagnosticSettings@2017-05-01-pre
enabled: true
}]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,11 @@ var defaultSqlLogicalServerProperties = {
databases: []
}


module sqlLogicalServer 'sql-logical-server.bicep' = [for (sqlLogicalServer, index) in sqlLogicalServers: {
name: 'sqlLogicalServer-${index}'
params: {
sqlLogicalServer: union(defaultSqlLogicalServerProperties, sqlLogicalServer)
password: password
tags: union(tags, union(defaultSqlLogicalServerProperties, sqlLogicalServer).tags)
}
}]
}]
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
param sqlDatabase object
param sqlServerName string


resource transparentDataEncryption 'Microsoft.Sql/servers/databases/transparentDataEncryption@2014-04-01' = {
name: '${sqlServerName}/${sqlDatabase.name}/current'
properties: {
status: sqlDatabase.dataEncryption
}
}
}