update azuredeploy.json README.md for (quickstarts\microsoft.dbformysql\flexible-mysql-with-private-endpoint) ***NO_CI***

This commit is contained in:
Azure Quickstarts Pipeline 2024-08-06 19:04:15 +00:00
Родитель c1036f2dcc
Коммит 308307736b
2 изменённых файлов: 298 добавлений и 1 удалений

Просмотреть файл

@ -9,7 +9,6 @@ languages:
- bicep
- json
---
# Deploy MySQL Flexible Server with Private Endpoint
![Azure Public Test Date](https://azurequickstartsservice.blob.core.windows.net/badges/quickstarts/microsoft.dbformysql/flexible-mysql-with-private-endpoint/PublicLastTestDate.svg)

Просмотреть файл

@ -0,0 +1,298 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "4257550397184178505"
}
},
"parameters": {
"mysqlAdminLogin": {
"type": "string",
"minLength": 1,
"metadata": {
"description": "MySQL administrator login name"
}
},
"mysqlAdminPassword": {
"type": "securestring",
"minLength": 8,
"metadata": {
"description": "MySQL administrator password"
}
},
"vmAdminUsername": {
"type": "string",
"metadata": {
"description": "Username for the Virtual Machine."
}
},
"vmAdminPassword": {
"type": "securestring",
"metadata": {
"description": "Password for the Virtual Machine. The password must be at least 12 characters long and have lower case, upper characters, digit and a special character (Regex match)"
}
},
"VmSize": {
"type": "string",
"defaultValue": "Standard_D2_v3",
"metadata": {
"description": "The size of the VM"
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Location for all resources."
}
}
},
"variables": {
"vnetName": "myVirtualNetwork",
"vnetAddressPrefix": "10.0.0.0/16",
"subnet1Prefix": "10.0.0.0/24",
"subnet1Name": "mySubnet",
"mySqlServerName": "[format('mysql{0}', uniqueString(resourceGroup().id))]",
"mySqlDatabaseName": "[format('{0}/sample-db', variables('mySqlServerName'))]",
"privateEndpointName": "myPrivateEndpoint",
"privateDnsZoneName": "privatelink.mysql.database.azure.com",
"pvtEndpointDnsGroupName": "[format('{0}/mydnsgroupname', variables('privateEndpointName'))]",
"vmName": "[take(format('myVm{0}', uniqueString(resourceGroup().id)), 15)]",
"publicIpAddressName": "[format('{0}PublicIP', variables('vmName'))]",
"networkInterfaceName": "[format('{0}NetInt', variables('vmName'))]",
"osDiskType": "StandardSSD_LRS"
},
"resources": [
{
"type": "Microsoft.DBforMySQL/flexibleServers",
"apiVersion": "2024-02-01-preview",
"name": "[variables('mySqlServerName')]",
"location": "[parameters('location')]",
"sku": {
"name": "Standard_D2ads_v5",
"tier": "GeneralPurpose"
},
"properties": {
"administratorLogin": "[parameters('mysqlAdminLogin')]",
"administratorLoginPassword": "[parameters('mysqlAdminPassword')]",
"storage": {
"autoGrow": "Enabled",
"iops": 3200,
"storageSizeGB": 20
},
"createMode": "Default",
"version": "8.0.21",
"backup": {
"backupRetentionDays": 7,
"geoRedundantBackup": "Enabled"
},
"highAvailability": {
"mode": "Disabled"
},
"network": {
"publicNetworkAccess": "Disabled"
}
}
},
{
"type": "Microsoft.DBforMySQL/flexibleServers/databases",
"apiVersion": "2023-12-30",
"name": "[variables('mySqlDatabaseName')]",
"properties": {
"charset": "utf8",
"collation": "utf8_general_ci"
},
"dependsOn": [
"[resourceId('Microsoft.DBforMySQL/flexibleServers', variables('mySqlServerName'))]"
]
},
{
"type": "Microsoft.Network/virtualNetworks",
"apiVersion": "2024-01-01",
"name": "[variables('vnetName')]",
"location": "[parameters('location')]",
"properties": {
"addressSpace": {
"addressPrefixes": [
"[variables('vnetAddressPrefix')]"
]
}
}
},
{
"type": "Microsoft.Network/virtualNetworks/subnets",
"apiVersion": "2024-01-01",
"name": "[format('{0}/{1}', variables('vnetName'), variables('subnet1Name'))]",
"properties": {
"addressPrefix": "[variables('subnet1Prefix')]",
"privateEndpointNetworkPolicies": "Disabled"
},
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]"
]
},
{
"type": "Microsoft.Network/privateEndpoints",
"apiVersion": "2024-01-01",
"name": "[variables('privateEndpointName')]",
"location": "[parameters('location')]",
"properties": {
"subnet": {
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('subnet1Name'))]"
},
"privateLinkServiceConnections": [
{
"name": "[variables('privateEndpointName')]",
"properties": {
"privateLinkServiceId": "[resourceId('Microsoft.DBforMySQL/flexibleServers', variables('mySqlServerName'))]",
"groupIds": [
"mysqlServer"
]
}
}
]
},
"dependsOn": [
"[resourceId('Microsoft.DBforMySQL/flexibleServers', variables('mySqlServerName'))]",
"[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]",
"[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('subnet1Name'))]"
]
},
{
"type": "Microsoft.Network/privateDnsZones",
"apiVersion": "2020-06-01",
"name": "[variables('privateDnsZoneName')]",
"location": "global",
"properties": {},
"dependsOn": [
"[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]"
]
},
{
"type": "Microsoft.Network/privateDnsZones/virtualNetworkLinks",
"apiVersion": "2020-06-01",
"name": "[format('{0}/{1}', variables('privateDnsZoneName'), format('{0}-link', variables('privateDnsZoneName')))]",
"location": "global",
"properties": {
"registrationEnabled": false,
"virtualNetwork": {
"id": "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]"
}
},
"dependsOn": [
"[resourceId('Microsoft.Network/privateDnsZones', variables('privateDnsZoneName'))]",
"[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]"
]
},
{
"type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
"apiVersion": "2024-01-01",
"name": "[variables('pvtEndpointDnsGroupName')]",
"properties": {
"privateDnsZoneConfigs": [
{
"name": "config1",
"properties": {
"privateDnsZoneId": "[resourceId('Microsoft.Network/privateDnsZones', variables('privateDnsZoneName'))]"
}
}
]
},
"dependsOn": [
"[resourceId('Microsoft.Network/privateDnsZones', variables('privateDnsZoneName'))]",
"[resourceId('Microsoft.Network/privateEndpoints', variables('privateEndpointName'))]"
]
},
{
"type": "Microsoft.Network/publicIPAddresses",
"apiVersion": "2024-01-01",
"name": "[variables('publicIpAddressName')]",
"location": "[parameters('location')]",
"tags": {
"displayName": "[variables('publicIpAddressName')]"
},
"properties": {
"publicIPAllocationMethod": "Dynamic"
}
},
{
"type": "Microsoft.Network/networkInterfaces",
"apiVersion": "2024-01-01",
"name": "[variables('networkInterfaceName')]",
"location": "[parameters('location')]",
"tags": {
"displayName": "[variables('networkInterfaceName')]"
},
"properties": {
"ipConfigurations": [
{
"name": "ipConfig1",
"properties": {
"privateIPAllocationMethod": "Dynamic",
"publicIPAddress": {
"id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIpAddressName'))]"
},
"subnet": {
"id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('subnet1Name'))]"
}
}
}
]
},
"dependsOn": [
"[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIpAddressName'))]",
"[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]",
"[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('vnetName'), variables('subnet1Name'))]"
]
},
{
"type": "Microsoft.Compute/virtualMachines",
"apiVersion": "2024-03-01",
"name": "[variables('vmName')]",
"location": "[parameters('location')]",
"tags": {
"displayName": "[variables('vmName')]"
},
"properties": {
"hardwareProfile": {
"vmSize": "[parameters('VmSize')]"
},
"osProfile": {
"computerName": "[variables('vmName')]",
"adminUsername": "[parameters('vmAdminUsername')]",
"adminPassword": "[parameters('vmAdminPassword')]"
},
"storageProfile": {
"imageReference": {
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2019-Datacenter",
"version": "latest"
},
"osDisk": {
"name": "[format('{0}OsDisk', variables('vmName'))]",
"caching": "ReadWrite",
"createOption": "FromImage",
"managedDisk": {
"storageAccountType": "[variables('osDiskType')]"
},
"diskSizeGB": 128
}
},
"networkProfile": {
"networkInterfaces": [
{
"id": "[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]"
}
]
}
},
"dependsOn": [
"[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]"
]
}
]
}