<commit_before>{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "adminUsername": {
      "type": "string",
      "metadata": {
        "description": "Administrator user name used when provisioning virtual machines"
      }
    },
    "mongoAdminUsername": {
      "type": "string",
      "metadata": {
        "description": "MongoDB Administrator user name used when provisioning MongoDB sharding cluster"
      }
    },
    "mongoAdminPassword": {
      "type": "securestring",
      "metadata": {
        "description": "MongoDB Administrator password used when provisioning MongoDB sharding cluster"
      }
    },
    "dnsNamePrefix": {
      "type": "string",
      "metadata": {
        "description": "DNS Name for the publicly accessible router nodes. Must be lowercase. It should match with the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$ or it will raise an error."
      }
    },
    "centOsVersion": {
      "type": "string",
      "defaultValue": "7.2",
      "allowedValues": [
        "6.5",
        "6.6",
        "6.7",
        "7.0",
        "7.1",
        "7.2",
        "7.3",
        "7.4",
        "7.5",
        "7.6"
      ],
      "metadata": {
        "description": "The CentOS version for the VM. This will pick a fully patched image of this given CentOS version."
      }
    },
    "numDataDisks": {
      "type": "int",
      "defaultValue": 4,
      "allowedValues": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13,
        14,
        15,
        16,
        32
      ],
      "metadata": {
        "description": "The number of data disks on each shard node. We will use Raid0 for the data disks to improve performance. On each shard."
      }
    },
    "sizeOfDataDiskInGB": {
      "type": "int",
      "minValue": 1,
      "maxValue": 1023,
      "defaultValue": 20,
      "metadata": {
        "description": "The size of each data disk, the value is between 1 and 1023."
      }
    },
    "routerNodeVmSize": {
      "type": "string",
      "defaultValue": "Standard_DS3_v2",
      "metadata": {
        "description": "The size of the virtual machines used when provisioning the router nodes"
      }
    },
    "configNodeVmSize": {
      "type": "string",
      "defaultValue": "Standard_DS3_v2",
      "metadata": {
        "description": "The size of the virtual machines used when provisioning config nodes"
      }
    },
    "replicaNodeVmSize": {
      "type": "string",
      "defaultValue": "Standard_DS3_v2",
      "metadata": {
        "description": "The size of the virtual machines used when provisioning replica set nodes"
      }
    },
    "authenticationType": {
      "type": "string",
      "defaultValue": "password",
      "allowedValues": [
        "sshPublicKey",
        "password"
      ],
      "metadata": {
        "description": "Type of authentication to use on the Virtual Machine. SSH key is recommended."
      }
    },
    "adminPasswordOrKey": {
      "type": "securestring",
      "metadata": {
        "description": "SSH Key or password for the Virtual Machine. SSH key is recommended."
      }
    },
    "_artifactsLocation": {
      "type": "string",
      "defaultValue": "https://raw.githubusercontent.com/cjsingh8512/azure-quickstart-templates/users/chsi/101-mongodb-sharded-on-centos/",
      "metadata": {
        "description": "The base URI where artifacts required by this template are located. When the template is deployed using the accompanying scripts, a private location in the subscription will be used and this value will be automatically generated."
      }
    },
    "_artifactsLocationSasToken": {
      "type": "securestring",
      "metadata": {
        "description": "The sasToken required to access _artifactsLocation.  When the template is deployed using the accompanying scripts, a sasToken will be automatically generated."
      },
      "defaultValue": ""
    },
    "location": {
      "type": "string",
      "defaultValue": "[resourceGroup().location]",
      "metadata": {
        "description": "Location for all resources."
      }
    }
  },
  "variables": {
    "artifactsLocation": "[parameters('_artifactsLocation')]",
    "artifactsLocationSasToken": "[parameters('_artifactsLocationSasToken')]",
    "configPrimaryNodeScript": "[uri(parameters('_artifactsLocation'), concat('scripts/config_primary.sh', parameters('_artifactsLocationSasToken')))]",
    "configSecondaryNodeScript": "[uri(parameters('_artifactsLocation'), concat('scripts/config_secondary.sh', parameters('_artifactsLocationSasToken')))]",
    "routerNodeScript": "[uri(parameters('_artifactsLocation'), concat('scripts/router.sh', parameters('_artifactsLocationSasToken')))]",
    "replicaPrimaryNodeScript": "[uri(parameters('_artifactsLocation'), concat('scripts/replica_primary.sh', parameters('_artifactsLocationSasToken')))]",
    "replicaSecondaryNodeScript": "[uri(parameters('_artifactsLocation'), concat('scripts/replica_secondary.sh', parameters('_artifactsLocationSasToken')))]",
    "certificateLocation": "[uri(parameters('_artifactsLocation'), concat('scripts/MongoAuthCert.pem', parameters('_artifactsLocationSasToken')))]",
    "templateBaseUrl": "[variables('artifactsLocation')]",
    "sharedTemplateUrl": "[uri(variables('templateBaseUrl'), concat('nested/shared-resources.json', variables('artifactsLocationSasToken')))]",
    "configPrimaryTemplateUrl": "[uri(variables('templateBaseUrl'), concat('nested/config-primary-resources.json', variables('artifactsLocationSasToken')))]",
    "configSecondaryTemplateUrl": "[uri(variables('templateBaseUrl'), concat('nested/config-secondary-resources.json', variables('artifactsLocationSasToken')))]",
    "routerTemplateUrl": "[uri(variables('templateBaseUrl'), concat('nested/router-resources.json', variables('artifactsLocationSasToken')))]",
    "replicaPrimaryTemplateUrl": "[uri(variables('templateBaseUrl'), concat('nested/replica-primary-resources.json', variables('artifactsLocationSasToken')))]",
    "replicaSecondaryTemplateUrl": "[uri(variables('templateBaseUrl'), concat('nested/replica-secondary-resources.json', variables('artifactsLocationSasToken')))]",
    "namespace": "mongodb-",
    "virtualNetworkName": "myVNET",
    "networkSettings": {
      "virtualNetworkName": "[variables('virtualNetworkName')]",
      "addressPrefix": "10.0.0.0/16",
      "subnet": {
        "dse": {
          "name": "dse",
          "prefix": "10.0.0.0/24",
          "vnet": "[variables('virtualNetworkName')]"
        }
      },
      "statics": {
        "clusterRange": {
          "base": "10.0.0.",
          "start": 5
        },
        "configPrimaryIp": "10.0.0.240",
        "configSecondaryIp1": "10.0.0.241",
        "configSecondaryIp2": "10.0.0.242",
        "routerIp": "10.0.0.230",
        "replicaPrimaryIp": "10.0.0.100"
      }
    },
    "configPrimaryOsSettings": {
      "imageReference": {
        "publisher": "OpenLogic",
        "offer": "CentOS",
        "sku": "[parameters('centOsVersion')]",
        "version": "latest"
      },
      "scripts": [
        "[variables('configPrimaryNodeScript')]"
      ],
      "certificates": "[variables('certificateLocation')]"
    },
    "configSecondaryOsSettings": {
      "imageReference": {
        "publisher": "OpenLogic",
        "offer": "CentOS",
        "sku": "[parameters('centOsVersion')]",
        "version": "latest"
      },
      "scripts": [
        "[variables('configSecondaryNodeScript')]"
      ],
      "certificates": "[variables('certificateLocation')]"
    },
    "routerOsSettings": {
      "imageReference": {
        "publisher": "OpenLogic",
        "offer": "CentOS",
        "sku": "[parameters('centOsVersion')]",
        "version": "latest"
      },
      "scripts": [
        "[variables('routerNodeScript')]"
      ],
      "certificates": "[variables('certificateLocation')]"
    },
    "replicaPrimaryOsSettings": {
      "imageReference": {
        "publisher": "OpenLogic",
        "offer": "CentOS",
        "sku": "[parameters('centOsVersion')]",
        "version": "latest"
      },
      "scripts": [
        "[variables('replicaPrimaryNodeScript')]"
      ],
      "certificates": "[variables('certificateLocation')]"
    },
    "replicaSecondaryOsSettings": {
      "imageReference": {
        "publisher": "OpenLogic",
        "offer": "CentOS",
        "sku": "[parameters('centOsVersion')]",
        "version": "latest"
      },
      "scripts": [
        "[variables('replicaSecondaryNodeScript')]"
      ],
      "certificates": "[variables('certificateLocation')]"
    }
  },
  "resources": [
    {
      "name": "shared",
      "type": "Microsoft.Resources/deployments",
      "apiVersion": "2019-07-01",
      "properties": {
        "mode": "Incremental",
        "templateLink": {
          "uri": "[variables('sharedTemplateUrl')]",
          "contentVersion": "1.0.0.0"
        },
        "parameters": {
          "networkSettings": {
            "value": "[variables('networkSettings')]"
          },
          "namespace": {
            "value": "[variables('namespace')]"
          },
          "location": {
            "value": "[parameters('location')]"
          }
        }
      }
    },
    {
      "name": "[concat('configSecondaryNode', copyIndex(1))]",
      "type": "Microsoft.Resources/deployments",
      "apiVersion": "2019-07-01",
      "dependsOn": [
        "[concat('Microsoft.Resources/deployments/', 'shared')]"
      ],
      "copy": {
        "name": "secondaryconfigcopy",
        "count": 2,
        "mode": "serial",
        "batchSize": 1
      },
      "properties": {
        "mode": "Incremental",
        "templateLink": {
          "uri": "[variables('configSecondaryTemplateUrl')]",
          "contentVersion": "1.0.0.0"
        },
        "parameters": {
          "adminUsername": {
            "value": "[parameters('adminUsername')]"
          },
          "namespace": {
            "value": "[variables('namespace')]"
          },
          "vmbasename": {
            "value": "[concat('configSecondary', copyIndex(1))]"
          },
          "subnet": {
            "value": "[variables('networkSettings').subnet.dse]"
          },
          "vmSize": {
            "value": "[parameters('configNodeVmSize')]"
          },
          "sizeOfDataDiskInGB": {
            "value": "[parameters('sizeOfDataDiskInGB')]"
          },
          "numDataDisks": {
            "value": "[parameters('numDataDisks')]"
          },
          "staticIp": {
            "value": "[variables('networkSettings').statics[concat('configSecondaryIp', copyIndex(1))]]"
          },
          "osSettings": {
            "value": "[variables('configSecondaryOsSettings')]"
          },
          "authenticationType": {
            "value": "[parameters('authenticationType')]"
          },
          "adminPasswordOrKey": {
            "value": "[parameters('adminPasswordOrKey')]"
          },
          "location": {
            "value": "[parameters('location')]"
          }
        }
      }
    },
    {
      "name": "configPrimaryNode",
      "type": "Microsoft.Resources/deployments",
      "apiVersion": "2019-07-01",
      "dependsOn": [
        "[concat('Microsoft.Resources/deployments/', 'shared')]",
        "secondaryconfigcopy"
      ],
      "properties": {
        "mode": "Incremental",
        "templateLink": {
          "uri": "[variables('configPrimaryTemplateUrl')]",
          "contentVersion": "1.0.0.0"
        },
        "parameters": {
          "adminUsername": {
            "value": "[parameters('adminUsername')]"
          },
          "mongoAdminUsername": {
            "value": "[parameters('mongoAdminUsername')]"
          },
          "mongoAdminPassword": {
            "value": "[parameters('mongoAdminPassword')]"
          },
          "namespace": {
            "value": "[variables('namespace')]"
          },
          "vmbasename": {
            "value": "configPrimary"
          },
          "sizeOfDataDiskInGB": {
            "value": "[parameters('sizeOfDataDiskInGB')]"
          },
          "numDataDisks": {
            "value": "[parameters('numDataDisks')]"
          },
          "subnet": {
            "value": "[variables('networkSettings').subnet.dse]"
          },
          "staticIp": {
            "value": "[variables('networkSettings').statics.configPrimaryIp]"
          },
          "vmSize": {
            "value": "[parameters('configNodeVmSize')]"
          },
          "osSettings": {
            "value": "[variables('configPrimaryOsSettings')]"
          },
          "authenticationType": {
            "value": "[parameters('authenticationType')]"
          },
          "adminPasswordOrKey": {
            "value": "[parameters('adminPasswordOrKey')]"
          },
          "location": {
            "value": "[parameters('location')]"
          }
        }
      }
    },
    {
      "name": "[concat('ReplicaSecondaryNode', copyIndex(1))]",
      "type": "Microsoft.Resources/deployments",
      "apiVersion": "2019-07-01",
      "dependsOn": [
        "[concat('Microsoft.Resources/deployments/', 'shared')]"
      ],
      "copy": {
        "name": "secondaryreplicacopy",
        "count": 3,
        "mode": "serial",
        "batchSize": 1
      },
      "properties": {
        "mode": "Incremental",
        "templateLink": {
          "uri": "[variables('replicaSecondaryTemplateUrl')]",
          "contentVersion": "1.0.0.0"
        },
        "parameters": {
          "adminUsername": {
            "value": "[parameters('adminUsername')]"
          },
          "replSetName": {
            "value": "repset1"
          },
          "namespace": {
            "value": "[variables('namespace')]"
          },
          "vmbasename": {
            "value": "[concat('ReplicaSecondary', copyIndex(1))]"
          },
          "sizeOfDataDiskInGB": {
            "value": "[parameters('sizeOfDataDiskInGB')]"
          },
          "numDataDisks": {
            "value": "[parameters('numDataDisks')]"
          },
          "subnet": {
            "value": "[variables('networkSettings').subnet.dse]"
          },
          "vmSize": {
            "value": "[parameters('replicaNodeVmSize')]"
          },
          "osSettings": {
            "value": "[variables('replicaSecondaryOsSettings')]"
          },
          "authenticationType": {
            "value": "[parameters('authenticationType')]"
          },
          "adminPasswordOrKey": {
            "value": "[parameters('adminPasswordOrKey')]"
          },
          "location": {
            "value": "[parameters('location')]"
          }
        }
      }
    },
    {
      "name": "ReplicaPrimaryNode",
      "type": "Microsoft.Resources/deployments",
      "apiVersion": "2019-07-01",
      "dependsOn": [
        "[concat('Microsoft.Resources/deployments/', 'shared')]",
        "secondaryreplicacopy"
      ],
      "properties": {
        "mode": "Incremental",
        "templateLink": {
          "uri": "[variables('replicaPrimaryTemplateUrl')]",
          "contentVersion": "1.0.0.0"
        },
        "parameters": {
          "adminUsername": {
            "value": "[parameters('adminUsername')]"
          },
          "mongoAdminUsername": {
            "value": "[parameters('mongoAdminUsername')]"
          },
          "mongoAdminPassword": {
            "value": "[parameters('mongoAdminPassword')]"
          },
          "replSetName": {
            "value": "repset1"
          },
          "namespace": {
            "value": "[variables('namespace')]"
          },
          "vmbasename": {
            "value": "ReplicaPrimary"
          },
          "subnet": {
            "value": "[variables('networkSettings').subnet.dse]"
          },
          "vmSize": {
            "value": "[parameters('replicaNodeVmSize')]"
          },
          "sizeOfDataDiskInGB": {
            "value": "[parameters('sizeOfDataDiskInGB')]"
          },
          "numDataDisks": {
            "value": "[parameters('numDataDisks')]"
          },
          "staticIp": {
            "value": "[variables('networkSettings').statics.replicaPrimaryIp]"
          },
          "osSettings": {
            "value": "[variables('replicaPrimaryOsSettings')]"
          },
          "authenticationType": {
            "value": "[parameters('authenticationType')]"
          },
          "adminPasswordOrKey": {
            "value": "[parameters('adminPasswordOrKey')]"
          },
          "location": {
            "value": "[parameters('location')]"
          }
        }
      }
    },
    {
      "name": "routerNode",
      "type": "Microsoft.Resources/deployments",
      "apiVersion": "2019-07-01",
      "dependsOn": [
        "[concat('Microsoft.Resources/deployments/', 'shared')]",
        "[concat('Microsoft.Resources/deployments/', 'configPrimaryNode')]",
        "[concat('Microsoft.Resources/deployments/', 'ReplicaPrimaryNode')]"
      ],
      "properties": {
        "mode": "Incremental",
        "templateLink": {
          "uri": "[variables('routerTemplateUrl')]",
          "contentVersion": "1.0.0.0"
        },
        "parameters": {
          "adminUsername": {
            "value": "[parameters('adminUsername')]"
          },
          "mongoAdminUsername": {
            "value": "[parameters('mongoAdminUsername')]"
          },
          "mongoAdminPassword": {
            "value": "[parameters('mongoAdminPassword')]"
          },
          "namespace": {
            "value": "[variables('namespace')]"
          },
          "vmbasename": {
            "value": "router"
          },
          "subnet": {
            "value": "[variables('networkSettings').subnet.dse]"
          },
          "vmSize": {
            "value": "[parameters('routerNodeVmSize')]"
          },
          "dnsname": {
            "value": "[parameters('dnsNamePrefix')]"
          },
          "staticIp": {
            "value": "[variables('networkSettings').statics.routerIp]"
          },
          "osSettings": {
            "value": "[variables('routerOsSettings')]"
          },
          "authenticationType": {
            "value": "[parameters('authenticationType')]"
          },
          "adminPasswordOrKey": {
            "value": "[parameters('adminPasswordOrKey')]"
          },
          "location": {
            "value": "[parameters('location')]"
          }
        }
      }
    }
  ],
  "outputs": {}
}
<commit_msg>Changed the artifacts location to the master branch<commit_after>{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "adminUsername": {
      "type": "string",
      "metadata": {
        "description": "Administrator user name used when provisioning virtual machines"
      }
    },
    "mongoAdminUsername": {
      "type": "string",
      "metadata": {
        "description": "MongoDB Administrator user name used when provisioning MongoDB sharding cluster"
      }
    },
    "mongoAdminPassword": {
      "type": "securestring",
      "metadata": {
        "description": "MongoDB Administrator password used when provisioning MongoDB sharding cluster"
      }
    },
    "dnsNamePrefix": {
      "type": "string",
      "metadata": {
        "description": "DNS Name for the publicly accessible router nodes. Must be lowercase. It should match with the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$ or it will raise an error."
      }
    },
    "centOsVersion": {
      "type": "string",
      "defaultValue": "7.2",
      "allowedValues": [
        "6.5",
        "6.6",
        "6.7",
        "7.0",
        "7.1",
        "7.2",
        "7.3",
        "7.4",
        "7.5",
        "7.6"
      ],
      "metadata": {
        "description": "The CentOS version for the VM. This will pick a fully patched image of this given CentOS version."
      }
    },
    "numDataDisks": {
      "type": "int",
      "defaultValue": 4,
      "allowedValues": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9,
        10,
        11,
        12,
        13,
        14,
        15,
        16,
        32
      ],
      "metadata": {
        "description": "The number of data disks on each shard node. We will use Raid0 for the data disks to improve performance. On each shard."
      }
    },
    "sizeOfDataDiskInGB": {
      "type": "int",
      "minValue": 1,
      "maxValue": 1023,
      "defaultValue": 20,
      "metadata": {
        "description": "The size of each data disk, the value is between 1 and 1023."
      }
    },
    "routerNodeVmSize": {
      "type": "string",
      "defaultValue": "Standard_DS3_v2",
      "metadata": {
        "description": "The size of the virtual machines used when provisioning the router nodes"
      }
    },
    "configNodeVmSize": {
      "type": "string",
      "defaultValue": "Standard_DS3_v2",
      "metadata": {
        "description": "The size of the virtual machines used when provisioning config nodes"
      }
    },
    "replicaNodeVmSize": {
      "type": "string",
      "defaultValue": "Standard_DS3_v2",
      "metadata": {
        "description": "The size of the virtual machines used when provisioning replica set nodes"
      }
    },
    "authenticationType": {
      "type": "string",
      "defaultValue": "password",
      "allowedValues": [
        "sshPublicKey",
        "password"
      ],
      "metadata": {
        "description": "Type of authentication to use on the Virtual Machine. SSH key is recommended."
      }
    },
    "adminPasswordOrKey": {
      "type": "securestring",
      "metadata": {
        "description": "SSH Key or password for the Virtual Machine. SSH key is recommended."
      }
    },
    "_artifactsLocation": {
      "type": "string",
      "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-mongodb-sharded-on-centos/",
      "metadata": {
        "description": "The base URI where artifacts required by this template are located. When the template is deployed using the accompanying scripts, a private location in the subscription will be used and this value will be automatically generated."
      }
    },
    "_artifactsLocationSasToken": {
      "type": "securestring",
      "metadata": {
        "description": "The sasToken required to access _artifactsLocation.  When the template is deployed using the accompanying scripts, a sasToken will be automatically generated."
      },
      "defaultValue": ""
    },
    "location": {
      "type": "string",
      "defaultValue": "[resourceGroup().location]",
      "metadata": {
        "description": "Location for all resources."
      }
    }
  },
  "variables": {
    "artifactsLocation": "[parameters('_artifactsLocation')]",
    "artifactsLocationSasToken": "[parameters('_artifactsLocationSasToken')]",
    "configPrimaryNodeScript": "[uri(parameters('_artifactsLocation'), concat('scripts/config_primary.sh', parameters('_artifactsLocationSasToken')))]",
    "configSecondaryNodeScript": "[uri(parameters('_artifactsLocation'), concat('scripts/config_secondary.sh', parameters('_artifactsLocationSasToken')))]",
    "routerNodeScript": "[uri(parameters('_artifactsLocation'), concat('scripts/router.sh', parameters('_artifactsLocationSasToken')))]",
    "replicaPrimaryNodeScript": "[uri(parameters('_artifactsLocation'), concat('scripts/replica_primary.sh', parameters('_artifactsLocationSasToken')))]",
    "replicaSecondaryNodeScript": "[uri(parameters('_artifactsLocation'), concat('scripts/replica_secondary.sh', parameters('_artifactsLocationSasToken')))]",
    "certificateLocation": "[uri(parameters('_artifactsLocation'), concat('scripts/MongoAuthCert.pem', parameters('_artifactsLocationSasToken')))]",
    "templateBaseUrl": "[variables('artifactsLocation')]",
    "sharedTemplateUrl": "[uri(variables('templateBaseUrl'), concat('nested/shared-resources.json', variables('artifactsLocationSasToken')))]",
    "configPrimaryTemplateUrl": "[uri(variables('templateBaseUrl'), concat('nested/config-primary-resources.json', variables('artifactsLocationSasToken')))]",
    "configSecondaryTemplateUrl": "[uri(variables('templateBaseUrl'), concat('nested/config-secondary-resources.json', variables('artifactsLocationSasToken')))]",
    "routerTemplateUrl": "[uri(variables('templateBaseUrl'), concat('nested/router-resources.json', variables('artifactsLocationSasToken')))]",
    "replicaPrimaryTemplateUrl": "[uri(variables('templateBaseUrl'), concat('nested/replica-primary-resources.json', variables('artifactsLocationSasToken')))]",
    "replicaSecondaryTemplateUrl": "[uri(variables('templateBaseUrl'), concat('nested/replica-secondary-resources.json', variables('artifactsLocationSasToken')))]",
    "namespace": "mongodb-",
    "virtualNetworkName": "myVNET",
    "networkSettings": {
      "virtualNetworkName": "[variables('virtualNetworkName')]",
      "addressPrefix": "10.0.0.0/16",
      "subnet": {
        "dse": {
          "name": "dse",
          "prefix": "10.0.0.0/24",
          "vnet": "[variables('virtualNetworkName')]"
        }
      },
      "statics": {
        "clusterRange": {
          "base": "10.0.0.",
          "start": 5
        },
        "configPrimaryIp": "10.0.0.240",
        "configSecondaryIp1": "10.0.0.241",
        "configSecondaryIp2": "10.0.0.242",
        "routerIp": "10.0.0.230",
        "replicaPrimaryIp": "10.0.0.100"
      }
    },
    "configPrimaryOsSettings": {
      "imageReference": {
        "publisher": "OpenLogic",
        "offer": "CentOS",
        "sku": "[parameters('centOsVersion')]",
        "version": "latest"
      },
      "scripts": [
        "[variables('configPrimaryNodeScript')]"
      ],
      "certificates": "[variables('certificateLocation')]"
    },
    "configSecondaryOsSettings": {
      "imageReference": {
        "publisher": "OpenLogic",
        "offer": "CentOS",
        "sku": "[parameters('centOsVersion')]",
        "version": "latest"
      },
      "scripts": [
        "[variables('configSecondaryNodeScript')]"
      ],
      "certificates": "[variables('certificateLocation')]"
    },
    "routerOsSettings": {
      "imageReference": {
        "publisher": "OpenLogic",
        "offer": "CentOS",
        "sku": "[parameters('centOsVersion')]",
        "version": "latest"
      },
      "scripts": [
        "[variables('routerNodeScript')]"
      ],
      "certificates": "[variables('certificateLocation')]"
    },
    "replicaPrimaryOsSettings": {
      "imageReference": {
        "publisher": "OpenLogic",
        "offer": "CentOS",
        "sku": "[parameters('centOsVersion')]",
        "version": "latest"
      },
      "scripts": [
        "[variables('replicaPrimaryNodeScript')]"
      ],
      "certificates": "[variables('certificateLocation')]"
    },
    "replicaSecondaryOsSettings": {
      "imageReference": {
        "publisher": "OpenLogic",
        "offer": "CentOS",
        "sku": "[parameters('centOsVersion')]",
        "version": "latest"
      },
      "scripts": [
        "[variables('replicaSecondaryNodeScript')]"
      ],
      "certificates": "[variables('certificateLocation')]"
    }
  },
  "resources": [
    {
      "name": "shared",
      "type": "Microsoft.Resources/deployments",
      "apiVersion": "2019-07-01",
      "properties": {
        "mode": "Incremental",
        "templateLink": {
          "uri": "[variables('sharedTemplateUrl')]",
          "contentVersion": "1.0.0.0"
        },
        "parameters": {
          "networkSettings": {
            "value": "[variables('networkSettings')]"
          },
          "namespace": {
            "value": "[variables('namespace')]"
          },
          "location": {
            "value": "[parameters('location')]"
          }
        }
      }
    },
    {
      "name": "[concat('configSecondaryNode', copyIndex(1))]",
      "type": "Microsoft.Resources/deployments",
      "apiVersion": "2019-07-01",
      "dependsOn": [
        "[concat('Microsoft.Resources/deployments/', 'shared')]"
      ],
      "copy": {
        "name": "secondaryconfigcopy",
        "count": 2,
        "mode": "serial",
        "batchSize": 1
      },
      "properties": {
        "mode": "Incremental",
        "templateLink": {
          "uri": "[variables('configSecondaryTemplateUrl')]",
          "contentVersion": "1.0.0.0"
        },
        "parameters": {
          "adminUsername": {
            "value": "[parameters('adminUsername')]"
          },
          "namespace": {
            "value": "[variables('namespace')]"
          },
          "vmbasename": {
            "value": "[concat('configSecondary', copyIndex(1))]"
          },
          "subnet": {
            "value": "[variables('networkSettings').subnet.dse]"
          },
          "vmSize": {
            "value": "[parameters('configNodeVmSize')]"
          },
          "sizeOfDataDiskInGB": {
            "value": "[parameters('sizeOfDataDiskInGB')]"
          },
          "numDataDisks": {
            "value": "[parameters('numDataDisks')]"
          },
          "staticIp": {
            "value": "[variables('networkSettings').statics[concat('configSecondaryIp', copyIndex(1))]]"
          },
          "osSettings": {
            "value": "[variables('configSecondaryOsSettings')]"
          },
          "authenticationType": {
            "value": "[parameters('authenticationType')]"
          },
          "adminPasswordOrKey": {
            "value": "[parameters('adminPasswordOrKey')]"
          },
          "location": {
            "value": "[parameters('location')]"
          }
        }
      }
    },
    {
      "name": "configPrimaryNode",
      "type": "Microsoft.Resources/deployments",
      "apiVersion": "2019-07-01",
      "dependsOn": [
        "[concat('Microsoft.Resources/deployments/', 'shared')]",
        "secondaryconfigcopy"
      ],
      "properties": {
        "mode": "Incremental",
        "templateLink": {
          "uri": "[variables('configPrimaryTemplateUrl')]",
          "contentVersion": "1.0.0.0"
        },
        "parameters": {
          "adminUsername": {
            "value": "[parameters('adminUsername')]"
          },
          "mongoAdminUsername": {
            "value": "[parameters('mongoAdminUsername')]"
          },
          "mongoAdminPassword": {
            "value": "[parameters('mongoAdminPassword')]"
          },
          "namespace": {
            "value": "[variables('namespace')]"
          },
          "vmbasename": {
            "value": "configPrimary"
          },
          "sizeOfDataDiskInGB": {
            "value": "[parameters('sizeOfDataDiskInGB')]"
          },
          "numDataDisks": {
            "value": "[parameters('numDataDisks')]"
          },
          "subnet": {
            "value": "[variables('networkSettings').subnet.dse]"
          },
          "staticIp": {
            "value": "[variables('networkSettings').statics.configPrimaryIp]"
          },
          "vmSize": {
            "value": "[parameters('configNodeVmSize')]"
          },
          "osSettings": {
            "value": "[variables('configPrimaryOsSettings')]"
          },
          "authenticationType": {
            "value": "[parameters('authenticationType')]"
          },
          "adminPasswordOrKey": {
            "value": "[parameters('adminPasswordOrKey')]"
          },
          "location": {
            "value": "[parameters('location')]"
          }
        }
      }
    },
    {
      "name": "[concat('ReplicaSecondaryNode', copyIndex(1))]",
      "type": "Microsoft.Resources/deployments",
      "apiVersion": "2019-07-01",
      "dependsOn": [
        "[concat('Microsoft.Resources/deployments/', 'shared')]"
      ],
      "copy": {
        "name": "secondaryreplicacopy",
        "count": 3,
        "mode": "serial",
        "batchSize": 1
      },
      "properties": {
        "mode": "Incremental",
        "templateLink": {
          "uri": "[variables('replicaSecondaryTemplateUrl')]",
          "contentVersion": "1.0.0.0"
        },
        "parameters": {
          "adminUsername": {
            "value": "[parameters('adminUsername')]"
          },
          "replSetName": {
            "value": "repset1"
          },
          "namespace": {
            "value": "[variables('namespace')]"
          },
          "vmbasename": {
            "value": "[concat('ReplicaSecondary', copyIndex(1))]"
          },
          "sizeOfDataDiskInGB": {
            "value": "[parameters('sizeOfDataDiskInGB')]"
          },
          "numDataDisks": {
            "value": "[parameters('numDataDisks')]"
          },
          "subnet": {
            "value": "[variables('networkSettings').subnet.dse]"
          },
          "vmSize": {
            "value": "[parameters('replicaNodeVmSize')]"
          },
          "osSettings": {
            "value": "[variables('replicaSecondaryOsSettings')]"
          },
          "authenticationType": {
            "value": "[parameters('authenticationType')]"
          },
          "adminPasswordOrKey": {
            "value": "[parameters('adminPasswordOrKey')]"
          },
          "location": {
            "value": "[parameters('location')]"
          }
        }
      }
    },
    {
      "name": "ReplicaPrimaryNode",
      "type": "Microsoft.Resources/deployments",
      "apiVersion": "2019-07-01",
      "dependsOn": [
        "[concat('Microsoft.Resources/deployments/', 'shared')]",
        "secondaryreplicacopy"
      ],
      "properties": {
        "mode": "Incremental",
        "templateLink": {
          "uri": "[variables('replicaPrimaryTemplateUrl')]",
          "contentVersion": "1.0.0.0"
        },
        "parameters": {
          "adminUsername": {
            "value": "[parameters('adminUsername')]"
          },
          "mongoAdminUsername": {
            "value": "[parameters('mongoAdminUsername')]"
          },
          "mongoAdminPassword": {
            "value": "[parameters('mongoAdminPassword')]"
          },
          "replSetName": {
            "value": "repset1"
          },
          "namespace": {
            "value": "[variables('namespace')]"
          },
          "vmbasename": {
            "value": "ReplicaPrimary"
          },
          "subnet": {
            "value": "[variables('networkSettings').subnet.dse]"
          },
          "vmSize": {
            "value": "[parameters('replicaNodeVmSize')]"
          },
          "sizeOfDataDiskInGB": {
            "value": "[parameters('sizeOfDataDiskInGB')]"
          },
          "numDataDisks": {
            "value": "[parameters('numDataDisks')]"
          },
          "staticIp": {
            "value": "[variables('networkSettings').statics.replicaPrimaryIp]"
          },
          "osSettings": {
            "value": "[variables('replicaPrimaryOsSettings')]"
          },
          "authenticationType": {
            "value": "[parameters('authenticationType')]"
          },
          "adminPasswordOrKey": {
            "value": "[parameters('adminPasswordOrKey')]"
          },
          "location": {
            "value": "[parameters('location')]"
          }
        }
      }
    },
    {
      "name": "routerNode",
      "type": "Microsoft.Resources/deployments",
      "apiVersion": "2019-07-01",
      "dependsOn": [
        "[concat('Microsoft.Resources/deployments/', 'shared')]",
        "[concat('Microsoft.Resources/deployments/', 'configPrimaryNode')]",
        "[concat('Microsoft.Resources/deployments/', 'ReplicaPrimaryNode')]"
      ],
      "properties": {
        "mode": "Incremental",
        "templateLink": {
          "uri": "[variables('routerTemplateUrl')]",
          "contentVersion": "1.0.0.0"
        },
        "parameters": {
          "adminUsername": {
            "value": "[parameters('adminUsername')]"
          },
          "mongoAdminUsername": {
            "value": "[parameters('mongoAdminUsername')]"
          },
          "mongoAdminPassword": {
            "value": "[parameters('mongoAdminPassword')]"
          },
          "namespace": {
            "value": "[variables('namespace')]"
          },
          "vmbasename": {
            "value": "router"
          },
          "subnet": {
            "value": "[variables('networkSettings').subnet.dse]"
          },
          "vmSize": {
            "value": "[parameters('routerNodeVmSize')]"
          },
          "dnsname": {
            "value": "[parameters('dnsNamePrefix')]"
          },
          "staticIp": {
            "value": "[variables('networkSettings').statics.routerIp]"
          },
          "osSettings": {
            "value": "[variables('routerOsSettings')]"
          },
          "authenticationType": {
            "value": "[parameters('authenticationType')]"
          },
          "adminPasswordOrKey": {
            "value": "[parameters('adminPasswordOrKey')]"
          },
          "location": {
            "value": "[parameters('location')]"
          }
        }
      }
    }
  ],
  "outputs": {}
}

{'fraction_non_alphanumeric': 0.1712196689699502, 'fraction_numerical': 0.012319888585355402, 'mean_word_length': 2.164590219510128, 'pattern_counts': {'":': 724, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 28, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5620105', 'n_tokens_mistral': 10831, 'n_tokens_neox': 10450, 'n_words': 1737}