Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added 2c022f7c4bb575b0c372c62049a89b1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 5c9ab328116b389b678e128e1452003.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 6338ed09b5d0a81ece975dcba2515f2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions PT1H (1).json

Large diffs are not rendered by default.

92 changes: 92 additions & 0 deletions SQL.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
@description('The sqladmin password of the SQL logical server.')
@secure()
param pSQLPassword string

@description('The sqladmin password of the SQL logical server.')
param pSQLServer object

@description('The AD related object to be integrated.')
param pActiveDirectory object


@description('Az SQL Server lock if required.')
param pLock object

@description('change tags if required.')
param pTag object

@description('Location for sql resources.')
param pLocation string = resourceGroup().location


var vTag = (empty(pTag) ? json('null') : pTag)


resource sqlServer 'Microsoft.Sql/servers@2022-02-01-preview' = {
name: pSQLServer.Name
location: pLocation
tags: vTag
identity: {
type: 'SystemAssigned'
}
properties: {
administratorLogin: pSQLServer.Username
administratorLoginPassword: pSQLPassword
version: pSQLServer.Version
minimalTlsVersion: pSQLServer.MinimalTLSVersion
publicNetworkAccess: pSQLServer.PublicNetworkAccess
}
}

resource sqlDBMaster 'Microsoft.Sql/servers/databases@2022-02-01-preview' = {
parent: sqlServer
name: 'master'
location: pLocation
properties: {
}
}

resource ResourceLock 'Microsoft.Authorization/locks@2020-05-01' = if (pLock.Deploy) {
scope: sqlServer
name: 'sqlServerLock'
properties: {
level: pLock.Type
notes: pLock.Notes
}
}

resource connectionPolicies 'Microsoft.Sql/servers/connectionPolicies@2022-02-01-preview' = {
parent: sqlServer
name: 'default'
properties: {
connectionType: pSQLServer.ConnectionType
}
}

resource administrators_activeDirectory 'Microsoft.Sql/servers/administrators@2022-02-01-preview' = if (pActiveDirectory.Deploy) {
parent: sqlServer
name: 'ActiveDirectory'
properties: {
administratorType: 'ActiveDirectory'
login: pActiveDirectory.AdminGroup
sid: pActiveDirectory.AdminGroupSID
}
dependsOn: [
connectionPolicies
]
}

resource azureADOnlyAuthentications 'Microsoft.Sql/servers/azureADOnlyAuthentications@2022-02-01-preview' = if (pActiveDirectory.AADOnlyAuthentication && (!empty(pActiveDirectory.AdminGroup))) {
parent: sqlServer
name: 'default'
properties: {
azureADOnlyAuthentication: pActiveDirectory.AADOnlyAuthentication
}
dependsOn: [
connectionPolicies
administrators_activeDirectory
]
}



43 changes: 43 additions & 0 deletions SQL.param.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"pSQLPassword": {
"reference": {
"keyVault": {
"id": "/subscriptions/SQL DB & MI - MT Ind ( v-munm ) - Muneswara Reddy M/resourceGroups/SaiTest"
},
"secretName": "sqladmin"
}
},
"pSQLServer": {
"value": {
"Name": "saisrv",
"Username": "sai",
"Version": "12.0",
"PublicNetworkAccess": "Enabled",
"ConnectionType": "Default",
"MinimalTLSVersion": "1.2"
}
},
"pActiveDirectory": {
"value": {
"Deploy": true,
"AdminGroup": "v-vmoganti@microsoft.com",
"AdminGroupSID": "4daf82fb-f2d0-4392-9823-10371afb7d1c",
"AADOnlyAuthentication": true
}
},
"pLock": {
"value": {
"Deploy": false,
"Type": "CanNotDelete",
"Notes": "SetByARMTemplate"
}
},
"pTag": {
"value": {
}
}
}
}
Binary file added a171b25547099584cc221c302321601.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cd06cda6f3256058a5e6b6e9a5a7ceb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added f1d955d8032492b39d11f01b9c6cbe3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fcae1ca2115f69498aff7681b13bcbd2-sz_46293.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 手机照片1d4f39560bb3fa5d.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.