{ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "windowsAdminUsername": { "type": "string", "metadata": { "description": "Username for Windows account" } }, "windowsAdminPassword": { "type": "securestring", "minLength": 12, "maxLength": 123, "metadata": { "description": "Password for Windows account. Password must have 3 of the following: 1 lower case character, 1 upper case character, 1 number, and 1 special character. The value must be between 12 and 123 characters long" } }, "sshRSAPublicKey": { "type": "securestring", "metadata": { "description": "RSA public key used for securing SSH access to Azure resources" } }, "spnClientId": { "type": "string", "metadata": { "description": "Azure service principal client id" } }, "spnClientSecret": { "type": "securestring", "metadata": { "description": "Azure service principal client secret" } }, "spnTenantId": { "type": "string", "metadata": { "description": "Azure AD tenant id for your service principal" } }, "logAnalyticsWorkspaceName": { "type": "string", "metadata": { "description": "Name for your log analytics workspace" } }, "kubernetesVersion": { "defaultValue": "1.28.5", "type": "string", "metadata": { "description": "The version of Kubernetes" } }, "clusterName": { "type": "string", "defaultValue": "Arc-DataSvc-AKS", "metadata": { "description": "The name of the Kubernetes cluster resource" } }, "dnsPrefix": { "type": "string", "defaultValue": "arcdata", "metadata": { "description": "Optional DNS prefix to use with hosted Kubernetes API server FQDN" } }, "deploySQLMI": { "type": "bool", "defaultValue": false, "metadata": { "description": "SQL Managed Instance deployment" } }, "enableADAuth": { "type": "bool", "defaultValue": false, "metadata": { "description": "Indicate whethe to support AD authentication in SQLMI" } }, "SQLMIHA": { "type": "bool", "defaultValue": false, "metadata": { "description": "SQL Managed Instance high-availability deployment" } }, "deployPostgreSQL": { "type": "bool", "defaultValue": false, "metadata": { "description": "PostgreSQL deployment" } }, "githubAccount": { "type": "string", "metadata": { "description": "Target GitHub account" }, "defaultValue": "microsoft" }, "githubBranch": { "type": "string", "metadata": { "description": "Target GitHub branch" }, "defaultValue": "main" }, "deployBastion": { "type": "bool", "metadata": { "description": "Choice to deploy Bastion to connect to the client VM" }, "defaultValue" : false }, "bastionHostName": { "type": "string", "defaultValue": "Arc-Data-Demo-Bastion", "metadata": { "description": "the Azure Bastion host name" } } }, "variables": { "templateBaseUrl": "[concat('https://raw.githubusercontent.com/', parameters('githubAccount'), '/azure_arc/', parameters('githubBranch'), '/azure_arc_data_jumpstart/aks/ARM/')]", "clientVmTemplateUrl": "[uri(variables('templateBaseUrl'), 'clientVm.json')]", "aksTemplateUrl": "[uri(variables('templateBaseUrl'), 'aks.json')]", "logAnalyticsUrl": "[uri(variables('templateBaseUrl'), 'logAnalytics.json')]", "VNETUrl": "[uri(variables('templateBaseUrl'), 'VNET.json')]", "addsVMTemplateUrl": "[uri(variables('templateBaseUrl'), 'addsVm.json')]", // Virtual Network configuration "virtualNetworkName": "Arc-Data-VNet", "subnetName": "Arc-Data-Subnet", "akssubnetName": "AKS-Subnet", "addressPrefix": "172.16.0.0/16", "subnetAddressPrefix": "172.16.1.0/24", "bastionSubnetPrefix": "172.16.2.64/26", "addsPrivateIPAddress": "172.16.1.100", "bastionSubnetName": "AzureBastionSubnet", "bastionSubnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('bastionSubnetName'))]", "addsDomainName": "jumpstart.local" }, "resources": [ { "type": "Microsoft.Resources/deployments", "comments": "Deploys a VNET and Subnet for Client VM", "apiVersion": "2021-04-01", "name": "VNETDeployment", "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('VNETUrl')]", "contentVersion": "1.0.0.0" }, "parameters": { "virtualNetworkName": { "value": "[variables('virtualNetworkName')]" }, "subnetName": { "value": "[variables('subnetName')]" }, "addressPrefix": { "value": "[variables('addressPrefix')]" }, "subnetAddressPrefix": { "value": "[variables('subnetAddressPrefix')]" }, "bastionSubnetPrefix": { "value": "[variables('bastionSubnetPrefix')]" } } } }, { "type": "Microsoft.Resources/deployments", "comments": "Updates VNet DNS servers after ADDS VM is deployed", "apiVersion": "2021-04-01", "name": "updateVNetDNSServers", "condition": "[parameters('enableADAuth')]", "dependsOn": ["VNETDeployment", "addsVmDeployment"], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('VNETUrl')]", "contentVersion": "1.0.0.0" }, "parameters": { "virtualNetworkName": { "value": "[variables('virtualNetworkName')]" }, "subnetName": { "value": "[variables('subnetName')]" }, "addressPrefix": { "value": "[variables('addressPrefix')]" }, "subnetAddressPrefix": { "value": "[variables('subnetAddressPrefix')]" }, "bastionSubnetPrefix": { "value": "[variables('bastionSubnetPrefix')]" }, "dnsServers": { "value": ["[variables('addsPrivateIPAddress')]", "168.63.129.16"] } } } }, { "type": "Microsoft.Resources/deployments", "comments": "Deploys an AKS Cluster", "apiVersion": "2021-04-01", "name": "aksDeployment", "dependsOn": ["VNETDeployment", "addsVmDeployment", "updateVNetDNSServers"], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('aksTemplateUrl')]", "contentVersion": "1.0.0.0" }, "parameters": { "sshRSAPublicKey": { "value": "[parameters('sshRSAPublicKey')]" }, "spnClientId": { "value": "[parameters('spnClientId')]" }, "spnClientSecret": { "value": "[parameters('spnClientSecret')]" }, "kubernetesVersion": { "value": "[parameters('kubernetesVersion')]" }, "dnsPrefix": { "value": "[parameters('dnsPrefix')]" }, "vnetSubnetID": { "value": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('aksSubnetName'))]" } } } }, { "type": "Microsoft.Resources/deployments", "comments": "Deploys Active Directory Domain Services Windows VM", "apiVersion": "2021-04-01", "name": "addsVmDeployment", "condition": "[parameters('enableADAuth')]", "dependsOn": ["VNETDeployment"], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('addsVMTemplateUrl')]", "contentVersion": "1.0.0.0" }, "parameters": { "windowsAdminUsername": { "value": "[parameters('windowsAdminUsername')]" }, "windowsAdminPassword": { "value": "[parameters('windowsAdminPassword')]" }, "addsDomainName": { "value": "[variables('addsDomainName')]" }, "virtualNetworkName": { "value": "[variables('virtualNetworkName')]" }, "subnetName": { "value": "[variables('subnetName')]" }, "addsPrivateIPAddress":{ "value": "[variables('addsPrivateIPAddress')]" }, "templateBaseUrl":{ "value": "[variables('templateBaseUrl')]" }, "deployBastion":{ "value": "[parameters('deployBastion')]" }, "bastionSubnetPrefix": { "value": "[variables('bastionSubnetPrefix')]" } } } }, { "type": "Microsoft.Resources/deployments", "comments": "Deploys the Client Windows VM", "apiVersion": "2021-04-01", "name": "clientVmDeployment", "dependsOn": ["VNETDeployment", "addsVmDeployment", "updateVNetDNSServers"], "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('clientVmTemplateUrl')]", "contentVersion": "1.0.0.0" }, "parameters": { "windowsAdminUsername": { "value": "[parameters('windowsAdminUsername')]" }, "windowsAdminPassword": { "value": "[parameters('windowsAdminPassword')]" }, "spnClientId": { "value": "[parameters('spnClientId')]" }, "spnClientSecret": { "value": "[parameters('spnClientSecret')]" }, "spnTenantId": { "value": "[parameters('spnTenantId')]" }, "workspaceName": { "value": "[parameters('logAnalyticsWorkspaceName')]" }, "clusterName": { "value": "[parameters('clusterName')]" }, "virtualNetworkName": { "value": "[variables('virtualNetworkName')]" }, "subnetName": { "value": "[variables('subnetName')]" }, "deploySQLMI": { "value": "[parameters('deploySQLMI')]" }, "SQLMIHA": { "value": "[parameters('SQLMIHA')]" }, "enableADAuth": { "value": "[parameters('enableADAuth')]" }, "deployPostgreSQL": { "value": "[parameters('deployPostgreSQL')]" }, "templateBaseUrl": { "value": "[variables('templateBaseUrl')]" }, "bastionSubnetPrefix": { "value": "[variables('bastionSubnetPrefix')]" }, "deployBastion": { "value": "[parameters('deployBastion')]" }, "bastionHostName": { "value": "[parameters('bastionHostName')]" }, "bastionSubnetRef": { "value": "[variables('bastionSubnetRef')]" }, "addsDomainName": { "value": "[variables('addsDomainName')]" } } } }, { "type": "Microsoft.Resources/deployments", "comments": "Deploys Azure Log Analytics workspace to support Azure Arc-enabled data services logs upload", "apiVersion": "2021-04-01", "name": "logAnalyticsDeployment", "properties": { "mode": "Incremental", "templateLink": { "uri": "[variables('logAnalyticsUrl')]", "contentVersion": "1.0.0.0" }, "parameters": { "workspaceName": { "value": "[parameters('logAnalyticsWorkspaceName')]" } } } } ] }