Skip to content

Instantly share code, notes, and snippets.

@ram-devsecops
Created July 19, 2017 03:58
Show Gist options
  • Save ram-devsecops/21bd2bebfddf2f2868d756f0921261af to your computer and use it in GitHub Desktop.
Save ram-devsecops/21bd2bebfddf2f2868d756f0921261af to your computer and use it in GitHub Desktop.
{
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"administratorLogin": {
"type": "string"
},
"administratorLoginPassword": {
"type": "securestring"
},
"location": {
"type": "string"
},
"serverName": {
"type": "string"
},
"skuCapacityDTU": {
"type": "int"
},
"skuFamily": {
"type": "string"
},
"skuName": {
"type": "string"
},
"skuSizeMB": {
"type": "int"
},
"skuTier": {
"type": "string"
},
"version": {
"type": "string"
}
},
"resources": [
{
"apiVersion": "2017-04-30-preview",
"kind": "",
"location": "[parameters('location')]",
"name": "[parameters('serverName')]",
"properties": {
"version": "[parameters('version')]",
"administratorLogin": "[parameters('administratorLogin')]",
"administratorLoginPassword": "[parameters('administratorLoginPassword')]",
"storageMB": "[parameters('skuSizeMB')]"
},
"sku": {
"name": "[parameters('skuName')]",
"tier": "[parameters('skuTier')]",
"capacity": "[parameters('skuCapacityDTU')]",
"size": "[parameters('skuSizeMB')]",
"family": "[parameters('skuFamily')]"
},
"type": "Microsoft.DBforMySQL/servers"
}
],
"resources":[
{
"type":"firewallrules",
"apiVersion":"2017-04-30-preview",
"dependsOn":[
"[concat('Microsoft.DBforMySQL/servers/', variables('serverName'))]"
],
"location":"[resourceGroup().location]",
"name":"[concat(variables('serverName'),'firewall')]",
"properties":{
"startIpAddress":"0.0.0.0",
"endIpAddress":"255.255.255.255"
}
},
{
"name":"[variables('databaseName')]",
"type":"databases",
"apiVersion":"2017-04-30-preview",
"properties":{
"charset":"utf8",
"collation":"utf8_general_ci"
},
"dependsOn":[
"[concat('Microsoft.DBforMySQL/servers/', variables('serverName'))]"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment